Re: how to instantiate MyDocument with file from open panel?
Re: how to instantiate MyDocument with file from open panel?
- Subject: Re: how to instantiate MyDocument with file from open panel?
- From: Jens Miltner <email@hidden>
- Date: Fri, 7 Dec 2007 14:46:02 +0100
On 06.12.2007, at 20:59, Nathaniel Gottlieb-Graham wrote:
I've run an open panel and called the openPanelDidEnd: selector, and
I have the file the user has chosen in an array. Now I'm a little
stuck because I want to do something with that file; I want a new
MyDocument instance to be created and load the data from the file
into a QTMovieView I've set up in IB. I'm unsure how to do this, in
particular instantiating MyDocument. Googling for it indicates very
few hits, so I'm probably approaching the problem the wrong way.
Thanks for the help, all.
you'll need to specify the file-type -> class mapping in the Info.plist.
The easiest way is to go to your application target's "Properties"
pane and define a new Document Type there. Once you've associated the
document type with your MyDocument class, AppKit will instantiate your
class when an appropriate document is opened.
HTH,
</jum>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden