Help Tags

Miscellaneous Forums/MacOS X Discussion/Help Tags

Has anyone managed to get these working on the Mac?

Here is a first attempt, not working though?

SuperStrict

Import "tooltags.c"

Extern
	Function MyAttachHelpTag( windowRef:Int )
End Extern

Local main_window:TGadget = CreateWindow("Tool tags",0,0,320,240,Null,15)
Local button:TGadget = CreateButton("taged",0,0,100,32,main_window,BUTTON_PUSH)

Local nsview:Int = QueryGadget( button, QUERY_NSVIEW )
DebugLog "error" + MyAttachHelpTag(nsview)

While WaitEvent()
	Select CurrentEvent.ID
		Case EVENT_GADGETACTION
			Select CurrentEvent.Source
			EndSelect	
		Case EVENT_WINDOWCLOSE
			If CurrentEvent.Source = main_window Then Exit
	EndSelect
Wend
End


and tooltags.c

#include <CoreServices/CoreServices.h>
#include <Carbon/Carbon.h>

OSStatus MyAttachHelpTag( ControlRef control )
{
	OSStatus status;
	HMHelpContentRec helpTag;
	
	helpTag.version = kMacHelpVersion;
	helpTag.tagSide = kHMDefaultSide;
	SetRect( &helpTag.absHotRect,0,0,0,0 );
	helpTag.content[kHMMinimumContentIndex].contentType = kHMCFStringLocalizedContent;
	helpTag.content[kHMMinimumContentIndex].u.tagCFString = CFSTR( "The help tag for the window." );
	helpTag.content[kHMMaximumContentIndex].contentType = kHMNoContent;
	
	status = HMSetControlHelpContent(control, &helpTag );

	return status;
}


There's a good chance you won't get Carbon code (your example) working with Cocoa code (MaxGUI).

Is a help tag meant to be a replacement for tooltips, or for working with them?
I notice that in Qt there is support for Help Balloon/tag things, which you can assign to any widget - usually using a "What's this" enabler (you know, when the mouse pointer shows the arrow an a question mark)

Brucey, Yes the help tags were meant to be a direct replacement for my balloontips implementation on the PC. This really is bad news :-( I wonder if cocoa has tooltips?

Perhaps people should take out another MAXGUI license to get QT finished instead.

Perhaps people should take out another MAXGUI license to get QT finished instead.

Hah... I can't see how that would help :-p


Cocoa has tooltips - in the Max sense of a ToolTip - that is, you hover the mouse over the gadget and after a slight delay the tool tip appears.
If that is what you are after?

As far as I can tell, there is no direct support for Help Balloons/Windows in Cocoa. However, Carbon does include this as it comes from the old MacOS 9, which did have this functionality.


Cocoa has tooltips - in the Max sense of a ToolTip - that is, you hover the mouse over the gadget and after a slight delay the tool tip appears.
If that is what you are after?



Really for all gadgets? I know they are available for toolbar, but for buttons?

they are indeed available for all gadgets.. MaxGUI doesn't enable them (on all platforms).

Perhaps you need to make a request :-)

Will this use up one of my three wishes? Well either way, to whom it may concern I would like like to request that ToolTips be enabled on all gadgets!

I am keeping my fingers crossed. and squinting in anticipation.