On Sep 18, 2009, at 23:28, James wrote:

Thank you for your help. Maybe the question is a bit broad. But it is hard to to break it down for me. I have looked up in the NSWindow and NSPanel class.?
The result is not perfect.
Does anyone can point several key methods for it. Or example would be better.

One simple approach:

1. Implement the action method for your contextual menu item in your application delegate class.

2. Create a window controller subclass that's responsible for loading the info window (defined in a XIB file).

3. Create a singleton object of this window controller subclass when needed. For example, use a class method of the window controller subclass to create the object the first time it is requested, and keep a pointer to the singleton object in a static variable.

#1 requires an understanding of action methods and the responder chain, as well as the application delegation pattern. #2 requires an understanding of XIB/NIB files, File's Owner and window controller architecture. #3 requires an understanding of singleton object patterns, Objective-C class methods and use of static variables as class variables. All of which are straightforward (in this case) and things you need to know for pretty much all Cocoa programming.


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to