Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] setDelegate for NSApplication

Title: setDelegate for NSApplication

Dear All,

I’m quite new to SWT Cocoa Port.

I would like to know how to set a delegate for the org.eclipse.swt.internal.cocoa.NSApplication class.

I see that the class has a method setDelegate and I try to invoke it , but the delegate don’t receive any callback, like for example:

applicationDidBecomeActive

or

applicationShouldTerminate

My delegate extends NSObject and implements the two above methods.

MDSwtDelegate controller = new MDSwtDelegate();

org.eclipse.swt.internal.cocoa.NSApplication application = org.eclipse.swt.internal.cocoa.NSApplication.sharedApplication();

application.setDelegate(controller);

Any suggestion it’s very appreciate.

Thanks in advance,

Roberto


Back to the top