Cannot make SE colorization stick

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: heatherlaine, Klaus, FourthWorld, robinmiller, kevinmiller

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 5328
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Cannot make SE colorization stick

Post by dunbarx » Sat Jan 27, 2018 12:35 am

Thanks, Bogs.

Craig

shaosean
Posts: 905
Joined: Thu Nov 04, 2010 7:53 am

Re: Cannot make SE colorization stick

Post by shaosean » Sat Jan 27, 2018 2:30 am

I recommend not modifying the IDE stacks, as you have seen they can be a pain, but if you upgrade all your changes will be lost. Until there's an API to change the themes, overriding the IDE scripts is probably the safest bet.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2673
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Cannot make SE colorization stick

Post by mwieder » Sat Jan 27, 2018 3:57 am

What shaosean said. In addition, Craig, you're trying to modify a running application. You can't do that on any platform. Doesn't matter whether you're on a Mac or not. Best to create a stack to do the mods on startup.

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot make SE colorization stick

Post by bogs » Sat Jan 27, 2018 6:02 am

I'll state right at the outset, I agree with Shaosean's statement (to a point) that, if you have the skill and knowledge to write the plugin he's talking about, or even to modify the plugin he wrote to suite your tastes, that is probably the best way to go. I haven't looked into his plugin myself yet, but it seems to work from the light test I gave it very well on the Lc versions I use.

I'll also state flat out I think he did a great job with the design of it. I wish I had written it myself :P

Having said that, I've seen this said a few times -
shaosean wrote:
Sat Jan 27, 2018 2:30 am
... but if you upgrade all your changes will be lost...
which to my way of thinking is only partially correct, depending I guess on what an 'upgrade' means to you.

Mind you, I don't think I've ever used the actual 'upgrade' version system, it is the first thing I turn off. If I want to see what the 'new' version is like, I download it. I assume I am in the minority in this regard, but, if you mod the IDE directly, that mod is done. The new version downloaded and installed will not reflect it (unless you then mod the downloaded upgrade), but it certainly won't wipe out the mod of the version you've done either, at least I haven't seen this behavior on my system. The new installed IDE always picks its own installed folder
Image
Having said that, I'll repeat that again, for the most part I agree with what Shaosean said, it is the better way. Some day I'll reach that level myself, but probably not before I hack the IDE in some way :wink: and of course in this case we are only talking about targeting one area that takes about ... thinking... 5 mins. or less to change? I waste more time than that taking screen shots to document how to do it.
mwieder wrote:
Sat Jan 27, 2018 3:57 am
Craig, you're trying to modify a running application.
I don't know what to say there, the operation is not done to the executing file but to a stack in a subfolder. Clearly it is able to be done, since I have done it now on 4 versions of the IDE on 2 operating systems. It is only possible because the IDE works as a launcher / stack save program, and is not a monolithic executable.

I'll post the run down one below this to preserve some kind of continuity.
Last edited by bogs on Sat Jan 27, 2018 6:53 am, edited 1 time in total.
Image

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot make SE colorization stick

Post by bogs » Sat Jan 27, 2018 6:49 am

Modifying the lines !!
Ok, that might have been over the top :P
***WARNING*** if you decide to do this, you may find the cats and dogs in your house have gone sterile, your beer is missing from the fridge, or that your computer is now talking to you in Klingonese. If any of that happens, well, your on your own. Apparently all this is very dire. You have been warned. :twisted: :twisted: :twisted:

Although these directions pertain (mostly) to the Mac OSX operating system, as far as I know the same file is in the same location on any operating system, the only question as to how much of the permissions hoohah you have to go through to be able to write it is, well, whether or not you have permission to write it heh.

For instance, on my linux box, I install Lc to my home folder for my use only, so I have permission to pretty much do what I wish. By default, however, it is setup to install for everyones use into /opt/runrev/..., which means you would have to elevate your permissions. Windows I have no idea about the current version.

So, anyway, I downloaded the 8.1.8 version of Lc, hit view ui in list, and pulled up the project browser to check the location of the stack I was looking for. As mentioned in another thread somewhere else, what used to be in the revStackEditor.rev file is now, I think, a behavior script (?). In any case, Craig mentioned it above, it is now in the 'revSeUtilities.livecodescript' file.
Image
I opened the .app location by right clicking on the Lc icon in the dock, and opening that in finder.
Image
Right click on the app icon and choose 'show package contents'.
Image
Once inside, you have to get to the 'behaviors' folder. Here is the path I saw -
Image
The file your looking for in that folder is 'revSeUtilities.livecodescript'.
Image
Right click on this file and choose 'get info'. At the bottom, set it so that you have read / write permission for only this file. You don't need to have it for any of the folders along the way, as far as I can tell, but that may have changed on OSX systems newer than 10.6.5.

Anyway, now you should be ready to change the line(s) in that file that control the color(s) you want to display, and because you have write permission for the file, it *should* save like any other. I had no problem with it, anyway.
Image
The results of, as I said, about 5 minutes doodling around to change the permission mostly.
Image

If you have any questions about the method used, the steps taken, something not explained clearly enough, fire away.

If your goldfish has keeled over, your jug'o'milk has gone sour, or your plumbing started leaking, well, you were warned at the beginning.

Either way, have fun :mrgreen:
Image

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2673
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Cannot make SE colorization stick

Post by mwieder » Sat Jan 27, 2018 7:07 am

Doh! :oops: I forgot this was about modifying a livecodescript stack. That's in the universe of possibility, given the proper directory permissions. Nevertheless, the pain of having to do this every time you download a new LC version makes me wonder if a simple plugin stack to do the work is too easy? Some other reason you need to go about things the hard way?

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot make SE colorization stick

Post by bogs » Sat Jan 27, 2018 7:20 am

Actually, at this point with my dis-jointed knowledge of how things work, writing the plugin is actually more difficult than the time it took to just mod the lines as I said above.

Mind you, I completely agree with your point of view, as I also said above. You and I have no argument in any way I can think of that, if you have the knowledge to write the plugin to control the part of the IDE your targeting, that is 100% the way to go about it.

Having said that, on my box, it took me less than a minute to find and make the change. When I switched to the Mac system, which I am infinitely less familiar with, it took +/- 5 minutes, mostly to change permissions. The ultimate question is I guess, how long would it take me to learn to write a plugin, design it, code it, and eventually test it / debug it / etc, vs. this is something I want to test, change the line, done ?

Since I've been using Lc (not a long long time, btw) it has changed formats twice, so plugins that worked with 7.x might or might not work with 8.x. In the case of the script editor, the plugin you wrote might be targeting the wrong things altogether to boot, so you'd have to re-write it.
The preceding 'you'd' and 'you' were generic, and did not mean you personally

You know, thinking about it, I think I'll just continue to change what I need changed directly. Outside of Mc though, that isn't much :wink:

What is even more peculiar is, ultimately I have no interest in changing the script editor, I only figured this out to help Craig with his question :mrgreen:
Image

shaosean
Posts: 905
Joined: Thu Nov 04, 2010 7:53 am

Re: Cannot make SE colorization stick

Post by shaosean » Sat Jan 27, 2018 11:00 am

Well, seeing as someone else wrote a plugin to do it, there's no need to hack the IDE or write a plugin to do it ;) BUT, always hack the IDE and learn how to write plugins.. Learn as much as you can.. Ask questions, question everything (except that one thing, you know which one I'm talking about ;) )

Now that the IDE is open source, perhaps you can take some of the "hacking the IDE" energy and implement script editor themes and submit it for inclusion in a future build :)

AndyP
Posts: 327
Joined: Wed Aug 27, 2008 12:57 pm
Location: Seeheim, Germany (ex UK)
Contact:

Re: Cannot make SE colorization stick

Post by AndyP » Sat Jan 27, 2018 12:57 pm

I'm working on a hack for the ide that will allow one custom theme to be set directly from the Script editor preferences pane of the the preferences stack.
I'm hard coding this first for testing and when happy that it's robust enough, I will make the relevant changes in the repository and hopefully the LiveCode team will get it into a future build.
Andy Piddock

http://2108.co.uk/tinyide/ - TinyIDE gives you more space to develop your ideas

http://2108.co.uk/script-editor-themer/ Script Editor Themer - Your code has never looked so good

My software never has bugs. It just develops random features

shaosean
Posts: 905
Joined: Thu Nov 04, 2010 7:53 am

Re: Cannot make SE colorization stick

Post by shaosean » Sat Jan 27, 2018 1:09 pm

Awesome job.. Let me know if there's anything you need a hand with..

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot make SE colorization stick

Post by bogs » Sat Jan 27, 2018 4:13 pm

shaosean wrote:
Sat Jan 27, 2018 11:00 am
Ask questions, question everything (except that one thing, you know which one I'm talking about ;) )
I'm sorry, I forgot what it is I wasn't supposed to ask :oops: so you'll probably be asked whatever it is again at some point. I'm blaming that on senility, or my very bad case of 'allTheTimers' :twisted:
shaosean wrote:
Sat Jan 27, 2018 11:00 am
Well, seeing as someone else wrote a plugin to do it, there's no need to hack the IDE or write a plugin to do it
That is a good point, and really Craig, if you get the chance, his plugin is worth the look (as I mentioned earlier in this very thread). I just still answer any question I can because, well, I guess it is there :mrgreen: I feel good that Andy is picking up your toy and running with it which should make it multi-generational, provided his plans work out.

From what he wrote above this, he's going considerably further than I thought with it :wink:

P.S. edit - I really hope Craig lets us know which way he went and which way worked out ok for now :P
Image

bogs
Posts: 1761
Joined: Sat Feb 25, 2017 10:45 pm

Re: Cannot make SE colorization stick

Post by bogs » Fri Feb 09, 2018 9:30 pm

bogs wrote:
Sat Jan 27, 2018 4:13 pm
P.S. edit - I really hope Craig lets us know which way he went and which way worked out ok for now :P
Craig, you have a pm if you'd rather just whisper it behind the scenes as it were Image
Image

Post Reply

Return to “Talking LiveCode”