[comp.sys.mac.programmer] prompting user in SFGetFile?

rolf@sparc1 (Rolf Wilson) (06/04/91)

  Under system 6, I was able to shoehorn a prompt into the
SFGetFile dialog box to help the user when it might be
unclear WHY this box had suddenly popped up. Remember how
HyperCard would ask "Where is Home?" in that box?
  Well, under 7.0, the space that I had used to put a
new dialog into seems to have disappeared. What is the
best way to provide a prompt in SFGetFile in such a way
that it can be used under both System 6 and 7?
--

Rolf Wilson   Illinois State Geological Survey   rolf@sparc1.isgs.uiuc.edu

leonardr@sv.portal.com (Leonard Rosenthol) (06/05/91)

In article <1991Jun3.182938.4743@ux1.cso.uiuc.edu>, rolf@sparc1 (Rolf Wilson) writes:
> From: rolf@sparc1 (Rolf Wilson)
> Newsgroups: comp.sys.mac.programmer
> Subject: prompting user in SFGetFile?
> Date: 3 Jun 91 18:29:38 GMT
> Organization: University of Illinois at Urbana
> 
> 
>   Under system 6, I was able to shoehorn a prompt into the
> SFGetFile dialog box to help the user when it might be
> unclear WHY this box had suddenly popped up. Remember how
> HyperCard would ask "Where is Home?" in that box?
>   Well, under 7.0, the space that I had used to put a
> new dialog into seems to have disappeared. What is the
> best way to provide a prompt in SFGetFile in such a way
> that it can be used under both System 6 and 7?
>
	The best way is to use SFPGetFile with your own 'prompted' Standard File dialog.  That will work under both 6 and 7 and allows you to put the prompt ANYWHERE you want...I use a centered prompt at the top of the stdFile dialog, set off by a line from the 'normal' dialog.

Leonard Rsoenthol

----------------------------------------------------------------------
+ Leonard Rosenthol                | AppleLink: MACgician            +
+ Software Ventures                | GEnie:     MACgician            +
+ Internet: leonardr@sv.portal.com | AOL:       MACgician            +
----------------------------------------------------------------------

CAH0@bunny.gte.com (Chuck Hoffman) (06/05/91)

In article <1991Jun3.182938.4743@ux1.cso.uiuc.edu> rolf@sparc1 (Rolf 
Wilson) writes:
>   Under system 6, I was able to shoehorn a prompt into the
> SFGetFile dialog....
[stuff left out]
> What is the
> best way to provide a prompt in SFGetFile in such a way
> that it can be used under both System 6 and 7?

I think it is usually a bad practice to hack something in when there is a 
published, supported interface, whether to the Mac OS or any other OS.  
The problem always is that the vendor has complete freedom to change the 
unpublished internals.  Usually (not always) vendors continue to support 
their published interfaces, or tell you how to change them if they change 
the interface.  In this case, I would say to bite the bullet and write 
your own dialog, as published in the IM.


Chuck Hoffman, GTE Laboratories, Inc.    |  I'm not sure why we're here,
cah0@bunny.gte.com                       |  but I am sure that while we're
Telephone (U.S.A.) 617-466-2131          |  here, we're supposed to help
GTE VoiceNet: 679-2131                   |  each other.
GTE Telemail: C.HOFFMAN                  |