Re: Interface Builder Palettes Collide
Re: Interface Builder Palettes Collide
- Subject: Re: Interface Builder Palettes Collide
- From: "John C. Randolph" <email@hidden>
- Date: Tue, 3 Jun 2003 18:59:19 -0700
On Tuesday, June 3, 2003, at 06:05 PM, Daniel Jalkut wrote:
If two palettes in Interface Builder implement the same class, does
Interface Builder do anything to keep the palettes' namespaces
separate?
No, it does not. If you load the same class twice (or to be precise,
load two classes with the same name), the behavior is undefined.
I'm asking because I'm getting funky behavior that I believe is
caused by my having two custom palettes - one that implements a custom
control inspector/palette, and another that implements a more complex
view that *contains* an instance of the custom control.
To make these palettes "stand-alone", I just compile in the custom
control class code to each palette. I suspect that Interface Builder
is getting confused, and when the time comes to ask the custom view
who its inspector is, it's asking the wrong implementation. Shouldn't
IB be able to limit its querying of classes to the class definition
for the particular palette? Or is this asking too much of the ObjC
runtime?
I suppose I may have to create a Framework containing the control's
class, and have both palettes link against that?
That could work.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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.