Re: How to read a text file over a network

2010-12-14 Thread Dave Zwerdling
You should check out NSFileManager to see if you can simplify your read methods - specifically the contentsAtPath: method. Then decode the data from the file using the appropriate encoding. Once you've figured out what the URI for the file is, you can use NSFileManager again to fetch it, using

Re: respondsToSelector warning: may not respond

2010-11-26 Thread Dave Zwerdling
I always take the protocol route. You can implement other methods and do a single cast to NSObject nameOfProtocol* (or idnameOfProtocol if you don't need the NSObject methods) and then just pass around that. All you have to check for in instantiation is that it passes implementsProtocol: and

Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-22 Thread Dave Zwerdling
Hello again; Well, I ran some debugging and I determined that ALL I needed was an initial save. After that, all the core data stores are up-to-date, and faults result in actual fetched data. So, although kind of kludgy, I accepted the Initial Save behavior à la Garageband, where the user is

Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-21 Thread Dave Zwerdling
Hi everyone, Here's the context: I have a Core-Data document-based application. There is an importer which creates new data to be imported into the document. When the user specifies, particular entities are then moved into the document's MOC. Because the imported can run prior to a

Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-21 Thread Dave Zwerdling
On Nov 21, 2010, at 11:37 AM, vincent habchi wrote: Le 21 nov. 2010 à 20:09, Dave Zwerdling a écrit : The issue lies in this: I have a background-thread reader of entities. Because it is multithreaded, it uses a separate MOC for the entities to be read. These MOCs have their persistent

Re: Loading NSManagedObjects across NSManagedObjectContexts in an unsaved NSPersistentDocument

2010-11-21 Thread Dave Zwerdling
On Nov 21, 2010, at 2:47 PM, Kyle Sluder wrote: On Sun, Nov 21, 2010 at 2:32 PM, Dave Zwerdling zwerd...@gmail.com wrote: On Nov 21, 2010, at 11:37 AM, vincent habchi wrote: Le 21 nov. 2010 à 20:09, Dave Zwerdling a écrit : The issue lies in this: I have a background-thread reader