Re: Can't add/edit subviews to NSView subclass via IBPlugin
Re: Can't add/edit subviews to NSView subclass via IBPlugin
- Subject: Re: Can't add/edit subviews to NSView subclass via IBPlugin
- From: Ricky Sharp <email@hidden>
- Date: Fri, 23 Nov 2007 14:36:53 -0600
On Nov 23, 2007, at 2:18 PM, Gabriele de Simone wrote:
I've created an IB 3 equivalent of an old IB 2.x palette for a
simple NSView subclass. The only difference in this class and NSView
is that it draws a gradient background in its drawRect: method. The
goal is to use it as a "prettier" container for additional subviews.
On the surface, the plug-in works great and the Cocoa bindings
integration is spectacular, but...
- Contrary to IB 2, the new version won't let me drag subviews
inside my custom view. Even if I double click the custom view to
"focus" its contents, every control I drag over it is added as a
sibling rather than child.
- If I open a nib file created with IB 2 which contains one of these
custom views, IB 3 will display any children (subviews) embedded in
it, but won't let me move them or drag them out.
When moving from IB 2.x to 3.x, there are API changes. Container
views must now at least implement ibDesignableContentView. I cover
this in my sample code MyIBPlugIn.
Is there a specific flag/method that needs to be implemented to
restore the above functionality?
A slightly less annoying limitation is the following: IB 3 remembers
that this NIB file required a custom palette. Although palettes
don't exist anymore, and IB 3 works with instances of the same view
via the new IBplugin, it keeps throwing an error message saying that
the old palette is required. Any way to kill this warning? No amount
of re-saving the NIB did the trick...
This has already come up as well. Two options here. If you must keep
the nibs in 2.x format, you'll have to live with this warning
(definitely file a bug/enhancement). Or, save in one of the new 3.x
formats.
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden