Re: is among the words AND find words
Whoops, sorry Phil, replied before I saw your post. On Tue, Dec 20, 2011 at 9:41 PM, Phil Davis rev...@pdslabs.net wrote: Hi Jim, Try token instead of word as the chunk you're looking for. It will work. On 12/20/11 4:42 PM, Jim Hurley wrote: If the sentence: Now is the time, for all good men. is within the field myField , then find word time in field myField is successful. The word time is found despite the fact that it is not delimited with spaces on either side. But time is among the words of Now is the time, for all good men. returns false, since is among the words reads the comma after time. It requires the spaces on either side of time as delimiters. But time is among the tokens of Now is the time, for all good men. returns true. Unfortunately you will have to write your own tokenOffset() function. :-) Phil Davis Has this come up before and has it been suggest that this be an enhancement? That is to say, it would be helpful if is among the words and find word(s) behave the same with respect to the space delimiter. Or am I missing something? Jim Hurley __**_ 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-livecodehttp://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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- 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
Scripter's Scrapbook (was arrowkey)
A reminder that the Scripter's Scrapbook is designed to do exactly this... www.ssbk.co.uk or http://www.runrev.com/store/product/scripters-scrapbook-1-0-0/ And if you want a 'Socks' category, you can have that too! Hugh Senior FLCo On Dec 20, 2011, at 7:04 AM, Mike Bonner wrote: I saw the other input for this problem, I'm thinking that checking keysdown() for the arrow keycodes would be a more reliable solution depending on your needs. I swear I keep learning new things on this list and in the forums. Luckily I have a horrible memory so I get the bonus of relearning the same thing over and over! Yeah, me too -- as one of my patients once said to me, I have a mind like a steel sieve. I save lots of tips from this list in a stack I've made, and thank God for LC's find command Wish it worked for socks. (Anyone seen a sort of a brownish-greenish one, medium, almost new?) -- Peter Peter M. Brigham ___ 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: Database syntax
Actually, this was precisely the situation in which multiple LC arrays, being used as tables, where the array key was the primary key of the table, and joining these tables was far faster to do using LC arrays than any in-memory SQL database. Admittedly these were only 2-way and 3-way joins, so _maybe_ if they were 7-way joins I might not have seen the same performance difference. If you need a RDBMS (and integrity checks, triggers, etc), then you probably do need it -- there's no point in re-inventing the wheel. But if you need to just store a list of blobs, then an array with pointers to blobs on the filesystem might still be much faster (and much simpler). I'm not opposed to RDBMS per se. In my time, I've used Oracle, Firebird, Frontbase, Postgresql, Openbase, HSQL, Valentina and Sqlite, and I still use some of those if the situation needs it. Bernard On Wed, Dec 21, 2011 at 2:25 AM, Pete p...@mollysrevenge.com wrote: But as soon as you get into multiple datasets with links between them or multiple ways to access one dataset or multiple users accessing the same data, there's a strong justification to use a database unless the performance/memory issues are so bad that you can't deal with them (which I find difficult to believe). ___ 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: is among the words AND find words
No worries Pete! Phil On 12/21/11 12:09 AM, Pete wrote: Whoops, sorry Phil, replied before I saw your post. On Tue, Dec 20, 2011 at 9:41 PM, Phil Davisrev...@pdslabs.net wrote: Hi Jim, Try token instead of word as the chunk you're looking for. It will work. On 12/20/11 4:42 PM, Jim Hurley wrote: If the sentence: Now is the time, for all good men. is within the field myField , then find word time in field myField is successful. The word time is found despite the fact that it is not delimited with spaces on either side. But time is among the words of Now is the time, for all good men. returns false, since is among the words reads the comma after time. It requires the spaces on either side of time as delimiters. But time is among the tokens of Now is the time, for all good men. returns true. Unfortunately you will have to write your own tokenOffset() function. :-) Phil Davis Has this come up before and has it been suggest that this be an enhancement? That is to say, it would be helpful if is among the words and find word(s) behave the same with respect to the space delimiter. Or am I missing something? Jim Hurley __**_ 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-livecodehttp://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-livecodehttp://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: is among the words AND find words
Hmmm ... what will happen to there is time,enough for it - NB no space before or after the comma. I think you *want* to find time in that case - but I'm not sure if you will by stripping out all non-letter characters from the word time,enough. Would it not be simpler (and faster) to find the the word as a string, and then verify that the char before is not a letter, and that the char after it is not a letter ? but then, what about find the time-bomb here ? Is time a word, or time-bomb a single, hyphenated word ? Oh well, you choose :-) -- Alex. On 21/12/2011 05:10, Jim Hurley wrote: Think I will try something like this. Test to see if the word, as a string, is in the text. If so, then strip out all characters not between a and z or A and Z and then check to see if the stripped-down word is the same as the test word. That way I will find time even if it appears as (time) or time. or time, or with quotes on either side, etc. I wonder what algorithm LC uses in Find word(s) to find only words. Jim Hurley ___ 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: Database syntax
On 12/21/11 1:44 AM, Bernard Devlin bdrun...@gmail.com wrote: Hi Bernard, Hi All, 1) Look guys. DATABASE must be used when A) it is much bigger of RAM ... B) you want persistence of data C) you have complex structures of data (tables, links, ) D) You need kind of client/server E) You want use different API to acess DATA. E.g. From LiveCode and PHP and NET and iOS. It is clear that if you try stick to REV arrays somehow, say goodbye to PHP access for example. ++ DATABASE gives ANOTHER abstraction LAYER ++ 2) WE all remember, yet 1990-95 years when computers was with ONE MEGABYTE of RAM But dbs even in that years was many megabytes and even Gbs sometimes. Yes, today RAM can be easy 4-8-16GB ... Yes for many apps this is more than enough ... So some people can try drop DB usage .. 3) But as for me ... When I start describe some model of some app, and I see Person, Phone, Group, Account, Invoice, ... And yet 50-100 objects/tables ... And x3 - x5 more links between them You will put that into INI file ??? Into txt file ??? Into Array ??? Never ... Database World already 40-50 years develop first of all DATA MODELs Navigational, Relational, Object-Relational, pure OO 4) I think I never have relate speed of SQLite and memory usage ... Not sure what you mean ... When we did benches of Valentina against of others RDBMS, We always give same cache size for example. Benches clear did show, that wile DB is small, and is much less of RAM and given cache, even FileMaker could be faster enough ... Really nothing hard todo here ... But when db grow to some SizeCritical then happens Oops, Immediate degradation in speed because HDD dances. What benches have show yet 15 years ago, is that thanks to vertical storage format of tables, and other format of indexes, Valentina DB hasthis SizeCritical significant higher ... But right, if db is big then all db engines start dances with HDD. And here becomes important another parameter: how speed go down while db grow. x10 more of RAM. x100 more of RAM. Is it linear or worse or better? Many issues here. Conditions change dynamically ... In my experience _no database_ will outperform arrays as data storage. The simple reason is that a) arrays are stored in memory b) Of course, if you run out of memory, you are in dangerous territory anyway. If you read some of the arguments of Ruslan (of Valentina fame), even he admits that native in-memory data structures are faster than database access. And he usually does that whilst he's in the process of arguing that sqlite is much slower than Valentina. In following those arguments, I've seen Ruslan argue that sqlite's speedy performance comes at the cost of high memory usage (he argues Valentina performs faster, and is designed to only use small amounds of memory). Think about it: if you are setting the dgData of a Datagrid to an array of 1,000 items, if you are having to get that data from a disk-based database before putting it into the dgData, then that is going to be slower. The only way in which things could be faster, would be if the Datagrid was only asking for data as it was scrolled/sorted. If you have a lot of blob data to display, and the aggregated size of that data is more than the memory you have available, then you are going to have to bring it in from disk. Whether or not it is faster to do that than to store it on the filesystem (with your 1,000 member array just containing the path to the binary data), I do not know. My experiments some years ago using millions of rows of numeric data, demonstrated to me that nothing available to Livecode except its own arrays really proved a suitably fast datastore (I compared it with in-memory databases, accessing some high-cost commercial databases with in-memory tables too). One thing that has not been brought out so far in this discussion is that when passing data to a SQL statement in Livecode, it is possible to have your data stored in an array with numbered keys e.g. myArray[1], myArray[2]... and then to pass that array's name to the Livecode SQL functions using :1, :2... to pass in the data. Search the following page for this line of text: | revExecuteSQL myID,insert into mytable values(:1,:2,:1),myArray | http://docs.runrev.com/Command/revExecuteSQL Bernard -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] ___ 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
DataGrid Problem
Hi Pete! I am using the Form version of DataGrid and not a table. The form is a scrolling field. I have one field strategy that displays statements from an array. This works fine. But as I stated before I have not been able to add an Edit Field (field freq). When I include the following code for a Edit Field (field freq) in the Behavior script, the statements from my Strategy field disappears! on FillInData pDataArray set the text of field Strategy of me to pDataArray[Strategy] set the text of field freq of me to empty end FillInData on LayoutControl local theFieldRect,theMasterRect put the rect of me into theMasterRect put the rect of field Strategy of me into theMasterRect set the left of field Strategy of me to item 1 of theMasterRect put the rect of field freq of me into theMasterRect set the right of field freq of me to item 4 of theMasterRect put the rect of grc Background of me into r set the rect of grc Background of me to r end LayoutControl Any suggestions would be greatly appreciated! Charles Szasz csz...@mac.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
iPad screenrecording: how?
Hi there, I want to make a screen recording of my new iPad app. How do you people do this? There are no iPad screen recording apps yet. Are there? For now I started to use the iPad simulator and use Quicktime to make a screenrecording (OSX Lion). This gives a fairly good .mov file but the sound is terrible because it uses the internal mic of my iMac. I use iMovie to do the editing. Any ideas and advice is welcome. greetings, William ___ 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: is among the words AND find words
The token keyword works with time, and time-bomb (assuming you want to find just time). I've found it to be really useful in a number of circumstances in parsing out chunks of text from strings that don't fit the standard word model - like SQL statements which can include commas, parentheses, quotes, single quotes, and periods. Many punctuation marks are treated as separate tokens as well as anything delimited by a space, return, tab, or semicolon. Only drawback is that there is no tokenOffset function so you have to write your own using a repeat loop to go through the string. Pete On Wed, Dec 21, 2011 at 2:15 AM, Alex Tweedly a...@tweedly.net wrote: Hmmm ... what will happen to there is time,enough for it - NB no space before or after the comma. I think you *want* to find time in that case - but I'm not sure if you will by stripping out all non-letter characters from the word time,enough. Would it not be simpler (and faster) to find the the word as a string, and then verify that the char before is not a letter, and that the char after it is not a letter ? but then, what about find the time-bomb here ? Is time a word, or time-bomb a single, hyphenated word ? Oh well, you choose :-) -- Alex. On 21/12/2011 05:10, Jim Hurley wrote: Think I will try something like this. Test to see if the word, as a string, is in the text. If so, then strip out all characters not between a and z or A and Z and then check to see if the stripped-down word is the same as the test word. That way I will find time even if it appears as (time) or time. or time, or with quotes on either side, etc. I wonder what algorithm LC uses in Find word(s) to find only words. Jim Hurley __**_ 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- 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: iPad screenrecording: how?
you might use a tripod and a video camera. Shooting the screen isn't too bad if the camera and subject are steady. The audio could be direct if it's first turned down in level - video cameras are usually mic level in and would probably sound better with a close up mic I've used this technique as a way to report bugs in software that involve two screens - that can't be screen-recorded properly. On 21 December 2011 09:56, William de Smet williamdes...@gmail.com wrote: Hi there, I want to make a screen recording of my new iPad app. How do you people do this? There are no iPad screen recording apps yet. Are there? For now I started to use the iPad simulator and use Quicktime to make a screenrecording (OSX Lion). This gives a fairly good .mov file but the sound is terrible because it uses the internal mic of my iMac. I use iMovie to do the editing. Any ideas and advice is welcome. greetings, William ___ 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
RE: iPad screenrecording: how?
Hi William: I have to set up an external video camera to do recordings of iPad. Works decently, but a lot of overhead. Would be very interested if there is an application that can render the gestures (i.e. shows virtual hand and finger gestures). That would be a *great* app to have for anyone who needs to train on how to run an iPad. It would also need to somehow render the iPad bezel (home button, orientation lock, et.al.). If anyone wants to develop such a thing, you will definitely have at least one customer! Mark ___ 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: DataGrid Problem
Ah yes, sorry I'm not very familiar with using datagrid forms. The lesson after the one I pointed you to is titled How Can The User Edit Field Content In A Datagrid Form so hopefully it will provide some guidance. Maybe zryip or Trevor can help? On Wed, Dec 21, 2011 at 8:12 AM, Charles Szasz csz...@mac.com wrote: Hi Pete! I am using the Form version of DataGrid and not a table. The form is a scrolling field. I have one field strategy that displays statements from an array. This works fine. But as I stated before I have not been able to add an Edit Field (field freq). When I include the following code for a Edit Field (field freq) in the Behavior script, the statements from my Strategy field disappears! on FillInData pDataArray set the text of field Strategy of me to pDataArray[Strategy] set the text of field freq of me to empty end FillInData on LayoutControl local theFieldRect,theMasterRect put the rect of me into theMasterRect put the rect of field Strategy of me into theMasterRect set the left of field Strategy of me to item 1 of theMasterRect put the rect of field freq of me into theMasterRect set the right of field freq of me to item 4 of theMasterRect put the rect of grc Background of me into r set the rect of grc Background of me to r end LayoutControl Any suggestions would be greatly appreciated! Charles Szasz csz...@mac.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 -- 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: is among the words AND find words
Feature request! Sign me up! Bob On Dec 21, 2011, at 10:12 AM, Pete wrote: The token keyword works with time, and time-bomb (assuming you want to find just time). I've found it to be really useful in a number of circumstances in parsing out chunks of text from strings that don't fit the standard word model - like SQL statements which can include commas, parentheses, quotes, single quotes, and periods. Many punctuation marks are treated as separate tokens as well as anything delimited by a space, return, tab, or semicolon. Only drawback is that there is no tokenOffset function so you have to write your own using a repeat loop to go through the string. Pete ___ 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: Database syntax
I think I've hijacked this thread beyond providing the OP with the links to the Runrev documentation. I'm emailing Ruslan privately about this discussion so that others don't have to bother with it. I'm not slighting Ruslan in the least, nor saying that people should avoid databases. Bernard ___ 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: Database syntax
I think the guy who asked the original question must be tearing his hair out by now! One thing I mentioned earlier that might be relevant to him is that there's no need to use blobs when storing LC arrays. Just use base64 encoding and store it in a text field, works fine. Some folks on this list pointed me in that direction a few months back. On Wed, Dec 21, 2011 at 12:48 AM, Bernard Devlin bdrun...@gmail.com wrote: Actually, this was precisely the situation in which multiple LC arrays, being used as tables, where the array key was the primary key of the table, and joining these tables was far faster to do using LC arrays than any in-memory SQL database. Admittedly these were only 2-way and 3-way joins, so _maybe_ if they were 7-way joins I might not have seen the same performance difference. If you need a RDBMS (and integrity checks, triggers, etc), then you probably do need it -- there's no point in re-inventing the wheel. But if you need to just store a list of blobs, then an array with pointers to blobs on the filesystem might still be much faster (and much simpler). I'm not opposed to RDBMS per se. In my time, I've used Oracle, Firebird, Frontbase, Postgresql, Openbase, HSQL, Valentina and Sqlite, and I still use some of those if the situation needs it. Bernard On Wed, Dec 21, 2011 at 2:25 AM, Pete p...@mollysrevenge.com wrote: But as soon as you get into multiple datasets with links between them or multiple ways to access one dataset or multiple users accessing the same data, there's a strong justification to use a database unless the performance/memory issues are so bad that you can't deal with them (which I find difficult to believe). ___ 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 -- 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: is among the words AND find words
Before rushing for a tokenOffset feature request, perhaps it might be worth considering some other options. Perhaps there could be a way of signalling a string of items which would mark either what should be considered a non-word, or a non-token. That way such a search feature could be used with non-ascii languages. I believe there is some work coming up at some point on right-to-left languages. So perhaps this string of word-items or token-items could be added then. Just my 2c. Bernard On Wed, Dec 21, 2011 at 6:24 PM, Bob Sneidar b...@twft.com wrote: Feature request! Sign me up! ___ 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: is among the words AND find words
Bob et. al. Message: 14 Date: Wed, 21 Dec 2011 08:24:59 -0800 From: Bob Sneidar b...@twft.com To: How to use LiveCode use-livecode@lists.runrev.com Subject: Re: is among the words AND find words Message-ID: ba41a52b-8b6e-4dc0-9996-1253098ea...@twft.com Content-Type: text/plain; charset=us-ascii I think this underscores the need for the words keyword to be upgraded to reflect real text. For instance, word delimiters could be a property containing all the characters which might be word delimiters, all the punctuations for example. I don't know how you would treat a hyphen. That would work. Upon thinking about it, I am not sure what the application would be for finding specific words in an english (or any other languages) phrase. It is useful for finding keywords in a Livecode statement for sure. Bob The application would be one of gatering all the lines in a text field that contain a word or words and displaying them in a second field. The text might also include quotes and that messes up the wordOffset function. Turns out the tokens don't work since the period is not a token so the token 1 of time. is time. Astonishingly, it turns out that LC all allows for Put time is among the tokens of Now is the time, for all good men. That returns true. But Put men is among the tokens of Now is the time, for all good men. returns false--because of the period after men I think I'll just strip the lead and trailing characters from the resulting wordOffset word, using something like: function stripEnds tWord repeat if charIsNotLetter (char 1 of tWord) then delete char 1 of tWord next repeat else exit repeat end if end repeat repeat if charIsNotLetter (char -1 of tWord) then delete char -1 of tWord next repeat else exit repeat end if end repeat return tWord end stripEnds function charIsNotLetter tChar put charToNum(tChar) into tNum switch case tNum = charToNum(a) and tNum = charToNum(z) return false break case tNum = charToNum(A) and tNum = charToNum(Z) return false break default return true end switch end charIsNotLetter But I would prefer RR to implement your suggestion of augmenting the delimiters for word to include all non-letters. ___ 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: Database syntax
On 12/21/11 8:27 PM, Bernard Devlin bdrun...@gmail.com wrote: I think I've hijacked this thread beyond providing the OP with the links to the Runrev documentation. I'm emailing Ruslan privately about this discussion so that others don't have to bother with it. I'm not slighting Ruslan in the least, nor saying that people should avoid databases. Hi Bernard, Be sure I have jump not because feel any offend. Just I like repeat some things many times. May be because I am a teacher by nature :-) Its interesting even for myself answer question: when you choose db and when no. So I have try list that possible reasons ... Agree its hard find such reasons together. And I think yet dozen reasons direct and indirect can be remembered. -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] ___ 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: DataGrid Problem
On Wed, Dec 21, 2011 at 5:12 PM, Charles Szasz csz...@mac.com wrote: I am using the Form version of DataGrid and not a table. The form is a scrolling field. I have one field strategy that displays statements from an array. This works fine. But as I stated before I have not been able to add an Edit Field (field freq). When I include the following code for a Edit Field (field freq) in the Behavior script, the statements from my Strategy field disappears! on FillInData pDataArray set the text of field Strategy of me to pDataArray[Strategy] set the text of field freq of me to empty end FillInData on LayoutControl local theFieldRect,theMasterRect put the rect of me into theMasterRect put the rect of field Strategy of me into theMasterRect set the left of field Strategy of me to item 1 of theMasterRect put the rect of field freq of me into theMasterRect set the right of field freq of me to item 4 of theMasterRect put the rect of grc Background of me into r set the rect of grc Background of me to r end LayoutControl Hi Charles, For editing a field in a datagrid form, you need a little more code than the fillindata and layoutcontrol handlers. First of all the LayoutControl handler have one parameter you can use for getting the rect of me: on LayoutControl pControlRect In the LayoutControl handler, you are placing controls relatively to their own rects instead of using the rect of the datagrid cell. I have not tested the result of your code, but the result should be a bit different than the result you are expecting. This could maybe explain why the strategy field is not visible: because it is maybe not include in the rect of the cell row. Comment the layoutcontrol code and try again. About editing a field in a datagrid form: Most common usage is to edit a field by double clicking on it. So you need a mouseDoubleUp handler in your behavior script: on mouseDoubleUp pMouseBtnNum if pMouseBtnNum is 1 then if (word 1 of the target is field) then if the dgProps[allow editing] of the dgControl of me then EditFieldText the long id of the target, the dgIndex of me,freq exit mouseDoubleUp end if end if end if pass mouseDoubleUp end mouseDoubleUp 1. The field is editable only if the datagrid is editable (the dgProps[allow editing] of the dgControl of me) 2. With the EditFieldText handler we are assuming you have a key named freq in your datagrid data. 3. the dgIndex of me is the index of the edited row. For more information about the EditFieldText handler, have a look to this datagrid lesson: http://lessons.runrev.com/s/lessons/m/datagrid/l/7336-How-Can-The-User-Edit-Field-Content-in-a-Data-Grid-Form- 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: is among the words AND find words
An alternative approach: Assuming that the phrase now is the time, for all good men is in fld 1, then this button script on mouseUp put findWord(fld 1,time) end mouseUp function findWord pContent,pStr if pStr is among the tokens of pContent then return num of words of char 1 to offset(pStr,pContent) of pContent else return 0 end findWord reurns 4 as expected. Similarly for 'time-bomb' and other variants. Hugh Senior FLCo ___ 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: is among the words AND find words
FlexibleLearning- Wednesday, December 21, 2011, 12:00:29 PM, you wrote: An alternative approach: Assuming that the phrase now is the time, for all good men is in fld 1, then this button script on mouseUp put findWord(fld 1,time) end mouseUp function findWord pContent,pStr if pStr is among the tokens of pContent then return num of words of char 1 to offset(pStr,pContent) of pContent else return 0 end findWord reurns 4 as expected. Similarly for 'time-bomb' and other variants. Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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: is among the words AND find words
Thanks, Hugh. Unfortunately there are a couple of problems. It won't work for this line: Now is the time. because of the period. Nor for the line Now is the time for all because of the quotes. Stripping the lead and trailing characters is cumbersome, but fairly reliable--except for quotes, where I just replace the quote with a carrot or whatever. An alternative approach: Assuming that the phrase now is the time, for all good men is in fld 1, then this button script on mouseUp put findWord(fld 1,time) end mouseUp function findWord pContent,pStr if pStr is among the tokens of pContent then return num of words of char 1 to offset(pStr,pContent) of pContent else return 0 end findWord reurns 4 as expected. Similarly for 'time-bomb' and other variants. Hugh Senior FLCo ___ 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
Function to Upper and Lower Case sentences
I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam ___ 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: is among the words AND find words
Plus it doesn't work for the case where the sentence ends with a period and you search for men - that returns zero. On Wed, Dec 21, 2011 at 12:09 PM, Mark Wieder mwie...@ahsoftware.netwrote: FlexibleLearning- Wednesday, December 21, 2011, 12:00:29 PM, you wrote: An alternative approach: Assuming that the phrase now is the time, for all good men is in fld 1, then this button script on mouseUp put findWord(fld 1,time) end mouseUp function findWord pContent,pStr if pStr is among the tokens of pContent then return num of words of char 1 to offset(pStr,pContent) of pContent else return 0 end findWord reurns 4 as expected. Similarly for 'time-bomb' and other variants. Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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 -- 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: Database syntax
How can you tell how big the encoded array will be? I would use blobs whenever the size might increase in the future beyond what I expected. But if the array is a fixed size, and you know for certain it will never grow beyond x, then a text column would do fine. Bob On Dec 21, 2011, at 10:35 AM, Pete wrote: One thing I mentioned earlier that might be relevant to him is that there's no need to use blobs when storing LC arrays. Just use base64 encoding and store it in a text field, works fine. Some folks on this list pointed me in that direction a few months back. ___ 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: is among the words AND find words
On Dec 21, 2011, at 12:28 PM, Jim Hurley wrote: where I just replace the quote with a carrot or whatever You must mean caret? ;-) Otherwise I think you just found an algorithm that could solve the problem of world hunger! Bob ___ 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: is among the words AND find words
I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. Bob On Dec 21, 2011, at 12:09 PM, Mark Wieder wrote: Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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: Function to Upper and Lower Case sentences
On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam __ function titleCase theText, forceIt if forceIt is true then put tolower(theText) into theText end if repeat with theWordNum = 1 to the number of words of theText put toupper(char 1 of word theWordNum of theText) \ char 2 to -1 of word theWordNum of theText \ into word theWordNum of theText end repeat return theText end titleCase ___ 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: Function to Upper and Lower Case sentences
Try something like this: on mouseUp get fld yourField put toLower(it) into it repeat for each word tWord in it put toUpper(char 1 of tWord) into char 1 of tWord end repeat put it into fld yourField end mouseUp -Original Message- From: Sivakatirswami ka...@hindu.org To: How to use LiveCode use-livecode@lists.runrev.com Sent: Wed, Dec 21, 2011 10:45 am Subject: Function to Upper and Lower Case sentences I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam ___ 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: Function to Upper and Lower Case sentences
OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. On 12/21/11 10:57 AM, Bob Sneidar wrote: On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam __ function titleCase theText, forceIt if forceIt is true then put tolower(theText) into theText end if repeat with theWordNum = 1 to the number of words of theText put toupper(char 1 of word theWordNum of theText) \ char 2 to -1 of word theWordNum of theText \ into word theWordNum of theText end repeat return theText end titleCase ___ ___ 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: Function to Upper and Lower Case sentences
I think he's looking for something to capitalize the first char of each sentence, not of each word. On Wed, Dec 21, 2011 at 12:57 PM, Bob Sneidar b...@twft.com wrote: end repeat -- 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: is among the words AND find words
Not really - try parsing out an SQL SELECT statement. Granted that's not really English text but if you want to make this a general purpose function, you have to deal with that circumstance. I needed to do that and ended up going through the text and inserting a space after each comma if there wasn't already one there. On Wed, Dec 21, 2011 at 12:54 PM, Bob Sneidar b...@twft.com wrote: I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. Bob On Dec 21, 2011, at 12:09 PM, Mark Wieder wrote: Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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 -- 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: Database syntax
The problem I had was that it just didn't work using a blob. The encoded array got stored OK but LC didn't recognise what came back as an array, don't remember all the details. The default max size of a text field in SQLite is 1 million characters so I think he'd be pretty safe. On Wed, Dec 21, 2011 at 12:48 PM, Bob Sneidar b...@twft.com wrote: How can you tell how big the encoded array will be? I would use blobs whenever the size might increase in the future beyond what I expected. But if the array is a fixed size, and you know for certain it will never grow beyond x, then a text column would do fine. Bob On Dec 21, 2011, at 10:35 AM, Pete wrote: One thing I mentioned earlier that might be relevant to him is that there's no need to use blobs when storing LC arrays. Just use base64 encoding and store it in a text field, works fine. Some folks on this list pointed me in that direction a few months back. ___ 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 -- 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: Function to Upper and Lower Case sentences
On 12/21/11 3:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. Seems like there should be some kind of fancy regex to do this, something that looks for space-period-character and capitalizes the character part. Maybe one of our regex gurus knows how. I think your lines solution could work too. You might have to make a more than one pass if you think there will be question marks or exclamation points at line endings. -- 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: Database syntax
Not any hair left to pull out. I am enjoying the banter and learning at the same time. Keep it coming! -= Mike Sent from my BlackBerry device on the Rogers Wireless Network -Original Message- From: Pete p...@mollysrevenge.com Sender: use-livecode-boun...@lists.runrev.com Date: Wed, 21 Dec 2011 10:35:26 To: How to use LiveCodeuse-livecode@lists.runrev.com Reply-To: How to use LiveCode use-livecode@lists.runrev.com Subject: Re: Database syntax I think the guy who asked the original question must be tearing his hair out by now! One thing I mentioned earlier that might be relevant to him is that there's no need to use blobs when storing LC arrays. Just use base64 encoding and store it in a text field, works fine. Some folks on this list pointed me in that direction a few months back. On Wed, Dec 21, 2011 at 12:48 AM, Bernard Devlin bdrun...@gmail.com wrote: Actually, this was precisely the situation in which multiple LC arrays, being used as tables, where the array key was the primary key of the table, and joining these tables was far faster to do using LC arrays than any in-memory SQL database. Admittedly these were only 2-way and 3-way joins, so _maybe_ if they were 7-way joins I might not have seen the same performance difference. If you need a RDBMS (and integrity checks, triggers, etc), then you probably do need it -- there's no point in re-inventing the wheel. But if you need to just store a list of blobs, then an array with pointers to blobs on the filesystem might still be much faster (and much simpler). I'm not opposed to RDBMS per se. In my time, I've used Oracle, Firebird, Frontbase, Postgresql, Openbase, HSQL, Valentina and Sqlite, and I still use some of those if the situation needs it. Bernard On Wed, Dec 21, 2011 at 2:25 AM, Pete p...@mollysrevenge.com wrote: But as soon as you get into multiple datasets with links between them or multiple ways to access one dataset or multiple users accessing the same data, there's a strong justification to use a database unless the performance/memory issues are so bad that you can't deal with them (which I find difficult to believe). ___ 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 -- 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 ___ 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: Function to Upper and Lower Case sentences
I did something similar recently, where not only was the delimiter important, but preserving the exact delimiter was also important. In my case it was breaking out the parts of a query that might contain AND or OR. What I did was: replace AND with cr AND cr in theList replace OR with cr OR cr in theList repeat with theLineCount = 1 to the number of lines of theList step 2 put line theLineCount of theList into theLine put line theLineCount +1 into theDelimiter -- do some stuff with whatcha got put theLine theDelimiter cr after theNewList end repeat You could modify this to deal with a period and a space, a period and a close parens, a period and a character return or a period and anything else that might apply. Just don't append CR for a single period and cr, or you will end up with blank lines that were not there beforehand. Also, now that I think about it, you should probably also replace ... with an ellipsis before continuing, and any other thing that might come after a period in normal text. You should end up with a list of sentences, and whatever came after them. Also, now that I think about it some more, you should probably replace 2 cr's with some kind of placeholder cr before anything else in a repeat loop to account for multiple CR's. That would throw your function out of sync if an extra line showed up anywhere along the way. Bob On Dec 21, 2011, at 1:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. On 12/21/11 10:57 AM, Bob Sneidar wrote: On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam __ function titleCase theText, forceIt if forceIt is true then put tolower(theText) into theText end if repeat with theWordNum = 1 to the number of words of theText put toupper(char 1 of word theWordNum of theText) \ char 2 to -1 of word theWordNum of theText \ into word theWordNum of theText end repeat return theText end titleCase ___ ___ 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: is among the words AND find words
OIC good point. But wouldn't it be better simply isolate the comma delimited arguments (usually in parens) in an SQL statement and then deal with them as items? But I suppose there are all kinds of special circumstances that would make a general purpose word function very unwieldy. Bob On Dec 21, 2011, at 1:17 PM, Pete wrote: Not really - try parsing out an SQL SELECT statement. Granted that's not really English text but if you want to make this a general purpose function, you have to deal with that circumstance. I needed to do that and ended up going through the text and inserting a space after each comma if there wasn't already one there. On Wed, Dec 21, 2011 at 12:54 PM, Bob Sneidar b...@twft.com wrote: I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. Bob On Dec 21, 2011, at 12:09 PM, Mark Wieder wrote: Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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 -- 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 ___ 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: Database syntax
Probably something similar to what I encountered when passing an AES encrypted string that *might* contain commas or characters that would jack a query. Using sqlYoga solved that for me as the insert and update queries are escaped by default (correct me if I am wrong). Bob On Dec 21, 2011, at 1:22 PM, Pete wrote: The problem I had was that it just didn't work using a blob. The encoded array got stored OK but LC didn't recognise what came back as an array, don't remember all the details. The default max size of a text field in SQLite is 1 million characters so I think he'd be pretty safe. On Wed, Dec 21, 2011 at 12:48 PM, Bob Sneidar b...@twft.com wrote: How can you tell how big the encoded array will be? I would use blobs whenever the size might increase in the future beyond what I expected. But if the array is a fixed size, and you know for certain it will never grow beyond x, then a text column would do fine. Bob On Dec 21, 2011, at 10:35 AM, Pete wrote: One thing I mentioned earlier that might be relevant to him is that there's no need to use blobs when storing LC arrays. Just use base64 encoding and store it in a text field, works fine. Some folks on this list pointed me in that direction a few months back. ___ 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 -- 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 ___ 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: is among the words AND find words
Bob- Wednesday, December 21, 2011, 12:54:46 PM, you wrote: I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. For that matter Now is the time, for all good men is also a problem with the data. That comma has no reason being there. -- -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: Function to Upper and Lower Case sentences
Or a close paren? Seems like modern English usage is to put the period before the close paren at the end of a sentence (although I personally hate that). On Wed, Dec 21, 2011 at 1:30 PM, J. Landman Gay jac...@hyperactivesw.comwrote: On 12/21/11 3:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. Seems like there should be some kind of fancy regex to do this, something that looks for space-period-character and capitalizes the character part. Maybe one of our regex gurus knows how. I think your lines solution could work too. You might have to make a more than one pass if you think there will be question marks or exclamation points at line endings. -- 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- 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: Database syntax -- array to BLOB
On 12/21/11 11:22 PM, Pete p...@mollysrevenge.com wrote: The problem I had was that it just didn't work using a blob. The encoded array got stored OK but LC didn't recognise what came back as an array, don't remember all the details. This can be interested feature actually. A) I not remember right now if V4REV support ARRAY to BLOB ... but probably yes, should work, because we have FixedBinary field VarBinary field BLOB field and should be something to put binary value from REV into field. But since array is special structure, may be we can/need provide special API func for this. E.g. WriteArrayToBLOB( fld, array ) anyway with Valentina no need to have overhead of base64 encoding... The default max size of a text field in SQLite is 1 million characters so I think he'd be pretty safe. B) BLOB/TEXT in Valentina DB limited by huge numbers ... -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] ___ 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: is among the words AND find words
I think I tried that but the arguments aren't always comma delimited unfortunately. Somewhat related,I wish SQLite provided more formatted access to the table structures. Some stuff is available via the PRAGMA statements but for other information, there's no alternative but to parse the CREATE TABLE statement. I think I found a series of SQL statements once that built the equivalent of mySQL Information tables for SQLite but now I can't find it! On Wed, Dec 21, 2011 at 1:49 PM, Bob Sneidar b...@twft.com wrote: OIC good point. But wouldn't it be better simply isolate the comma delimited arguments (usually in parens) in an SQL statement and then deal with them as items? But I suppose there are all kinds of special circumstances that would make a general purpose word function very unwieldy. Bob On Dec 21, 2011, at 1:17 PM, Pete wrote: Not really - try parsing out an SQL SELECT statement. Granted that's not really English text but if you want to make this a general purpose function, you have to deal with that circumstance. I needed to do that and ended up going through the text and inserting a space after each comma if there wasn't already one there. On Wed, Dec 21, 2011 at 12:54 PM, Bob Sneidar b...@twft.com wrote: I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. Bob On Dec 21, 2011, at 12:09 PM, Mark Wieder wrote: Yes, but... if the phrase is now is the time,for all good men then a search for all will return 5 instead of 6. -- -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 -- 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 ___ 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 -- 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: is among the words AND find words
True enough, except that a comma *might* be there under normal circumstances, whereas I cannot think of an example where two words can be joined by a comma in normal English grammar. But again, it might not be english grammar we are trying to work with, so any function devised could not be so generalized so as to attempt to work with ANY text haphazardly strung together without consideration for grammatical structure. An SQL parser would have to be tuned for SQL, an English sentence parser accordingly etc. Bob On Dec 21, 2011, at 1:59 PM, Mark Wieder wrote: Bob- Wednesday, December 21, 2011, 12:54:46 PM, you wrote: I suppose it could be argued that everything would break down if the text were now,is,the,time,for,all,goo,men... but at some point we have to presume the absence of the absurd? to have 2 words split by a comma is a problem with the data, not with the software. For that matter Now is the time, for all good men is also a problem with the data. That comma has no reason being there. -- -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 ___ 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: Function to Upper and Lower Case sentences
Pete- Wednesday, December 21, 2011, 2:00:57 PM, you wrote: Or a close paren? Seems like modern English usage is to put the period before the close paren at the end of a sentence (although I personally hate that). I believe that's the traditional approach and it's been changing over time to the point where the correct way is now acceptable. -- -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: Function to Upper and Lower Case sentences
(Me too!) On Dec 21, 2011, at 2:00 PM, Pete wrote: Or a close paren? Seems like modern English usage is to put the period before the close paren at the end of a sentence (although I personally hate that). On Wed, Dec 21, 2011 at 1:30 PM, J. Landman Gay jac...@hyperactivesw.comwrote: On 12/21/11 3:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. Seems like there should be some kind of fancy regex to do this, something that looks for space-period-character and capitalizes the character part. Maybe one of our regex gurus knows how. I think your lines solution could work too. You might have to make a more than one pass if you think there will be question marks or exclamation points at line endings. -- 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-livecodehttp://lists.runrev.com/mailman/listinfo/use-livecode -- 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 ___ 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: Database syntax -- array to BLOB
I think the problem I had with blobs is that a base64 encoded string is text, not binary so trying to put into a column that thinks it's getting binary data seems to mess things up. But I don't remember for sure. All I know is that using base64 encoding and a text column works just fine for me. On Wed, Dec 21, 2011 at 2:04 PM, Ruslan Zasukhin ruslan_zasuk...@valentina-db.com wrote: On 12/21/11 11:22 PM, Pete p...@mollysrevenge.com wrote: The problem I had was that it just didn't work using a blob. The encoded array got stored OK but LC didn't recognise what came back as an array, don't remember all the details. This can be interested feature actually. A) I not remember right now if V4REV support ARRAY to BLOB ... but probably yes, should work, because we have FixedBinary field VarBinary field BLOB field and should be something to put binary value from REV into field. But since array is special structure, may be we can/need provide special API func for this. E.g. WriteArrayToBLOB( fld, array ) anyway with Valentina no need to have overhead of base64 encoding... The default max size of a text field in SQLite is 1 million characters so I think he'd be pretty safe. B) BLOB/TEXT in Valentina DB limited by huge numbers ... -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] ___ 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 -- 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: Function to Upper and Lower Case sentences
Came across another corner case - a quotation at the end of a sentence, eg: Mark said, You don't know what you're talking about! This could be a real nightmare! On Wed, Dec 21, 2011 at 2:09 PM, Mark Wieder mwie...@ahsoftware.net wrote: Pete- Wednesday, December 21, 2011, 2:00:57 PM, you wrote: Or a close paren? Seems like modern English usage is to put the period before the close paren at the end of a sentence (although I personally hate that). I believe that's the traditional approach and it's been changing over time to the point where the correct way is now acceptable. -- -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 -- 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
could not find a valid Identity to use for the selected profile
Anybody know how to jump through this hoop when saving an iOS app? ___ 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: could not find a valid Identity to use for the selected profile
Hi, That's very, very little information. For example, are you sure you did everything correctly? Do you even have an Apple developer account for iOS? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission! On 22 dec 2011, at 00:22, Ray Horsley wrote: Anybody know how to jump through this hoop when saving an iOS app? ___ 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: text styles
I've about driven myself crazy over this one today, but it turns out I think I may have found a bug. Either that or very strange expected behavior. So I'm wondering if someone wouldn't mind checking this for me to see if the results are the same. Should only take a couple minutes. Create a new stack. Place one field on it. Make the stack, field, and font size large enough to read easily on an iPad (or in the simulator). Set the font of the field to Arial. In the preOpenCard handler, set the htmlText of the field. Something like: set the htmlText of fld 1 to pHowdy! How iare/i you today?/p Set the standalone settings for iPad, etc. Launch it in the simulator. Does the word are appear in italics? It doesn't for me. Should it? The same thing works fine in the IDE. But when run in the simulator or on a device the text is not styled. I did just try using Helvetica instead of Arial and that seems to work okay. Unfortunately, I need Arial and not Helvetica. Anybody have any suggestions here? This is very nearly a showstopper if it's a bug. Really need this to work. 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: iPad screenrecording: how?
Hello, I spent a tremendous amount of time researching this. It turns out there is NOT an app for that :-) I did finally come up with a setup that works but it is not cheap, not is it perfect. I can capture the iPad screen but it doesn't show finger touches like you see with the simulator. First you need some hardware that can capture HDMI. I chose this. http://www.bhphotovideo.com/bnh/controller/home?is=REGsku=618348Q=O=A=details Then you need Some Software to capture the incoming HDMI. Apple has an Xcode sample project called WhackedTV, that can do it. But I use ScreenFlow 3. ScreenFlow is what I normally capture screen casts with. The iPad shows up as one of the video sources you can capture when you configure the recording. Then in post processing I add the iPad Frame around the video. If you want to see the results you can check out the video http://www.geistinteractive.com/gosign/overview/ Its a lot of work. But as far as I know its the only way to capture and record the iPad screen. Todd -- Todd Geist (805) 419-9382 ___ 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: could not find a valid Identity to use for the selected profile
Sorry. I guess my question did provide pretty scant specs. Anyway, yes, I enrolled in the Apple Developer program last year after purchasing an iPad. I've since given the iPad to somebody else in our company and I just bought a new iPad 2. After I renewed the developer membership I setup the new iPad 2 using the Apple ID. My first attempt at saving a standalone prompted me to install SDK 5 which I did. Now I've got this error after choosing a profile I created last year. Could it be that profile is no good anymore? I'm using Lvecode 5.0.2 with Mac 10.6.8. Thanks for your thoughts on this Mark. On Dec 21, 2011, at 4:29 PM, Mark Schonewille wrote: Hi, That's very, very little information. For example, are you sure you did everything correctly? Do you even have an Apple developer account for iOS? -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission! On 22 dec 2011, at 00:22, Ray Horsley wrote: Anybody know how to jump through this hoop when saving an iOS app? ___ 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: could not find a valid Identity to use for the selected profile
Hi, Yes, indeed, you have to renew the profiles every now and then. They expire. -- Best regards, Mark Schonewille Economy-x-Talk Consulting and Software Engineering Homepage: http://economy-x-talk.com Twitter: http://twitter.com/xtalkprogrammer KvK: 50277553 Become our partner in sales http://qery.us/1bq Start selling Color Converter today. 20% commission! On 22 dec 2011, at 01:20, Ray Horsley wrote: Sorry. I guess my question did provide pretty scant specs. Anyway, yes, I enrolled in the Apple Developer program last year after purchasing an iPad. I've since given the iPad to somebody else in our company and I just bought a new iPad 2. After I renewed the developer membership I setup the new iPad 2 using the Apple ID. My first attempt at saving a standalone prompted me to install SDK 5 which I did. Now I've got this error after choosing a profile I created last year. Could it be that profile is no good anymore? I'm using Lvecode 5.0.2 with Mac 10.6.8. Thanks for your thoughts on this Mark. ___ 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: File time off by an hour...
H. No responses to this. I did experiment a bit and noticed that when I set my PC's time zone to Eastern time in lieu of Central time, the file times show correctly. Also, without switching time zones, the file dates show an hour behind for files saved during months falling in daylight savings, and show correctly for files saved during months not falling in daylight savings... Weird. Is this a bug? Anyone have a workaround? Thanks, - Boo -Original Message- From: Keith (Gulf Breeze Ortho Lab) Sent: Wednesday, December 21, 2011 1:04 AM To: How to use LiveCode Subject: File time off by an hour... Hi All, I am using detailed files to obtain a file's date and time modified (converting it to short date and short time)... All works well, but I noticed the following... Several of my files have a date of 9/24/11 with a time of 2:26 PM (as shown in Windows explorer). However, when I obtain and convert the date and time in LiveCode, the date appears correctly, but the time is off by 1 hour and shows as 1:26 PM in lieu of 2:26 PM. However, when I open the file and save it, it shows the correct time after modifying the file. (The problem seems to be with older files from several months back.) Does this have something to do with daylight savings time or something? How can I ensure that the file modified time that's shown in a LiveCode app. appears exactly as it appears in Windows explorer? FYI: I am on Central Time here... Thanks, - Boo ___ 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
revAndroidPlugin and the Android SDK
The revAndroidPlugin is not recognizing the Android SDK anymore. I still use to view messages and the output of a LC put for debugging. Any Ideas? Thanks Ralph DiMola IT Director Evergreen Information Services ___ 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: Function to Upper and Lower Case sentences
well I got this far.. in my hokey-baby xTalk way of coding...but it works well enough to keep one or two donors from screaming with all caps in their comments... but someone was entering dates like this: 12.21.2012 in his comments my script munges these to 12212012.. and it doesn't deal well with !bangs... but it's good enough to do what I need for now. on mouseUp local tNewSentence put the clipboarddata[text] into tInput # I'll change this to input from $POST on the server side script later set the linedel to . repeat for each line aSentence in tInput ## First we lower case all # delete space in front first repeat until x #I think there is a better trim leading/trailing space function I saw years ago...I have it # somewhere... one day I will master accessing all my code (ha, good luck with that!) put char 1 of aSentence into x if x = then delete char 1 of aSentence end repeat put toLower(aSentence) into aSentence replace ! with ! in aSentence # doesn't help unless next word is in my dictionary. # so I need something to see exclamation marks as delimiters, not sure # how to tackle that if dot is already set as delimiter put (toUpper(char 1 of aSentence)) into char 1 of aSentence # next we set upper case words from our mini-dictionary function... Repeat for each word theWord in aSentence put capitalizeWords(theWord) into tWord put tWord space after tNewSentence end Repeat delete char -1 of tNewSentence put tNewSentence . after tOutPut put empty into tNewSentence end repeat if char 1 of tOutput = . then delete char 1 of tOutput set the clipboarddata[text] to tOutput put tOutput end mouseUp function capitalizeWords theWord put ganesha, pancha, gurudeva!,gurudev!,Satguru, ganapathi, ganapati, yogaswami, siva, shiva, muruga, bodhinatha,lord, nataraja, aum into tCapsDictionary set the itemdel to comma if tCapsDictionary contains theWord then --if theWord is among the items of tCapsDictionary ## doesn't work; dunno why... # so I used contains put toUpper(char 1 of theWord) into char 1 of theWord end if return theWord end capitalizeWords On 12/21/11 11:46 AM, Bob Sneidar wrote: I did something similar recently, where not only was the delimiter important, but preserving the exact delimiter was also important. In my case it was breaking out the parts of a query that might contain AND or OR. What I did was: replace AND with cr AND cr in theList replace OR with cr OR cr in theList repeat with theLineCount = 1 to the number of lines of theList step 2 put line theLineCount of theList into theLine put line theLineCount +1 into theDelimiter -- do some stuff with whatcha got put theLine theDelimiter cr after theNewList end repeat You could modify this to deal with a period and a space, a period and a close parens, a period and a character return or a period and anything else that might apply. Just don't append CR for a single period and cr, or you will end up with blank lines that were not there beforehand. Also, now that I think about it, you should probably also replace ... with an ellipsis before continuing, and any other thing that might come after a period in normal text. You should end up with a list of sentences, and whatever came after them. Also, now that I think about it some more, you should probably replace 2 cr's with some kind of placeholder cr before anything else in a repeat loop to account for multiple CR's. That would throw your function out of sync if an extra line showed up anywhere along the way. Bob On Dec 21, 2011, at 1:02 PM, Sivakatirswami wrote: OK yes, Title case is easy... It's sentence case I was looking for because a period/dot is not part of a word. I guess one could use a dot as a line delimiter and then step thru the lines. On 12/21/11 10:57 AM, Bob Sneidar wrote: On Dec 21, 2011, at 12:43 PM, Sivakatirswami wrote: I have a need to take all caps input and 1) Lower case all but first letter of sentences 2) Upper case words in a small dictionary I will provide to the function. As anyone cooked up something like this already... if I just had 1) can manage 2) Happy Holidays! Om Shanti Sivakatirswami Kauai Aadheenam __ function titleCase theText, forceIt if forceIt is true then put tolower(theText) into theText end if repeat with theWordNum = 1 to the number of words of theText put toupper(char 1 of word theWordNum of theText) \ char 2 to -1 of word theWordNum of theText \ into word theWordNum of theText end repeat return theText end titleCase ___
Re: iOS: text styles
Hi Chris, I'll confirm LC 5.0.2 OSX 6.8 -- are does not appear in italics. I've noticed this in the past. Setting Arial to bold, etc in the inspector doesn't have any effect either. I have no idea why. be well, randy - On Dec 21, 2011, at 4:42 PM, Chris Sheffield wrote: I've about driven myself crazy over this one today, but it turns out I think I may have found a bug. Either that or very strange expected behavior. So I'm wondering if someone wouldn't mind checking this for me to see if the results are the same. Should only take a couple minutes. Create a new stack. Place one field on it. Make the stack, field, and font size large enough to read easily on an iPad (or in the simulator). Set the font of the field to Arial. In the preOpenCard handler, set the htmlText of the field. Something like: set the htmlText of fld 1 to pHowdy! How iare/i you today?/p Set the standalone settings for iPad, etc. Launch it in the simulator. Does the word are appear in italics? It doesn't for me. Should it? The same thing works fine in the IDE. But when run in the simulator or on a device the text is not styled. I did just try using Helvetica instead of Arial and that seems to work okay. Unfortunately, I need Arial and not Helvetica. Anybody have any suggestions here? This is very nearly a showstopper if it's a bug. Really need this to work. 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 ___ 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: text styles
On 12/21/11 4:42 PM, Chris Sheffield wrote: Set the standalone settings for iPad, etc. Launch it in the simulator. Does the word are appear in italics? It doesn't for me. Should it? The same thing works fine in the IDE. But when run in the simulator or on a device the text is not styled. I did just try using Helvetica instead of Arial and that seems to work okay. Unfortunately, I need Arial and not Helvetica. I vaguely recall something similar happening to me. What I think is going on is that iOS won't generate fake styles like bold and italic; it will only use fonts that have separate style faces in the font family. I haven't tried it, but it might work to set the font name rather than the style: pHowdy! How font=Arial-ItalicMTare/font you today?/p The font names for iOS 5 are here: http://iosfonts.com/. iOS 4 has all the Arials too. -- 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
Is Control a DataGrid
Hello, When Looping through controls on a card, how does one determine if the current control is a DataGrid? Actually I want to know that it is NOT a DataGrid. Thanks Todd -- Todd Geist ___ 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: Is Control a DataGrid
Perhaps the focusedObject? -Original Message- From: Todd Geist t...@geistinteractive.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Wed, Dec 21, 2011 7:24 pm Subject: Is Control a DataGrid Hello, When Looping through controls on a card, how does one determine if the current control is a DataGrid? Actually I want to know that it is NOT a DataGrid. Thanks Todd -- Todd Geist ___ 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: Is Control a DataGrid
Hi Todd, This should work unless you use 'dgControl' as your own custom prop name anywhere: if the dgControl of control x = empty then -- this is NOT a DG -- do stuff here end if Phil Davis On 12/21/11 10:31 PM, dunb...@aol.com wrote: Perhaps the focusedObject? -Original Message- From: Todd Geistt...@geistinteractive.com To: How to use LiveCodeuse-livecode@lists.runrev.com Sent: Wed, Dec 21, 2011 7:24 pm Subject: Is Control a DataGrid Hello, When Looping through controls on a card, how does one determine if the current control is a DataGrid? Actually I want to know that it is NOT a DataGrid. Thanks Todd -- 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: Is Control a DataGrid
I should have said a little more. From the DG API docs http://lessons.runrev.com/s/lessons/m/datagrid/l/7344-Data-Grid-API: /dgControl/ - get the dgControl of the target - Returns the long id of the data grid. Useful in row/column template behaviors when you need to get properties of the data grid. Phil On 12/21/11 10:45 PM, Phil Davis wrote: Hi Todd, This should work unless you use 'dgControl' as your own custom prop name anywhere: if the dgControl of control x = empty then -- this is NOT a DG -- do stuff here end if Phil Davis On 12/21/11 10:31 PM, dunb...@aol.com wrote: Perhaps the focusedObject? -Original Message- From: Todd Geistt...@geistinteractive.com To: How to use LiveCodeuse-livecode@lists.runrev.com Sent: Wed, Dec 21, 2011 7:24 pm Subject: Is Control a DataGrid Hello, When Looping through controls on a card, how does one determine if the current control is a DataGrid? Actually I want to know that it is NOT a DataGrid. Thanks Todd -- 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: is among the words AND find words
Thanks to all for their help with this. I learned a new key word in token. So far the function below handles everything reasonable I have thrown at it, including finding time in the less than reasonable text in field 1: Now is timely the timeless time.-for, all good. on mouseUp put field 1 into tText put theWordIsAmongTheWords(time, tText) into msg box --returns true end mouseUp function theWordIsAmongTheWords tWord, tList --The quote and period are irrelevant to the test for the word, so delete them. replace quote with in tList replace . with in tList put empty into tNums --Collect all the strings that wordOffset would find. repeat put wordOffset(tWord,tList, last item of tNums) into tNum if tNum = 0 then exit repeat put the last item of tNums + tNum comma after tNums end repeat --Test each of these strings aginst the word being tested. --With the quotes and periods gone, the tokens of sting found work well. repeat for each item tWordNum in tNums put word tWordNum of tList into tTestWord if tWord is among the tokens of tTestWord then return true end repeat --If all the tests fail, then return false return false end theWordIsAmongTheWords ___ 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: iPad screenrecording: how?
You could try this http://www.ponoko.com/design-your-own/products/scandock-2703 -- Chipp Walters CEO, Altuit, Inc. ___ 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: is among the words AND find words
Strike most of my last message. It appears that most of the function can be replaced with an examination of the entire text (dah) as in: put tWord is among the tokens of tList into tTest return tTest This tests the whole text; it is not necessary to test each string containing the word individually. But remove the quotes and periods first. Jim Thanks to all for their help with this. I learned a new key word in token. So far the function below handles everything reasonable I have thrown at it, including finding time in the less than reasonable text in field 1: Now is timely the timeless time.-for, all good. on mouseUp put field 1 into tText put theWordIsAmongTheWords(time, tText) into msg box --returns true end mouseUp function theWordIsAmongTheWords tWord, tList --The quote and period are irrelevant to the test for the word, so delete them. replace quote with in tList replace . with in tList put empty into tNums --Collect all the strings that wordOffset would find. repeat put wordOffset(tWord,tList, last item of tNums) into tNum if tNum = 0 then exit repeat put the last item of tNums + tNum comma after tNums end repeat --Test each of these strings aginst the word being tested. --With the quotes and periods gone, the tokens of sting found work well. repeat for each item tWordNum in tNums put word tWordNum of tList into tTestWord if tWord is among the tokens of tTestWord then return true end repeat --If all the tests fail, then return false return false end theWordIsAmongTheWords ___ 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