[Coco] multiple windows on a screen in Basic09

Bob Devries devries.bob at gmail.com
Thu Jan 14 21:01:19 EST 2010


Tim Fadden, you said:

> I think each window must have its own unique number. IE: /w1 /w2 /w3 /w4 
> etc. Looks like you are defining /w1 twice.

Tim, that's *exactly* what I am trying to do. As per the manuals, I should 
be able to put two windows onto the same screen, however, while it appears 
to be possible using a shell script, it balks in Basic09.

Unfortunately, overlay windows can't be used, since they don't have unique 
paths. You can't open two overlay windows on the screen, and print to them 
separately. AFAIK, you need to close one, and print to the one "lower 
window", and then re-open the next overlay window to print to it.

This may be do-able, but would incur a large overhead, I think.

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: "Tim Fadden" <t.fadden at cox.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Friday, January 15, 2010 9:47 AM
Subject: Re: [Coco] multiple windows on a screen in Basic09


> On 1/14/2010 2:53 PM, Bob Devries wrote:
>> 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
>>
>>
> I think each window must have its own unique number. IE: /w1 /w2 /w3 /w4 
> etc. Looks like you are defining /w1 twice.
>
> Tim
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list