Re: can't open inputStream for plist

From: Guillaume Polet (guillaume.pole..enali.be)
Date: Mon Apr 24 2006 - 08:17:12 EDT

  • Next message: David Haggerty: "RE: CVS migration note"

    Have you added the correct patterns to the patternset files located
    within the woproject directory. If not try adding those:

    **/*.txt
    **/*.plist

    (under Windows it seems that you also need to add *.txt and *.plist
    otherwise resources located at the root folder of your project will not
    be included in your build.

    Guillaume

    Alexander Trofimchouk a écrit :
    > Hello,list.
    > I use Eclipse 3.2
    > I try to execute this code:
    > application.java
    > public NSDictionary imageMap() {
    > if (imageMap == null) {
    > InputStream inputStream = resourceManager()
    > .inputStreamForResourceNamed("Resources/imagelist", null, null);
    > NSLog.out.appendln(inputStream.toString());
    > try {
    > NSData mapData = new NSData(inputStream, inputStream.available());
    > imageMap = (NSDictionary)
    > NSPropertyListSerialization.propertyListFromData(mapData,null);
    > } catch (Exception exception) {
    > NSLog.out.appendln("Application: failed to read in image map");
    > }
    > }
    > return imageMap;
    > }
    > but I get NullPointerException for inputStream.
    > file placed into "Resources" folder of the project, which works well
    > (e.g. gif images for buttons)
    > also when I try to open stream for "add.gif" it works! But when I've
    > renamed it to add.txt or add.plist, it again give me NullPointerException.
    > What is wrong?
    > Thanks in advance.



    This archive was generated by hypermail 2.0.0 : Mon Apr 24 2006 - 08:17:24 EDT