Re: NSView Names
Re: NSView Names
- Subject: Re: NSView Names
- From: email@hidden
- Date: Thu, 28 Feb 2002 11:59:24 -0800
As a REALbasic user who is switching to Cocoa, I like almost everything
about Cocoa better than REALbasic. This is the rare exception. In
REALbasic
every object in the "physical" part of the IDE (the equivalent of IB)
has a
global name, and this name is accessible from the "code" part (the
equivalent of PB). In other words, it works more like AppleScript
Studio.
This business of shuttling back and forth between PB and IB drawing
connections and inserting outlet accessors drives me nuts; because of
it,
it takes much longer to write a simple Cocoa app than the equivalent
simple
REALbasic app, as audience members saw when I demonstrated both in my
talk
at Macworld Expo last month. It would be great to have an easier way to
close the gap between PB code and IB names. Perhaps this could be an
NSBundle method, e.g. objectWithName:nibNamed: or something. m.
Interesting. It sounds like you would perhaps be equally well-served
(or better served) by a facility in IB that let you say "this object is
the default target for outlets and actions". You would typically set
that to be your file's owner or the app delegate you instantiated in
your nib -- whatever you're hooking most things up to. Then for any
given UI element like an NSButton, you could very quickly say "I want
this to be connected to an outlet named fooButton and an action named
fooButtonChanged:." IB would create the outlet and action on the
"default target", both in the nib and by inserting code into your .h and
.m for you, and would make the necessary connections for you.
I believe all the technology needed to do this already more or less
exists -- the EOProject framework written for WebObjects Builder is
capable of doing the code insertion into the .h and .m, I think. (It
would be great to see IB using EOProject in general, it would make the
user experience much more tightly integrated with PB). This would
indeed greatly accelerate nib development, but without muddying the
waters with new API like objectWithName:nibNamed:.
Opinions? I was once not a big fan of code insertion by design tools
like IB -- I like to be in charge of writing the code myself. But
EOProject did this so well in WebObjects Builder that I became a
convert. It would work beautifully for IB.
Ben Haller
Stick Software
_______________________________________________
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.