Re: "Tricks" of the "Trade"
Re: "Tricks" of the "Trade"
- Subject: Re: "Tricks" of the "Trade"
- From: Charles Bennett <email@hidden>
- Date: Fri, 08 Jun 2001 13:57:21 -0400
>
I know about that, however the problem is, when you don't have a single
>
nib anymore, then the whole thing starts to break up in my mind, because
>
the classes no longer know about each other through IB connections, how
>
do you get around that? Notifications seem like a rather ungainly
>
approach.
>
>
Erik
Nibs.. ahh Files Owner.. Whoever is was at NeXT came up with this idea
did a great thing. Rates right up there with FirstResponder. (though I've
always thought the "1" icon should be a 0 (for nil) )
It is so simple and yet so powerful. Was it J. Hurlot?
It is something about OS X programming they you really do want to learn.
Go to
http://www.powerguardian.com/osx and grab my ExampleMDI.tar.gz
it shows you how to load a nib 'n' times and communicate with objects
in that nib from your "main" nib and controller. It's not an example of programming
style but a quickie example..
The program isn't supposed to do anything other than be an example and was the
result of answering this question in another thread.
The specific example was loading a nib multiple times and having hooks to the
objects inside, but the idea of getting a hook to an object in a different nib
is the same.
Look at the comments in MyMainController.m
For those that miss the old NeXT sndplay to play sounds from the command line
there is a very trivial version there with source. drop it in your path somewhere.
(It's really a 1 minute program for anyone to write, but perhaps it'll save you a minute..)
chuck
--
"I have great motivational skills. Everyones always saying how much harder they have to work when I'm around!"
-Homer S