Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!newsfeed.nyu.edu!newsmaster.cc.columbia.edu!osiris.giss.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Toolbox programming in GSoft Date: 9 Feb 1999 13:34:51 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 12 Message-ID: <79pdhr$pk9@post.gsfc.nasa.gov> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10418 Is anybody else doing toolbox programming in ByteWorks GSoft BASIC? I am trying to learn it by referring to ByteWorks tutorial on toolbox programming in C, and translating the exercises from C into GSoft. It has been a struggle! Maybe we can get a discussion going to trade tips and things. -- --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!128.174.5.49!vixen.cso.uiuc.edu!logbridge.uoregon.edu!su-news-hub1.bbnplanet.com!news.gtei.net!news.pbi.net!207.5.0.44!nntp.mainstreet.net!bug.rahul.net!rahul.net!a2i!news.rt66.com!not-for-mail From: "Mike Westerfield" Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Tue, 09 Feb 1999 22:15:43 -0700 Organization: Byte Works, Inc. Lines: 18 Distribution: world Message-ID: <79r4n4$lp9$1@news.rt66.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> NNTP-Posting-Host: pmj29.rt66.com Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Xref: news1.icaen comp.sys.apple2.programmer:10419 ---------- In article <79pdhr$pk9@post.gsfc.nasa.gov>, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >Is anybody else doing toolbox programming in ByteWorks GSoft BASIC? I am, and Eric Shephard is. He's working on a translation of the course for GSoft BASIC. If you run into problems that look like they may be bugs rather than your own misunderstandings, be sure and let me know. Eric has found a few, as have I. And watch our web site--version 1.2 will be out soon. The web site is at http://www.hypermall.com/byteworks Mike Westerfield Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.erols.net!netnews.com!newspeer1.nac.net!news.new-york.net!newsmaster.cc.columbia.edu!osiris.giss.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: 10 Feb 1999 15:39:12 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 18 Distribution: world Message-ID: <79s970$g90@post.gsfc.nasa.gov> References: <79pdhr$pk9@post.gsfc.nasa.gov> <79r4n4$lp9$1@news.rt66.com> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10420 In article <79r4n4$lp9$1@news.rt66.com>, MikeW50@aol.com says... >If you run into problems that look like they may be bugs rather than your >own misunderstandings, be sure and let me know. Eric has found a few, as >have I. And watch our web site--version 1.2 will be out soon. Most of my problems have arisen from dumb mistakes in translation from C into GSoft. However, I was stumped for hours by a feature of the IF...THEN statements that doesn't seem to be mentioned in the manual. When I put a comment an the same line as the IF...THEN statement, it ignores the IF, so the subsequent ELSE or END IF gets flagged with "ELSE with no IF" or "END IF with no IF". -- --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!128.174.5.49!vixen.cso.uiuc.edu!news-peer1.sprintlink.net!news.sprintlink.net!news-peer.gip.net!news.gsl.net!gip.net!newsfeed.cwix.com!207.5.0.44!nntp.mainstreet.net!bug.rahul.net!rahul.net!a2i!news.rt66.com!not-for-mail From: "Mike Westerfield" Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Wed, 10 Feb 1999 22:45:53 -0700 Organization: Byte Works, Inc. Lines: 60 Distribution: world Message-ID: <79tqt7$6bk$1@news.rt66.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> <79r4n4$lp9$1@news.rt66.com> <79s970$g90@post.gsfc.nasa.gov> NNTP-Posting-Host: pmd28.rt66.com Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Xref: news1.icaen comp.sys.apple2.programmer:10423 ---------- In article <79s970$g90@post.gsfc.nasa.gov>, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >Most of my problems have arisen from dumb mistakes in translation from C >into GSoft. However, I was stumped for hours by a feature of the IF...THEN >statements that doesn't seem to be mentioned in the manual. When I put a >comment an the same line as the IF...THEN statement, it ignores the IF, so >the subsequent ELSE or END IF gets flagged with "ELSE with no IF" or "END >IF with no IF". Yea, that's nasty. But it's a feature, not a bug. The problem is that GSoft BASIC supports two different kinds of IF statements. This is fairly common in implementations of BASIC. The early implementations used the one-line form, as in IF expression THEN statement The statement was often a GOTO statement, so a shorter version evolved for this case: IF expression THEN line-number Modern IF-THEN statements are multi-lined affairs, like IF expression THEN statement statement ELSE statement statement END IF One other piece of information is needed. In BASIC, a comment isn't really a comment in the sense that it is in Pascal, C, or FORTRAN. A comment is actually a command that eats all of the characters to the end of the line and doesn't take any action. It's a technical distinction--in almost all cases, it doesn't matter whether it's really a comment in the Pascal sense or a command in the BASIC sense--but this is one of the exceptions. BASIC needs a way to tell these two kinds of IF statement apart. GSoft BASIC does this by looking just past the THEN. If it finds an end of line, it assumes the second form of the IF statement is being used, and proceeds. But if there is any command at all--and remember, a comment is a command--GSoft BASIC assumes that the _first_ form of the IF statement is being used. It doesn't expect an ELSE or END IF, and complains if it finds one. Here's one last technicality. This statement is legal in BASIC: IF X = 4 THEN REM Don't do anything at all It works in Applesoft, just as it is, for example. While you might think it's stupid, and in many cases I'd agree, it's still legal and still works in GSoft BASIC. Besides execution time, it's little technical tidbits like this legal statement that keep me from making REM a special case. Mike Westerfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!newsfeed.berkeley.edu!cnn.nas.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: 11 Feb 1999 13:33:32 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 15 Distribution: world Message-ID: <79um7c$3vd@post.gsfc.nasa.gov> References: <79pdhr$pk9@post.gsfc.nasa.gov> <79r4n4$lp9$1@news.rt66.com> <79tqt7$6bk$1@news.rt66.com> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10424 In article <79tqt7$6bk$1@news.rt66.com>, MikeW50@aol.com says... >Yea, that's nasty. But it's a feature, not a bug. Okay. I see what you are saying, and it is no problem for me to accomodate this. I do think that if it is a feature, it needs to be mentioned in the manual, either in the discussion of comments or in the discussion of IF...THEN statements. As I said, it took me hours to figure out that this "feature" was why my IF..THEN...ELSE blocks were bombing. -- --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!128.174.5.49!vixen.cso.uiuc.edu!howland.erols.net!cpk-news-hub1.bbnplanet.com!news.gtei.net!firehose.mindspring.com!not-for-mail From: poindexter@mindspring.com (Joseph Anthony Bouchard) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Fri, 12 Feb 1999 03:22:11 GMT Organization: Survival Systems Computer Consulting Lines: 55 Message-ID: <36c35a39.241412221@news.mindspring.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> <79r4n4$lp9$1@news.rt66.com> <79s970$g90@post.gsfc.nasa.gov> <79tqt7$6bk$1@news.rt66.com> Reply-To: poindexter@mindspring.com NNTP-Posting-Host: cf.cd.a2.bb Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 12 Feb 1999 03:23:53 GMT X-Newsreader: Forte Agent 1.5/32.451 Xref: news1.icaen comp.sys.apple2.programmer:10425 "Mike Westerfield" wrote: > >---------- >In article <79s970$g90@post.gsfc.nasa.gov>, >The problem is that GSoft BASIC supports two different kinds of IF >statements. This is fairly common in implementations of BASIC. The early >implementations used the one-line form, as in > > IF expression THEN statement > >The statement was often a GOTO statement, so a shorter version evolved for >this case: > > IF expression THEN line-number > >Modern IF-THEN statements are multi-lined affairs, like > > IF expression THEN > statement > statement > ELSE > statement > statement > END IF > >One other piece of information is needed. In BASIC, a comment isn't really a >comment in the sense that it is in Pascal, C, or FORTRAN. A comment is >actually a command that eats all of the characters to the end of the line >and doesn't take any action. It's a technical distinction--in almost all >cases, it doesn't matter whether it's really a comment in the Pascal sense >or a command in the BASIC sense--but this is one of the exceptions. > >BASIC needs a way to tell these two kinds of IF statement apart. GSoft BASIC >does this by looking just past the THEN. If it finds an end of line, it >assumes the second form of the IF statement is being used, and proceeds. But >if there is any command at all--and remember, a comment is a command--GSoft >BASIC assumes that the _first_ form of the IF statement is being used. It >doesn't expect an ELSE or END IF, and complains if it finds one. >Mike Westerfield I don't know much about GSoft Basic, but... If it allows multiple commands per line (separated by a semi-colon or somesuch), you could let the THEN terminate with the divider. If it already does this, the only thing needed to put a REM on the line with the IF condition is to make it a separate statement on the same line. Voila: IF g < 10 THEN ; REM Gravity less than 10? JABouchard "Poindexter" poindexter@mindspring.com Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!nntp.giganews.com!cyclone.swbell.net!uunet!ffx.uu.net!in4.uu.net!news.rt66.com!not-for-mail From: "Mike Westerfield" Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Thu, 11 Feb 1999 19:19:05 -0700 Organization: Byte Works, Inc. Lines: 17 Distribution: world Message-ID: <7a0341$dd4$1@news.rt66.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> <79r4n4$lp9$1@news.rt66.com> <79tqt7$6bk$1@news.rt66.com> <79um7c$3vd@post.gsfc.nasa.gov> NNTP-Posting-Host: pma07.rt66.com Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Xref: news1.icaen comp.sys.apple2.programmer:10426 ---------- In article <79um7c$3vd@post.gsfc.nasa.gov>, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >I do think that if it is a feature, it needs to be >mentioned in the manual, either in the discussion of comments or in the >discussion of IF...THEN statements. I agree. The manual already exists, and was in the hands of most of the people who I expect will buy a copy when this omission was discovered. An appropriate note was placed in the Manual Errata section of the Release.notes file for the 1.1 release, though. You might avoid other minor heartaches by looking through the file for other corrections. Mike Westerfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!newsfeed.berkeley.edu!cnn.nas.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: 12 Feb 1999 13:28:01 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 16 Message-ID: <7a1a91$7of@post.gsfc.nasa.gov> References: <79pdhr$pk9@post.gsfc.nasa.gov> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10430 I have a question about the use of the function ALLOCATEPROC to retrieve a procPtr to send as a parameter to the NewWindow2 function for purposes of performing window updates. Is it sufficient to call ALLOCATEPROC once and send the same procPtr to every new window opened? Or does a new procPtr need to be retrieved for each new instance of an open window? If a new pointer must be retrieved for each new window, I presume that that pointer should be disposed of when the window is closed. What happens if you forget to dispose of the procPtr? -- --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!WCG!198.6.0.215!uunet!ffx.uu.net!in5.uu.net!news.rt66.com!not-for-mail From: "Mike Westerfield" Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Fri, 12 Feb 1999 21:01:46 -0700 Organization: Byte Works, Inc. Lines: 17 Distribution: world Message-ID: <7a2tgh$nl$1@news.rt66.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> <7a1a91$7of@post.gsfc.nasa.gov> NNTP-Posting-Host: pmg24.rt66.com Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Xref: news1.icaen comp.sys.apple2.programmer:10432 ---------- In article <7a1a91$7of@post.gsfc.nasa.gov>, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >Is it sufficient to call ALLOCATEPROC once and >send the same procPtr to every new window opened? Yes. >What happens if you >forget to dispose of the procPtr? You waste some memory. It won't cause a crash. Mike Westerfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!newsfeed.nyu.edu!newsmaster.cc.columbia.edu!osiris.giss.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: 16 Feb 1999 13:51:41 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 33 Message-ID: <7abt5d$jus@post.gsfc.nasa.gov> References: <79pdhr$pk9@post.gsfc.nasa.gov> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10435 Here are a couple more questions: 1. I am having trouble getting Splat! debugger to work with GSoft. I am using the ORC text shell, and Splat! is installed as an Init. The DEBUG command doesn't seem to exist for the ORCA shell, so I tried putting a BREAK command into my source code. When I ran the program, Splat! was called, but promply generated an error something like "Variable table found outside subroutine." The system then hung, and I had to reboot. 2. I was attempting to assign values to the record which gets sent to SFGetFile2 to tell the open file dialog what file types to show. Looking in the source file for the GSoft tools, I saw that it's elements were an integer, followed by an array of records. This led me to believe that the following statement should be used to set a value in the record: fileTypes.fileAndAuxTypes(0).flags = $8000 This returned a syntax error. After playing with the thing for a while, I found that it would accept the statement fileTypes.fileAndAuxTypes(0) = $8000 Interestingly, a series of these statements using successively greater subscripts did seem to populate the record with the proper numbers in the proper places. Is there something I am not understanding about the syntax of assigning values to this record? --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!128.174.5.49!vixen.cso.uiuc.edu!howland.erols.net!netnews.com!newspeer1.nac.net!news.new-york.net!uunet!ffx.uu.net!in5.uu.net!news.rt66.com!not-for-mail From: "Mike Westerfield" Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Wed, 17 Feb 1999 16:42:01 -0700 Organization: Byte Works, Inc. Lines: 30 Distribution: world Message-ID: <7afk5j$f67$1@news.rt66.com> References: <79pdhr$pk9@post.gsfc.nasa.gov> <7abt5d$jus@post.gsfc.nasa.gov> NNTP-Posting-Host: pma26.rt66.com Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express for Macintosh - 4.01 (295) Xref: news1.icaen comp.sys.apple2.programmer:10436 ---------- In article <7abt5d$jus@post.gsfc.nasa.gov>, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >1. I am having trouble getting Splat! debugger to work with GSoft. I am >using the ORC text shell, and Splat! is installed as an Init. The DEBUG >command doesn't seem to exist for the ORCA shell, so I tried putting a >BREAK command into my source code. When I ran the program, Splat! was >called, but promply generated an error something like "Variable table >found outside subroutine." The system then hung, and I had to reboot. I don't have Splat! or the source code, so I can't do much about this problem. The tests I have for records work find with ORCA/Debugger. >2. I was attempting to assign values to the record which gets sent to >SFGetFile2 to tell the open file dialog what file types to show. Looking >in the source file for the GSoft tools, I saw that it's elements were an >integer, followed by an array of records. This led me to believe that the >following statement should be used to set a value in the record: > >fileTypes.fileAndAuxTypes(0).flags = $8000 > >This returned a syntax error. After playing with the thing for a while, I >found that it would accept the statement At first blush, this appears to be a bug in GSoft BASIC. I'll look into it. Mike Westerfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!news.idt.net!newsfeed.berkeley.edu!cnn.nas.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Toolbox programming in GSoft Date: 2 Mar 1999 14:58:32 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 21 Message-ID: <7bguao$p5q@post.gsfc.nasa.gov> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10463 I am trying to use the toolbox call NewHandle, and have a question. The tutorial by Byteworks for toolbox programming in C talks about a function called userid, which returns the master id assigned by Memory Manager, OR'ed with $0100. Is there an equivalent function in GSoft? I tried to simulate that with the following: userID = MMStstartup : ! at beginning of program . . . userID2 = userID + 256 myHandle = NewHandle (length, userID2, $8000, NIL) New Handle would not accept userID2 as a proper user ID. --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!128.174.5.49!vixen.cso.uiuc.edu!logbridge.uoregon.edu!remarQ73!supernews.com!remarQ.com!remarQ69!not-for-mail From: CUTjefbla@bconnex.net (Jeff Blakeney) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: Wed, 03 Mar 1999 06:44:38 GMT Organization: Barrie Connex Lines: 47 Message-ID: <36dcd8a9.10814675@news.bconnex.net> References: <7bguao$p5q@post.gsfc.nasa.gov> Reply-To: CUTjefbla@bconnex.net (Jeff Blakeney) NNTP-Posting-Host: 209.212.39.34 X-Trace: 920443601 .TSFKFCQB2722D1D4C usenet54.supernews.com X-Complaints-To: newsabuse@remarQ.com X-Newsreader: Forte Free Agent 1.1/32.230 Xref: news1.icaen comp.sys.apple2.programmer:10465 On 2 Mar 1999 14:58:32 GMT, Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) wrote: >I am trying to use the toolbox call NewHandle, and have a question. The >tutorial by Byteworks for toolbox programming in C talks about a function >called userid, which returns the master id assigned by Memory Manager, >OR'ed with $0100. Is there an equivalent function in GSoft? I tried to >simulate that with the following: > >userID = MMStstartup : ! at beginning of program > . > . > . >userID2 = userID + 256 >myHandle = NewHandle (length, userID2, $8000, NIL) > >New Handle would not accept userID2 as a proper user ID. Have you dim'd myHandle as a handle? Using this program: length = 1024 userID = MMStartup userID2 = userID + 256 myHandle = NewHandle(length,userID2,$8000,NIL) gave me an error but using this program: dim myHandle as handle userID = MMStartup userID2 = userID + 256 myHandle = NewHandle(length,userID2,$8000,NIL) worked fine. By the way, you could also replace the $8000 in the NewHandle call with attrLocked if you wanted to make the source a little easier to understand. Take a look at the GSoftTools.gst file for lost of helpful types, constants and to find out what variable type each toolbox call parameter is supposed to be and what variable type gets returned from a toolbox call. I hope this helps. === To ensure I see a reply please also e-mail me but remember to: CUT the obvious from my e-mail address to e-mail me Jeff Blakeney - Dean of the Apple II University on Delphi *** HyperCard IIgs course now in session in the A2Pro forum on Delphi Path: news1.icaen!news.uiowa.edu!NewsNG.Chicago.Qual.Net!207.24.245.130!nyd.news.ans.net!ptdnetP!newsgate.ptd.net!newsfeed.nyu.edu!newsmaster.cc.columbia.edu!osiris.giss.nasa.gov!newsfeed.gsfc.nasa.gov!usenet From: Geraldine.A.Wright.1@gsfc.nasa.gov (Geraldine Wright) Newsgroups: comp.sys.apple2.programmer Subject: Re: Toolbox programming in GSoft Date: 3 Mar 1999 13:12:28 GMT Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 37 Message-ID: <7bjcft$cmi@post.gsfc.nasa.gov> References: <7bguao$p5q@post.gsfc.nasa.gov> <36dcd8a9.10814675@news.bconnex.net> NNTP-Posting-Host: gerryw.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII X-Newsreader: WinVN 0.99.7 Xref: news1.icaen comp.sys.apple2.programmer:10466 In article <36dcd8a9.10814675@news.bconnex.net>, CUTjefbla@bconnex.net says... >Have you dim'd myHandle as a handle? Yes. The tool error returned when I tried this indicated an improper userid. >length = 1024 >userID = MMStartup >userID2 = userID + 256 >myHandle = NewHandle(length,userID2,$8000,NIL) > >gave me an error but using this program: > >dim myHandle as handle >userID = MMStartup >userID2 = userID + 256 >myHandle = NewHandle(length,userID2,$8000,NIL) > >worked fine. Hmm. I did just what you did in the second example, and it did not work for me. >...Take a look at the GSoftTools.gst file for lost of >helpful types, constants and to find out what variable type each >toolbox call parameter is supposed to be and what variable type gets >returned from a toolbox call. I have already been doing that. --------------------------------------- Geraldine Wright (the Applesoft-aholic) Geraldine.A.Wright.1@gsfc.nasa.gov --------------------------------------- "Big, fat hairy deal!" -Garfield