"The following objects were modified outside the script editor, would you like to reload them"
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: "The following objects were modified outside the script editor, would you like to reload them"
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).
LC Indy 9.6.3 on Mac OS High Sierra (french localized version).
Re: "The following objects were modified outside the script editor, would you like to reload them"
@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?
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
François
Re: "The following objects were modified outside the script editor, would you like to reload them"
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.
- 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
François
-
- 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"
I agree. Actually I think that in Livecode variable names should also support any character.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?
And it does but md5Digest is confused when using two-codepoint characters. (it is used to check if the script was changed on resumeStack).
Re: "The following objects were modified outside the script editor, would you like to reload them"
I also use accented characters in comments but never encountered this problem. I saw it for the first time with "é" in a string.
-
- 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"
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.I also use accented characters in comments but never encountered this problem. I saw it for the first time with "é" in a string.
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
Re: "The following objects were modified outside the script editor, would you like to reload them"
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.
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.
Re: "The following objects were modified outside the script editor, would you like to reload them"
@ 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.
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
François
Re: "The following objects were modified outside the script editor, would you like to reload them"
I did 3 test (Livecode 9.6.3.) with accents…
1. …in variable name
2. …in comments
3. …in strings
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?
1. …in variable name
Code: Select all
on mouseUp
put 7 into à
put à
end mouseUp
Code: Select all
on mouseUp
-- à
answer empty
end mouseUp
Code: Select all
on mouseUp
answer "à"
end mouseUp
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
François
Re: "The following objects were modified outside the script editor, would you like to reload them"
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!
Re: "The following objects were modified outside the script editor, would you like to reload them"
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… .
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… .
--
François
François
-
- 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"
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
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
-
- 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"
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,.
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
HyperActive Software | http://www.hyperactivesw.com
-
- 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"
@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
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