Script Editor features

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

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: GLX2 - Why doesn't a ctrl-s save my changes?

Post by BarrySumpter » Sun Oct 02, 2011 11:38 pm

Wow!
I really like all the colors and the hyperlinking to functions.

I had a look at this about 4am last night so was a bit ditsy.

Why doesn't a ctrl-s save the changes I've made in the GLX2 editor?

Where's the Editor tool bar?

Can I program GLX2 to Save as ... like MS Save as...?

Can I add my own comment and uncomment tool bar button?

I wonder if the original author would still have the support docos?
Last edited by BarrySumpter on Mon Oct 03, 2011 6:32 am, edited 1 time in total.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 4:28 am

Barry- that's a bit weird. How are you launching glx2? Are you just launching it as a stack or do you have it in your Plugins folder?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 4:30 am

Mark - that's even weirder. Did you just type that stuff in or did you compile it before taking the snapshot? The "--" prefix for comments is formatting fine for me.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Script Editor features

Post by jacque » Mon Oct 03, 2011 4:34 am

The native editor doesn't have everything you list, but there are still ways to get the info usually.
1) Search for references to functions and handlers
You can use the Find and Replace menu item in the Edit menu, which is actually pretty powerful. Uncheck everything except script searches and then look for whatever you want. Double click any result to see the script. There's a glitch sometimes where you need to drag the window a little wider to see all the contents.

A faster way is to use advanced search within the editor itself. This is the one I usually use. Cmd-F (control-F on windows) brings up the plain Find, adding the shift key or clicking the More... button next to the Find box brings up advanced search. From there you can search all stacks, the current stack, the current tab, etc. for any string. Expanding the toggle arrow allows grep searches and other advanced features. You can locate just about anything with this. You can also do mass-replacements, or find-and-replace one at a time. I use this dialog constantly.
2) Search all scripts in a stack
See #1.
3) Index of all scripts in a stack so they can be accessed directly (without navigating through the app, which may not be working)
It isn't an index, but you can jump to any handler by right-clicking one of its calls in a script and choosing "Go to definition". That will pop you right into the handler itself.
4) Identification of unused functions and handlers (dead code)
No real built-in way to do this, but sometimes I use one of the Find methods to search. If the only thing that comes up is the handler itself, then it is dead code.
5) Some kind of object navigator that displays the current heirarchy of stack objects, all the way through the group levels
Application browser, which I think you just heard about.
6) An object browser that identifies all the available attributes, handlers, etc in an object (card, group, button, etc)
Ditto, Application browser, coupled with the property inspector. Double-clicking any object in the app browser will open its property inspector.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 4:58 am

You can use the Find and Replace menu item in the Edit menu, which is actually pretty powerful.
and the global search feature is more powerful than the search stuff in glx2. Open the search pane, then click the More button and you'll get options that will search through all scripts in a stack file including substacks. That's what I currently use to see if a handler is unreferenced.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Script Editor features

Post by BarrySumpter » Mon Oct 03, 2011 6:26 am

mwieder wrote:Barry- that's a bit weird. How are you launching glx2? Are you just launching it as a stack or do you have it in your Plugins folder?
uhhh, which part is weird?
All of it? That would be cool.
I'm lauching GLX2 under RunRev Plugins and NOT under User Plugins.

My -- are showing the entire line as purple.

I had deduced the GLX2 editor had all the same features of LC editor.
With GLX2 enhancements added. But can't seem to get the hang of GLX2.
Still ditsy the whole day.
Or am I missing all the LC features in GLX2 somewhere?

Dieing to know what Crumbs are. LOL

I'd like to list the handlers in the left pane even if I'm not using one.
Then bold it when I am using it live REALbasic.
(Had to update a RB app this morning. And was surprised how much I missed the interface.)
REALbasic - thats two four letter words put together.
Just like LiveCode.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 6:11 pm

Well, yes... all of it's weird. I don't know why this would act differently for you, but I haven't (and wouldn't have) placed the script editor in with Rev's plugins - you'd have to do this for every version you installed, and there may be permissions problems as well. That's what the user plugins area is for.

Control-s should work. In fact, that's the only way to save palette stacks or other non-toplevel stacks.

All the handlers in the current script should be listed in the handlers pane on the left. As well as in the glx2's handlers menu. Mark Smith's screenshot shows this. And there are different icons depending on whether it's a handler or a function and whether or not it's private. If you start a line with --> (see Mark's screenshot) it will become a folder in the handlers pane to help you keep things organized.
"Where's the editor toolbar?"
Depends on your OS - it should be the menubar at the top of the screen on OSX. Otherwise it will be at the top of the script editor window on linux and Windows.

There's no "save as" at the moment, but it's easy to implement. And would be a nice addition. Look at card "tab 1" of stack "revGLX2 Code" and you'll see a group named "GLX2 Menubar" - you'll probably want to add the "save as" function to the File menu button. And send me the code once it's working so I can merge it into the public stream.

Adding new stuff to the toolbar is a little tricky but can be done - there's some startup code to do this, but off the top of my head I forget where it is. I'll dig around and find that for you if you want to play around with it.

breadcrumbs... as you've noticed, calls to handlers are hyperlinked in the script. If you click on one it will take you to the place where the handler is defined. And it will leave a breadcrumb in the crumbs toolbar right above the script pane (next to the Compile button) that will take you back to where you clicked from. Alt- or option-clicking the crumb will delete it from the crumbs toolbar. This is really handy.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 6:50 pm

Just noticed the bit about the "--" comments showing up properly.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Script Editor features

Post by BarrySumpter » Mon Oct 03, 2011 11:00 pm

Not sure what going on here.
I get a right margin line that truncates my script.
GLX2.gif


Also, do I have to switch back to the LC Editor to debug?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 03, 2011 11:56 pm

Yeah... that's a "feature" that Jerry put in to allow comments to be separated from the code. It's a preference you can toggle on and off. But you can also grab that line and drag it over to the right to show more text.

Debugging should work fine. Er... it's been so long since I've been without PowerDebug that I forget exactly, but I think everything should work.

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Script Editor features

Post by BarrySumpter » Sun Oct 09, 2011 1:24 am

OK one final go at GLX2.

Is there any videos or user guide available at all?

I keep trying to use GLX2 but it's really a distraction without a feature set and user guide.

I've decided to turn this off and remove from my plugins library.

Can't express in words how frustrating it is not to be able to take advantage of this considerable work.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

Re: Script Editor features

Post by marksmithhfx » Mon Oct 10, 2011 4:08 am

BarrySumpter wrote: Is there any videos or user guide available at all?

I keep trying to use GLX2 but it's really a distraction without a feature set and user guide.

Can't express in words how frustrating it is not to be able to take advantage of this considerable work.
Hi Barry, you are not alone. I felt there should have been better integrated help and an introduction. We should keep that in mind when we build our own tools.

--Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Script Editor features

Post by BarrySumpter » Mon Oct 10, 2011 4:51 am

Perhaps someone has already downloaded this and has it saved somewhere.
Or might have it in their cache?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: Script Editor features

Post by mwieder » Mon Oct 10, 2011 7:01 am

<sigh> I've pinged Jerry about it, but I'm not sure the old support site got archived. It may come down to having to create the docs from scratch again.

mhoneywill
Posts: 66
Joined: Fri Feb 05, 2010 7:31 pm

Re: Script Editor features

Post by mhoneywill » Mon Oct 10, 2011 7:45 pm

The web archive might help see

http://web.archive.org/web/200812081729 ... ences.html

Cheers

Martin

Post Reply