Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!rutgers!umn-d-ub!cs.umn.edu!thelake!steve From: steve@thelake.mn.org (Steve Yelvington) Newsgroups: comp.sys.atari.st Subject: Re: DA's and Curses Message-ID: Date: 8 Apr 90 16:37:38 GMT References: <2225@ariel.unm.edu> Lines: 93 [In article <2225@ariel.unm.edu>, seattle@hydra.unm.edu (David G. Adams) writes ... ] > Ok, I've tried a few little experiments, but I'm still mystified as to > how to get my stupid.c file turned into a stupid.acc file. I've tried > cc -VGEMACC -o stupid.acc stupid.c just like it says in my MWC manual, > even made sure it didn't exit and all. It doesn't use any windows, so > I thought it'd be easy. (stupid me) All it does is print numbers to > the screen using Bconin. I hope you mean Bconout. :-) > Well, on boot-up it seems to want to run my > program - definately not what I intended. Yup. That's what it's supposed to do. When the system comes up, it loads the .ACC files and executes them. It's the DA's responsibility to initialize itself, then call the Event Manager to return system control to the AES until it's time to go to work. See below. There are some other (stupid) restrictions. The desk accessory cannot own file handles or memory; the system thinks they belong to the current program. It also doesn't own the menu bar, so if you want to clear the screen and do generic (vt52) output, you must copy the menu bar manually and restore it manually. > Is there a programming guide for Desk Accessories? Maybe for developers, I don't know. I haven't seen the developer documentation. I don't want to have to swear out a blood oath never to tell anyone that Atari exists. (Do you know why you never see lawyers at the beach? The cats keep covering them up with sand....) > (I'm sure someone has asked this before, but... :-} ) Occasionally, but probably not frequently enough for the list of questions that davidli is compiling. Here is a generic desk accessory skeleton that I posted in this newsgroup in response to a similar question in April 1989. I wrote it for use with Sozobon C, but it should compile under MWC with no problem, except perhaps fullpath(). Sozobon users should note that dastart.o is available by anonymous ftp from terminator.cc.umich.edu. (I know nothing about your curses problem.) O/ cut here =====O\================================================================== /* * accskel.c * desk accessory skeleton for Sozobon C * link dastart.o, then this module, then the GEM bindings, then dlibs. */ #define MENU_ID "File selector" #define AC_OPEN 30 /* these arrays are not needed for GEMFAST */ int contrl[12], intin[128], intout[128], ptsin[128], ptsout[128]; main() { int apid, menuid, msgbuf[8]; apid = appl_init(); /* say hello to the AES */ menuid = menu_register(apid, MENU_ID); /* add me to the Desk menu */ while (1) /* loop forever */ { evnt_mesag(msgbuf); if ( (msgbuf[0] == AC_OPEN) && (msgbuf[3] == menuid) ) wakeup(); /* go into active mode */ } appl_exit(); /* you'll never get here -- supposedly */ } wakeup() /* Whatever needs to be done. Here we display the fsel ... */ { char path[128], defult[13] = '\0'; int button; fullpath(path,"*.*"); fsel_input(path,defult,&button); } -- Steve Yelvington at the lake in Minnesota steve@thelake.mn.org