Re: One more question about Rev cgi & binary data
Dave, Thanks for the code; I'll try that as well, although the problem is not to parse data from multipart encoded forms, but to keep binary data consistent inside Rev variables... I'm probably doing something wrong, but as soon as I use "line" or "lineoffset" in a script, or even try to count the number of chars, binary data seem to get corrupted... Probably because the "return" char is part of the binary data... JB > > > I've done this before with jpeg files uploaded as binary data. I can't > find the script I used, but I think the handler below is what I used > to parse the form data. It's based on a libCGI script that Jacqueline > Gay used to distribute. It will handle standard and multipart forms. > > If you need to find out how the data was encoded (e.g. whether base64 > or binary) then I think you'll need to look for a "Content-transfer- > encoding:" header somewhere below the boundary for the file part. > > Cheers > Dave > > ## > > //assumes sPostdata already contains the entire posted data > // watch for wrapping in the email > > local sCGIData, sPostdata > > on parsePostData > if sPostdata is empty then exit parsePostData > if matchText($CONTENT_TYPE,"multipart/form-data; > *boundary=(.*)",tMimeBoundary) then > stripQuotes tMimeBoundary > > put lineOffset(tMimeBoundary,sPostdata) into tStartLine > if tStartLine = 0 then exit parsePostdata > repeat forever > put lineOffset(tMimeBoundary,sPostdata, tStartLine + 1) + > (tStartLine + 1) into tEndline > if tEndline < 1 then exit repeat > if matchText(line tStartLine to tEndLine of > sPostdata,"Content- > Disposition: +form-data; +name=""e&"([^""e&"]+)",tName) then > put lineOffset(CRLF & CRLF, line tStartLine > to tEndLine of > sPostdata) + tStartLine + 1 into tDataOffset > > put line tDataOffset to tEndLine - 1 of > sPostdata into tValue > rStripCR tValue > put tValue into sCGIData[tName] > put tEndLine into tStartLine > else > exit repeat > end if > end repeat > else ##assume www form urlencoded > if sPostdata <> empty then split sPostdata by "&" and "=" > repeat for each line tKey in the keys of sPostData > put URLDecode(sPostData[tKey]) into sCGIData[tKey] > end repeat > end if > end parsePostData > ___ > use-revolution mailing list > use-revolution@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: ___ 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: way to listen to port 127.0.0.1
> Unless someone can fix the "browser window flashes white while > browser between pages problem" - - - if that can be fixed, then > I can do it all inside Revolution, which really is preferable.? This > just needs to run on Mac Leopard. I was able to eliminate (or at least significantly reduce) flicker by putting a lock screen at the beginning of the browserBeforeNavigate handler and an unlock screen in the browserNavigateComplete handler in the card script of the sample stack. ___ 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: Creating a Search Field
Hello Gregory, If I well understand your aim, you could be interested in adapting the search device I programmed thanks to very good advices from Éric Chatonnet (as always :-)). By the way, his tutorial "How to Master Users Data in Entry Boxes" might interest you; you can find it on his site : http://www.sosmartsoftware.com/ I have three fields : - one is the list to be searched in (say "bigList") -- this field could have its visible property set to false - a second is a one line field where the user write what he/she is searching for (say "entry") - the third is a field where the results of the search appears (say, "results") the script of the field "entry" is as follow : local mySubList, - ON rawkeyUp find empty REPEAT find fld "entry" in fld "bigList" of this cd IF the result is "not found" THEN exit repeat ELSE put value(the foundline) & cr after mySubList END IF END repeat put empty into fld "results" put mySubList into fld "results" select char 2 to -1 of line 1 of fld "results" select after fld "entry" put empty into mySubList END rawkeyUp ON returnInField -- here do what you want with the found word (I use the found word to find a corresponding card in another stack) END returnInField HTH Best regards from Grenoble André Le 26 avr. 08 à 18:25, Gregory Lypny a écrit : Hello everyone, I tried to write a handler for one of those nifty search fields that you find in Mac programs like Mail, where it pulls up found records as you type a search phrase. I came up with the following. (Incidentally, I do not use the filter command because it is much slower than "repeat for each" on big data sets.) on keyDown put me into searchString get fld "Data" repeat for each line thisLine in it if thisLine contains searchString then put thisLine & return after hits end repeat if the last character of hits is return then delete the last character of hits put hits into fld "Browse List" put "Found" && recordCount(hits,"f") into fld "Number of Records" -- a hit count function pass keyDown end keyDown It does the trick, but has a number of glitches that I'd like to fix. The main one is that it pulls up records that do not contain the search string. For example, if I type "mit" (without quotes), it will correctly pull up records that contain Mitchell; however, if I then type another letter, say "p", it will still pull up the same records that contain Mitchell even though none of these has the string "mitp", although some do contain "mit" in one spot and somewhere else a "p" and others do not contain "p" at all. I must not be understanding the contains operator. The other thing that tells me I haven't gotten it right is that the hit list should get smaller the more characters I type and bigger as I delete them. Well, most of the time the first character I type (e.g., just an "m") turns up nothing; I have to type a second character to get it going. And keyDown does not seem to respond to the Delete key. Any suggestions would be most appreciated. Gregory ___ 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
(no subject)
Sadhu Nadesan Sent via iPhone by AT&T ___ 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: (no subject)
congrats Best regards, Mark Schonewille -- Economy-x-Talk Consulting and Software Engineering http://economy-x-talk.com http://www.salery.biz Our servers may be off-line between 28 April and 1 May. If you have an urgent request, you can contact us at <[EMAIL PROTECTED]>. Apologies for any inconveniences. On 27 apr 2008, at 18:06, Sadhu Nadesan wrote: Sadhu Nadesan Sent via iPhone by AT&T ___ 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 email with no subject
Apologies about mail saying servers down. It's not true and I didn't send it. Sadhu Nadesan Sent via iPhone by AT&T ___ 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
Table cell formatting
I'm poking around with the table cell format options. It looks like even though you can select multiple columns for formatting it only actually seems to work on some of the columns. Also, it looks like you need to press return twice for it to take affect. Where is documentation for this? I've entered mm, mmyy, mm and it doesn't seem to make any difference. I've also tried entering "d" for day but that is not an accepted letter. What would the correct settings be for using the system date format? Bill Vlahos ___ 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: Table cell formatting
I forgot to include that this is for the "Date" format of the table cell. Bill On Apr 27, 2008, at 12:45 PM, Bill Vlahos wrote: I'm poking around with the table cell format options. It looks like even though you can select multiple columns for formatting it only actually seems to work on some of the columns. Also, it looks like you need to press return twice for it to take affect. Where is documentation for this? I've entered mm, mmyy, mm and it doesn't seem to make any difference. I've also tried entering "d" for day but that is not an accepted letter. What would the correct settings be for using the system date format? Bill Vlahos ___ 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: Creating a Search Field
Jacqueline, for me, if it were only just this list. And thank you for the variation, André. I'll put it up beside what I've got and perhaps nab the best of both. Gregory Montreal On Sun, Apr 27, 2008, at 1:00 PM, Jacqueline replied: Gregory Lypny wrote: Thank you Jacqueline, How embarrassing. I just read the fine print at the bottom of the keyDown entry in the Rev dictionary. No excuse for my oversight. I think I also found the answer to the Delete key issue there too. I wish I had a nickle for every time I've embarrassed myself on the list. :) -- Jacqueline Landman Gay | [EMAIL PROTECTED] And so did André: Hello Gregory, If I well understand your aim, you could be interested in adapting the search device I programmed thanks to very good advices from Éric Chatonnet (as always :-)). By the way, his tutorial "How to Master Users Data in Entry Boxes" might interest you; you can find it on his site : http://www.sosmartsoftware.com/ I have three fields : - one is the list to be searched in (say "bigList") -- this field could have its visible property set to false - a second is a one line field where the user write what he/she is searching for (say "entry") - the third is a field where the results of the search appears (say, "results") the script of the field "entry" is as follow : local mySubList, - ON rawkeyUp find empty REPEAT find fld "entry" in fld "bigList" of this cd IF the result is "not found" THEN exit repeat ELSE put value(the foundline) & cr after mySubList END IF END repeat put empty into fld "results" put mySubList into fld "results" select char 2 to -1 of line 1 of fld "results" select after fld "entry" put empty into mySubList END rawkeyUp ON returnInField -- here do what you want with the found word (I use the found word to find a corresponding card in another stack) END returnInField HTH Best regards from Grenoble André ___ 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
PRINTING IN RUNREV 2.9
Hello, I don't know if anyone knows whether it is possible to print and entire scrolling field in Revolution 2.9. I've not been able to do it with Revolution 2.5.1. The idea is to be able to print the entire scrolling field, including that which is not visible in the card on the screen. (If anyone knows how to do it in 2.5.1 I would also like to know.) Any help with this is greatly appreciated. All the best, Leonardo Wild ___ 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: PRINTING IN RUNREV 2.9
Leonardo, Did you try: revPrintField the name of Field 1 works here for me Tom McGrath On Apr 27, 2008, at 9:56 PM, Biocentric Solutions wrote: Hello, I don't know if anyone knows whether it is possible to print and entire scrolling field in Revolution 2.9. I've not been able to do it with Revolution 2.5.1. The idea is to be able to print the entire scrolling field, including that which is not visible in the card on the screen. (If anyone knows how to do it in 2.5.1 I would also like to know.) Any help with this is greatly appreciated. All the best, Leonardo Wild ___ 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: Tab in tables and determine which cell
Thanks to JB for his suggestions on keeping count but Ken Ray came up with a more elegant solution. I'm not sure why Rev hasn't documented this. Thanks, Bill Vlahos Here you go, Bill... after some research, it turns out that Rev doesn't give you too many messages to work with in their "table" field. However I found that we can get what we want by putting the attached code into the *card* script (or higher in the hierarchy), but not in the table field itself, as it won't get the messages necessary. Here's the code for the card script: --- on mouseUp -- Use this to trap whtn the user clicks in a cell put GetCellName(the long id of the target) into fld "Log" pass mouseUp end mouseUp on tabIntoCell pObj -- Use this to trap the user tabbing into a cell put GetCellName(pObj) into fld "Log" end tabIntoCell on mouseDown -- Sent when user clicks in table put the long id of the target into tObj set the uCurrentCell of tObj to GetCellName(tObj) end mouseDown on revUpdateCellValue pObject,txcell,tycell,tCurrentcell,tNewText -- Sent when user tabs to another cell or uses the arrow keys send "tabIntoCell pObject" to me in 20 milliseconds pass revUpdateCellValue end revUpdateCellValue function GetCellName pObj put revGetCellName(pObj) into tName replace "revCell-" with "" in tName return tName end GetCellName --- So use 'mouseUp' and 'tabIntoCell' to do what you want (I have the output going into a field "Log", but you can do what you want). What you get back is a row,column output (e.g. "1,2" or "4,3", etc.) that you can use to do what you need to do. Have fun! Ken On Apr 23, 2008, at 6:41 PM, Bill Vlahos wrote: I have a table that users can tab through. I'd like to be able to determine when a user tabs into a certain column and do some action. I can determine it when the user clicks in a cell but how can I determine it when they tab into a cell? Bill Vlahos ___ 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
PRINTING IN RUNREV 2.9
> I don't know if anyone knows whether it is possible to print and > entire scrolling field in Revolution 2.9. Yes, export it to a text file. Then go out to shell and print it. Use awk and printf if you need to format it. If on Linux, or presumably on OSX too, you can just pipe the result of printf to a print driver. It works, its quick, its easy. I have not been able to get revPrintField to work on Linux. It does print, but the resulting page setup does not affect the layout or size and the field comes out truncated and with strange tab settings. When I've tracked down if this is due to the page setup dialog or to revPrintField, later this week, I'll file a bug report. Awk is a complete antique, but it works. If you need a reference on it, get Sed and Awk from O'Reilly. The Aho Kernigan Weinberger book is out of print now.. Peter ___ 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: PRINTING IN RUNREV 2.9
I, too, have been having trouble with printing using 2.9. revShowPrintDialog does nothing. The Dialog that pops up using Answer Printer does not allow the selection of page size or orientation. Bummer! I did, once, see the correct Page Setup Dialog; don't know what I did but I was trying most everything under the sun. It's pretty obvious that the rev printing commands just do not work with 2.9. I'm pretty sure they did with 2.7.4; maybe 2.8.1 as well. Joe Wilkins On Apr 27, 2008, at 8:24 PM, Thomas McGrath III wrote: Leonardo, Did you try: revPrintField the name of Field 1 works here for me Tom McGrath On Apr 27, 2008, at 9:56 PM, Biocentric Solutions wrote: Hello, I don't know if anyone knows whether it is possible to print and entire scrolling field in Revolution 2.9. I've not been able to do it with Revolution 2.5.1. The idea is to be able to print the entire scrolling field, including that which is not visible in the card on the screen. (If anyone knows how to do it in 2.5.1 I would also like to know.) Any help with this is greatly appreciated. All the best, Leonardo Wild ___ 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 Joe Lewis Wilkins [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