Re: Making an object accessible by both MyDocument AND a custom class
Re: Making an object accessible by both MyDocument AND a custom class
- Subject: Re: Making an object accessible by both MyDocument AND a custom class
- From: James DiPalma <email@hidden>
- Date: Wed, 25 Sep 2002 12:59:09 -0400
You could make sure that MyCustomObject was the delegate of NSApp. The
easiest way to accomplish this would be to connect them in
MainMenu.nib... File's Owner -> MyCustomObject. Then you could message
MyCustomObject from most any object by sending messages to nil. The
messages would go up the responder chain and end up at your single
instance of MyCustomObject.
[nil tellMyCustomObjectToDoSomething];
NO! sending a message to nil will do nothing.
Look at NSApplication and documentation for its method
-sendAction:to:from: it gives a brief description of how the responder
chain is used when sending actions.
-jim
P.S. I respect that people are trying to do what is right by
participating and answering questions, but this post contains enough
information to sound like it might be correct, but is in fact very
misleading.
_______________________________________________
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.