NALib icon indicating copy to clipboard operation
NALib copied to clipboard

Solve Cocoa AppDelegate problem

Open Manderby opened this issue 4 years ago • 1 comments

After the postStartup, the NSApplication sets its application delegate in naStartApplication to the default. Desired would be to the delegate class of NALib to capture more notifications. This interfered with some other mechanisms though (don't quite remember now).

Please have a look at the following comments removed from naStartApplication to get back in the mood:

  //[NSApp setDelegate:(NA_COCOA_BRIDGE id)naGetUIElementNativePtr(app)];
  
//  SEL selector = @selector(doSomethingWithObject:afterDelay:);
//  IMP newImp = (IMP)swizzledDoSometingWithObjectAfterDelay;
//  Method method = class_getClassMethod([MyClass class], selector);
//  const char * encoding = method_getTypeEncoding(method);
//  class_replaceMethod([MyClass class], selector, newIMP, encoding);

Manderby avatar Nov 04 '20 14:11 Manderby

Note that there has been some development in starting up an application. It has become much more stable and maybe now it is possible to use the delegates properly. It has been an unresolved issue though and it is still not clear what is needed when.

Manderby avatar Oct 15 '23 18:10 Manderby