Re: the need for hmac-sha1 (was Re: [partly OT?] Amazon S3, EC2, cyborgs)
On Aug 28, 2006, at 8:18 PM, Andre Garzia wrote: I can't do hmac by hand, but I can do a XSLT subset in about 200 lines! :D Actually, there is nothing to hmac. If you have a digest function, I can show you how to hmac it. If you make unhex() and xorBytes() functions, then it is one line. Some folks are going to other SHA and other digests. Maybe we need generic functions like digest() and mac() with options that have standards-based names. Those options can grow over time. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
the need for hmac-sha1 (was Re: [partly OT?] Amazon S3, EC2, cyborgs)
Not only Amazon S3 but Blogger and some other web services out there need hmac-sha1 based authentication. Many soap web services need that. Anyone doing web service works on the client side would benefit from having hmac-sha1 support. I'd vote for that. I can't do hmac by hand, but I can do a XSLT subset in about 200 lines! :D Cheers andre On Aug 28, 2006, at 10:53 PM, Dar Scott wrote: On Aug 28, 2006, at 6:46 PM, Andre Garzia wrote: We use OpenSSL for the crypto-thing routines right? I think OpenSSL has SHA1 support in it so it would be a matter of exposing it just like LibXML2 has support for XSLT but RunRev team has not exposed it to upper levels. Right. I have no idea how much work that would be. Also, when adding to the language, RunRev needs to consider where a feature fits in, whether it has the right generalizations and options. What's needed in S3 is hmac-sha1. The HMAC part is straightforward, but some people might want hmac-sha1, too, or instead. On bugzilla is a feature request to allow applying MD5 to files too large to bring in at one time. This requires a partial MD5, I think. I am not able to figure out how to build one from MD5. That is, a partial would need to be built from scratch or use partial functions from, say, openSSL. No doubt, folks would want to do the same with SHA1. I imagine this would need 3 functions. So 3 variations for partial plus one for full, times hmac or not, times the number of digest methods could add up. Thats 16 functions for just MD5 and SHA1. But, if we have just one added, I would want SHA1. Like I said, I can build the hmac around that, a one-liner on a wide screen. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Loading Application into Memory
- Original Message - From: "Sarah Reichelt" <[EMAIL PROTECTED]> To: "How to use Revolution" Sent: Sunday, August 27, 2006 3:02 AM Subject: Re: Loading Application into Memory > On 8/27/06, Steven Axtell <[EMAIL PROTECTED]> wrote: > > I am writing a textbook-like application that consists of text and JPEG figures. The total size of the application is about 500 KB. When I launch the application, the first card comes up fast. When I select a button to bring up a second card, there is a fair amount of delay (about 2 seconds on a Windows Pentium III, 1 GHz, 512 MB machine) before the second card comes up. It's as though the application is loading into memory at that time. After that, all of the cards come up fast. What can I do to get the application to load into memory at launch? Also, what would I need to do to show a card briefly while the application is loading into memory? > > The mail application file will load into memory before showing the > first card. If you have a very big app, the way around this is to have > separate stack files for you sub-stacks, so that they load as needed > and not all at once. > > Your problem sounds like something is happening when you go to the > second card. Does the first card have a "closeCard" handler? Does the > second card have a "preOpenCard" or "openCard" handler? To test, try > locking messages and then going to the second card. If that is fast, > then you have something happening - perhaps loading an image file. You > may be able to delay it until after the second card is displayed. > > Cheers, > Sarah Sarah, I am not using closeCard, preOpenCard or openCard handlers. I am just using simple "go to card 1" statements. Card 2 doesn't have any images on it, so there shouldn't be any delay due to that. The only time I notice the delay with the second card is when I run the application as a standalone application. When I am working with the application file (building the application), there is no problem with delays between cards. Also, after I have launched the standalone application and went to card 2, I can go back and forth between card 1 and card 2 without delay. It gives me the impression that all of the cards except card 1 are loading up into memory when I go from card 1 to card 2. I appreciate any more thoughts that you have on this. Thanks, Steve > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-revolution > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [partly OT?] Amazon S3, EC2, cyborgs
On Aug 28, 2006, at 6:46 PM, Andre Garzia wrote: We use OpenSSL for the crypto-thing routines right? I think OpenSSL has SHA1 support in it so it would be a matter of exposing it just like LibXML2 has support for XSLT but RunRev team has not exposed it to upper levels. Right. I have no idea how much work that would be. Also, when adding to the language, RunRev needs to consider where a feature fits in, whether it has the right generalizations and options. What's needed in S3 is hmac-sha1. The HMAC part is straightforward, but some people might want hmac-sha1, too, or instead. On bugzilla is a feature request to allow applying MD5 to files too large to bring in at one time. This requires a partial MD5, I think. I am not able to figure out how to build one from MD5. That is, a partial would need to be built from scratch or use partial functions from, say, openSSL. No doubt, folks would want to do the same with SHA1. I imagine this would need 3 functions. So 3 variations for partial plus one for full, times hmac or not, times the number of digest methods could add up. Thats 16 functions for just MD5 and SHA1. But, if we have just one added, I would want SHA1. Like I said, I can build the hmac around that, a one-liner on a wide screen. Dar ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [partly OT?] Amazon S3, EC2, cyborgs
We use OpenSSL for the crypto-thing routines right? I think OpenSSL has SHA1 support in it so it would be a matter of exposing it just like LibXML2 has support for XSLT but RunRev team has not exposed it to upper levels. Andre On Aug 28, 2006, at 7:27 PM, Dar Scott wrote: On Aug 28, 2006, at 1:38 PM, Mark Wieder wrote: IIRC the problem with rev and S3 is that the Amazon S3 group has only implemented SHA1 authentication and there's no rev support for that. I'll put a vote on a SHA feature enhancement. For a little while, at least; I use shell() for now, so it is not crucial for me. I mentioned the hole in the Rev cryptographic capability in my dense & cryptic talk in RevCon05. A workaround might be to use Interachy controlled by appleTalk to do S3. I haven't looked at S3 closely, so I am not familiar with what it needs. We have SOAP now, and I suppose one could throw together a specialized SOAP or REST for S3. I'd like to have something that kept going even when Seattle falls into the sound. Some distribution would be nice. The Internet went down in the NW for a bit, according to a report on the AWS forum, and folks couldn't get their S3 data, even though AWS was up. On the other hand, the license terms "legal" and "as required by law" are vague and do not specify the location of the data or governing body. I'd hate to have my data stored in a data center in Ugabuga (or Transylvania) and find my data given to the chief (or Natasha & Boris). It is no fun to carefully abide by the law (in addition to doing right) and then discover it was the wrong law. The queues look cool, too, and seem to be mature. Dar Scott ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Plugin/Lib Structure
I know that the limits were good to have back in the old "free version" days of Rev / MetaCard, but since it's been a long time since there's been anything of the sort why are still limited to the amount of stacks that we can load (library, frontscript, backscript, etc) as well as the length of a script that we can assign to a control in a compiled app? _ Get the new Windows Live Messenger! http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [partly OT?] Amazon S3, EC2, cyborgs
On Aug 28, 2006, at 1:38 PM, Mark Wieder wrote: IIRC the problem with rev and S3 is that the Amazon S3 group has only implemented SHA1 authentication and there's no rev support for that. I'll put a vote on a SHA feature enhancement. For a little while, at least; I use shell() for now, so it is not crucial for me. I mentioned the hole in the Rev cryptographic capability in my dense & cryptic talk in RevCon05. A workaround might be to use Interachy controlled by appleTalk to do S3. I haven't looked at S3 closely, so I am not familiar with what it needs. We have SOAP now, and I suppose one could throw together a specialized SOAP or REST for S3. I'd like to have something that kept going even when Seattle falls into the sound. Some distribution would be nice. The Internet went down in the NW for a bit, according to a report on the AWS forum, and folks couldn't get their S3 data, even though AWS was up. On the other hand, the license terms "legal" and "as required by law" are vague and do not specify the location of the data or governing body. I'd hate to have my data stored in a data center in Ugabuga (or Transylvania) and find my data given to the chief (or Natasha & Boris). It is no fun to carefully abide by the law (in addition to doing right) and then discover it was the wrong law. The queues look cool, too, and seem to be mature. Dar Scott ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Plugin/Lib Structure
On 8/29/06, Scott Rossi <[EMAIL PROTECTED]> wrote: Hey plugin/lib gurus... I'm looking for feedback regarding the structure of a Rev library -- is it acceptable to arrange multiple library stacks as substacks of a single main library stack? I have several library stacks that I would like to store as substacks in a single master library stack for ease of management/updating. Some of the substacks must be loaded as frontscripts, the rest are to be loaded as backscripts. Am I facing any issues with this orientation? I don't think of myself as a plugin guru, but here's my 2 cents worth :-) If you are using the libraries as front & back scripts, not with "start using", then they could just be a selection of buttons on a single stack. I have an app that uses several stacks that are set as libraries with "start using". Having each of them as separate stack files makes for easy updating, but if they were all part of the same stack file, I would lose that advantage. So my preference would either be to have multiple front/back script buttons on a single stack, or to have multiple separate stack files. Cheers, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Plugin/Lib Structure
On Aug 28, 2006, at 1:56 PM, Scott Rossi wrote: I have several library stacks that I would like to store as substacks in a single master library stack for ease of management/updating. Some of the substacks must be loaded as frontscripts, the rest are to be loaded as backscripts. Am I facing any issues with this orientation? That depends on whether you or others using the master library stack would, at times, want to include that as a substack of another stack, say when building a standalone. I have assumed that that is the case in some of my library stacks and thus avoid having substacks of the library stack. I don't really know how others use library stacks. I have stored compressed library stacks in properties. With some tweaking it is possible to use those without saving to disk. This is especially useful for libraries needed rarely, libraries variations that are selected based on the environment, or libraries that must be loaded after an external is installed or put into a temporary location. If a library is used only as a front script or back script, you might consider putting each into a button or other control on a card in your master stack. This might be simpler. (I have a vague impression that stacks as front scripts are slower than buttons as front scripts, but I have not measured that and have no idea why that would be so.) The current darzTimer plugin has versions of the 'darzTimer Helper Library' stacks in properties. Some versions need an external and that external exists where temporary files go momentarily as the library is set up. Right now the darzTimer plugin is much like your master library stack and the helper much like your other library stacks. In the future, after I get some more feedback on how darzTimer is working out for folks, I'll augment it so users can install a 'darzTimer Library' where they want and use that in projects. It would be like your master library and would use the appropriate version of 'darzTimer Helper Library'. In that version, the darzTimer plugin would be simply a client of the 'darzTimer Library'. That library would have no substacks, which--depending on folks' build habits--might be handy. For example, I could make--in that future version--the 'darzTimer Library' a substack of the plugin. If the substacks are very large, then load time might be a factor. However, I don't know of anything inherently wrong with library substacks. Dar Scott ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: XML and Revolutin
On 8/29/06, Thomas von Fintel <[EMAIL PROTECTED]> wrote: Am 28.08.2006 um 20:14 schrieb Bruce Robertson: >> Get it here >> http://www.troz.net/Rev/tutorials.php > > Oops, the XMLDemo1.rev download links doesn't work. I had no problems downloading the stack. I've just changed my web site to a new host, so depending on how fast your local DNS gets updated, my links may not work for a couple of days. I have emailed Bruce the file directly and if anyone else has any download problems, just let me know and I'd be happy to send them the stacks they want. Regards, Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Plugin/Lib Structure
I guess it depends on if the library is for yourself, or others. In the past, I've created an autoinstaller which intalled the requisite stacks into a users main stack. Or, of course you can 'start using' your library as it's own. Another option, and one which I think could be a good idea is 'suck-up/spit-out' where you unpack the stacks in memory when the library is initilized. This has the advantage of being able to work as a substack of a mainstack. -C ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
On Aug 28, 2006, at 12:57 PM, Robert Sneidar wrote: Also note, that on OS X you can SEE the files, but cannot select them if they do not match the filter. Also be aware that the file type IS case sensitive. This is an OS X behavior for good or worse. Not a Rev thing. Mark Talluto -- CANELA Software http://www.canelasoftware.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Plugin/Lib Structure
Scott Rossi wrote: I'm looking for feedback regarding the structure of a Rev library -- is it acceptable to arrange multiple library stacks as substacks of a single main library stack? I have several library stacks that I would like to store as substacks in a single master library stack for ease of management/updating. Some of the substacks must be loaded as frontscripts, the rest are to be loaded as backscripts. Am I facing any issues with this orientation? Only if you're using these in a standalone, in which the limit of 10 frontscripts and 10 backscripts would come into play. In the IDE there are no such limits, so knock yourself out. -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
Upon doing some testing for Mac OS X, if you use the "with filter" clause, you MUST use the file type arguement, and no wild cards characters are allowed in the file type. For example: answer file "choose a file" with filter "F+PR,bob*.prg" -- allows selection of all Foxpro Program files beginning with "bob" and ending in ".prg" answer file "choose a file" with filter "*,bob*.prg" -- no dice answer file "choose a file" with filter ",bob*.prg" -- still no dice answer file "choose a file" with filter "bob*.prg" -- nuh uh. nix. nada. You can see that if you don't know the file type, the "with filter" clause is useless to you. Also note, that on OS X you can SEE the files, but cannot select them if they do not match the filter. Also be aware that the file type IS case sensitive. I think since this seems to work differently between Windows and Mac OSes, you will need to include logic to handle different Oes. Bob Sneidar IT Manager Logos Management Calvary Chapel CM Sarah Reichelt wrote: On 8/28/06, Martin Baxter <[EMAIL PROTECTED]> wrote: Sarah Reichelt wrote: On 8/25/06, Sarah Reichelt <[EMAIL PROTECTED]> wrote: Hi all, The "answer file" command usually gets me thoroughly confused, but this time, I'm not sure it is able to do what I want. I want to allow the user to select a text file, but it has to be a text file with a name like "Slot45.txt". The number will vary, but it has to start with "Slot" and have the ".txt". Is this possible? I can get it to limit to text files, but is it possible to limit the available files to only text files which start with "Slot"? The following works for me on Rev 2.7.2 on Windows answer file "choose a file" with filter "Slots,slot*.txt" - just shows .txt files beginning with 'slot' (case insensitive) However, the same code using Rev 2.6.1 on Linux does not work - even using with filter "JPG,*.jpg" The whole filter string is inserted into the file selection dialog, matching nothing. I don't have a mac - donations welcome! ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Plugin/Lib Structure
Hey plugin/lib gurus... I'm looking for feedback regarding the structure of a Rev library -- is it acceptable to arrange multiple library stacks as substacks of a single main library stack? I have several library stacks that I would like to store as substacks in a single master library stack for ease of management/updating. Some of the substacks must be loaded as frontscripts, the rest are to be loaded as backscripts. Am I facing any issues with this orientation? Thanks for any comments. Regards, Scott Rossi Creative Director Tactile Media, Multimedia & Design - E: [EMAIL PROTECTED] W: http://www.tactilemedia.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [partly OT?] Amazon S3, EC2, cyborgs
Dar- Saturday, August 26, 2006, 1:59:19 PM, you wrote: > I don't have an application (yet), but I'm curious if anybody has run > a standalone or command-line Rev script on an Amazon EC2 virtual > machine. > The Amazon [so-called] Web Services just dazzle me. Storage, queues, > virtual servers, cyborgs... All accessible and with upfront simple > pricing. Well, the combination of EC2 and S3 is very intriguing. EC2 by itself doesn't offer persistence (the data is gone after the vm quits) so you'd need to move any data you wanted to keep to S3 space. But the pricing is great and it sounds like Amazon is one of the few places around that's really thinking about what Web 3.0 is gonna look like. IIRC the problem with rev and S3 is that the Amazon S3 group has only implemented SHA1 authentication and there's no rev support for that. I tried at one point to convert a javascript implementation but kept coming up with different results, so I back-burnered it. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Skin conductance measurement
Don't forget that a Bluetooth interface will also give the maximum electrical isolation for the subject!!! (that would actually be my FIRST concern!) Optoisolators or transformers must be used (it's probably a law) between a human subject and anything connected to mains-based devices. That would rule out any DC-scaled sensors (most optoisolators are not linear) unless they're wired into a data acquisition module at the patient end. Old systems probably used PWM for output to get through the isolation. Isolation and safety should be foremost in medical equipment design. (Duh) Me? I don't want to write software that can blow up something, hurt someone or get me sued! ( I guess that also means defense contracts?) Good luck with your new project. Multiply your estimate of how much time it will take by 10, unless you can get out-of-the-box products to do what you want. Interfacing with the noisy, drifting, always changing Analog world after being in a nice, save, digital-stepped world can be a bit jarring. I'd love to have a software-hardware Bluetooth breadboard kit, with rev XCMDs for all platforms. [I can dream - or make one!!] sqb Then you'll have to learn how to program the PIC microcontroller to access the EDA device data and communicate with the main app. You could probably get by without the Bluetooth if you could deal with the limited portability, as that's what would eat up most of the battery power, but portability seems one of the primary advantages of this project. All in all, I think this isn't something I'd want to tackle without having something like the resources of an MIT behind me - note that this project was a Mechanical Engineering thesis. -- -Mark Wieder [EMAIL PROTECTED] -- stephen barncard s a n f r a n c i s c o - - - - - - - - - - - - ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: XML and Revolutin
Am 28.08.2006 um 20:14 schrieb Bruce Robertson: Get it here http://www.troz.net/Rev/tutorials.php Oops, the XMLDemo1.rev download links doesn't work. I had no problems downloading the stack. Thomas ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Skin conductance measurement
David- Thursday, August 24, 2006, 5:46:57 AM, you wrote: > I have been wanting to add a skin conductance measure to an old rev > application for a a long while. I wanted something portable and cross > platform, and nothing really seemed to fit the bill. I then came > across the Handwave Bluetooth instrument from MIT. It is described > here: > http://tinyurl.com/s9l8h > and here > http://tinyurl.com/zg3vf Well, neither of those links is very useful. The first one links to a page that says "You have attempted to access full membership-level ZDNet UK content!", and the second one just times out. Communications between Python and rev apps is fairly easy to work out if that's where you're heading. If you're trying to duplicate the work of the MIT Media Lab, I would think the harder part of the job would be designing and constructing the collector. From the MIT document: "The core of the HandWave consists of two sandwiched printed circuit boards, one containing amplification circuitry, and one containing the Bluetooth module. The amplifier board provides the power connections and the terminal for the pair of electrodes. The device resides within an injection molded polypropylene housing, which includes an external power switch and electrode connection port." Then you'll have to learn how to program the PIC microcontroller to access the EDA device data and communicate with the main app. You could probably get by without the Bluetooth if you could deal with the limited portability, as that's what would eat up most of the battery power, but portability seems one of the primary advantages of this project. All in all, I think this isn't something I'd want to tackle without having something like the resources of an MIT behind me - note that this project was a Mechanical Engineering thesis. -- -Mark Wieder [EMAIL PROTECTED] ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: XML and Revolutin
> Hi Rob, >> Dear All, >> >> I'm writing a small program that will read a text file and generate a >> corresponding SVG graphic. Ideally, the input text file would be >> readily parsed, and I'm wondering about using XML style construction. >> >> I'd appreciate pointers to any resources that would help me use XML. >> Is there, for example a tool that would strip an XML file to a list of >> variables and values? > > please check Sarah's great XML tutorial, that will definitiely get > you started. > > It was (and still is) for me a very valuable resource for dealing > with Rev XML :-) > > Get it here > http://www.troz.net/Rev/tutorials.php Oops, the XMLDemo1.rev download links doesn't work. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
Sarah Reichelt wrote: The "answer file" command usually gets me thoroughly confused, but this time, I'm not sure it is able to do what I want. I want to allow the user to select a text file, but it has to be a text file with a name like "Slot45.txt". The number will vary, but it has to start with "Slot" and have the ".txt". As has been noted here, filtering for prefixes is a lot harder than filtering for suffixes. The former is too prone to user error, while the latter is what the system expects. "Go with the grain", as they say. Mark Waddingham did an *excellent* reworking of the answer file command for v2.6.1, and since then it offer unprecedented flexibility which works on all platforms without branching statements -- from the Dictionary: Syntax answer file[s] prompt [with defaultPath] [with type types \ [or type types ...]] [titled windowTitle] [as sheet] Examples answer file "Select a file to delete:" answer files "Select the files you wish to process:" answer file "Input:" with "/Macintosh HD/" answer file (field "Prompt") with type "Revolution Stacks|rev|RSTK" -- shows stacks answer files "Select the images you wish to view:" with \ type "JPEG Images|jpg|JPEG" \ or type "GIF Images|gif|GIFf" \ or type "All Images|jpg,gif|JPEG,GIFf" So in your case you could support a suffix like "tsv" and ALSO support "txt" and all: answer files "Select a file:" with type "Tab-Separated|tsv|TEXT" \ or type "Text Files|txt|TEXT" \ or type "All Files" This will present the user on any supported platform with a standard GetFile dialog with an option control at the top which lets them choose between filtering for Tab-Separated, Text Files, or All Files, with the first one ("Tab Separated") as the default. I LOVE this new "answer file with type" option, and have been replacing all of my older "answer file" calls with this new form to allow smooth support on both Mac and Win without having to check the platform and using "...with filter..." or "...of type..." for each one separately. Thank you Mark! -- Richard Gaskin Managing Editor, revJournal ___ Rev tips, tutorials and more: http://www.revJournal.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: finding repeating patterns
On Sun, 27 Aug 2006 10:00:24 -0700 Rob Cozens <[EMAIL PROTECTED]> wrote: This started out as a mental exercise for moi, and the mouseUp logic is untested: .. OTOH, working on it led me to the following offsets function, which has been tested. function offsets targetString, sourceString put empty into offsetsList put 0 into offsetAdjustment put length(targetString)-1 into targetLengthAdjustment repeat get offset(targetString,sourceString) if it = 0 then return offsetsList put (it+offsetAdjustment) &return after offsetsList put it+targetLengthAdjustment into deleteCutoff delete char 1 to deleteCutoff of sourceString add deleteCutoff to offsetAdjustment end repeat end offsets Example: offsets("at","The cat in the hat smelled a rat where he sat.") returns 6 17 31 44 Note that the same logic can be applied to create lineOffsets, itemOffsets, and wordOffsets functions. Enjoy! Here's my version of the same thing -- I use it constantly. function multOffset str,ctr -- returns a comma-delimited list of all the offsets of str in ctr put "" into mosList put 0 into startPoint repeat put offset(str,ctr,startPoint) into os if os = 0 then exit repeat add os to startPoint put startPoint & "," after mosList end repeat if char -1 of mosList = "," then delete char -1 of mosList return mosList end multOffset function multLineOffset str,ctr -- returns a comma-delimited list of all the lineOffsets of str in ctr put multOffset(str,ctr) into charList if charList = "0" then return "0" put the number of items of charList into nbr put "" into mlo repeat with n = 1 to nbr put the number of lines of (char 1 to (item n of charList) of ctr) & "," after mlo end repeat if char -1 of mlo = "," then delete char -1 of mlo return mlo end multLineOffset -- Peter Peter M. Brigham [EMAIL PROTECTED] http://home.comcast.net/~pmbrig/ ~+~+~+~+~+~+~+~+~+~+~+~+~+~+~+~ My life has a superb cast, but I can't figure out the plot. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
Sarah Reichelt wrote: On 8/28/06, Martin Baxter <[EMAIL PROTECTED]> wrote: Sarah Reichelt wrote: > On 8/25/06, Sarah Reichelt <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> The "answer file" command usually gets me thoroughly confused, but >> this time, I'm not sure it is able to do what I want. >> >> I want to allow the user to select a text file, but it has to be a >> text file with a name like "Slot45.txt". The number will vary, but it >> has to start with "Slot" and have the ".txt". >> >> Is this possible? I can get it to limit to text files, but is it >> possible to limit the available files to only text files which start >> with "Slot"? The following works for me on Rev 2.7.2 on Windows answer file "choose a file" with filter "Slots,slot*.txt" - just shows .txt files beginning with 'slot' (case insensitive) However, the same code using Rev 2.6.1 on Linux does not work - even using with filter "JPG,*.jpg" The whole filter string is inserted into the file selection dialog, matching nothing. I don't have a mac - donations welcome! ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Smooth & Fast Stack Resize?
When I show the default decorations for a stack and resize it with the standard Windows controls, the window adjusts very quickly and smoothly. What I would like to do is to show no decorations and use my own custom controls for resizing the stack window. Unfortunately, the methods I've tried so far result in a very slow, herky-jerky resize of the stack window. Does anyone have a magic handler (that could be attached, for example, to a small rectangle graphic) that resizes the stack window as smoothly (or closely as possible) as the "OS native" resizing method works? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
On 8/28/06, Martin Baxter <[EMAIL PROTECTED]> wrote: Sarah Reichelt wrote: > On 8/25/06, Sarah Reichelt <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> The "answer file" command usually gets me thoroughly confused, but >> this time, I'm not sure it is able to do what I want. >> >> I want to allow the user to select a text file, but it has to be a >> text file with a name like "Slot45.txt". The number will vary, but it >> has to start with "Slot" and have the ".txt". >> >> Is this possible? I can get it to limit to text files, but is it >> possible to limit the available files to only text files which start >> with "Slot"? > > Thanks for the replies, Sean & Rob. I need to keep the files as text > files so they can be imported into a spreadsheet later, so a custom > file type is not an option. > > I guess I'll build my own file selector. In the meantime I've gone the > lazy way and allowed selection of any text file, with a file name > check after selection to catch any non-matching files. Since it's only > for in-house use (& mainly by me), this will be OK for now. > > Thanks, > Sarah Just a thought, If your files are tab/return delimited, it might be useful to give them a .tsv suffix. This is a more correct suffix for such files than .txt anyway. Since almost nobody actually does this, it would amount, in practice, to a custom file type suffix. In my experience, Microsoft spreadsheets understand this type. OpenOffice however does not, it opens them in Write (doh). So you should test with your preferred spreadsheet. Thanks for the idea Martin, I'll try that and see how it works. Sarah ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: answer files with filter
Sarah Reichelt wrote: On 8/25/06, Sarah Reichelt <[EMAIL PROTECTED]> wrote: Hi all, The "answer file" command usually gets me thoroughly confused, but this time, I'm not sure it is able to do what I want. I want to allow the user to select a text file, but it has to be a text file with a name like "Slot45.txt". The number will vary, but it has to start with "Slot" and have the ".txt". Is this possible? I can get it to limit to text files, but is it possible to limit the available files to only text files which start with "Slot"? Thanks for the replies, Sean & Rob. I need to keep the files as text files so they can be imported into a spreadsheet later, so a custom file type is not an option. I guess I'll build my own file selector. In the meantime I've gone the lazy way and allowed selection of any text file, with a file name check after selection to catch any non-matching files. Since it's only for in-house use (& mainly by me), this will be OK for now. Thanks, Sarah Just a thought, If your files are tab/return delimited, it might be useful to give them a .tsv suffix. This is a more correct suffix for such files than .txt anyway. Since almost nobody actually does this, it would amount, in practice, to a custom file type suffix. In my experience, Microsoft spreadsheets understand this type. OpenOffice however does not, it opens them in Write (doh). So you should test with your preferred spreadsheet. Martin Baxter ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: [EN] Answer folder
Thank you Mark for your answer. It would be great if Revolution copy these folders automatically ! Best regads, Jérôme On Monday, August 28, 2006, at 00:37AM, Mark Schonewille <[EMAIL PROTECTED]> wrote: >Hello Jérôme, > >In the application package of your Revolution application, following >the path /Revolution/Contents/Resources you will find folders named >French.lproj and German.lproj etc. Copy these folders over to the >same location in your standalone application package and it should >all work fine. > >Best, > >Mark > >-- > >Economy-x-Talk >Consultancy and Software Engineering >http://economy-x-talk.com >http://www.salery.biz > >Convert HyperCard stacks with DIFfersifier. Download it at http:// >differsifier.economy-x-talk.com > >Op 27-aug-2006, om 23:48 heeft Jérôme Rosat het volgende geschreven: > >> >> Hello, >> >> I use Revolution Studio 2.7.3 on a MacBook and with MacOS 10.4.7 in >> French. >> >> I use in the script of a button the function "Answer folder". In >> the environment of development, the buttons of the window are in >> French. In the standalone application, buttons are in English. >> >> How to make them in French? Is it a bug? >> >> Thank you for your help. > > >___ >use-revolution mailing list >use-revolution@lists.runrev.com >Please visit this url to subscribe, unsubscribe and manage your subscription >preferences: >http://lists.runrev.com/mailman/listinfo/use-revolution > > ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution