Le samedi, 7 juin 2003, � 23:26 Europe/Paris, Dar Scott a �crit :

On Saturday, June 7, 2003, at 02:15 PM, Emmanuel Companys wrote:

on enterInField
get the selectedtext of me
set textfont of it to <font name>
set textcolor of it to <color name or the corresponding of 3 digits>
set textstyle of it to "bold"
end enterInField

I changed selectedtext to selectedChunk and it works great! Thanks!

I can see I need to put get/it to better use; I would have used my own variable.

Of course you could use any variable instead of it. Or even not use any varaible at all and repeat "the selectedChunk" instead; but this whould have the program repeat a job it's already done.

Any time the get-it solution is safe (no other command modifying it int the holder, for intance) I find it easier to write, read and debug.

Manuel

Reply via email to