On Apr 8, 2010, at 4:46 AM, Gideon King wrote:

> So I need to know where in the process I need to intercept the original file 
> open request and do the conversion, and forward the request to open the 
> converted file.


It depends on your interface. If you're offering the ability to simply "open" 
this type of document using the normal mechanisms like the Open menu item, or 
dragging the file onto the application icon, then you would add the document 
type to Info.plist. In the normal file reading methods, you would read from the 
file and convert it to your format, and set the url to nil etc.

Here's an example:
http://www.sethwillits.com/temp/DocChangeTest.zip


If you want a separate import process like using File -> Import, which does an 
open dialog, pick a file and it creates an untitled document, you'd just stick 
all of that in a normal top-level controller that does the reading, creates a 
new document of your native type, and sets the data on that document.


--
Seth Willits


_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to