Re: Cocoa patterns?
Re: Cocoa patterns?
- Subject: Re: Cocoa patterns?
- From: "David P. Henderson" <email@hidden>
- Date: Sun, 26 Aug 2001 20:30:46 -0400
On Sunday, August 26, 2001, at 08:09 , brian hook wrote:
>
This may be a case of necessitating "unlearning" the crap that MFC and
>
AppWizard on Win32 kind of teach people. I had assumed that since IB
>
generates files for me that any radical changes done to a UI via IB
>
would require new source file generation, thus destroying existing
>
source. I've been also assuming that the MVC paradigm minimizes a lot
>
of this damage by isolating the damage to the "V" part, which ideally
>
should be trivial to re-implement since the real work happens in the
>
"M" part. Does this sound right?
>
Not quite. Currently, IB will overwrite any existing files if you use
the create command, but you have 2 alternate methods of adding new
outlets/actions to a nib.
1) Add all outlets and actions in your source files; then, read the
saved header file into your nib by either using the Read File command or
by dragging the header on to your nib file's window. This method also
works for adding objects to a nib initially.
2) Add all outlets and actions in your source files and in your nibs
manually. In other words, type them in both places. This is more work
than the first method and prone to errors in typing.
Also you should, in general, think of the nib file as the V portion of
the MVC model. While a nib's owner or its delegate generally serve as
the C in MVC.
Dave
--
Chaos Assembly Werks
"The Trend over the last 20 years or so has been to design computer
languages that enforce a state of paranoia. You're expected to program
every module as if it were in a state of siege In Perl culture, by
contrast, you're expected to stay out of someone's home because you
weren't invited in, not because there are bars on the windows."
from Programming Perl