[comp.sys.mac.programmer] SFPGetFile Problem

soe@ames.arpa (Brad Soe) (03/05/88)

I am using SFPGetFile from the Standard File Package to display a
File selection Dialog Box. I have some extra things in the box
(Which is why I wanted to user SPFGetFile), but I can't quite 
figure out how to Get them to display once SFPGetFile has been 
called. I have declared the standard file items appropriately
in my resource template, and SPFGetFile seems to display 
the standard file stuff and handle events correctly
(standard file window and scroll bar, "Drive", "Eject", "Open" Buttons etc...). 

I want to have a text window and a scrollbar in addition to the 
Standard file stuff, but can't seem to get them to display once
SFPGetFile has been called. 

I have declared in the resource template that the text window be of type 
'textEdit' and the scroll bar of type 'userItem'. 

Do I need to define a routine that will draw them, or can I just
use 'GetDItem' to get the item handle of the 'textEdit' item, 
store text in it (Using 'SetIText'). Then use 'GetDItem' 
to get the 'userItem' handle for the scroll bar, create it, 
and then use 'SetDItem' to put it back. 

Or am I supposed to use 'GetDItem' to get the 'userItem' Handle, 
and then use 'SetDItem' to set the handle to a ProcPtr that 
will draw the Item?? I tried this, but the draw routine never seems 
to be called with appropriate item number that I want drawn. 

I read the about the standard file package chapter in Inside Macintosh II
but it is not really clear how to create 'userItem' items. 

I am using LSC v2.15. 
Is there a simple solution? Everything is quite mysterious.
Reply by e-mail.

					Brad Soe 
					internet : soe@ames.arc.nasa.gov
					NASA Ames Research Ctr.
					Mail Stop 233-18
					Moffett Field, CA 94035
					(415) 694-4866