The templateField Keyword

Dan Shafer revolutionary.dan at gmail.com
Sat Mar 11 18:53:45 EST 2006


Good one, Dave. But there's no need to reset the templateField (unless of
course you need to) and further testing suggests you *can* set the
templateField in an openStack handler and its values persist for all fields
you create *in scripts* but not those you create manually in the IDE>

The docs could be a bit clearer.



On 3/11/06, Dave Cragg <dcragg at lacscentre.co.uk> wrote:
>
>
> On 9 Mar 2006, at 19:41, Gregory Lypny wrote:
>
> > Hello everyone,
> >
> > I tried to create a field template using the templateField keyword,
> > but it doesn't seem to work.  When I use the handler below, the
> > text in newly created fields is Lucida Grande, but the size is 11
> > instead of 12, and the height is 14 instead of 18.  What am I doing
> > wrong?
> >
> >       Regards,
> >
> >               Gregory
> >
> > on openStack
> >   set the textFont of the templateField to "Lucida Grande"
> >   set the textSize of the templateField to 12
> >   set the fixedLineHeight of the templateField to true
> >   set the textHeight of the templateField to 18
> > end openStack
>
> Are these newly created fields made by using the Rev tool palette?
> I'd assume that Rev sets the templateField every time you create a
> field. That would explainwhat you see.
>
> To create fields using templateField settings of your own, you need
> to use "create field" before anything else can change the
> templateField again. Something like this:
>
>
>     on createField
>       set the textFont of the templateField to "Lucida Grande"
>       set the textSize of the templateField to 12
>       set the fixedLineHeight of the templateField to true
>       set the textHeight of the templateField to 18
>       create field
>       reset the templateField
>     end createField
>
> Cheers
> Dave
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Shafer, Information Product Consultant and Author
http://www.shafermedia.com
Get my book, "Revolution: Software at the Speed of Thought"
>From http://www.shafermediastore.com/tech_main.html



More information about the use-livecode mailing list