for clarification:

the reason for using the Form object, as in Form.meta, is to be memory 
efficient.
if you only have 3 possible paint patterns, it would be more efficient to 
create the objects in advance:

e.g.

$meta:=New collection(New object;New object;New object;New object;New 
object;New object)
$meta[0].stroke:=selected_stroke  //"#ffffff"
$meta[0].fill:=selected_fill_blue  //"#61778e"
$meta[1].stroke:=selectable_stroke  //"automatic"
$meta[1].fill:=unselected_fill  //-1
$meta[2].stroke:=unselected_stroke_dark_red  //"#ff6600"
$meta[2].fill:=unselected_fill  //-1
$meta[4].stroke:=selected_stroke  //"#ffffff"
$meta[4].fill:=selected_fill_dark_red  //"#bd967d"
$meta[3].stroke:=unselectable_stroke  //"#d3d3d3"
$meta[3].fill:=unselected_fill  //-1
$meta[5].stroke:=selected_stroke  //"#ffffff"
$meta[5].fill:=selected_fill_grey  //"#a3a3a3"
Form.meta:=$meta

then you can select and return the appropriate meta in your meta expression 
method.

of course, you can always return a new object like

$0:=new object(“stroke”;”orange”)

which is not incorrect, it is just not optimised.
**********************************************************************
4D Internet Users Group (4D iNUG)
New Forum: https://discuss.4D.com
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to