Object Referencing in LC 9.0.0

Brian Milby brian at milby7.com
Sun Jun 10 20:38:22 EDT 2018


Here's the revised function call:

on seSetObjectState objRef, objState
   if objRef is empty then pass seSetObjectState
   put the long id of objRef into t1
   put the long id of btn "Lib" of cd "LibMgr" of stack "MasterLibrary"
into t2
   if t1 = t2 and objState = "applied" then
      send "updateMasterIndex" to cd "LibMgr" of stack "MasterLibrary" in 1
ticks
   end if
   pass seSetObjectState
end seSetObjectState

So it looks like the message was being received with objRef empty causing
the issue.  (I used my Script Tracker to generate a diff of v47 to v48 to
find the change.)  [This is more for anyone finding this thread in the
future since Mike already found and fixed the issue.]

On Tue, May 29, 2018 at 10:26 AM, Bob Sneidar via use-livecode <
use-livecode at lists.runrev.com> wrote:

> I cannot make heads nor tails of your post. The asterisks and words
> running together make it impossible to read.
>
> Bob S
>
>
> > On May 26, 2018, at 13:34 , Michael Doub via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> >
> > Can someone using 9.0.0 help me out?
> >
> > This used to work in LC 7 but now generates an error on the second line
> (*put*thelongidofobjRef intot1).  What is the new correct syntax?   This
> popped up in the MasterLibrary.
> >
> > -= Thanks
> >       Mike
> >
> >
> > *on*seSetObjectState objRef, objState*
> >    put*thelongidofobjRef intot1 *
> >    put*thelongidofbtn"Lib"ofcd"LibMgr"ofstack"MasterLibrary"intot2*
> >    if* t1 = t2 andobjState = "applied"*then**
> >        send*"updateMasterIndex"tocd"LibMgr"ofstack"MasterLibrary"
> in1ticks*
> >    end* *if**
> >    pass*seSetObjectState*
> > end*seSetObjectState
> >
> > _______________________________________________
> > 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