Re: Param Naming - Object by Reference Best Practices

2017-06-01 Thread Bob Sneidar via use-livecode
OK Sold. I never really understood the value of using long id's until Richard's explanation, and an issue I was having as well with object resolution between different modules and a back script. Bob S > On May 31, 2017, at 17:18 , Trevor DeVore via use-livecode >

Re: Param Naming - Object by Reference Best Practices

2017-05-31 Thread Trevor DeVore via use-livecode
On Wed, May 31, 2017 at 5:17 PM Richard Gaskin via use-livecode < use-livecode@lists.runrev.com> wrote: > I almost always pass long IDs as object references, e.g.: > > put the long ID of grc "portal-title-bkgnd" into tObj > DoSomethingWith tObj > > Complete, absolute, unambiguous, and, if

Re: Param Naming - Object by Reference Best Practices

2017-05-31 Thread Richard Gaskin via use-livecode
I almost always pass long IDs as object references, e.g.: put the long ID of grc "portal-title-bkgnd" into tObj DoSomethingWith tObj Complete, absolute, unambiguous, and, if used repeatedly, cached. -- Richard Gaskin Fourth World Systems Software Design and Development for the

Re: Param Naming - Object by Reference Best Practices

2017-05-31 Thread J. Landman Gay via use-livecode
On 5/31/17 4:06 PM, Sannyasin Brahmanathaswami via use-livecode wrote: One does not expect this to be improperly evaluated put "graphic portal-title-bkgnd" into pObject What do you do? And why? I suspect the engine is trying to do subtraction since it can't tell you are referring to a

Re: Param Naming - Object by Reference Best Practices

2017-05-31 Thread Mike Bonner via use-livecode
Forgot the trailing "quote" after "portal-title-bkgnd" so it would actually be put "graphic" & quote & "portal-title-bkgnd" & quote into pObject On Wed, May 31, 2017 at 3:49 PM, Mike Bonner wrote: > try.. > put "graphic" & quote & "portal-title.bkgnd" into pObject > > As it

Re: Param Naming - Object by Reference Best Practices

2017-05-31 Thread Mike Bonner via use-livecode
try.. put "graphic" & quote & "portal-title.bkgnd" into pObject As it is, you end up with pObject containg: graphic portal-title-bkgnd.. Meaning portal MINUS title MINUS bkgnd (since its unquited) and the engine fails because its confused about what to do with it. Quoting the name of the graphic

Param Naming - Object by Reference Best Practices

2017-05-31 Thread Sannyasin Brahmanathaswami via use-livecode
The more libs/behaviors we use the more we are passing params that reference objects This fails put "graphic portal-title-bkgnd" into pObject setGradient pObject command setGradient pObject local tNewGradientArray # be careful when cutting and paste to and from email # tabs may get replace