• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Subject: RE: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
  • From: "Mark Orchard" <email@hidden>
  • Date: Fri, 20 Jul 2001 21:08:55 +1000

Brendan,

Will you please explain the second part of your answer in more detail?

I tried the following from an button's action method in my second nib
(NSPanel dialog that appears above my main window) to try and access a
public method in my MainMenu.nib's "MyMainController" class (i.e. the app.
delegate).


NSBundle appBundle =
NSBundle.bundleForClass(Class.forName("MyMainController"));
Class mainClass = appBundle.principalClass();

The application bundle is returned correctly in appBundle. Unfortunately,
mainClass returns null.

Note,

((MyMainController)NSApplication.sharedApplication().delegate()).wantedMetho
d();

works but only because MyMainController is my app's delegate.


Regards,

Mark

-----Original Message-----

  • Follow-Ups:
    • Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
      • From: Brendan Younger <email@hidden>
References: 
 >Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java) (From: Brendan Younger <email@hidden>)

  • Prev by Date: Re: NSToolBar Implementation
  • Next by Date: Re: NSToolBar Implementation
  • Previous by thread: Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
  • Next by thread: Re: [Help] How to get instance of instantiated Controller in nib from Controller in another nib? (Java)
  • Index(es):
    • Date
    • Thread