breakpoint on parameter
J. Landman Gay
jacque at hyperactivesw.com
Wed May 24 00:39:46 CEST 2017
On 5/23/17 10:36 AM, Matt Maier via use-livecode wrote:
> I want to find out which parts of my code are making changes to a control's
> parameter. Specifically, I've got an arrow that I want to be black, and it
> is black when it's created, but then it turns gray. I can't find the script
> that's turning it gray.
> I don't know where to put a breakpoint in the script.
> Can I put a breakpoint on that control's color parameter, so execution
> stops whenever something modifies it and goes to the script that's doing
> the modification?
You can't break for a parameter per se, only at a specified line of
script. (There are ways to break when certain variables change but
that's different.) What I'd do is use the Find and Replaced dialog in
the Edit menu to search for a relevant term. If you are using the color
constant "gray" then search for that, otherwise search for the RGB
value. Set the checkboxes to search only the scripts.
You'll get a list of all script references to the color and you can
either break at those lines, or just look at them to see which ones are
making the change.
You could also do a script search for the control's name and check every
instance of that.
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode