Passing Lists

Richard Gaskin ambassador at fourthworld.com
Wed Jan 15 21:54:00 EST 2003


Geoff Canyon wrote:

>>> Any suggestions for a more self-constent form that would allow simple
>>> syntax
>>> like this to work?:
>>> 
>>> set the textstyle of btn 1 to the textstyle of char 20 to 30 of fld 1
>> 
>> It depends: what do you want the above statement to do? A button can't
>> have
>> mixed text: the button's entire label has to be a single style or set
>> of
>> styles.
>> 
>> So if char 20 to 25 of the field is bold italic, say, and char 26 to
>> 30 is
>> condensed underline, the statement above is ambiguous: do you want the
>> button to be bold italic? Condensed underline? Bold italic condensed
>> underline?
> regards,
> 
> Geoff Canyon
> gcanyon at inspiredlogic.com
> I think the answer is never set the style of something that can have
> only one style to the style of something that can have multiple styles.
> In other words, the above command should be:
> 
> set the textstyle of btn 1 to the textstyle of char 20 of fld 1
> 
> Either the text run has a consistent style, in which case the result is
> identical to the earlier command, or the text run has a mixed style, in
> which case you are protected from that fact.
> 
> OR: you want to do something entirely different if the text run's style
> is mixed, in which case test for it.

Of course it could be special-cased.  And to make any Style menu it has to
be.  But I was just proposing the idea of putting the flag in the result
rather than throwing an error.  It's less orthogonal as it is, but not in
any way unlivable. :)

-- 
 Richard Gaskin 
 Fourth World Media Corporation
 Developer of WebMerge 2.1: Publish any database on any site
 ___________________________________________________________
 Ambassador at FourthWorld.com       http://www.FourthWorld.com
 Tel: 323-225-3717                       AIM: FourthWorldInc




More information about the use-livecode mailing list