Search found 2768 matches

by mwieder
Tue Jul 09, 2019 1:01 am
Forum: Feature Requests
Topic: Error Messages
Replies: 23
Views: 1007

Re: Error Messages

...and in particular engine/src/executionerrors.h But you *could* go through the process of intercepting the ErrorDialg message and in your script convert the terse built-in messages to ones of your own. There are, of course, several error messages that could do with some translation. Gotta love #52...
by mwieder
Tue Jul 09, 2019 12:23 am
Forum: Off-Topic
Topic: Old tips = new tricks
Replies: 49
Views: 2898

Re: Old tips = new tricks

The browser widget and linux don't play well together ever since LC went the CEF route. But to get back to your issue here, saving a stack by script with the "with format xxx" syntax will work on LC versions where it's supported (I think that's 8.0 and above) and will be ignored on previous versions...
by mwieder
Tue Jul 09, 2019 12:14 am
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1883

Re: Implementing full regex in LiveCode

1234ABC > ABC 1234 678XYZ > XYZ 678 If that's literally all you need then how about something like function convertBackwards pInputString local tResultString local tNumber, tText if matchtext(pInputString, "(\d+)([A-Z]+)", tNumber, tText) then put tText && tNumber into tResultString end if return t...
by mwieder
Mon Jul 08, 2019 5:31 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1883

Re: Implementing full regex in LiveCode

Yep - that would add some significant power to text processing. Meanwhile, I think Thierry has done an excellent job with his regex extension library.
by mwieder
Mon Jul 08, 2019 4:49 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1883

Re: Implementing full regex in LiveCode

Ah. Got it. So your problem here isn't that LiveCode's PCRE implementation doesn't support backreferences, but rather that the replaceText command could benefit from the replacement string *also* supporting regex (and being able to leverage the backreferences from the match expression).
by mwieder
Sun Jul 07, 2019 10:58 pm
Forum: Talking LiveCode
Topic: Implementing full regex in LiveCode
Replies: 34
Views: 1883

Re: Implementing full regex in LiveCode

The PCRE library in LiveCode does indeed support backreferences. Although PCRE regex statements, like the rest of Perl, are in a write-only language.

put matchtext("abca", "(a)(b)(c)\g-3") # returns true
put matchtext("abca", "(a)(b)(c)\g-2") # returns false
by mwieder
Sun Jul 07, 2019 10:47 pm
Forum: Off-Topic
Topic: Old tips = new tricks
Replies: 49
Views: 2898

Re: Old tips = new tricks

You can't open a version > 8.1.2 on your *nix machine?
by mwieder
Sun Jul 07, 2019 10:46 pm
Forum: Off-Topic
Topic: Old tips = new tricks
Replies: 49
Views: 2898

Re: Old tips = new tricks

"the version" is of course still working. And "the stackfileversion" also still works, although its use isn't recommended and it may/will/who-knows disappear at any time. I don't remember offhand when the "save stack with format" syntax was introduced, but I'm reasonably confident it was pretty rece...
by mwieder
Sun Jul 07, 2019 9:49 pm
Forum: Off-Topic
Topic: Old tips = new tricks
Replies: 49
Views: 2898

Re: Old tips = new tricks

the stackfileversion property has been deprecated since version 8.0.0.
by mwieder
Tue May 28, 2019 6:01 pm
Forum: Talking LiveCode
Topic: Using "of me" fails to throw an error - is this expected?
Replies: 7
Views: 462

Re: Using "of me" fails to throw an error - is this expected?

Simon - thanks.
Richard - yep. But at least there's an easy workaround for that.

In general I'm all in for fixing things that should be bugs but aren't.

...sheesh... taken out of context, that sentence is completely wacky. :P
by mwieder
Tue May 28, 2019 4:49 am
Forum: Talking LiveCode
Topic: Using "of me" fails to throw an error - is this expected?
Replies: 7
Views: 462

Re: Using "of me" fails to throw an error - is this expected?

Yes, but... in that case it's lax parsing that has been tightened up in a recent (9.5dp1) build. Here "of me" is benign but misleading: there may be other instances of "of me" in that script that correctly refer to the button object, and having a different "of me" line refer to the containing object...
by mwieder
Tue May 28, 2019 2:12 am
Forum: Talking LiveCode
Topic: Using "of me" fails to throw an error - is this expected?
Replies: 7
Views: 462

Re: Using "of me" fails to throw an error - is this expected?

Yep - that's definitely buggy behavior and worthy of a bug report.
And it works that way in 9.5dp1 as well, so it's a good time to fix it.
by mwieder
Tue May 28, 2019 2:05 am
Forum: Getting Started with LiveCode - Complete Beginners
Topic: Bugged by automatic maze navigation
Replies: 9
Views: 655

Re: Bugged by automatic maze navigation

Teresa May Topples Over?
Too Many Trade-Offs?

Additionally, the random(n) function returns an integer between 1 and n, not zero and n.
by mwieder
Fri May 24, 2019 4:55 pm
Forum: Announcements
Topic: Refactoring Support for the LC Script Editor
Replies: 7
Views: 1148

Re: Refactoring Support for the LC Script Editor

Thanks to Bernd Niggeman for finding *many* edge cases here. The latest build is can be downloaded directly from https://github.com/mwieder/revRefactor/tree/master/Plugin even if you don't need to build from the script text files. And thanks to Brian Milby for ScriptTracker, which really has changed...

Go to advanced search