Re: Alternative to Interface Builder?
Re: Alternative to Interface Builder?
- Subject: Re: Alternative to Interface Builder?
- From: "Dennis C.De Mars" <email@hidden>
- Date: Mon, 16 Jun 2003 21:31:04 -0700
On Monday, June 16, 2003, at 06:05 PM, Danny Swarzman wrote:
Brilliant and brillianter. Gee, I didn't know.
In the old days of ResEdit, if I wanted to put a text box into a
window, I
just had to drag one thing and label it. That was all the mouse work.
Now, I do that. Next I add an outlet in another window. Then I click
in the
main nib window to get the right display, make sure that I have my
destination pane on the screen and not covered, and option drag from
the
nib window into my pane. Then I scroll in the info window to the new
outlet
that I created and click connect.
This still seems like less work (and less error prone) to me than
writing the source code needed to define the constant you would define
in ResEdit and then the code needed to load the resource and then the
code needed to get the specific control and put a reference to it into
a variable...plus, with IB you don't necessarily need the step where
you add the outlet in IB (see below).
What I miss is the ability to get all the information about a window
in one
place where I can see it all without interacting with the computer. I
admit
that when you had to give things numbers instead of name it was a
little
tedious to need to add a line to a header file. But with Cocoa, you
still
need to coordinate the thing with a header file - just use names
instead of
numbers.
Well, if you define the outlet name in your header first, then you
don't need to define it in the nib file also; you can just drag the
file (just the icon representing the file in Project Builder will do)
into the IB window and it will define all of those outlets for you. You
can add more outlets to the header later and drag to the IB window
again and it will update your nib file to add your new outlets. (From
your previous postings, I would surmise you will still object because
it involves dragging rather than typing, but I personally find it
easier and less error-prone).
I've done my time with ResEdit, and rez files in MPW, and the
equivalent with the CodeWarrior tools. Having done things both ways, I
can't understand why you would want to revert to the ResEdit style; but
if you do, why don't you just use the "tag" fields? Practically every
IB object has a "tag" which you can set to whatever number you want
(just pretend it is a resID) and then in your program you can use
"viewWithTag" to retrieve it from the view hierarchy. This at least
would free you from all that control-dragging; you can substitute a
call to viewWithTag for every connection to an outlet, which is
apparently what you want to do. You'll also lose any kind of type
checking, which is also a ResEdit feature.
I realize that some people are more comfortable with a mouse than I
am. But
why does this have to be one size fits all?
Thanks, Hasan, for the tip about Renaissance. I'll check that out.
I sympathize, to a certain extent, with the desire to have all
components of an application defined in a human-readable format. On the
other hand, I personally (meaning this is just my personal take on it)
came to the conclusion, in the old days, that having a Rez file
(human-readable) as opposed to a resource file (non-human-readable) of
everything was more of a security blanket type of thing; that is, it
have me a warm fuzzy feeling to have the text version, but if I really
needed to take a look at my GUI elements I invariably used ResEdit or
the applicable GUI editor. I never really made much use of the Rez
files. (I go on about the Rez files because your comment above about
seeing all information about a window without interacting with the
computer makes it sound like you would like some sore of Rez-type
representation for nib files).
As for "why does this have to be one size fits all," I don't think
most of us would have an objections to Apple providing an alternative
text representation, but Apple has to balance the effort required to
provide a complete facility of this type (complete meaning that all
Cocoa objects and object graphs that IB can handle could be represented
equivalently, and that the representation would be extensible to future
possible Cocoa object) against the number of developers who would
actually use it.
Having said all that, this Renaissance thing sound like it is exactly
what you are looking for -- and furthermore, you may find the Gnustep
community in general to be more sympathetic to your point of view; they
are mostly users of Linux and other Unix-like systems and tend to be
passionate advocates of text-based development tools. For instance,
Codewarrior for Linux couldn't make any headway until they agreed to
add a facility for generating makefiles from the CW project file. They
like makefiles over IDEs, powerful keyboard-based edtiors like emacs
over heavily GUI-based editors, etc.
- Dennis D.
- Danny Swarzman
At 15:16 -0700 6/16/03, Matt Gemmell wrote:
On Monday, June 16, 2003, at 10:35 pm, Jeff Harrell wrote:
The procedure for connecting a thing to its controller is especially
tedious.
Control-dragging from this box to that box is especially tedious? Or
is there more to the process that I'm blissfully ignorant of?
I've sometimes thought that the control-dragging can be tedious. What
I'd like is a keyboard shortcut which I can trigger when I've selected
an item, which would display an outline view of the Nib (the same as
the outline view in the Instances tab of the Nib's window). This could
either focus into the Instances tab and switch to outline view, or
could just duplicate the outline view in a dialog.
I can then keyboard-navigate through the hierarchy to select my target
object, and press return - which would then focus me into the
inspector, ready to keyboard-navigate to the appropriate target or
outlet, and again press return to make the connection. I'd find that
really handy.
IB is brilliant, no question about it. I've never seen anything else
like it, and it's one of the greatest strengths of the OS X
development
environment for me. Still room for a few improvements here and there
nevertheless. :)
Cheers,
-Matt
--
Matt Gemmell
Scotland Software
http://www.scotlandsoftware.com/
_______________________________________________
_______________________________________________
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.