Using polygon as line and childControlNames

Terence Heaford t.heaford at btinternet.com
Mon Dec 8 14:42:52 EST 2014


Tried this and as you suggested it worked on 7.0.1.

I had changed my stack to use the childControlIDs but with your experiment below working changed it back to using childControlNames and it now works, don’t know why but it does. The gremlins strike again.

I think using childControlIDs is the safer solution so I will stick with that.

Thanks for your help

Terry



> On 8 Dec 2014, at 14:57, Geoff Canyon <gcanyon at gmail.com> wrote:
> 
> I created a group and set this as the script:
> 
> on drawLine x,y,x1,y1,tColor
>   lock screen
>   set the style of the templateGraphic to polygon
>   put x & "," & y & return & x1 & "," & y1 into tPoints
>   create grc in me
>   put the id of the last grc of me into tID
>   set the foregroundColor of of grc id tID to tColor
>   set the points of grc id tID to tPoints
>   set the locked of grc id tID to true
>   unlock screen
>   put the childControlNames of me
> end drawLine
> 
> Then this in the message box:
> 
> send "drawLine 1,1,50,200,blue" to grp 1
> 
> puts this:
> 
> graphic id 1008
> 
> 
> On Mon, Dec 8, 2014 at 9:54 AM, Geoff Canyon <gcanyon at gmail.com> wrote:
> 
>> Mac with Yosemite 10,10,1 here. I've only checked in LC 7.0.0.
>> 
>> On Mon, Dec 8, 2014 at 9:51 AM, Terence Heaford <t.heaford at btinternet.com>
>> wrote:
>> 
>>> I’m using a Mac with Yosemite 10.10.1
>>> 
>>> Are you Windows or Linux? That may explain it.
>>> 
>>> All the best
>>> 
>>> Terry
>>> 
>>> 
>>>> On 8 Dec 2014, at 14:46, Geoff Canyon <gcanyon at gmail.com> wrote:
>>>> 
>>>> On Mon, Dec 8, 2014 at 2:33 AM, Terence Heaford <
>>> t.heaford at btinternet.com>
>>>> wrote:
>>>> 
>>>>> Thanks, this does work but I am confused why childControlNames only
>>>>> returns POLYGON and not "graphic id 1011" as "graphic id 1011” is it’s
>>>>> actual name as I have not renamed it.
>>>>> 
>>>> 
>>>> No idea. It's not doing that for me.
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> use-livecode at lists.runrev.com
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> use-livecode at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> 
>> 
>> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list