app-wide help tag switch for OS X

and my 2nd RB>xojo port roadblock is this: in RB I could enable/disable helptags for the whole app with this declare:

Declare Function HMSetHelpTagsDisplayed Lib kCarbonLib (displayTag As Boolean) As Integer
dim OSstatus as integer = HMSetHelpTagsDisplayed(enable)

Very convenient. I am unable to find the analogous declare for xojo/cocoa. Anyone know how to do this?

Thanks again!
Peter.

[quote=119022:@Peter Stys]and my 2nd RB>xojo port roadblock is this: in RB I could enable/disable helptags for the whole app with this declare:

Declare Function HMSetHelpTagsDisplayed Lib kCarbonLib (displayTag As Boolean) As Integer
dim OSstatus as integer = HMSetHelpTagsDisplayed(enable)

Very convenient. I am unable to find the analogous declare for xojo/cocoa. Anyone know how to do this?
[/quote]

No mention of HMSetHelpTagsDisplayed in the Apple Developer Library, and a search with HelpTag did not bring anything :frowning:

You may need to add a method to your app with a global flag instead.

[quote=119022:@Peter Stys]and my 2nd RB>xojo port roadblock is this: in RB I could enable/disable helptags for the whole app with this declare:

Declare Function HMSetHelpTagsDisplayed Lib kCarbonLib (displayTag As Boolean) As Integer
dim OSstatus as integer = HMSetHelpTagsDisplayed(enable)

Very convenient. I am unable to find the analogous declare for xojo/cocoa. Anyone know how to do this?

Thanks again!
Peter.[/quote]

As far as I know, there’s nothing analogous in Cocoa.

Good grief, that is unfortunate. So does that mean you have to write code for EACH control that has a helptag, to suppress it in accordance with a global flag??? There must be a better way.

The better question is why you would want to do such a thing.

Subclass each control you use and put the code there.

because users experienced with my app (myself included) don’t want helptags popping up all over the place when they already know what they’re doing vs. newbies who need pointers to learn how to use the app. I thought this would be “natural”.

good idea, thx, could probably be done class-wide rather than by every control instance.

Subclassing a control is exactly that.

I’m assuming you’re using native help tags (those little yellow boxes.) You should leave them in. An experienced user wouldn’t hover their mouse over a control for several seconds anyway. If they did, oh well, when they move the mouse it goes away. They help tags are designed to not be in the way.

I say leave them in because what if a user doesn’t need your app for months, then when they return to it they want to know what a control does (because they may have forgot,) but they have to go into preferences to re-enable help tags? Talk about poor UX.

Maybe somewhat simpler than subclassing. Just paste two events in each control. Probably easier for an existing program.

  • Add nohelp as global boolean variable
  • Add helpbuf as global string variable

Sub MouseEnter() if nohelp = true then helpbuf = me.HelpTag me.helptag = "" end if End Sub

Sub MouseExit() if nohelp = true then me.helptag = helpbuf end if End Sub

Set nohelp to true to suppress helptags.

Unless MouseEnter and MouseExit are already used, it should be fairly quick to implement throughout all controls.

[quote=119186:@Tim Parnell]I’m assuming you’re using native help tags (those little yellow boxes.) You should leave them in. An experienced user wouldn’t hover their mouse over a control for several seconds anyway. If they did, oh well, when they move the mouse it goes away. They help tags are designed to not be in the way.

I say leave them in because what if a user doesn’t need your app for months, then when they return to it they want to know what a control does (because they may have forgot,) but they have to go into preferences to re-enable help tags? Talk about poor UX.[/quote]

I considered your idea and tried (yes the little yellow boxes), and I must disagree: once you trigger a help tag then mouse over adjacent controls there is no delay and the boxes obscure the button collection, etc, etc and are a pain. So yes, I need to suppress them and am surprised Cocoa does not provide a universal switch like Carbon did.

Thanks to all for interesting ideas.

P.

Did you try to modify your plist setting? Even if there seems to be no switch anymore: Setting the delay to maybe 30 seconds should do the trick (if it works):
http://hints.macworld.com/article.php?story=20061107125819464

You should have said that you were not interested in anything but a declare :confused: Thank you for wasting time.

Excuse me? Where did this come from? I’m interested in any thoughtful comments. Declares or otherwise. If you think this is a waste of your time, may I suggest you simply not read or respond to this thread.
P.

[quote=119289:@Peter Stys]Excuse me? Where did this come from? I’m interested in any thoughtful comments. Declares or otherwise. If you think this is a waste of your time, may I suggest you simply not read or respond to this thread.
P.[/quote]

Nothing worse than people with an entitled mentality who do not even have the courtesy to reply to valid and tested suggestions…

Maybe somewhat simpler than subclassing. Just paste two events in each control. Probably easier for an existing program.

Add nohelp as global boolean variable
Add helpbuf as global string variable
Sub MouseEnter()
if nohelp = true then
helpbuf = me.HelpTag
me.helptag = “”
end if
End Sub
Sub MouseExit()
if nohelp = true then
me.helptag = helpbuf
end if
End Sub
Set nohelp to true to suppress helptags.

Unless MouseEnter and MouseExit are already used, it should be fairly quick to implement throughout all controls.

That is why I have a declare up my sleeve, but you won’t hear about it. Good day, Sir.

[quote=119297:@Michel Bujardet]Nothing worse than people with an entitled mentality who do not even have the courtesy to reply to valid and tested suggestions…

Maybe somewhat simpler than subclassing. Just paste two events in each control. Probably easier for an existing program.[/quote]

Not a good solution if he has lots of controls, and for future use. Better to subclass.

Now your just being silly. Why? He made it pretty clear he is aware of using a global variable to do the job but is looking for another solution. So your answer doesn’t answer his question. No need to get agitated about it.

[quote=119297:@Michel Bujardet]Nothing worse than people with an entitled mentality who do not even have the courtesy to reply to valid and tested suggestions…

That is why I have a declare up my sleeve, but you won’t hear about it. Good day, Sir.[/quote]

In fact Michel, your MouseEnter/MouseExit solution was a very good one and I may just do this. So thanks for that. My point was that Carbon had an app-wide switch which would be much simpler. If there isn’t one in Cocoa (or maybe there is but nobody else will know it seems), then any of the posted ideas are useful.

As for your last childish comment, it’s too bad that I and others will not benefit from your knowledge. Note that I DID thank everyone for their input; I figured if I responded individually to each entry it would needlessly clutter the NUG with vacuous messages. But if you expect a personal thank you, here you have it.

P.

BTW, Peter, I tried to modify the plist setting and it works very well for the native controls (you can set the delay until a tooltip appears up to several minutes which is as good as disabling it), but sadly not on the listbox. For that some method like proposed by Michel should be the only possibility.

Thx Ulrich, I will try all the suggestions. Problem is I have zillions of controls in a very large project so Michel’s suggestion will take a lot of cut & pasting, and the subclassing will be a big job too. And then the plist is good but not for some controls. Bummer. It’s really a shame that good functionality often disappears in the name of “modernization”.
Maybe I could extend my vacation just to complete the above :wink:

BTW, can plist be modified on the fly after app launch? To allow turning on & off while app is open?

P.