Re: drag and drop: NSView vs. NSImageView
Re: drag and drop: NSView vs. NSImageView
- Subject: Re: drag and drop: NSView vs. NSImageView
- From: "Louis C. Sacha" <email@hidden>
- Date: Fri, 5 Mar 2004 19:00:30 -0800
Hello...
If you want initWithFrame: to be called, you should continue to use
the "Custom View" NSView placeholder in InterfaceBuilder.
You don't have to change your nib to use an NSImageView and then set
the custom class to PCFolderDrop... if you leave the object in your
nib as an NSView instance with the custom class set to your subclass
everything will still work correctly. The only difference is that you
won't be able to change any of the settings of an NSImageView in the
IB inspector, you will have to set them in your code.
Essentially, you will have to choose between (1) being able to use
the normal designated initializer for your view subclass, or (2)
being able to change settings for your superclass in the
InterfaceBuilder inspector.
Hope that helps,
Louis
On 5. Mar 2004, at 16:27, Michael Becker wrote:
Even my initWithFrame: method doesn't get called.
[...]
And of course I changed the NIB. (I deleted the old NSView, put in
an NSImageView, then configured it to be of the custom class
PCFolderDrop).
What am I missing here?
The Interface Builder documentation :)
IB will place the actual NSImageView in the Nib file with
instructions about it should be swapped with an implementation of
your subclass when the Nib is read -- the reason it does not put
your class is, that it does not have the source for your class when
the Nib is saved.
You can implement awakeFromNib to do your initialization.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.