Bonjour Leo,
In Revolution, objects inherit some of the properties of their owner.
That is especially true for text attributes, colors, patterns and so on.
When such a property is inherited, asking for it returns empty.
The docs says: Use the effective keyword to get the displayed property of an object, regardless of whether the object itself has that property set.
So in your handler:
on mouseUp
if the effective textstyle of the clickline is "plain" then
set the textstyle of the clickline to "bold"
else
set the textstyle of the clickline to "plain"
end if
end mouseupLe 8 sept. 04, � 22:24, [EMAIL PROTECTED] a �crit :
Message: 6 Date: Wed, 8 Sep 2004 18:56:18 +0200 From: [EMAIL PROTECTED] Subject: the texstyle of the clickline To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed
Hello,
I have a card with a locked field and many lines of text inside. The script of this field is :
on mouseup
if the textstyle of the clickline is "plain" then set the textstyle
of the clickline to "bold" else set the textstyle of the clickline to
"plain"
end mouseup
I used this script under Hypertalk with no problem.
Under Revolution, this script don't work correctly.
When the textstyle is "plain", I saw than sometimes the textstyle of the clickline can be "plain" and sometimes can be empty. With others textstyles (bold, italic, underline, etc...) there is no problem.
I rectified this script like this :
on mouseup
if (the textstyle of the clickline is "plain" or the textstyle of the
clickline is empty) then ......
end mouseup
Is there a better solution ?
Thanks
Leo
�ric Chatonet 24, Boulevard de Port-Royal 75005 Paris
Fixe : 33 1 43 31 77 62 Mobile : 33 6 20 74 50 89
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution
