Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!styx!nike!cad!ucbvax!ernie.Berkeley.EDU!shebanow From: shebanow@ernie.Berkeley.EDU (Mike Shebanow) Newsgroups: net.micro.mac Subject: Re: Request for help with SFGetFile Message-ID: <14149@ucbvax.BERKELEY.EDU> Date: Wed, 4-Jun-86 11:12:06 EDT Article-I.D.: ucbvax.14149 Posted: Wed Jun 4 11:12:06 1986 Date-Received: Thu, 5-Jun-86 19:51:14 EDT References: <1010@k.cs.cmu.edu> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: shebanow@ernie.Berkeley.EDU.UUCP (Mike Shebanow) Distribution: net Organization: University of California, Berkeley Lines: 20 Keywords: StandardFile SFGetFile LightSpeed The only problem with your code is that you are not initializing the necessary Macintosh managers. When you are not using the LightSpeed standard libraries you have to init all of these yourself. The proper calls are: InitGraf(&thePort); InitFonts(); InitWindows(); InitMenus(); TEInit(); InitDialogs(0); InitCursor(); /* this is optional, but nice */ Also, you should avoid including "stdio.h" when you are not using the UNIX style libraries. Just to make sure, I added these lines to your program, and it ran fine. Have fun... Andrew G. Shebanow