Workaround request - textcolor property in a field in a group

Jim Ault JimAultWins at yahoo.com
Wed Jul 27 15:23:17 EDT 2005


Greeting group.

I am stuck trying to meet a deadline and can't remember some trivia about
textcolor property applied to text within a field.  For some reason this
worked last night, but now as I am getting ready to distribute.. no go.

Task > setting the textcolor of items in a field in a group this way

using tabStops + 
set itemDel to tab
--these work
set the backgroundcolor of fld AA of bg "betDisplayA" to pink
set the textcolor of fld AA of bg "betDisplayA" to darkblue

--does not work on this field, but does on others
set the textcolor of word 2 of line 2 of fld AA of bg "betDisplayA" to green

works from the message box
set the textcolor of word 1 of line 2 of fld comingAttractions to green
set the textcolor of item 2 of line 3 of fld comingAttractions to green


ANSWER --> I am screwed.  I did testing on a single group (background) using
the following
(note carefully the field specification I used to test the syntax and
effect)
(field AA is contained in a group, and there is only one group)

set the textcolor of word 2 of line 2 of fld AA to green --> works, so now I
can do other programming!

I then built a whole interface on the concept of colored text using field
chunks
The next level of complexity was to duplicate the constructed
[field.button.group] 8 times and write the code.

After hours of debugging other intricate tasks, I now find that setting the
color of a text chunk will not work if the field is in a group!!!!

This may have been covered already (most likely has) but I am now at my
deadline and have malarky to show the client.
Add to this that the dictionary Œtextcolor¹ is linked to Œforegroundcolor¹,
so there might be a note not to use bg whatever, but I could not get to it
using the documentation.

Very painful and costly lesson learned here.
Is there a workaround I could do in an hour or two? (I am pretty fast with
Transcript)

Thanks in advance for your help

Jim Ault
Las Vegas





More information about the use-livecode mailing list