Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)



Hi all,

I have two nib files in my Java/Cocoa project.
I need to get a programmatic instance of an "instantiated" Controller in my
MainMenu.nib file from a Controller class in another nib file
Both nib files are loaded.
I don't want to make the method I need to access in my main Controller
"public static".

Something like,

<start_wild_guess>

(MyMainController) mainController =
NSUnknownClass.getInstanceFromNib("MainMenu.nib", "MyMainController");
result = mainController.wantedMethod();

Does this make sense? Is there an easier way or am I missing something
obvious?
(I've checked as much documentation as I can).

</end_wild_guess>

Any help would be appreciated.


Thanks

Mark Orchard




Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.