Cocoa/Java - NSNotification not received.
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.