The templateField Keyword
revolutionary.dan at gmail.com
Sun Mar 12 23:37:04 EST 2006
In fact, as I think I posted earlier, you need not reset the templateField
after use. As long as you don't change any values in the templateField
between uses, you can set it once and then create as many fields as you want
that follow its pattern, *provided* you use the 'create field' command and
not the IDE tool.
On 3/12/06, Gregory Lypny <gregory.lypny at videotron.ca> wrote:
> Thanks for responding, Dan and Dave.
> 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? Incidentally, I was
> introduced to templateField by another member on this list shortly
> before 2.7 was released; I dabbled with it briefly, and it seemed to
> work fine with 2.6, although Dan writes that it doesn't work in that
> version either.
> On Sat, Mar 11, 2006, at 1:00 PM, use-revolution-
> request at lists.runrev.com 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:
Dan Shafer, Information Product Consultant and Author
Get my book, "Revolution: Software at the Speed of Thought"
More information about the Use-livecode