[Openmcl-devel] Problem with Interface Builder bindings
mevins at mac.com
Mon Mar 3 09:53:59 EST 2008
On Mar 3, 2008, at 4:25 AM, Didier Verna wrote:
> Kevin Reid <kpreid at mac.com> wrote:
>> On Feb 28, 2008, at 10:57, Didier Verna wrote:
>>> [ BTW, in order to let IB know that the class of the File's Owner
>>> is a
>>> subclass of NSView, I had to write a fake .h file with an
>>> definition and have IB read it. Not sure if it's the way to go... ]
>> In IB's class browser, you can right-click on NSView and choose to
>> subclass it; then use the inspector to add the actions and outlets.
>> In general, the effects of reading an .h file can be reproduced
>> manually; particularly, IB also supports generating the .h and .m
>> from your interactive definition.
>> (I haven't used IB in a while; the interface may have changed
>> somewhat. There may also be a way to specify the superclass of a
>> class after creating it.)
> I dug a bit more into this, and it seems that the new IB 3 doesn't
> have this feature anymore. This is a general complaint about it that
> I've encountered on several forums. This is because IB3 can
> with XCode automatically so you're not supposed to subclass manually
> anymore... unless when you're not using XCode dammit !
> Some people answer that it is not a problem because you can now also
> type in any class name whatsoever; even ones that are not known to IB.
> This is true, but still a pain, because when IB knows about
> it is able to present you with interesting outlets and actions
> which doesn't work with an unknown class :-(
That is true, and it's a pain. I don't know why Apple thought the new
InterfaceBuilder design was an improvement.
You can, however, work around it: in addition to typing in whatever
class name you like, you can also add the names of whatever actions
and outlets you like.
More information about the Openmcl-devel