Set color from string

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Set color from string

lhhuong
Hi all, I have a string as below:

color:= 'red'.

And i want to set color value from color variable:

ColorValue perform: color.

but i receive an error: color does not understood.

help me, please.
Reply | Threaded
Open this post in threaded view
|

Re: Set color from string

Tom Robinson-4

On 6/30/14, 9:32 PM, lhhuong wrote:
> Hi all, I have a string as below:
>
> /color:= 'red'./
Try using a symbol...

     color := #red.
     ColorValue perform: color

>
> And i want to set color value from color variable:
>
> /ColorValue perform: color./
>
> but i receive an error: color does not understood.
>
> help me, please.
>
>
>
> --
> View this message in context: http://forum.world.st/Set-color-from-string-tp4765879.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Set color from string

lhhuong
I have a xml file contains colors in tags <color></color>.
and I use loop construct to read color from xml file and it has string format.
color:= 'red' or color:= 'blue'...
Reply | Threaded
Open this post in threaded view
|

Re: Set color from string

Tom Robinson-4

On 7/1/14, 12:25 AM, lhhuong wrote:
> I have a xml file contains colors in tags <color></color>.
> and I use loop construct to read color from xml file and it has string
> format.
> /color:= 'red' or color:= 'blue'.../
color := 'red' asSymbol.

>
>
>
> --
> View this message in context: http://forum.world.st/Set-color-from-string-tp4765879p4765881.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: Set color from string

lhhuong
ok, thank you very much.
I have just solved this problem.