Re: character recognition
Thanks for the feedback - the sketch WAS pretty rough! I've updated it to be more accurate. On 06/04/2012 23:37, John Craig wrote: For interested parties. http://splash21.com/Gestures.html :D ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Unicode Problem
Hi Takashi-san, try this set the unicodeText of fld result to the unicodeText of fld temp Best, -- Kenji Kojima / 小島健治 http://www.kenjikojima.com/ On Apr 8, 2012, at 9:15 PM, Takashi Yoshino wrote: Hi, I found that the unicode function on LC 5.0.2 DOES works, But, the unicode function on LC.5.5.1 DOES NOT work. Here is a simple sample using Unicode. On LC 5.0.2 does works well, but LC 5.5.1 does not work. on mouseUp set the unicodeText of fld result to fld temp end mouseUp _.__ ._ _. ._ ._.__ .. ._._. _._ . ..__ ._.__ ._._. ___. .._ __.. __ .._ Takashi Yoshino http://www.wakayama-u.ac.jp/~yoshino/lab/ Tel: +81-73-457-8441 On 2012/04/06, at 18:38, Takashi Yoshino wrote: Hi, expert! I am very glad to add some functions of unicode in LC 5.5. I use them, and I have some problems about the functions. If you use the unicode functions, please give me some information. 1. put unicode function Here is my script. on mouseUp put fld Q1 into theUniData put unicode テスト into fld A1 end mouseUp I am sorry, I used Japanese character in the script. In LC 5.5, I can use Japanese text in the script ! It is great! But, the result of the script is bat. Wrong character appeared in the field. 2. set the unicode text Here is my script. on mouseUp put A1.txt into theFileName put AbsolutePathFromStack(theFileName) into theFullPath open file theFullPath read from file theFullPath until EOF set the unicodeText of fld A1 to it close file theFullPath end mouseUp I want read some Japanese from a file. LC can read text and put them into the field. Almost is OK. But there is not line feed in the text. If you use unicode function, please give me some information. _.__ ._ _. ._ ._.__ .. ._._. _._ . ..__ ._.__ ._._. ___. .._ __.. __ .._ Takashi Yoshino http://www.wakayama-u.ac.jp/~yoshino/lab/ Tel: +81-73-457-8441 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Unicode Problem
Hi Takashi-san, 2. set the unicode text Here is my script. on mouseUp put A1.txt into theFileName put AbsolutePathFromStack(theFileName) into theFullPath open file theFullPath read from file theFullPath until EOF set the unicodeText of fld A1 to it close file theFullPath end mouseUp I want read some Japanese from a file. If your Japanese text file is UTF 8 on mouseUp answer file put url (file: it) into tUrl set the unicodeText of field 1 to uniencode(tUrl, utf8) end mouseUp best, -- Kenji Kojima / 小島健治 http://www.kenjikojima.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
play sound from url on iOS
Hi friends, short question, is it possible to play a sound file from an URL in iOS? If yes, what do I need to use: play ... or iphonePlaySoundOnChannel...? The docs do not mention URL, only in the Video playback section. Thanks a lot in advance! Best Klaus -- Klaus Major http://www.major-k.de kl...@major.on-rev.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: iOS Control Instantiation problem
Sorry for the waste of bandwidth - I found it in the end: it's all to do with undetected errors in the code. In one case I had a badly formed statement that compiled without problems - I had put 'to' instead of 'into' - so the rest of the handler was skipped; in another case I had called iPhoneControlSet with a bad parameter, which again caused the script to stop executing. I find this kind of debugging tough: I am using very clunky debugging methods because I have not yet understood the following (from the LC iOS Release Notes): There is, however, a simple means of logging from an emulated target device. The LiveCode command form: put string Will write the string out to the standard error stream. These messages will be visible in Console.app when running in the simulator, and in the Console tab of the Xcode Organizer for a given target device while it is connected to the host computer. All these tests have just been with the 5.1 iPhone simulator, and I haven't yet found the Console app. Can anyone help me? Graham I wrote: I'm trying to create some native iOS controls as part of a series of experiments, using the iPhone form factor. Among other things, I'm trying to create a scroller. I seem to have fallen at the first fence. Within a preOpenCard handler for the first and only card in the stack, I use this bit of script which I got from an LC example ('Mobile Scroller Example') which works fine in the 5.1 iPhone simulator on my setup: if the environment is not mobile then exit preOpenCard end if iphoneControlCreate scroller put the result into theScID after this of course come a lot of iPhoneControlSet statements. The ONLY difference that I can see between the example that works and mine is that I have invented a new name for my scroller ID. Both examples appear to have the same iOS standalone parameters, both compile apparently error-free and the Simulator launches each one quite happily. Nevertheless, I can show that in my case the ID is empty and that there's no sign of the native control appearing on the card. I tried it with a native text control too (iPhoneControlCreate input) - same result. The control never appears and the ID is empty. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: iOS Control Instantiation problem
Console is located in /Applications/Utilities. You can also debug this way when running your app on a device. Simply open Xcode, and under your connected device, click the Console icon. Note that the Console application is used when you're running in the simulator, and the Console in Xcode is used when running your app on a physical device. Sometimes I get confused and wonder why I'm not seeing output in one or the other. :-) Chris On Apr 9, 2012, at 8:12 AM, Graham Samuel wrote: Sorry for the waste of bandwidth - I found it in the end: it's all to do with undetected errors in the code. In one case I had a badly formed statement that compiled without problems - I had put 'to' instead of 'into' - so the rest of the handler was skipped; in another case I had called iPhoneControlSet with a bad parameter, which again caused the script to stop executing. I find this kind of debugging tough: I am using very clunky debugging methods because I have not yet understood the following (from the LC iOS Release Notes): There is, however, a simple means of logging from an emulated target device. The LiveCode command form: put string Will write the string out to the standard error stream. These messages will be visible in Console.app when running in the simulator, and in the Console tab of the Xcode Organizer for a given target device while it is connected to the host computer. All these tests have just been with the 5.1 iPhone simulator, and I haven't yet found the Console app. Can anyone help me? Graham I wrote: I'm trying to create some native iOS controls as part of a series of experiments, using the iPhone form factor. Among other things, I'm trying to create a scroller. I seem to have fallen at the first fence. Within a preOpenCard handler for the first and only card in the stack, I use this bit of script which I got from an LC example ('Mobile Scroller Example') which works fine in the 5.1 iPhone simulator on my setup: if the environment is not mobile then exit preOpenCard end if iphoneControlCreate scroller put the result into theScID after this of course come a lot of iPhoneControlSet statements. The ONLY difference that I can see between the example that works and mine is that I have invented a new name for my scroller ID. Both examples appear to have the same iOS standalone parameters, both compile apparently error-free and the Simulator launches each one quite happily. Nevertheless, I can show that in my case the ID is empty and that there's no sign of the native control appearing on the card. I tried it with a native text control too (iPhoneControlCreate input) - same result. The control never appears and the ID is empty. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
MobGui Rotation Problem
Has anybody else noticed a problem with MobGui with using rotated devices? I have made both portrait and landscape cards. Then I fire up the simulator to test my app, and rotate. The first card looks good. When I switch to a second card, though, although the screen is rotated, MG has loaded the template for the other orientation. Thinking I might have done something to break MG I created a brand new stack, made sure that the MG code was in the card script of both cards, and tried it again. It still fails. I've also tested on real devices to the same result. Suggestions? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
iOS: deleting a line from a field
I have found that, for me, this line of script applied to a list field where the user has selected a line: delete the selectedLine works differently in the iOS environment compared to the IDE and desktop environments. In the IDE etc, the statement deletes the line and closes the gap remaining, but in iOS it doesn't close the gap but leaves a blank line! I don't know if this is a bug or one of the numerous errors I find myself making. I have anyway found a workaround, which is to replace the above script with something like this: put the selectedChunk into t1 -- this looks like e.g. 'char 5 to 25 of fld 4' add 1 to word 4 of t1 -- to include the return at the end of the line do delete t3 Should the original script have worked? Graham ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: iOS Control Instantiation problem
On 4/9/12 2:22 AM, Ken Ray wrote: On Apr 9, 2012, at 12:01 AM, J. Landman Gay wrote: On 4/8/12 9:44 PM, Ken Ray wrote: local sScrollerID on ShowScroller pViewRect,pContentHt -- pViewRect is the rect of the group that contains the scrolling list field I'm overlaying -- pContentHt is the total height of the content of the scrolling list field as if it didn't --need to scroll if the platform is iphone then put 0,0, (item 3 of pViewRect) , pContentHt into tContentRect I still haven't figured out why the rect always has to start at 0,0. You'd think it would start at the topleft of the scrollable group but that doesn't work. I think it needs to be relative to the topleft of the scrollable group, just like objects on a card are relative to the topleft of the card. That would make sense, but then how come we can pass the right edge of the group (card-relative) as the third parameter? Shouldn't the third param be the width of the group? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: iOS: deleting a line from a field
Using delete removes the line, but when using a scroller in iOS then readjust the height of the field that contains your lines and the rect theat the scroller should cover...:-) Dixie delete line lineCheck of fld 1 /* readjust the heights that need to be scrolled */ set the height of fld 1 to the formattedheight of fld 1 iphoneControlSet scrollid, contentRect, (0, 0, the width of fld 1, the formattedheight of fld 1) I have found that, for me, this line of script applied to a list field where the user has selected a line: delete the selectedLine works differently in the iOS environment compared to the IDE and desktop environments. In the IDE etc, the statement deletes the line and closes the gap remaining, but in iOS it doesn't close the gap but leaves a blank line! I don't know if this is a bug or one of the numerous errors I find myself making. I have anyway found a workaround, which is to replace the above script with something like this: put the selectedChunk into t1 -- this looks like e.g. 'char 5 to 25 of fld 4' add 1 to word 4 of t1 -- to include the return at the end of the line do delete t3 Should the original script have worked? Graham ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MobGui Rotation Problem
Have you tried turning the statusbar on and off in Mobgui? That has worked for me. It seems to store the geometry for each, then occasionally does not detect the correct one when the device is rotated. If you turn the setting off and then on again for each card the geometry data is copied to the other state and it might help. This in turn causes other problems later when you have updated the cards and wonder why they are updated in the IDE and not on the device (until you repeat the turn status bar off then back on to reset the geometry data again). Id love to be able to tell Mobgui what to use rather than have it guess (or just turn the feature off entirely), as especially on Android the reported screen sizes are not consistent and you have to create layouts for every possible scenario. On 9 Apr 2012, at 15:56, Mike Kerner wrote: Has anybody else noticed a problem with MobGui with using rotated devices? I have made both portrait and landscape cards. Then I fire up the simulator to test my app, and rotate. The first card looks good. When I switch to a second card, though, although the screen is rotated, MG has loaded the template for the other orientation. Thinking I might have done something to break MG I created a brand new stack, made sure that the MG code was in the card script of both cards, and tried it again. It still fails. I've also tested on real devices to the same result. Suggestions? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Windows tab buttons
On Mac I can set a background pattern on a tab button. I can also make the tab button non-opaque so a card image shows through. I can't do either of those on a Windows tab button, which seems to always be opaque and never accepts a background pattern. Has anyone found a way to trick the system into showing a pattern? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: MobGui Rotation Problem
Andrew, As you're probably aware, MG stores the with/without status bar as another resolution group (you can find them in the custom properties of each card). It's certainly not perfect, but it's a little better. It seems now like objects (that appear correct when laying them out) do not obtain the proper positions and sizes on the first pass into a card after a reorient, but on a second visit they seem to get fixed. Thanks for the suggestion... -- On the first day, God created the heavens and the Earth On the second day, God created the oceans. On the third day, God put the animals on hold for a few hours, and did a little diving. And God said, This is good. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: iOS Control Instantiation problem
-Original Message- From: use-livecode-boun...@lists.runrev.com [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of J. Landman Gay Sent: Monday, April 09, 2012 11:08 AM To: How to use LiveCode Subject: Re: iOS Control Instantiation problem On 4/9/12 2:22 AM, Ken Ray wrote: On Apr 9, 2012, at 12:01 AM, J. Landman Gay wrote: On 4/8/12 9:44 PM, Ken Ray wrote: local sScrollerID on ShowScroller pViewRect,pContentHt -- pViewRect is the rect of the group that contains the scrolling list field I'm overlaying -- pContentHt is the total height of the content of the scrolling list field as if it didn't --need to scroll if the platform is iphone then put 0,0, (item 3 of pViewRect) , pContentHt into tContentRect I still haven't figured out why the rect always has to start at 0,0. You'd think it would start at the topleft of the scrollable group but that doesn't work. I think it needs to be relative to the topleft of the scrollable group, just like objects on a card are relative to the topleft of the card. That would make sense, but then how come we can pass the right edge of the group (card-relative) as the third parameter? Shouldn't the third param be the width of the group? If the left side of the group and scrollable region (rect) are on screen and 0 then passing the right edge of the group (card-relative) as the third parameter of the contentrect will just make the virtual horizontal scrollable region a little wider than needed. Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Pattern draw changes
The 5.x docs say a change has been made to how patterns are drawn: Prior to 5.0.0-dp-2, the origin of a pattern (where it starts tiling from) is the top left of the object from which the pattern is inherited. For example, the means that the origin of a pattern of a graphic inherited from the card will be the top left of the card, rather than the top left of the graphic. AS of 5.0.0-dp-2, this functionality has been altered for objects with 'dynamic' layerMode (and for objects within a group with 'dynamic' layerMode). The origin of the patterns of such objects is now the top left of the object itself, irrespective of where the pattern is set. I tried both static and dynamic objects with a backpattern set, and the pattern origin looks identical both ways, with the origin always starting at the topleft of the object. What changed? My goal is to have the pattern align with the card backpattern no matter where the oject is located on the card. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
MobGUI issue - Objects Wrong Size On First Pass?
I have a MG project with several different orientations/resolutions/etc. set up for the different iOS devices. I noticed in testing that my higher resolution cards render at the iPhone (NON-retina) settings on the first pass. If I navigate away from the card that has the wrongly-rendered objects on them and then return, they render correctly. Has anyone else experienced this and/or worked around it? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
does Data Grid have a formattedHeight property?
I'm trying to set the height of a data grid based on the formattedHeight property, but as far as I can tell, the formattedHeight of a data grid returns the height. Is this a bug or by design? If by design, is there some other way I can accomplish this? Trevor, are you listening? :-) Thanks, Chris -- Chris Sheffield Read Naturally, Inc. www.readnaturally.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
Jacque- Monday, April 9, 2012, 8:18:58 AM, you wrote: On Mac I can set a background pattern on a tab button. I can also make the tab button non-opaque so a card image shows through. I can't do either of those on a Windows tab button, which seems to always be opaque and never accepts a background pattern. Has anyone found a way to trick the system into showing a pattern? Tab buttons on Windows *do* accept background patterns, and you can change the blending level. Tab buttons on linux *do not* accept background patterns or colors, but you can set the blending level. You can set the opaque property of a tab button on Windows or linux but it has no effect. You *can* set the icon of a tab button from the messagebox, but I don't know whether that helps you or not. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: does Data Grid have a formattedHeight property?
Hi Chris, On Mon, Apr 9, 2012 at 11:55 PM, Chris Sheffield cmsheffi...@me.com wrote: I'm trying to set the height of a data grid based on the formattedHeight property, but as far as I can tell, the formattedHeight of a data grid returns the height. Is this a bug or by design? If by design, is there some other way I can accomplish this? Trevor, are you listening? :-) Have a look to the dgFormattedHeight property in the datagrid API: http://lessons.runrev.com/s/lessons/m/datagrid/l/7344-data-grid-api Best Regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: does Data Grid have a formattedHeight property?
Thank you! I figured it had to be there somewhere. Missed it on my first pass through the docs. On Apr 9, 2012, at 4:34 PM, zryip theSlug wrote: Hi Chris, On Mon, Apr 9, 2012 at 11:55 PM, Chris Sheffield cmsheffi...@me.com wrote: I'm trying to set the height of a data grid based on the formattedHeight property, but as far as I can tell, the formattedHeight of a data grid returns the height. Is this a bug or by design? If by design, is there some other way I can accomplish this? Trevor, are you listening? :-) Have a look to the dgFormattedHeight property in the datagrid API: http://lessons.runrev.com/s/lessons/m/datagrid/l/7344-data-grid-api Best Regards, -- -Zryip TheSlug- wish you the best! 8) http://www.aslugontheroad.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
On 4/9/12 5:06 PM, Mark Wieder wrote: Has anyone found a way to trick the system into showing a pattern? Tab buttons on Windows *do* accept background patterns, and you can change the blending level. Thanks Mark. When I set the backpattern of a Windows tab button, nothing happens. I have toggled on and off the opaque with no effect (just in case.) All I see is the default system background. I'm mostly testing in WinXP, which is what my client uses, but I did briefly try it in Win7; it didn't look any different. Does the version of LiveCode matter? This project is still in 5.02. Or maybe it's Parallels not drawing it? -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
how to do this type of search
Hello All, A straightforward question, I think. I have a list of 5 tab-delimited items per line. Each item can be either a single word or a group of words separated by a /. Example: abide abode/abidedabode/abided/abiddenabides abiding alight alit/alighted alit/alighted alights alighting arise arose arisen arises arising awake awoke awoken awakes awaking be was/werebeenis being What I want my script to do is find which line contains an exact match to a given item. For example: -- is, on line 5 -- alighted, on line 2 All I can think of is to use brute force and go thru the list item by item. Maybe with wholematches or such, there's some faster way? Thank you. -- Nicolas Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Zipping Up an LC standalone program
Been putting together a litte script to get all my files ready for a release and used the revZIPxxx commands to make a zip file of the LC standalone program - this all on a Mac. The resulting zip file is only 4kb in size, obvioulsy not correct. The code is pretty straightfroward: revZipOpenArchive myZipFile,write *if* the result is not empty *then* *answer* the result *answer* file Zip file revZipAddItemWithFile myZipFile,myApp.app,it *if* the result is not empty *then* *answer* the result revZipCloseArchive myZipFile Zipping the same file with the built-in OS X compress function works fine and so does the CleanARchiver utitlity. ANy ideas? -- Pete Molly's Revenge http://www.mollysrevenge.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: how to do this type of search
The 'lineOffset' function will be your friend here... Dixie A straightforward question, I think. I have a list of 5 tab-delimited items per line. Each item can be either a single word or a group of words separated by a /. Example: abide abode/abidedabode/abided/abiddenabides abiding alightalit/alighted alit/alighted alights alighting arise arose arisen arises arising awake awoke awoken awakes awaking bewas/werebeenis being What I want my script to do is find which line contains an exact match to a given item. For example: -- is, on line 5 -- alighted, on line 2 All I can think of is to use brute force and go thru the list item by item. Maybe with wholematches or such, there's some faster way? Thank you. -- Nicolas Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
Here is one simple way, assuming you have control over the word list: -- one-time prep - optimize list for searching local sMyWordList put url (file: tPathToMyWords) into sMyWordList put tab before sMyWordList replace CR with (tab CR tab) in sMyWordList replace slash with (tab slash tab) in sMyWordList put tab after sMyWordList -- at search time set the wholeMatches to true -- not really required since we're including delimiters in the search string put lineOffset(tab tWord tab, sMyWordList) into tWordLineNumber Phil Davis On 4/9/12 5:40 PM, John Dixon wrote: The 'lineOffset' function will be your friend here... Dixie A straightforward question, I think. I have a list of 5 tab-delimited items per line. Each item can be either a single word or a group of words separated by a /. Example: abide abode/abidedabode/abided/abiddenabides abiding alight alit/alighted alit/alighted alights alighting arise arose arisen arises arising awake awoke awoken awakes awaking be was/werebeenis being What I want my script to do is find which line contains an exact match to a given item. For example: -- is, on line 5 -- alighted, on line 2 All I can think of is to use brute force and go thru the list item by item. Maybe with wholematches or such, there's some faster way? Thank you. -- Nicolas Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Phil Davis PDS Labs Professional Software Development http://pdslabs.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
The 'lineOffset' function will be your friend here... If only it truly were that simple... In my example, lineOffset would return 3 for is. But 5 is what I'm after. -- Nicolas Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
Set the wholematches to true before your search, then it will only locate the string when it is a whole word. -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig On Apr 9, 2012, at 9:06 PM, Nicolas Cueto wrote: The 'lineOffset' function will be your friend here... If only it truly were that simple... In my example, lineOffset would return 3 for is. But 5 is what I'm after. -- Nicolas Cueto ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
Jacque- Monday, April 9, 2012, 3:53:10 PM, you wrote: Thanks Mark. When I set the backpattern of a Windows tab button, nothing happens. I have toggled on and off the opaque with no effect (just in case.) All I see is the default system background. I'm mostly testing in WinXP, which is what my client uses, but I did briefly try it in Win7; it didn't look any different. Does the version of LiveCode matter? This project is still in 5.02. I tried this with 5.02 on XP just before posting to make sure I wasn't misremembering something. I set a background pattern for the card, then set a background pattern for the tab button. And set the blending level down to 10 so I could see the psychedelic effect when I moved the control around. When you say you toggled the opaque control, you mean with the message box, right? We're talking about the same control? Because there's no opaque control for tab buttons on the property editor. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
On Apr 9, 2012, at 9:06 PM, Nicolas Cueto wrote: If only it truly were that simple... In my example, lineOffset would return 3 for is. But 5 is what I'm after. Sorry, setting the wholematches to true then doing lineoffset will get you whole matches for lines. Instead: set the wholematches to true put wordoffset(is,m) into ww put the number of lines of word 1 to ww of m into whichline -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
If using 5.5 there is also lineindex put lineindex(wordoffset(is,m)) into ww ^-- should give the line the word is found on. On Mon, Apr 9, 2012 at 7:28 PM, Peter M. Brigham, MD pmb...@gmail.comwrote: On Apr 9, 2012, at 9:06 PM, Nicolas Cueto wrote: If only it truly were that simple... In my example, lineOffset would return 3 for is. But 5 is what I'm after. Sorry, setting the wholematches to true then doing lineoffset will get you whole matches for lines. Instead: set the wholematches to true put wordoffset(is,m) into ww put the number of lines of word 1 to ww of m into whichline -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Zipping Up an LC standalone program
Pete- Monday, April 9, 2012, 5:19:49 PM, you wrote: Zipping the same file with the built-in OS X compress function works fine and so does the CleanARchiver utitlity. ANy ideas? Don't bother with the revzip things. They've never worked very well. You'll get better results and more features (folders and such) if you shell out to zip or ditto. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: how to do this type of search
Yeah, i'm too fuzzy to answer questions lately. The proper method would be put wordoffset(is,m) into ww -- m being the container put lineindex(word ww of m) into tLine On Mon, Apr 9, 2012 at 7:33 PM, Mike Bonner bonnm...@gmail.com wrote: If using 5.5 there is also lineindex put lineindex(wordoffset(is,m)) into ww ^-- should give the line the word is found on. On Mon, Apr 9, 2012 at 7:28 PM, Peter M. Brigham, MD pmb...@gmail.comwrote: On Apr 9, 2012, at 9:06 PM, Nicolas Cueto wrote: If only it truly were that simple... In my example, lineOffset would return 3 for is. But 5 is what I'm after. Sorry, setting the wholematches to true then doing lineoffset will get you whole matches for lines. Instead: set the wholematches to true put wordoffset(is,m) into ww put the number of lines of word 1 to ww of m into whichline -- Peter Peter M. Brigham pmb...@gmail.com http://home.comcast.net/~pmbrig ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
On 4/9/12 8:28 PM, Mark Wieder wrote: Jacque- Monday, April 9, 2012, 3:53:10 PM, you wrote: Thanks Mark. When I set the backpattern of a Windows tab button, nothing happens. I have toggled on and off the opaque with no effect (just in case.) All I see is the default system background. I'm mostly testing in WinXP, which is what my client uses, but I did briefly try it in Win7; it didn't look any different. Does the version of LiveCode matter? This project is still in 5.02. I tried this with 5.02 on XP just before posting to make sure I wasn't misremembering something. I set a background pattern for the card, then set a background pattern for the tab button. And set the blending level down to 10 so I could see the psychedelic effect when I moved the control around. When you say you toggled the opaque control, you mean with the message box, right? We're talking about the same control? Because there's no opaque control for tab buttons on the property editor. Right, I set the opaque with the message box, just in case it mattered. We're using the same OS and the same LiveCode version so I'm not sure what's going on. The pattern shows up fine on my Mac. Maybe I'll just send the stack to my client and ask him what he sees. Thanks for the confirmation though, it helps a lot. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Zipping Up an LC standalone program
Or just use the Mac Archive or Compress menu item in the Finder. It works great. Kee ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
On 4/9/12 8:28 PM, Mark Wieder wrote: I tried this with 5.02 on XP just before posting to make sure I wasn't misremembering something. Just an update: I made a new stack in Win XP with a single tab button, imported an image, hid it, and set the backpattern of the tab button to the ID of the image. There was no fill. I think it must be Parallels. You can't get much simpler than what I did. What emulator do you use again? Richard likes it. Maybe I should try that. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.hyperactivesw.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Script editor instability
Since I upgraded to 5.5, now and then the script editor cannot be moved. Rather the titlebar becomes a sort of resize tab, as if I clicked and dragged the actual resize tab. So trying to move the script editor window only results in resizing that window.I think it only changes the width, not the actual rect, like the real resize tab would. I cannot reproduce it, but it happens at least two or three times in a session. I can dismiss the window with cmd-W, but this sometimes crashes LC. Anyone else see this? I have to save often to prevent real data loss. Never heard of this before the upgrade. Craig Newman ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: iOS Control Instantiation problem
That would make sense, but then how come we can pass the right edge of the group (card-relative) as the third parameter? Shouldn't the third param be the width of the group? Yes, *if* you don't want horizontal scrolling with the scroller… here's a good example of how I use it with a Data Grid that has more columns than are visible and (of course) more rows than are visible (grp 1 is my sample Data Grid): iphoneControlSet sScrollerId, rect, the rect of group 1 put sum(the dgProps[column widths] of grp 1) into tContentWidth put (the dgProp[row height] of grp 1) * (the number of elements of the dgData of grp 1) into tContentHeight iphoneControlSet sScrollerId, contentRect, (0, 0, tContentWidth, tContentHeight) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: iOS Control Instantiation problem
iphoneControlSet sScrollerId, rect, the rect of group 1 put sum(the dgProps[column widths] of grp 1) into tContentWidth put (the dgProp[row height] of grp 1) * (the number of elements of the dgData of grp 1) into tContentHeight iphoneControlSet sScrollerId, contentRect, (0, 0, tContentWidth, tContentHeight) or better yet (thanks zyrip!): iphoneControlSet sScrollerId, rect, the rect of group 1 iphoneControlSet sScrollerId, contentRect, (0, 0, (the dgFormattedWidth of grp 1),(the dgFormattedHeight of grp 1)) Ken Ray Sons of Thunder Software, Inc. Email: k...@sonsothunder.com Web Site: http://www.sonsothunder.com/ ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Windows tab buttons
Jacque- Monday, April 9, 2012, 7:36:49 PM, you wrote: You can't get much simpler than what I did. Yes you can. I didn't import an image, just used some of the built-in patterns. Hang on. Yep, that worked for me as well. What emulator do you use again? Richard likes it. Maybe I should try that. I use VirtualBox. I like it better than VMWare or Parallels. YMMV. It's got its own annoying quirks, like the necessity of installing a new version of the extensions every time a VirtualBox update comes out. but it's fast and stable and robust and means I don't have to have a Windows computer at work. -- -Mark Wieder mwie...@ahsoftware.net ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Zipping Up an LC standalone program
tar (from the shell) works even better. On 9 April 2012 19:29, Kee Nethery k...@kagi.com wrote: Or just use the Mac Archive or Compress menu item in the Finder. It works great. Kee ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode -- Stephen Barncard San Francisco Ca. USA more about sqb http://www.google.com/profiles/sbarncar ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Browse tool. I give up.
I have been doing this sort of thing for so many years, and still find the simplest things will not work. OK. Someone tell me why I cannot choose the browse tool under script control upon opening a stack in a new session. Wait. Maybe I should write an openstack or opencard handler that has choose browse tool in it. Wait. That does not work. And the funny thing is that I can place all kinds of other stuff, beeps, text loads, whatever, on both or either sides of that line, and though all the other stuff works fine, the tool will still start off as a pointer. I will finally deliver this stack with cantModify set to true, so the problem will go away, but what on earth do I not know in the meantime? Craig Newman ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Browse tool. I give up.
on openstack send browsetool to me in 1 tick end openstack on browsetool choose browse tool end browse tool ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Browse tool. I give up.
On 04/09/2012 11:18 PM, dunb...@aol.com wrote: I have been doing this sort of thing for so many years, and still find the simplest things will not work. OK. Someone tell me why I cannot choose the browse tool under script control upon opening a stack in a new session. Wait. Maybe I should write an openstack or opencard handler that has choose browse tool in it. Wait. That does not work. And the funny thing is that I can place all kinds of other stuff, beeps, text loads, whatever, on both or either sides of that line, and though all the other stuff works fine, the tool will still start off as a pointer. I will finally deliver this stack with cantModify set to true, so the problem will go away, but what on earth do I not know in the meantime? Craig Newman It sounds like you're launching Livecode by opening the stack. The problem is that the stack opens before the IDE is fully loaded and you are attempting to get the IDE to do something it's not ready for. Putting 'choose browse tool' into an openstack handler works fine here, so long as the IDE is open before the stack is opened, but not if I attempt to launch Livecode by opening the stack. Colin's script works, but you might notice the stack opens and when the IDE first opens, it is set to pointer and then switches to browse, which demonstrates the problem. Warren ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Is this possible on iOS?
For most of my apps I build a launcher that then loads the actual working stack from a remote location. I assume that's impossible due to Apple's restrictions on loading code remotely. But is it possible to save out a stack from the app locally, allowing it to be saved periodically and loaded locally at startup? ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode