How can I change subclasses in InterfaceBuilder easily with a custom classInspector ?
How can I change subclasses in InterfaceBuilder easily with a custom classInspector ?
- Subject: How can I change subclasses in InterfaceBuilder easily with a custom classInspector ?
- From: Nat! <email@hidden>
- Date: Fri, 21 Jul 2006 00:50:46 +0200
The short question is how can I inherit the custom NSObject
classInspector (Apple-5) in InterfaceBuilder, when I have created my
own inspector in a palette for a subclass of NSObject. Is there a
special value that I can return for - (NSString *)
classInspectorClassName; ?
=======================
Here's the long version:
What works.
Create an empty IB project.
Subclass "foo" from "NSObject".
Subclass "bar" from "foo".
Instantiate "foo".
When I inspect the instantiated "foo" object, I get with Apple-5 a
"xxx (Custom) Inspector" a list of possible subclasses including
"bar". (I also get a lot of other classes - probably a bug.)
I can now change the subclass.
What does not work.
I create with Xcode a new "Standard Apple Plug-ins" project of type
"IBPalette" named "foo".
Change superclass of "foo" in Framework/foo.h to NSObject and save it
Open Palette/Resources/fooPalette.nib in IB.
Navigate Classes to NSObject/NSResponder/NSView/foo and delete foo
Drag foo.h into IB from Xcode.
Save fooPalette.nib.
Quit Interfacebuilder.
Build palette. And drop Framework and Palette into Library/Frameworks
and Library/Developer/Palettes.
Load the palette in IB, "Tools/Palettes/Customize Toolbar" add "foo"
palette.
Create an empty IB project.
Subclass "bar" from "foo". (check: foo must be present and directly
subclassed from NSObject)
Instantiate "foo".
When I inspect the instantiated "foo" object, I get with Apple-5 a
"foo Inspector" "Not Applicable"
I can not change the subclass.
---------------------------------------------------
Why should I have to work for everything ?!
It's like saying I don't deserve it. -- Watterson
_______________________________________________
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