Re: Updating Data Substacks
--- Dan Shafer [EMAIL PROTECTED] wrote: Ah, I see your plan. Intriguing. So rather than a splasher and a traditional HyperCard-style stack containing UI and data, have the mainstack be the UI stack which has no data in it (and can't be updated by default) and then have an invisible stack that just stores the data card by card. Hmmm. I'll have to ponder this. It may be a great solution, though. Were you to take that path, you can easily avoid import/export schemes by adding new field in your data-stack via the 'copy/paste' or 'create' schemes. This means that 'on startUp' you could see if the file-format-version of your data-stack is lower than the current in the program-stack, and execute an upgrade procedure that adds the necessary fields to the cards in the data-stack. In the old HC-days, I used a UI/data separation scheme for a multi-user project. Using the 'request' command I'd contact a server stack running remotely, and fetch the data I'd display locally. That worked great and was much more flexible/cheaper than using a 'true' multi-user database. I'll stop rambling/reminiscing now :-) Jan Schenkel. As we grow older, we grow both wiser and more foolish at the same time. (De Rochefoucald) __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
defaultStack Scope
It appears that setting the defaultStack of a stack file is a temporary action. If I change it from the Message Box, e.g., it never sticks. If I say: set the defaultStack to Foo and then put the defaultStack it always returns the stack that was the default before I typed the message. I can put the same two commands in a button's mouseUp handler and it works. So the question is what else can reset the defaultStack property without my doing so explicitly? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: defaultStack Scope
Appears to me, it's the last non palette stack to have focus. So, changing focus of a stack makes it the defaultStack. -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 2:13 AM To: [EMAIL PROTECTED] Subject: defaultStack Scope It appears that setting the defaultStack of a stack file is a temporary action. If I change it from the Message Box, e.g., it never sticks. If I say: set the defaultStack to Foo and then put the defaultStack it always returns the stack that was the default before I typed the message. I can put the same two commands in a button's mouseUp handler and it works. So the question is what else can reset the defaultStack property without my doing so explicitly? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: Updating Data Substacks
Dan, You could also store your data as XML outside or in a stack property. Use one of the available XML libraries to read it. This has the added benefit of being a 'portable' file format. just a suggestion, Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 12:07 AM To: [EMAIL PROTECTED] Subject: Updating Data Substacks It just occurred to me that the RR model which requires me to create a separate stack to hold the data for my app might be an obstacle to product upgrades. My mainstack is a splasher. My substacks are a palette (which can change) and the primary data stack (which will change). If in my next rev of the product, I wish to add features (e.g., a menu or even a button on that stack with some new functions), I would expect to ask my users to replace their current stack with the new one. But that will, obviously, result in the loss of all their data. How should this work? What am I missing? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: defaultStack Scope
Oh, and check out the topstack function. Because you're only using palettes, you may find the revMenuBar stack keeps becoming the defaultstack in the IDE. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 2:13 AM To: [EMAIL PROTECTED] Subject: defaultStack Scope It appears that setting the defaultStack of a stack file is a temporary action. If I change it from the Message Box, e.g., it never sticks. If I say: set the defaultStack to Foo and then put the defaultStack it always returns the stack that was the default before I typed the message. I can put the same two commands in a button's mouseUp handler and it works. So the question is what else can reset the defaultStack property without my doing so explicitly? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Updating Data Substacks
Dan Shafer asks: Good) Keep your data separate from the UI. This way you can update the UI independently of the data. Thanks for the fast reply, Scott. But this would require storing it in a text file and managing all the data manipulation stuff or alternatively using a database, right? If I have to do those things to keep data from being munged when I upgrade the app, I might just as well use a conventional programming environment! Transparency of data storage is crucial to stackware applications. The UNIX and Windows restriction of executables being unable to write to themselves (Rev carries this forward to Mac OS as well for consistency) does require some re-thinking of data storage if you're used to working in Mac-specific xTalks. Fortunately Rev makes it easy: You could store your data in an external text file, but then you'd have to parse it to have any useful structure to it. If the nature of your data suggests a need for more structure than a single block of text, you could use a separate stack file for data storage. The main benefit of using a stack file as opposed to a text file is the hierarchical structure afforded with objects and their custom properties. Remember that every Rev object can have custom properties, and even multiple sets of custom properties. Accessing these is very fast -- much faster than fields, and only a tiny bit slower than globals. You can use array notation if you like, and they can store binary data as well as text. Since a new stack file contains one card in one mainstack, you instantly get this rich structure for organizing your data (for just 363 bytes of overhead): stack | | | | custom propertycust. prop. set| | | custom property | | card | --- | | custom property cust. prop. set | custom property Of course you can enrich this data hierarchy by adding more cards to the stack, adding objects to the cards, adding substacks, etc. With multiple property sets, every object inherently has a two-dimensional data space; with multiple objects in nested groups across multiple cards in mutiple substacks, you can effectively create an n-dimensional data space in one stack file. Using the substacks, cardNames, customKeys, and customPropertySets properties you can instantly obtain lists of any collection of members at any level of the hierarchy. If you need a rich hierarchy with a lot of objects when the user creates a new data file, you can have a template data stack in your app's stack file, use the clone command to make a copy in memory, and set the filename propery of the newly-cloned data stack to assign it a file path; when you issue a save command for that stack, it'll save to the assigned path. Because the storage space and access speed overhead are so low with custom properties, you can use stack files for data sets as large as memory allows and expect pretty snappy performance. In this sense, it rivals Panorama and other RAM-based databases, with all the ease and flexibility of an xTalk. A simple example of using custom props for data storage: on StoreData repeat with i = 1 to the number of flds set the UserData[i] of stack MyDataStack.rev to fld i end repeat end StoreData on DisplayData lock screen repeat with i = 1 to the number of flds put the UserData[i] of stack MyDataStack.rev into fld i end repeat unlock screen end DisplayData Tip: if your data file needs to store images, just copy them to the card(s) of your data stack, and use buttons in your app's UI stacks to dispay those images by setting the button's icon. Unlike most other xTalks, Rev icons have no practical limit on size, and using this method allows a single image object to be displayed in multiple button objects with minimal RAM overhead. Another tip: If you want to store data in a way that isn't obvious for someone to read if they open the stack file in a binary editor, you can use the compress and decompress functions on data you store in custom props, which will also reduce the size of the data file. -- Richard Gaskin Fourth World Media Corporation Custom Software and Web Development for All Major Platforms Developer of WebMerge 2.0: Publish any Database on Any Site ___ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717
sockets
Thank you all for your interest in my problems with sockets, I certainly learned something from your replies. Summarizing the problems I had it was impossible to open a socket to a mail server and then get any more than the initial welcome response from that server until I restarted revolution. This actually turned out to be one real problem and a stupid mistake working together to thwart my efforts at mail server communication. In sending commands to the mail server I used linefeed as described in the Revolution documentation write "command" linefeed to socket "socket" This certainly does not work on Windows but replacing linefeed with CRLF works just fine as someone pointed out. write "command" CRLF to socket "socket" Correcting the above I have been able to talk to the mail server without problems until I close the socket and attempt to open it again. That does not work and is a Revolution specific problem. Once a socket has been opened and used and it is then closed, it is spent. Whatever clean up, clearing buffers orother things thatneed to be done in relation toa close socket command, this does not work. I even tried libResetAll. The only workaround I know for the moment is to restart Revolution or the standalone. I will continue to work and learn more about sockets in Revolution. For the moment I can check if there is mail on a pop3 server using a few lines of Revolution, which is a great promise that there are more exciting things that can be done with sockets. Thanks Larry
Re: Updating Data Substacks
Dan Shafer asks: Good) Keep your data separate from the UI. This way you can update the UI independently of the data. Thanks for the fast reply, Scott. But this would require storing it in a text file and managing all the data manipulation stuff or alternatively using a database, right? If I have to do those things to keep data from being munged when I upgrade the app, I might just as well use a conventional programming environment! Transparency of data storage is crucial to stackware applications. The UNIX and Windows restriction of executables being unable to write to themselves (Rev carries this forward to Mac OS as well for consistency) does require some re-thinking of data storage if you're used to working in Mac-specific xTalks. Fortunately Rev makes it easy: You could store your data in an external text file, but then you'd have to parse it to have any useful structure to it. If the nature of your data suggests a need for more structure than a single block of text, you could use a separate stack file for data storage. The main benefit of using a stack file as opposed to a text file is the hierarchical structure afforded with objects and their custom properties. Remember that every Rev object can have custom properties, and even multiple sets of custom properties. Accessing these is very fast -- much faster than fields, and only a tiny bit slower than globals. You can use array notation if you like, and they can store binary data as well as text. Since a new stack file contains one card in one mainstack, you instantly get this rich structure for organizing your data (for just 363 bytes of overhead): I'm busy with the development of a big database. I do it with text files with the : put my variable into URL(file:filepath) and put URL(file:filepath) into my variable It's very easy and very fast Afterwards the parsing with repeat for each... makes it also very fast. You also need to build your own indexes when saving your data to text files for retrieving your searches quickly afterwards. Hope this helps. -- Greetings. Yves COPPE Email : [EMAIL PROTECTED] ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Where am I? (volume)
I am hoping users of my nearly finished camera tutorial will copy it to their hard drives, but some may simply run it from the distribution CD. Is there some way in RR to determine what kind of volume a RR app is running from? I use several waits at various points to regulate the speed of animations and I would like the app to be able to adjust this for slower CD devices. Thanks Bob -- Robert Arnold Associate Professor of Film Boston University Tel (617) 353-7735 Fax (617) 353-1084 http://people.bu.edu/rfarnold/ ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: unexpected quit on closeStackRequest
ROB: FWIW, your handler runs fine on Mac OS 9. One thought: closeStackRequest should be speciific to the stack whose close box is clicked on: I see no reason to pass it. KURT: Thanks for testing the script, Rob. However, if I comment out the line: pass closeStackRequest Your're right, Kurt, I now realize all my closeStackRequest handlers either call a shutdown handler or include close this stack; so I've never passed the message. -- Rob Cozens CCW, Serendipity Software Company http://www.oenolog.com/who.htm And I, which was two fooles, do so grow three; Who are a little wise, the best fooles bee. from The Triple Foole by John Donne (1572-1631) ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: sockets
On Friday, July 12, 2002, at 02:22 AM, Larry Forsgren wrote: In sending commands to the mail server I used linefeed as described in the Revolution documentation write command linefeed to socket socket This certainly does not work on Windows but replacing linefeed with CRLF works just fine as someone pointed out. write command CRLF to socket socket This is a characteristic of the protocol, not Windows. (I'm assuming that POP is like SMTP and does use crlf as the line end.) Your pop client code will be able to port to other platforms without your changing this. (Good catch, Shao Sean!) Dar Scott ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: The sound of silence
Not running a QT moviejust trying to play a sound. Thanks. Ro Ro, Send me your stack and the sound file and I will take a look at it. Best regards, Mark Talluto http://www.canelasoftware.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Using XCMDs/XCFNs in Revolution
Ken Simons has created a very useful but somewhat limited chart object which is entirely written in transcript and is free. You can find it in the user contributed area of the Rev site. It only can plot line and scatter (i.e. points without connecting the lines) plots but it does a pretty good job of them. It does not appear that he is trying to take it much further to all of the other plots types (bar, column, area, and the other goofy ones). You might want to ask him. Ken's chart object is perfectly fine for my in house application but it would be great to have another option. Bill Vlahos On Friday, July 12, 2002, at 01:30 AM, Graham Samuel wrote: On Thu, 11 Jul 2002 15:57:27 +0200 yves COPPE [EMAIL PROTECTED] wrote: [...] there is well 2 things that make problem : 1) Table format in Rev doesn't exist and the chart with. 2) Print capacity is very poor. For such difficult problem I use sometimes externals (listtable-chartoid and prinReport). I hope those points are better with new versions of rev. Curses! I'm now at least half a year late in starting serious Revo work based on Mac-only products I've already written using SuperCard. In one I make heavy use of HyperGraph and in all my products I need reasonable levels of printing sophistication currently provided by PrintReport. As one of my main motives is to go cross-platform, XCMDs/XCFNs wouldn't help me anyway. HyperGraph (Boojum/Royal Software - still working in MacOS 9.2.2 after all these years!) is essentially a chart-drawing utility which draws a repertoire of charts from data in arrays - I now think one of my early scripting projects will have to be something similar (but not a rip-off!), unless someone's already done it. I've missed a few weeks of this list - does anyone know of work already done in this area? TIA Graham -- --- Graham Samuel / The Living Fossil Co. / London, UK ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Transcript Dictionary Suggestion
Subject: Re: numberFormat prop From: Scott Rossi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Recently, Steve Messimer wrote: it would be nice to see an example of how the numberFormat should work. I believe the numberFormat is a global property, not applied to specific controls. So you simply say set the numberFormat to 0.00 and then any scripts currently executing use this format. Regards, Scott Rossi Creative Director Tactile Media, Multimedia Design - There is one thing that was in the hypercard dictionaries be nice to have in the transcript dictionaries. The HC dictionaries had buttons that demonstrated the command and could be examined for the syntax. Being able to examine an actual working script would clear up an awful lot of the the miss understandings that people are having to ask these lists about. That would save a great deal of time and energy that is now having to be expended. The above types of miss understandings would not happen as often. Just a thought. Dave Calkins ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: defaultStack Scope
Appears to me, it's the last non palette stack to have focus. So, changing focus of a stack makes it the defaultStack. Which I think explains what I'm seeing. Message Box is a stack. So when I type into it, it changes the defaultStack I just set? But it goes to the topStack, which isn't message box because it's a palette? So what am I not getting? -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 2:13 AM To: [EMAIL PROTECTED] Subject: defaultStack Scope It appears that setting the defaultStack of a stack file is a temporary action. If I change it from the Message Box, e.g., it never sticks. If I say: set the defaultStack to Foo and then put the defaultStack it always returns the stack that was the default before I typed the message. I can put the same two commands in a button's mouseUp handler and it works. So the question is what else can reset the defaultStack property without my doing so explicitly? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Where am I? (volume)
I am hoping users of my nearly finished camera tutorial will copy it to their hard drives, but some may simply run it from the distribution CD. Is there some way in RR to determine what kind of volume a RR app is running from? I use several waits at various points to regulate the speed of animations and I would like the app to be able to adjust this for slower CD devices. You could try two things: 1) Since it's your distribution CD, you know the volume name. Once the defaultfolder is set to a file in that volume (i.e. by having them select a file from the volume) you can get the volume name thusly: put the defaultfolder into df set the itemdelimiter to / delete the first char of df put the first item of df into volname if volname = your cd name then -- you're running off the CD end if 2) A quick and dirty method of determining if it's a CD (not the best approach) is to try to write a file to the CD. If you get an error, then it's write protected (and thus probably a CD--again, the defaultfolder must already be pointed at the CD): open file test for write if the result is Can't open that file then -- CD-specific code end if Regards, Howard Bornstein D E S I G N E Q www.designeq.com ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
RE: defaultStack Scope
Doesn't work that way on my machine (WinXP). Open Rev - Create New Stack and name it foo. Type: put the defaultstack into the messagebox returns: stack foo -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 12:30 PM To: [EMAIL PROTECTED] Subject: RE: defaultStack Scope Appears to me, it's the last non palette stack to have focus. So, changing focus of a stack makes it the defaultStack. Which I think explains what I'm seeing. Message Box is a stack. So when I type into it, it changes the defaultStack I just set? But it goes to the topStack, which isn't message box because it's a palette? So what am I not getting? -Chipp -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Shafer Sent: Friday, July 12, 2002 2:13 AM To: [EMAIL PROTECTED] Subject: defaultStack Scope It appears that setting the defaultStack of a stack file is a temporary action. If I change it from the Message Box, e.g., it never sticks. If I say: set the defaultStack to Foo and then put the defaultStack it always returns the stack that was the default before I typed the message. I can put the same two commands in a button's mouseUp handler and it works. So the question is what else can reset the defaultStack property without my doing so explicitly? -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution -- -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- Dan Shafer Technology Visionary - Technology Assessment - Documentation Looking at technology from every angle http://www.danshafer.com 831-392-1127 Voice - 831-401-2531 Fax ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution