[Coco] multiple windows on a screen in Basic09
Bob Devries
devries.bob at gmail.com
Thu Jan 14 18:10:41 EST 2010
Hi Wayne,
If I use /w1 and /w2, I will get two separate screens, I think.
What I'm trying to do is set up two paths to the same screen. Maybe the
likes of the dup() call in C would be more useful?
Regards, Bob Devries
--
Besides a mathematical inclination, an exceptionally good mastery of one's
native tongue is the most vital asset of a competent programmer.
Edsger W.Dijkstra, 18 June 1975
----- Original Message -----
From: "Wayne Campbell" <asa.rand at gmail.com>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Friday, January 15, 2010 9:21 AM
Subject: Re: [Coco] multiple windows on a screen in Basic09
> Forgot. Use /w to get next available window.
>
> ----- Original Message -----
> From: "Bob Devries" <devries.bob at gmail.com>
> To: <coco at maltedmedia.com>
> Sent: Thursday, January 14, 2010 1:53 PM
> Subject: [Coco] multiple windows on a screen in Basic09
>
>
>> Hi all,
>>
>> I have been trying to emulate what Wayne Campbell is trying to do, that
>> is, to have two active windows on a single screen using Basic09.
>>
>> Now I know that this is possible, since there was an example shell script
>> on the original OS9 System disk called "window.glr4". This script
>> produced three active windows on a graphics screen, and opened a shell in
>> two of them.
>>
>> I'm trying to emulate this in Basic09, but so far, no luck.
>>
>> Here's what I have:
>>
>> PROCEDURE twowin
>> DIM x:INTEGER
>> DIM a$:STRING[80]
>> DIM wpath1,wpath2:BYTE
>> OPEN #wpath1,"/w1":UPDATE
>> OPEN #wpath2,"/w1":UPDATE
>> RUN gfx2(wpath1,"DWSet",2,0,0,80,20,0,1,1)
>> RUN gfx2(wpath2,"DWSet",0,0,21,80,4,2,3)
>> RUN gfx2(wpath1,"Select")
>> PRINT #wpath1,"Output window"
>> RUN gfx2(wpath2,"Select")
>> PRINT #wpath2,"Input window"
>> INPUT #wpath2,"Type a line",a$
>> RUN gfx2(wpath1,"Select")
>> PRINT #wpath1,a$
>> RUN gfx2(wpath2,"Select")
>> RUN gfx2(wpath2,"CurXY",0,0)
>> RUN gfx2(wpath2,"Clear")
>> FOR x=1 TO 10000
>> NEXT x
>> RUN gfx2(wpath2,"DWEnd")
>> RUN gfx2(wpath1,"DWEnd")
>> CLOSE #wpath2
>> CLOSE #wpath1
>> END
>>
>> The code when run, gives an error 184, "Window already defined". I have
>> also tried 255 as the first parameter (window type), to no avail.
>>
>> According to the Basic09 manual, the use of 0 and 255 are special case
>> window types, "0" specifies the current screen, and 255 "Current display
>> screen. Use when putting several windows on the same physical screen"
>> (Basic09 Reference, page 9-34)
>>
>> Has anyone else ever tried this? Since it's possible using a shell
>> script, in my view it _should_ be possible using Basic09.
>>
>> Regards, Bob Devries
>>
>> --
>> Besides a mathematical inclination, an exceptionally good mastery of
>> one's native tongue is the most vital asset of a competent programmer.
>>
>> Edsger W.Dijkstra, 18 June 1975
>>
>> --
>> Coco mailing list
>> Coco at maltedmedia.com
>> http://five.pairlist.net/mailman/listinfo/coco
>
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco
More information about the Coco
mailing list