Linking a menu item between two different classes
Linking a menu item between two different classes
- Subject: Linking a menu item between two different classes
- From: Marc Weil <email@hidden>
- Date: Fri, 23 May 2003 14:44:55 -0400
Hello,
I have come across a problem that I have been trying for hours to solve, and
I just can't seem to get it. Let me outline what is going on here:
The project I am working on is an InputManager for another, third-party
application to which I only have the class-dump, no actual code. No biggie.
So, I have my principal class and I have another class that is a subclass of
a class in the third-party program, which is a subclass of NSDocument. So, I
have my +load method in the principal class of my InputManager just like I
am supposed to, and this function calls my other functions that insert menu
items, etc. in the main app. Here is where the problem comes in: I am
inserting a new menu item under the File menu (programmatically of course)
which needs to call saveDocument: in the responder chain so my subclass of
the applications's subclass of NSDocument can have it's
-dataRepresentationWithType method called. How in the world do I insert the
menu item from my principal class (which btw is a subclass of NSObject), and
yet have the target and action of that menu item reside in the subclass of
the subclass of NSDocument?? This has got me really stuck!
TIA for any help.
-- Marc Weil
P.S. Sorry for not using any actual class names. This project is kinda
secret and I don't want want to give any clues away as to what it is before
I release it. Thanks for understanding! :-)
Let me know if you need clarification on things.
_______________________________________________
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.