Example will not read its own file


#1

I got so frustrated trying to figure what was wrong and just loaded the example from bignerdranch.com. Apparently it suffers from the same malady as the code I entered as when built it will not read its own file. I set the “open with” on the file to ‘RaiseMan’ in hopes that would do the deed, but no luck. The transition from the book to Snow Leopard is killing me.


#2

Hi

I’m having the same problem. But, to expand on the information that jimrogers provided, I can only save my file as a .binary – not .??? as indicated in the book.

I’d appreciate any help you can provide for a work-around.

:slight_smile:

Thanks!

Alex


#3

Hi All,

I’ve actually just figured it out: When I created document-based RaiseMan app, my MyDocument.h file was defined as

But when I changed it to

I was able to save and open files.

Hope this helps!

Alex


#4

I had a similar problem. Whenever I tried to open a saved file it would not open it saying that my application is unable to open file of type “data”. I found that my program was also not appending the file extension at the end of the filename. I downloaded the source code for the fourth edition book and opened the same application in Xcode to see how it was done in Xcode 4.2. This should work for other examples as well. Here is the solution to this example:

  1. Go to the RaiseMan target (the place where you can modify the application plist) and select the info tab.
  2. Click the Add button at the bottom of the window and select ‘Add exported UTI’.
  3. Modify the new exported UTI so that is has at least the following field values:
    ______Description: RaiseMan Doc
    ______Identifier: com.bignerdranch.raiseman-doc
    ______Conforms To: public.data
    ______Extensions: rsmn

#5

OK, I’m having the same problem, and none of the suggested solutions is helping.

I can write files with the correct extension, but cannot read them. Also, the icon is not correct, even though it IS specified in both the document type and exported UTI.

so I am stymied!