Re: Empty fields and controls after testing

2011-10-27 Thread Björnke von Gierke
I think one of the problems here is the mixing of not quite compatible metaphors. HyperCard (and in extension LC which inherited most of those behaviours) uses a data model exactly like a Database. That means all data entry will be permanent, and fields are not data entry points, but data retai

Re: Empty fields and controls after testing

2011-10-26 Thread Peter M. Brigham, MD
One way that works to initialize controls (fields, pop-up buttons, menus, etc) is to store a set of default values as a customproperty containing an array with the keys being the names of the controls and the values being the contents. For instance store your default button/menu contents in the

Re: Empty fields and controls after testing

2011-10-26 Thread Bob Sneidar
I think all menus are buttons Bob On Oct 26, 2011, at 3:18 PM, Pete wrote: > Gotta think about other types of controls too, like option menus, etc. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsub

Re: Empty fields and controls after testing

2011-10-26 Thread Bob Sneidar
Yes, what I do is name all my fields with the prefix fld, and my labels with lbl. This way I can distinguish between editable fields I created and things like, oh say, Datagrid fields. Bob On Oct 26, 2011, at 2:43 PM, Ken Ray wrote: > > On Oct 26, 2011, at 11:19 AM, Bob Sneidar wrote: > >>

Re: Empty fields and controls after testing

2011-10-26 Thread Pete
Gotta think about other types of controls too, like option menus, etc. Maybe it's just the type of applications I tend to write but I want a lot of my stacks to retain their data from last time they were closed and not re-initialise them. For example, I have a stack that lists a bunch of accounts

Re: Empty fields and controls after testing

2011-10-26 Thread Ken Ray
On Oct 26, 2011, at 11:19 AM, Bob Sneidar wrote: > Yes, you will need to write your own initialization routine. I do this anyway > in all my forms because I read data into the fields, and then validate before > writing them back to my storage. I always want to make sure I do not have any > ran

Re: Empty fields and controls after testing

2011-10-26 Thread Bob Sneidar
Good tip Richard! Bob On Oct 26, 2011, at 7:11 AM, Richard Gaskin wrote: > In more recent years, the LiveCode IDE now sends a savingStandalone message, > which can be trapped to handle that sort of stuff for a clean build. ___ use-livecode mailing

Re: Empty fields and controls after testing

2011-10-26 Thread Bob Sneidar
Yes, you will need to write your own initialization routine. I do this anyway in all my forms because I read data into the fields, and then validate before writing them back to my storage. I always want to make sure I do not have any random data from a previous edit session making it's way into

Re: Empty fields and controls after testing

2011-10-26 Thread Richard Gaskin
Admin wrote: One thing that truly bugs the hell out of me with Live Code is that when I am done designing/programming and want to test it, the data is now a part of the program. In most applications architectures it's common to separate data storage from the user interface, making it easier t

Re: Empty fields and controls after testing

2011-10-26 Thread dunbarx
Wilkins To: How to use LiveCode Sent: Tue, Oct 25, 2011 4:50 pm Subject: Re: Empty fields and controls after testing Mike, I think your approach to creating something in LC is faulty. The vast majority of the time you're going to want any coding you've done within controls to "st

Re: Empty fields and controls after testing

2011-10-25 Thread J. Landman Gay
On 10/25/11 7:39 PM, Admin wrote: Is there a way to test a program and when you go back to edit mode, it initializes everything so that all controls are blank. As it stands now, I have to write a custom button that when pressed, wipes all fields/controls and puts them back to their empty origin

Re: Empty fields and controls after testing

2011-10-25 Thread Joe Lewis Wilkins
Mike, I think your approach to creating something in LC is faulty. The vast majority of the time you're going to want any coding you've done within controls to "stick" as you say. You mention Edit Mode. I never even leave testing mode. I suppose you "may" want to do that from time to time; but,

Re: Empty fields and controls after testing

2011-10-25 Thread Pete
You pretty much have to do it yourself. I usually do it in preOPenCard rather than have a button bu that depends on your application. Pete Molly's Revenge On Tue, Oct 25, 2011 at 5:39 PM, Admin wrote: > > > One thing that truly bugs the hell out of me with Live

Empty fields and controls after testing

2011-10-25 Thread Admin
One thing that truly bugs the hell out of me with Live Code is that when I am done designing/programming and want to test it, the data is now a part of the program. What I mean is, say you have and edit box and you go to test the program and type stuff in the edit box then go back to edit mod