[comp.sys.mac.programmer] SFGetFile prompt message

squatt@imag.imag.fr ( Le Toullec / Eq T.Muntean) (05/24/88)

Using LSC, and wanting a 'pretty' presentation, I try to used the prompt 
field in SFGetFile call. 
So I write SFGetFile(SFGWhere, CtoPStr("pretty message"),...,&SFReply), but 
nothing occurs...
Does anybody knows where the fault is ?

-----
Maiden
  

waldman@endor.harvard.edu (benjamin Waldman) (05/25/88)

In article <2992@imag.imag.fr> squatt@imag.imag.fr ( Le Toullec / Eq T.Muntean) writes:
>Using LSC, and wanting a 'pretty' presentation, I try to used the prompt 
>field in SFGetFile call. 
>So I write SFGetFile(SFGWhere, CtoPStr("pretty message"),...,&SFReply), but 
>nothing occurs...
>Does anybody knows where the fault is ?

If you read the description of SFGetFile in Inside Mac, you'll notice that
the prompt field is there "for historical purposes only," and is now ignored.
Why? I don'y know - I really think it would be useful at times.  You can,
however, have a prompt in SFPutFile, though.
			Ben Waldman
			waldman@endor.harvard.edu

darin@Apple.COM (Darin Adler) (05/25/88)

In article <2992@imag.imag.fr> squatt@imag.imag.fr ( Le Toullec / Eq T.Muntean) writes:
> ... I try to used the prompt field in SFGetFile call. 
> So I write SFGetFile(SFGWhere, CtoPStr("pretty message"),...,&SFReply), but 
> nothing occurs...

The prompt in the SFGetFile call is a "historical" feature. The prompt field
(a statText dialog item) is not visible in the standard SFGetFile dialog.
Using the SFPGetFile call, and a custom dialog, you can use the prompt feature
if you wish, but in this case you can add custom text of your own directly to
the dialog instead, which I think is nicer (the text is in the resource, rather
than in your code).
-- 
Darin Adler					       AppleLink: Adler4
UUCP: {sun,voder,nsc,mtxinu,dual}!apple!darin	  CSNET: darin@Apple.com

dorourke@polyslo.UUCP (David O'Rourke) (05/26/88)

In article <2992@imag.imag.fr> squatt@imag.imag.fr ( Le Toullec / Eq T.Muntean) writes:
>Using LSC, and wanting a 'pretty' presentation, I try to used the prompt 
>field in SFGetFile call. 
>So I write SFGetFile(SFGWhere, CtoPStr("pretty message"),...,&SFReply), but 
>nothing occurs...
>Does anybody knows where the fault is ?

   Inside Macintosh Vol. I, page 523.  "The prompt parameter is ignored; it's
there for historical purposes only."

   The prompt parameter doesn't do anything.  Too bad, it might be useful.
Try throwing a dialog box up first with the message, and then overlap the
SFGet Dialog on top of it so that the message is still visible.


-- 
David M. O'Rourke

Disclaimer: I don't represent the school.  All opinions are mine!

clubmac@runx.ips.oz (Macintosh Users Group) (05/29/88)

In article <2992@imag.imag.fr> squatt@imag.imag.fr ( Le Toullec / Eq T.Muntean) writes:
>Using LSC, and wanting a 'pretty' presentation, I try to used the prompt 
>field in SFGetFile call. 
>So I write SFGetFile(SFGWhere, CtoPStr("pretty message"),...,&SFReply), but 
>nothing occurs...
>Does anybody knows where the fault is ?

Yeah, I found this out when I was writing a program for Psychology researcher
on his Macintosh. Since the users of the program would bexDxD subjects of
the test, rather than an average Mac user, it needed to instruct the subject
at most stages of the test. So, to get around the lack of a prompt string
in SFGetFile, I simply inserted a dialog item into SFGetFile, via the SF
dialog filter procedure. Thus I was simply doing what I expected SFGetFile
to handle automatically.


Jason Haines, President
Club Mac - Australia's Largest Macintosh Users Group

Phone Home:  +61-2-73-1016
OZ Post:     Box 213, Holme Building, Sydney University, NSW, 2006, Australia
Internet:    clubmac@runx.ips.oz.au    UUCP: uunet!runx.ips.oz.au!clubmac