"The following objects were modified outside the script editor, would you like to reload them"

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Zax
Posts: 468
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Zax » Thu Aug 19, 2021 1:59 pm

I confirm the é problem: for development purpose, I paste the following hardcoded filename in a script and starts to be annoyed by the "modified" dialog. The filename contains an é because the file is located in my Développement folder!

LC Indy 9.6.3 on Mac OS High Sierra (french localized version).

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Fjord » Thu Aug 19, 2021 4:15 pm

@bn
I tried your test, it displayed the character é (e acute)

Of course I've got many accented characters: not in variable names, but in comments and in strings. I use them also, sometimes, in folders names, and obviously (like Zax) in my 'Développement' folder… which ends up in a string.
I guess you nailed it!
Funny: I substituted all é (e acute) with e (simple e), à (a acute) with a (simple a) and checked there were no other vowels. I still got the message 'modified outside…'

Now how does one avoid using UTF-8 in scripts?
--
François

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Fjord » Thu Aug 19, 2021 7:27 pm

On second thoughts, most (if not all) languages I've used adhere to the following rules:
- instructions: ASCII characters set
- comments and strings : any characters
Am I right?
At any rate, that would explain the fact that I keep complaining about the above problem, more than most - English speakers - users.
--
François

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by bn » Thu Aug 19, 2021 7:37 pm

On second thoughts, most (if not all) languages I've used adhere to the following rules:
- instructions: ASCII characters set
- comments and strings : any characters
Am I right?
I agree. Actually I think that in Livecode variable names should also support any character.
And it does but md5Digest is confused when using two-codepoint characters. (it is used to check if the script was changed on resumeStack).

Zax
Posts: 468
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Zax » Thu Aug 19, 2021 8:23 pm

Fjord wrote:
Thu Aug 19, 2021 4:15 pm
Of course I've got many accented characters: not in variable names, but in comments and in strings. I use them also, sometimes, in folders names, and obviously (like Zax) in my 'Développement' folder… which ends up in a string.
I also use accented characters in comments but never encountered this problem. I saw it for the first time with "é" in a string.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by bn » Thu Aug 19, 2021 8:38 pm

I also use accented characters in comments but never encountered this problem. I saw it for the first time with "é" in a string.
The confusing thing is that for e.g. roman languages accented characters come in two flavors. One in the high ASCII range (depending on operating system which "number") and as a two-codepoint unicode character.

The first one is of the one codepoint flavor the second is a two codepoint flavor.
(I like flavor today because it sounds like subparticle physics...)

Here is a stack that patches the Script Editor to handler the two codepoint flavor gracefully.

You could test this stack and see if it fixes your problems
Test it in a fresh copy of LC with a test stack of yours.

Kind regards
Bernd
Attachments
fix md5Digest in stack revSEStackbehavior.livecode.zip
see instructions in stack
(2.01 KiB) Downloaded 119 times

Zax
Posts: 468
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Zax » Fri Aug 20, 2021 8:08 am

Thanks Bernd, your stack works great.

I realized I also uses accented characters in strings (not only comments) but I think in my case the problem came after I pasted a file path from another application, or maybe from the Finder, I don't remember.

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Fjord » Fri Aug 20, 2021 11:23 am

@ Bernd
I tried and it seems you're right:
1. I modify the script, get the "modified outside the script editor" message, then
2. I use your stack, modify again, no message; then
3. quit livecode, reload the same stack again, same as 1.

It might be interesting to see if the same problem occurs when special chars occur:
- in instructions (put 2 into arrivée)
- in comments ( -- heure d'arrivée)
- in strings ( answer "arrivée")

I'll give it a try.
--
François

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Fjord » Fri Aug 20, 2021 11:57 am

I did 3 test (Livecode 9.6.3.) with accents…

1. …in variable name

Code: Select all

on mouseUp
   put 7 into à
   put à
end mouseUp
2. …in comments

Code: Select all

on mouseUp
   -- à
   answer empty
   
end mouseUp
3. …in strings

Code: Select all

on mouseUp
   answer "à"
   
end mouseUp
For each test:
a) I build a new stack and saved it
b) put a button on it, wrote its script with an é (e acute), according to 1, 2 or 3 above
c) tried the button
d) saved and quit, restart the stack
e) modify the script (add a return, as this is enough to create a problem)
f) retried the button
g) saved and quit, restart the stack
h) pasted (not typed) an à (a acute)
i) retried the button.

Everything worked fine. I remember the problem happened in my old stacks, only after some time. Can we conclude something?
--
François

Zax
Posts: 468
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Zax » Fri Aug 20, 2021 2:19 pm

Fjord wrote:
Fri Aug 20, 2021 11:57 am
Everything worked fine. I remember the problem happened in my old stacks, only after some time. Can we conclude something?
Did you try to paste some accented characters in LC script editor copied from other apps (text processor, Finder, etc)?
This is my test:
1 - open an existing "good" stack, without "modified" problem
2 - in the Finder, select a file with accented chars in its name with right-click. When the pop-up appears, press ALT and choose "copier [...] en tant que nom de chemin"
3 - back to LC, open a existing script and paste the copied file path with quotes.
4 - save the script and swap several times between IDE and script editor
5 - ---> nasty "modifed" dialog appears!

Fjord
Posts: 132
Joined: Sat Dec 06, 2008 6:18 pm
Location: France

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Fjord » Fri Aug 20, 2021 3:32 pm

I did slightly different: I wrote à (a grave, not a acute as I wrote before) in a TextEdit doc, copied from there and pasted into each of the 3 LC scripts I was testing.

I did not, however "swap several times between IDE and script editor" as you did. This is interesting also, as you triggered the error, which I did not. If you did that without saving in between, just swapping between the two windows, IDE and script editor, I don't know what it tests… :shock: .
--
François

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by bn » Fri Aug 20, 2021 4:20 pm

As Zax pointed out it depends on the source of the accented chars whether they are one- or two-byte chars.

Here is a script in the button that contains two-codepoint accented chars to copy from
I also tried to copy from TextEdit but that did not elicit the bug.

Kind regards
Bernd
Attachments
script with two codepoint chars.livecode.zip
(1.05 KiB) Downloaded 110 times

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7235
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by jacque » Fri Aug 20, 2021 4:26 pm

I get the error occasionally and I rarely use accented characters. If I remember right, it only happens when I've edited a script but not yet applied it. When I switch to the IDE and then back to the script editor I sometimes get the error. I never know which button to select in the dialog since there were no changes in the few seconds I was away from the editor.

It doesn't happen very often so it's hard to track down,.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4000
Joined: Sun Jan 07, 2007 9:12 pm
Location: Bochum, Germany

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by bn » Fri Aug 20, 2021 4:32 pm

@Jacque

I also get the error very rarely without accented characters. But the cases discussed here are reproducible and fixable. And an absolute pain if you get into the repeated dialog. Also at times if I do "Reload" it kills the line numbering.

Kind regards
Bernd

Zax
Posts: 468
Joined: Mon May 28, 2007 10:12 am
Location: France
Contact:

Re: "The following objects were modified outside the script editor, would you like to reload them"

Post by Zax » Fri Aug 20, 2021 7:04 pm

bn wrote:
Fri Aug 20, 2021 4:32 pm
And an absolute pain if you get into the repeated dialog. Also at times if I do "Reload" it kills the line numbering.
Indeed!
When it has happened to me, I thought my stack was corrupted, and LC ready to crash :(

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”