• 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
Cocoa/Java - NSNotification not received.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Cocoa/Java - NSNotification not received.


  • Subject: Cocoa/Java - NSNotification not received.
  • From: Rams <email@hidden>
  • Date: Thu, 6 Mar 2003 23:20:19 -0500

I am trying to receive notifications from a window without setting my object as the window's delegate. My code looks something like this...

public MyClass {

public NSSelector didMiniSelector
= new NSSelector("didMini", new Class[] {NSNotification.class});
...
public void awakeFromNib() {

// Waking code ending with...
NSNotificationCenter.defaultCenter().addObserver(this,
didMiniSelector,
"WindowDidMiniaturizeNotification",
null);
}
...
public void didMini(NSNotification aNotification) {
System.out.println("didMini");
}
}

The problem is, I get no notifications. Does anyone have any insight? I'm looking at http://developer.apple.com/techpubs/macosx/Cocoa/TasksAndConcepts/ ProgrammingTopics/Notifications/Tasks/Threading.html and wondering if this is my problem. If so, what is the best way for me, in java, to reference kCFRunLoopCommonModes?

--
"NT 5.0 is the last nail in the Unix coffin. Interestingly, Unix isn't in the coffin... It's wondering what the heck is sealing itself into a wooden box 6 feet underground..." --Jason McMullan


--
"NT 5.0 is the last nail in the Unix coffin. Interestingly, Unix isn't in the coffin... It's wondering what the heck is sealing itself into a wooden box 6 feet underground..." --Jason McMullan _______________________________________________
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.
  • Follow-Ups:
    • Re: Cocoa/Java - NSNotification not received.
      • From: email@hidden
  • Prev by Date: Re: How to get the current classic Sytem folder path?
  • Next by Date: Re: Intercepting every keystroke
  • Previous by thread: Sheets behaving funny
  • Next by thread: Re: Cocoa/Java - NSNotification not received.
  • Index(es):
    • Date
    • Thread