If the template grc is being set to polygon prior to creation, it SHOULD be named polygon. Polygons appear named as polygons. If you leave out the set style line, then an unnamed polygon shows in which case the engine defers it to "graphic id <whatever>" The first example you used, creates the grc, then sets the style, hence the different behavior, so it matters when the style is set, in the template, or after the fact.
On Mon, Dec 8, 2014 at 7:57 AM, Geoff Canyon <gcan...@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 <gcan...@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.heaf...@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 <gcan...@gmail.com> wrote: > >> > > >> > On Mon, Dec 8, 2014 at 2:33 AM, Terence Heaford < > >> t.heaf...@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@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@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@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@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode