Re: lock screen question and detect field question
One caveat: if you are assembling a great deal of text in small chunks, you should likely do it in a variable and then toss it into the field in one go. Field updates are slower than many (most?) other things you might be doing, and one field update with 10,000 lines will be *much* faster than 10,000 updates with one line each. gc On Oct 12, 2014, at 10:58 PM, J. Landman Gay jac...@hyperactivesw.com wrote: The display and update of the dialog is likely to take longer than just creating the fields. ___ 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: lock screen question and detect field question
Hi Larry, As well as the afore mentioned, all excellent comments, you can use the 'if exists(fld myField01) then' script. I also encapsulate all sorts of things in try...end try commands. These are extremely powerful although could be considered a little lazy. For example, when using iPhone commands I sometimes lazily put them inside trys in an effort to prevent them causing a problem when testing on the desktop. So, try ¬ delete field myField01 ¬ end try does not cause a lasting problem. Using a Catch pError inside the try will help out if you need to detect if it has been deleted/exists or not. All the best Sean Cole *Pi Digital Productions Ltd* www.pidigital.co.uk On 13 October 2014 18:53, Geoff Canyon gcan...@gmail.com wrote: One caveat: if you are assembling a great deal of text in small chunks, you should likely do it in a variable and then toss it into the field in one go. Field updates are slower than many (most?) other things you might be doing, and one field update with 10,000 lines will be *much* faster than 10,000 updates with one line each. gc On Oct 12, 2014, at 10:58 PM, J. Landman Gay jac...@hyperactivesw.com wrote: The display and update of the dialog is likely to take longer than just creating the fields. ___ 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: lock screen question and detect field question
On Mon, Oct 13, 2014 at 10:05 AM, la...@significantplanet.org wrote: 1) I have a program where I'm creating and deleting fields. Why are you creating them and deleting them? Why aren't the fields already there and you just show and hide them? ___ 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: lock screen question and detect field question
That is a really good question! And I have a really good answer! Because the fields are dynamic and not always the same ones needed. But you've given me a new thought: Maybe I can just create all the fields I will ever possibly need and then just show and hide them. I'm going to think about that. Thanks, Larry - Original Message - From: Kay C Lan lan.kc.macm...@gmail.com To: How to use LiveCode use-livecode@lists.runrev.com Sent: Sunday, October 12, 2014 8:14 PM Subject: Re: lock screen question and detect field question On Mon, Oct 13, 2014 at 10:05 AM, la...@significantplanet.org wrote: 1) I have a program where I'm creating and deleting fields. Why are you creating them and deleting them? Why aren't the fields already there and you just show and hide them? ___ 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: lock screen question and detect field question
On 10/12/2014, 9:05 PM, la...@significantplanet.org wrote: 1) I have a program where I'm creating and deleting fields. If I try to delete a field that hasn't yet been created, I get a script error. So is there a way to first find out if the field exists? Did you look up exists in the dictionary? That also refers you to there is operator in the see also section. 2) Other than creating a substack to overlay my main stack with a Loading field that adds a period after Loading.. is there a way to lock the screen (so the user doesn't see the fields being created) and still show a field with the Loading... going on? If you lock messages as well as locking the screen, you probably won't need to show a loading dialog. The display and update of the dialog is likely to take longer than just creating the fields. I can create 500 fields in under 2 milliseconds. -- 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: lock screen question and detect field question
On Mon, Oct 13, 2014 at 10:33 AM, la...@significantplanet.org wrote: Maybe I can just create all the fields I will ever possibly need and then just show and hide them. That is certainly an approach I've used many many times, especially if the number of fields is large. If the number of fields is smalll, say an input field and output field, even if they are of different sizes and located different, I first create them, take note of pertinent properties: height width loc textAlign textSize TextColor and any other property that might be different from one field to the other, then delete one field so I'm left with one field that can act as both as an input field and an output field. In my script, where I would normally: hide fld input show fild output I simply change the properties of my single field to reflect what I'm using it for: lock screen if the label of btn selectMethod = Output then set the height of fld multipurpose to 123 set the width of fld multipurpose to 456 set the loc of fld multipurpose to 200,200 etc put myOutput into fld multipurpose unlock screen ___ 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: lock screen question and detect field question
Accidently hit the Send button. Here is what I meant to type: lock screen if the label of btn selectMethod = Output then set the height of fld multipurpose to 123 set the width of fld multipurpose to 456 set the loc of fld multipurpose to 200,200 etc put myOutput into fld multipurpose else set the height of fld multipurpose to 23 set the width of fld multipurpose to 45 set the loc of fld multipurpose to 150,150 etc put empty into fld multipurpose end if unlock screen ___ 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