Strange local behavior (plus a cool tip!)

MisterX b.xavier at internet.lu
Thu Jun 24 04:18:06 EDT 2004


Maybe this is my pandimensional processor acting up but I wanted to know if
the following is localized to this computer or you have had the same
experience.

I entered a bug regarding the loss of hilitedlines in a list field after
resizing a stack.

so I wrote this nice little handler to save the face of my applications
<script 1>
on mouseUp
  put the hilitedtext of me into x
  put the hilitedline of me into ilastselection -- for reselect handler

  bla bla bla
end mouseUp

local ilastselection

on reselect
  -- in case selection is lost
  set the hilitedline of me to ilastselection
end reselect

When I needed to use the hilitedline of this field, I would just send
"Reselect" to the field and the hilitedline would come back if it was lost.
Well, funny behavior is that it never worked!

So I put the "local" statement before the mouseup and now it works.

I checked the documentation to see if there was a mention of precedence but
there isn't any.

So is it normal? Should I write a bugzilla to suggest documentation change
or a script precendence bug?

cheerios
Xavier




More information about the use-livecode mailing list