Re: How Do I get informed when -showHelp: has been called?
Thank you all for pointing me to the solution of my question. My first thought was that you could change the target of the menu item so that it calls your own method, then call the original showHelp method with something like: [NSApp showHelp:sender] This is what I did now, using an own -myShowHelp: method which calls [NSApp showHelp:sender], when other things have been prepared. This of course opens the Help Viewer. No need to subclass NSApplication and to override showHelp: at all. - (IBAction)myShowHelp:(id)sender { [... do some stuff]; [NSApp showHelp:sender]; [... do some other stuff]; } ---Ulf Dunkel ___ 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
Re: How Do I get informed when -showHelp: has been called?
On Wed, 29 Jun 2011 16:06:36 +0100, Angus Hardie angus.har...@malcolmhardie.com said: On 29 Jun 2011, at 14:22, Ulf Dunkel wrote: Am 27.06.2011 22:58, schrieb Ulf Dunkel: In a simple app of mine, I use the standard Help menu and MyApp Help menu item, which is bound to -showHelp:. I would like to have my AppDelegate being informed when the Help Viewer has been launched and opened from this menu item. It seems as if the method -showHelp: cannot be overridden. Which other way can I use to receive any information when -showHelp: has been called? My first thought was that you could change the target of the menu item so that it calls your own method, then call the original showHelp method with something like: [NSApp showHelp:sender] I routinely repoint the showHelp: action from the Help menu item so that my own code runs in response. Usually, however, this is because I *don't* want the Help View launched and opened from this menu item. :) m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ A fool + a tool + an autorelease pool = cool! Programming iOS 4! http://www.apeth.net/matt/default.html#iosbook___ 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
Re: How Do I get informed when -showHelp: has been called?
I would really like to get a hint on this. Even a simple not possible would help. Thank you. :-) - - - - - Am 27.06.2011 22:58, schrieb Ulf Dunkel: In a simple app of mine, I use the standard Help menu and MyApp Help menu item, which is bound to -showHelp:. I would like to have my AppDelegate being informed when the Help Viewer has been launched and opened from this menu item. It seems as if the method -showHelp: cannot be overridden. Which other way can I use to receive any information when -showHelp: has been called? TY in advance, ---Ulf Dunkel ___ 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
Re: How Do I get informed when -showHelp: has been called?
On 29 Jun 2011, at 14:22, Ulf Dunkel wrote: I would really like to get a hint on this. Even a simple not possible would help. Thank you. :-) - - - - - Am 27.06.2011 22:58, schrieb Ulf Dunkel: In a simple app of mine, I use the standard Help menu and MyApp Help menu item, which is bound to -showHelp:. I would like to have my AppDelegate being informed when the Help Viewer has been launched and opened from this menu item. It seems as if the method -showHelp: cannot be overridden. Which other way can I use to receive any information when -showHelp: has been called? TY in advance, ---Ulf Dunkel I'm curious what you're trying to achieve here. My first thought was that you could change the target of the menu item so that it calls your own method, then call the original showHelp method with something like: [NSApp showHelp:sender] This still might not actually display the help viewer for example if it had been removed from the system, or if something made it crash before it displayed. I'm not sure what happens in those cases (an error in the log, or does it display an error alert?) Not very likely perhaps though. If you have to be more certain you might be able to view the active process list and observe whether it contained the help viewer after the call to showHelp. Alternatively maybe run a web server inside your app and make the help page load some object from it? It depends on how certain you want to be I suppose. :-) Perhaps others might have better ideas or could suggest another way of doing it. Angus___ 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
Re: How Do I get informed when -showHelp: has been called?
On Jun 29, 2011, at 8:22 AM, Ulf Dunkel wrote: I would really like to get a hint on this. Even a simple not possible would help. Thank you. :-) - - - - - Am 27.06.2011 22:58, schrieb Ulf Dunkel: In a simple app of mine, I use the standard Help menu and MyApp Help menu item, which is bound to -showHelp:. I would like to have my AppDelegate being informed when the Help Viewer has been launched and opened from this menu item. It seems as if the method -showHelp: cannot be overridden. Which other way can I use to receive any information when -showHelp: has been called? What makes you think -showHelp: (in NSApplication) can not be overridden? Works fine here. The possibly confusing part when subclassing NSApplication is how to make your app use that subclass. Typically this is done by setting a custom class (your subclass) to the Application object in the MainMenu nib file. Gerd ___ 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
How Do I get informed when -showHelp: has been called?
In a simple app of mine, I use the standard Help menu and MyApp Help menu item, which is bound to -showHelp:. I would like to have my AppDelegate being informed when the Help Viewer has been launched and opened from this menu item. It seems as if the method -showHelp: cannot be overridden. Which other way can I use to receive any information when -showHelp: has been called? TY in advance, ---Ulf Dunkel ___ 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