[comp.sys.mac.programmer] Balloon help for a control panel

resnick@cogsci.uiuc.edu (Pete Resnick) (06/22/91)

I am trying to implement balloon help for my control panel. I have been
unable to get an 'hdlg' resource combined with 'STR#' resources to work. I
notice that all of the Apple supplied control panels have 'hrct' help
instead and nothing in the 'DITL' that indicates the resource. What is the
best way to do this and why won't 'hdlg' work?

pr
--
Pete Resnick             (...so what is a mojo, and why would one be rising?)
Graduate assistant - Philosophy Department, Gregory Hall, UIUC
System manager - Cognitive Science Group, Beckman Institute, UIUC
Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
BITNET (if no other way) : FREE0285@UIUCVMD

carr@apple.com (Randy Carr) (06/25/91)

In article <1991Jun21.203825.7041@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes:
> 
> I am trying to implement balloon help for my control panel. I have been
> unable to get an 'hdlg' resource combined with 'STR#' resources to work. I
> notice that all of the Apple supplied control panels have 'hrct' help
> instead and nothing in the 'DITL' that indicates the resource. What is the
> best way to do this and why won't 'hdlg' work?
> 

Pete, control panels are special cased by the Finder.  Since each cdev is actually running in
one of the Finder's heaps, I added code to the Finder that looks for 'hdlg' & 'hrct' resources
in the cdev's file while it is frontmost.  The resource ID of the 'hdlg' or 'hrct' resource
must always be -4064, but you can have either an 'hdlg' or 'hrct' resource or both resources for
the main panel dialog window.  All other dialogs or other windows that your cdev may have
needs to be tracked the usual way (like an 'hwin' resource or a help item in the 'DITL', etc.).

Control panels are the easiest thing to add help to these days...

Randy Carr
System Software (I wrote the Help Mgr)
Apple Computer, Inc.


> Pete Resnick             (...so what is a mojo, and why would one be rising?)
> Graduate assistant - Philosophy Department, Gregory Hall, UIUC
> System manager - Cognitive Science Group, Beckman Institute, UIUC
> Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
> BITNET (if no other way) : FREE0285@UIUCVMD
> 
> 

carr@apple.com (Randy Carr) (06/25/91)

In article <1991Jun21.203825.7041@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes:
> 
> I am trying to implement balloon help for my control panel. I have been
> unable to get an 'hdlg' resource combined with 'STR#' resources to work. I
> notice that all of the Apple supplied control panels have 'hrct' help
> instead and nothing in the 'DITL' that indicates the resource. What is the
> best way to do this and why won't 'hdlg' work?
> 

Pete,
Control panels are the easiest interface element to add help to these days.
All you need to do is add an 'hdlg' or 'hrct' (or both) resource of ID -4064.
These resources only affect the main dialog window of the panel and if you use
any other dialogs or windows, you must implement balloon help tracking in the 
usual way (like an 'hwin' resource or help item in a 'DITL' etc.)

I hope this helps.

Randy Carr
System Software (I wrote the Help Mgr)
Apple Computer, Inc.


> Pete Resnick             (...so what is a mojo, and why would one be rising?)
> Graduate assistant - Philosophy Department, Gregory Hall, UIUC
> System manager - Cognitive Science Group, Beckman Institute, UIUC
> Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
> BITNET (if no other way) : FREE0285@UIUCVMD

carr@apple.com (Randy Carr) (06/25/91)

In article <1991Jun21.203825.7041@ux1.cso.uiuc.edu>, resnick@cogsci.uiuc.edu (Pete Resnick) writes:
> 
> I am trying to implement balloon help for my control panel. I have been
> unable to get an 'hdlg' resource combined with 'STR#' resources to work. I
> notice that all of the Apple supplied control panels have 'hrct' help
> instead and nothing in the 'DITL' that indicates the resource. What is the
> best way to do this and why won't 'hdlg' work?
> 

Pete,
Control panels are the easiest interface element to add help to these days.
All you need to do is add an 'hdlg' or 'hrct' (or both) resource of ID -4064.
These resources only affect the main dialog window of the panel and if you use
any other dialogs or windows, you must implement balloon help tracking in the 
usual way (like an 'hwin' resource or help item in a 'DITL' etc.)

I hope this helps.

Randy Carr
System Software (I wrote the Help Mgr)
Apple Computer, Inc.


> Pete Resnick             (...so what is a mojo, and why would one be rising?)
> Graduate assistant - Philosophy Department, Gregory Hall, UIUC
> System manager - Cognitive Science Group, Beckman Institute, UIUC
> Internet/ARPAnet/EDUnet  : resnick@cogsci.uiuc.edu
> BITNET (if no other way) : FREE0285@UIUCVMD
> 
>