Path: news.cs.au.dk!Morten.Grouleff.Mjolner.Informatics From: Morten Grouleff Newsgroups: comp.lang.beta Subject: Re: @Window in SLOTS ? Date: 23 Feb 1999 11:39:35 +0100 Organization: Mjolner Informatics. Lines: 94 Message-ID: References: <7aort6$p1k$1@sun579.rz.ruhr-uni-bochum.de> <7attks$i47$1@goof.de.uu.net> NNTP-Posting-Host: freki.mjolner.dk Mime-Version: 1.0 (generated by tm-edit 7.106) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: xinwen.cs.au.dk 919766376 17083 255.255.255.255 (23 Feb 1999 10:39:36 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 23 Feb 1999 10:39:36 GMT X-Newsreader: Gnus v5.5/Emacs 19.34 Xref: news.cs.au.dk comp.lang.beta:11840 "Sascha Kimmel" writes: [...] > This would be a nice feature. > But I would like to have a lib with standard windows, e.g. a LIB containing > an ABOUT-window, whose contents are generated dynamically. In such a way as > I can use noteUser, AlertUser and so on. > An example: > > ORIGIN '....guienv'; > INCLUDE 'aboutwindow'; > > guienv > (# > MyAboutWindow : AboutWindow > (# > do > 'About Testprogram'->title; > '1.0'->version; > > [...] > #); > > do MyAboutWindow.open; > > #); Okay, how about this: ====== mainprogram.bet ====== ORIGIN '~beta/guienv/v1.6/guienv'; INCLUDE 'aboutwindow'; --- program:descriptor --- guienv (# aWin: ^AboutWindow; oWin: ^otherWindow; do &AboutWindow[]-> aWin[]; aWin.open; 'About Testprogram'->aWin.title; '1.0'->aWin.version; &otherWindow[]->oWin[]; oWin.open; oWin[]->aWin.other[]; #) ====== aboutwindow.bet ====== ORIGIN '~beta/guienv/v1.6/fields'; -- guienvlib: Attributes -- AboutWindow: window (# (* Interface: *) version: (# v: ^Text; enter v[] do v[]->editText1.contents #); other: ^otherWindow; (* Private: *) editText1: @editText (# open::< (# do (100,30)->size; (82,56)->position; #) #); staticText2: @staticText (# open::< (# do 'version:'->label; (53,16)->size; (24,63)->position; #) #); open::< (# do editText1.open; pushButton1.open; staticText2.open; #); ; pushButton1: @pushButton (# open::< (# do 'doit!'->label; (60,20)->size; (72,138)->position; #); eventHandler::< (# onMouseUp::< (# do 'doit pressed!'->other.setComment; #) #) #) #); ; otherWindow: window (# (* Interface: *) setComment: (# t: ^Text; enter t[] do t[]->editText1.contents; #); (* Private: *) open::< (# do editText1.open; 'The Other Window'->title; INNER #); editText1: @editText (# open::< (# do (100,30)->size; (89,82)->position; #) #) #) Regards, -- ** Morten Grouleff: ** ** Earthworm Jim PC: ** ** Mjølner Informatics: **