Script references to objects in groups?
What is the correct scripting syntax for referring to the objects in a group? In a current situation, I have a group of buttons in a stack menu panel. If one of the buttons is hilited when the user presses the escape key, that button is still hilited the next time the menu opens. So I'd like to say something like: set the hilite of all the buttons in grp "mButtons" to false But this doesn't seem to work, although it seems to me I read of something like this earlier this year. If not, I can loop through the objects, but even then I can't find the syntax in the reference stacks. What am I missing? Happy New Year/Millennium! David -- David Cramer, Process Innovation Evangelist 87-1313 Border Street PBSC Computer Training Centres (an IBM company) Winnipeg MB R3H 0X4 Corporate Office Research & Development Canada This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm
Happy new year!
Best wishes to all for the coming year! Regrds, Andu This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm
Re: file question
>MetaGurus, >I want to read a certain specified range of line numbers from a huge text >file. What's the best way to do this? What I'd like is something like: > >open file thisFile >read from file thisFile from line 189 to line 300 >put it into myVar >close file thisFile > >...except that this obviously won't work. You can't specify a beginning >line and an ending line to read from a file, can you? > >Normally you'd think to just load the whole file into a variable and then >work with it, but this file is huge and needs to be accessed numerous times, >and different lines will be read each time. I know I can use character >numbers but would prefer not to. Can anyone help? > >Richard MacLemale >www.coolclassroom.com Look up "read" in Metatalk reference. It's all there. Regrds, Andu This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm
Re: file question
Richard MacLemale wrote: > > MetaGurus, > I want to read a certain specified range of line numbers from a huge text > file. What's the best way to do this? What I'd like is something like: > > open file thisFile > read from file thisFile from line 189 to line 300 > put it into myVar > close file thisFile > > ...except that this obviously won't work. You can't specify a beginning > line and an ending line to read from a file, can you? > > Normally you'd think to just load the whole file into a variable and then > work with it, but this file is huge and needs to be accessed numerous times, > and different lines will be read each time. I know I can use character > numbers but would prefer not to. Can anyone help? > > Richard MacLemale > www.coolclassroom.com Hi Richard, The script below is fine running in my own apps : open file thefile for read read from file thefile until eof put line 189 to 300 of it into b close file line 1 of the openFiles If your platform is unix and this script don't run on it, just set the read permissions of the file to "yes" and it will run again... Have fun and a big and good new millenium... Pierre -- Pierre Sahores CRDP de l'academie de Creteil Tel.: +33 143247509 20, rue Daniele-Casanova Fax.: +33 148726072 94170 Le Perreux - France [EMAIL PROTECTED] http://www.ac-creteil.fr/crdp/ Web applications servers design, XTalk's, MacOS, Linux This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm
Re: file question
Richard MacLemale wrote: > I want to read a certain specified range of line numbers from a huge text > file. What's the best way to do this? What I'd like is something like: > > open file thisFile > read from file thisFile from line 189 to line 300 > put it into myVar > close file thisFile You can read the file in bits. Try: constant buffersize = 10 -- the number of lines to read in one step function readLines thisFile,startLine,endLine open file thisFile -- now read the lines we are not interested in put zero into i repeat while i < startLine - buffersize read from file thisFile for buffersize lines get the result if it is not empty then throw it add buffersize to i end repeat -- there may be some lines left put startLine - i into i if i > 0 then read from file thisFile for i lines end if -- now read what we want and return it read from file thisFile for endLine - startLine + 1 lines close file thisFile return it end readLines Hope this helps. You will have to do some experiments to find an optimal buffersize constant. Note: I have not tried this script, so it will propably have some bugs! Regards RĂ¼diger GINIT - Gesellschaft fuer integrierte Informationssysteme mbH GINIT GmbH Ruediger zu Dohnaemail: [EMAIL PROTECTED] Technologiepark phone: +49-721-96681-63 Emmy-Noether-Str. 9 fax: +49-721-96681-11 D-76131 Karlsruhewww:http://www.ginit.de PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm
Re: FW: pointertool and mousedown
Andreas Link wrote: > > does anybody know a possibility to get the mousedown event when the pointer > tool is selected? > > (i want to get the rect, etc. of a currently modified/moved object) The mouseDown message is caught in the insert-before-script that is used by mctools. You can either remove that script, but many things wont work any more, or you can add your own script even before that: Create a button named "myMouseDown" with your mouseDown handler and execute: insert the script of button "myMouseDown" into front Have fun! RĂ¼diger GINIT - Gesellschaft fuer integrierte Informationssysteme mbH GINIT GmbH Ruediger zu Dohnaemail: [EMAIL PROTECTED] Technologiepark phone: +49-721-96681-63 Emmy-Noether-Str. 9 fax: +49-721-96681-11 D-76131 Karlsruhewww:http://www.ginit.de PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E This is the MetaCard mailing list. Archives: http://www.mail-archive.com/metacard%40lists.best.com/ Info: http://www.xworlds.com/metacard/mailinglist.htm