Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Sannyasin Brahmanathaswami
OH… duh…. no! ha (red in the face) This does work… fabulous! local tHALogo, tCompanyTitle on preOpenCard setStage end preOpenCard on opencard scene1 end opencard command setStage # be sure to declare all objects in local outside all handlers put the long id of fld "comp

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Richard Gaskin
Brahmanathaswami wrote: Can you look at my earlier post? perhaps I should open up a new thread “Best Practices — Passing control reference by variables in scripts” on preOpenCard put the long id of img "HaLogo" into tHaLogo end preOpenCard #then later command setStage set the loc of t

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Mark Wieder
On 02/02/2016 06:59 PM, Sannyasin Brahmanathaswami wrote: on preOpenCard put the long id of img "HaLogo" into tHaLogo end preOpenCard #then later command setStage set the loc of tHALogo to the screenLoc end setStage generates an error What kind of an error? That code works he

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Sannyasin Brahmanathaswami
On February 2, 2016 at 12:07:34 PM, Ali Lloyd (ali.ll...@livecode.com) wrote: > By the way... did I mention that I *really* appreciate the team's > presence on this list? > So do I! Can you look at my earlier post? perhaps I should open up a new thread “Best Pra

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Ali Lloyd
:-D Re-reading my original reply, I see that I did actually say "...it will usually be better to reference a control by id..." when I definitely should have said "...it will usually be quicker to reference a control by id..." On Tue, Feb 2, 2016 at 9:21 PM Mark Wieder wrote: > By the way...

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Mark Wieder
By the way... did I mention that I *really* appreciate the team's presence on this list? -- Mark Wieder ahsoftw...@gmail.com ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Mark Wieder
Ali (and Mark) I was just answering the question asked :-) Heh. What I usually do (and what we generally do in the IDE) is get a target object's long ID, put it in a variable and use that for subsequent references. That way you only pay the (again, very small) performance penalty once per u

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Ali Lloyd
I was just answering the question asked :-) What I usually do (and what we generally do in the IDE) is get a target object's long ID, put it in a variable and use that for subsequent references. That way you only pay the (again, very small) performance penalty once per usage. Obviously YMMV, I wou

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Mark Waddingham
On 2016-02-02 19:00, Mark Wieder wrote: PLEASE don't encourage people to reference objects by id. That's the main reason we can't have proper version control in LC. If you only use ids as a runtime property (i.e. don't assume they remain the same across sessions) then that usage has no impact

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Mark Wieder
On 02/02/2016 01:51 AM, Ali Lloyd wrote: Controls referenced by id are cached, so on a stack / card with many controls especially of the same type, it will usually be better to reference a control by id (and then it is irrelevant whether you specify the type or not). PLEASE don't encourage p

Re: Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-02 Thread Ali Lloyd
Yes, in general specifying the control type when referring to the control by name will be very slightly faster than not doing so - this is because when cycling through the controls of a card to see if there is a match, a non-matching control type can be instantly disregarded (a constant time operat

Using [ Control "SomeImageName" ] VS [image "SomeImageName"]

2016-02-01 Thread Sannyasin Brahmanathaswami
I using some scripts lately where it seems convenient to do something like this: global gCurrentHiddenControl, gCurrentShowingControl # then: command fadeOutCurrentControl pSpeed put (the blendlevel of control gCurrentShowingControl) +1 into tLevel set the blendlevel of control gCurr