On Sat, Jan 3, 2015 at 10:41 AM, Peter Haworth <[email protected]> wrote:
> > replaceText(pScript,"(^\s*breakpoint$"," ") > > Hi Peter, If this is exactly how your script is written then I see two problems: 1) you need to actually put the result into something so: put replaceText(pScript,"(?im)^\s+breakpoint$","--BREAKPOINT") into tUpdatedScript (it's one of my pet peeves with the Docs; the examples given are typically unworkable as a straight Copy and Paste into a script - but that's another rant] replaceText - a function, does not work like replace - a command 2) you have an opening ( prior to your ^. I think you meant to have (?m) or even better (?im) so it's case insensitive and works multi-line but in your troubleshooting maybe the ( got left behind. I do what you do but instead of replacing the 'breakpoint' with nothing I merely comment it out and make it STANDOUT - as shown in the code above. Usually my hard breakpoints have ended up in their location because of some long hard troubleshooting so I don't wish to loose them. if I ever need to return to a handler for more troubleshooting, if there is the odd -- BREAKPOINT in there then the first thing I do is uncomment them and step through and see what the variables are telling me. HTH _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
