The templateField Keyword

Gregory Lypny gregory.lypny at
Mon Mar 13 08:47:05 EST 2006

Thanks once again, Dan, Dave, and Jacqueline.  I think I get it.   
When all is said and done, it seems that for development it's easier  
and faster to create a little stack of fields and other things with  
the features I want and simply copy and paste them into the project  
I'm working on.


On Mon, Mar 13, 2006, at 4:48 AM, Dave Cragg wrote:

> On 13 Mar 2006, at 00:03, Gregory Lypny wrote:
>> 	What you say below is not how I expect templateField to work based
>> on its description.  I thought that setting the templateField was a
>> one-time thing and that it remained in effect until it was reset.
>> Your handler based on the createField message would seem to make
>> templateField unnecessary because you're changing the style of
>> newly created fields using a script after they've been created,
>> whereas the point of templateField is to set those properties
>> before.  Am I misunderstanding what you've intended?
> I think Dan's reply clears it up. There's no need to reset the
> templateField, although I learned it was a "good idea" back when I
> started with Metacard, and so have followed that advice like a good
> boy. ;-) I think the idea is that by immediately resetting the
> templatexxxxx, you don't leave any surprises around for the next time
> you create an object. But if you're solely in charge of what gets
> created, then I guess it doesn't matter.
> The main point I wanted to make was that you should use "create
> field" in your own script to get a field that follows the template
> settings you have made. I don't think you can rely on the tool
> palette in the IDE to respect the settings you have made. I say this
> without knowing how the tool palette creates objects; I was just
> assuming it was likely to set the templateField itself before doing
> so. I also wasn't sure what the palette does after it has created an
> object, but Dan's reply suggests it sets back to the state it was in
> before.

More information about the Use-livecode mailing list