Script Editor Colors Gone?

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

cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Script Editor Colors Gone?

Post by cmhjon » Tue Mar 01, 2022 11:00 pm

Hi all,

Recently, I had to upgrade my Mac from Catalina to Big Sur. I am running LC 9 Indy. Since the upgrade, ALL script text is the Script Editor window is now black. I tried changing the Colorization preference from Default to Revolution Classic but neither restores the colors. I also tried reinstalling LC and that also did not help.

Although this is not a big deal, I really do like the colors as it makes code easier on the eyes.

Any ideas?

Thank you,
Jon

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Tue Mar 01, 2022 11:54 pm

Not sure but it may be a case of deleting the preferences file...
You can locate the file by running this in msg box:

Code: Select all

put the filename of stack "revPreferences"
Quit LC first and then delete file in the OS.

This has solved the odd quirck that has sprung up from time to time for me (autocorrect not working, strict compilation mode not working, wonky message box with no buttons, etc)
Hope that helps

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 9:51 am

I am running MacOS 12 (Monterey), and initially upgraded to it because MacOS 11 (Big Sur) was causing a whole slew of problems with LiveCode.

With MacOS 12 on my 2018 Mac Mini I have not had any obvious problems at all.

I have a feeling that Apple rushed out with MacOS 11 far, far too quickly after 10.15
because they had dug themselves a big hole by announcing they'd produce a new OS version
every 12 months and felt they had to stick with it.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 12:09 pm

SShot 2022-03-02 at 13.08.07.png
-
That is NOT what I expected at all.
-
SShot 2022-03-02 at 13.31.32.png
-
Stack deleted as more BRUTAL version attached further down.
Last edited by richmond62 on Wed Mar 02, 2022 2:28 pm, edited 1 time in total.

cmhjon
Posts: 175
Joined: Tue Aug 04, 2015 11:55 am

Re: Script Editor Colors Gone?

Post by cmhjon » Wed Mar 02, 2022 1:32 pm

Sadly, deleting LC preferences did not restore the script colors :(

Thanks,
Jon

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Wed Mar 02, 2022 1:42 pm

Hi Jon
Sorry to hear that didn't work for you - but just check you've done it right.
If you delete the prefs file before you quit LC it won't work.

The clue this hasn't worked will be that all your preferences will be as you had them - and you won't get the tutorial at the beginning which you get on the very first install. If you did get this, then yes, you have successfully deleted your preferences and forced LC to recreate a new prefs file.

Don't use a stack to do this in the IDE - either make it a standalone or just use the Finder to delete the file AFTER you quit LC (i just copy the file path in the message box and then in the finder hit cmd-shift-G and paste the file path there to navigate directly).

On restarting LC it will recreate the preferences file as new, which means the first thing you'll see is the offer to run the tutorial.

If that doesn't work, not sure what other easy fix you can employ other than maybe upgrading - I'm on Monterey running 10 DP2. I've not had any such issues...
What exact version of Indy are you using? are you able/licensed to run the last version of Indy (9.6.3)?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 2:27 pm

SShot 2022-03-02 at 15.24.33.png
-
This WILL work if used inwith a live LiveCode session.

PLEASE be very careful with this stack.

Sorry; but if this mucks up your LC preferences completely I am not prepared
to accept any responsibility.
Last edited by richmond62 on Wed Mar 02, 2022 2:44 pm, edited 1 time in total.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Wed Mar 02, 2022 2:30 pm

I haven't tested your stack, but i know for sure that if i manually delete the prefs file prior to quitting LC it does not work.
The evidence of this working is getting the tutorial when restarting LC.

I presume then that you must be putting a fresh prefs file in place of the deleting one?
Does this reset everything to the point of getting the tutorial on startup?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 2:44 pm

i know for sure
Hmm . . .

Code: Select all

on mouseUp
   put the filename of stack "revPreferences" into XXX
   put the filename of stack "revPreferences" into QQQ
   set the itemDelimiter to "/"
   put the longFilePath of XXX into ZZZ
   revCopyFile ZZZ, "/LC_Prefs_Copy"
   delete file ZZZ
   save stack "Blocker" as XXX
end mouseUp
This stack saves a substack of itself in the place of the Preferences file so works instantly.
Attachments
Prefs Deleter.livecode.zip
Stack.
(36.9 KiB) Downloaded 68 times

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Wed Mar 02, 2022 3:48 pm

But does it reset the preferences? Ignoring the tutorial thing for now (which is a very obvious way to prove preferences have been reset), if you change the script editor font, run your script and restart LC, is the script editor font the same or reset to its default?

If not, how can we make sure LC doesn't recognise someone has tinkered with the prefs on shutdown and just flush a copy of existing prefs to disk overwriting your substack that's replaced the prefs file?

At the very least, if there is a persistent interface problem it's worth just shutting down LC, manually deleting the prefs file and restarting LC (a total effort of about ~20 seconds) to see if that helps - indeed only Jon can confirm if that actually makes a difference... then again it's not clear if Jon manually deleted the prefs file *after* shutting LC down or used your stack...

At the end of the day theoretical discussions about prefs files don't matter - what does is if this was a solution for Jon (which he states it wasn't).

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 3:59 pm

Hilarious:

The first time I ran that it changed my scriptEditor font and colourisation.

On subsequent runs it screws up the Menus and the scriptEditor font and colourisation cannot be got at.
-
SShot 2022-03-02 at 16.56.17.png
BEFORE
-
SShot 2022-03-02 at 16.56.56.png
AFTER

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Wed Mar 02, 2022 4:16 pm

sorry i can't really understand the difference in the pics as it's showing 2 different things...
but if it's screwed up your IDE, you may need to manually delete the prefs file ;) ;) ;)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 4:18 pm

The "difference" is that in the second image the 'Object' Menu is 99% inaccessible.

On a restart LC is back to what it was before hitting the button.

stam
Posts: 2679
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: Script Editor Colors Gone?

Post by stam » Wed Mar 02, 2022 4:38 pm

Glad it worked out for you and things returned to normal on restart.
But did it change any actual preferences?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9359
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Script Editor Colors Gone?

Post by richmond62 » Wed Mar 02, 2022 5:59 pm

But did it change any actual preferences?
Not after the first time I ran it . . .

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”