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

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Script Editor features

Post by richervin » Thu Sep 29, 2011 10:35 pm

I've been missing certain features that are common in other editors, especially autocomplete.

Also, I'm finding it difficult to trace code through the stacks, cards, groups, and buttons.

Do any of these features exist in the standard editor? Or are there alternative editors that would include them?
1) Search for references to functions and handlers

2) Search all scripts in a stack

3) Index of all scripts in a stack so they can be accessed directly (without navigating through the app, which may not be working)

4) Identification of unused functions and handlers (dead code)

5) Some kind of object navigator that displays the current heirarchy of stack objects, all the way through the group levels

6) An object browser that identifies all the available attributes, handlers, etc in an object (card, group, button, etc)
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

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

Re: Script Editor features

Post by mwieder » Thu Sep 29, 2011 11:07 pm

You may want to give the open-source glx2 script editor a try. It's got autocomplete and links to handlers, etc.

https://bitbucket.org/mwieder/glx2/downloads

I've had thoughts about implementing dead-code searches and other refactoring tools, but they're on the back burner for now.

3) Note that the application browser does show you what objects have scripts in them. and 5) are you looking for something more detailed than what the app browser currently shows?

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Re: Script Editor features

Post by richervin » Fri Sep 30, 2011 1:22 am

Thanks for the editor alternative! I was able to install it and will work with it some more.

Also, thanks for the App Browser tip. I had completely missed out on that.

It looks like your editor has a lot of nice keyboard shortcuts. I'll look forward to getting more familiar with those.

The profiling feature is a tool I am hoping won't be necessary, but I'm glad to have them.

Does it have a feature to find references to a handler? That's one thing I've really missed and haven't spotted in the interface, but there are a lot of features in this so perhaps I'll come across it later.

Once again, thanks for your work on this!
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

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

Re: Script Editor features

Post by mwieder » Fri Sep 30, 2011 1:45 am

Well, I'll take the kudos for working on it recently, but it's not really my original design. Jerry Daniels wrote the script editor and graciously allowed it to be released as an open-source project. I'm the maintainer of the project, which means I get to do most of the work, although bug fixes, additions, whatever are more than welcome... nudge, nudge, wink.

There's currently no concordance for cross-references, although it's on my wish list. I wrote some code to do this once but it was way too slow, so I'll need to revisit it some day.

richervin
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 54
Joined: Sat Sep 17, 2011 5:04 pm

Re: Script Editor features

Post by richervin » Fri Sep 30, 2011 2:36 am

If the code is functional, but slow then maybe I can take a look at it. I'm very good at runtime optimization of other people's code (it beats writing my own code!)
LiveCode 5.1.1 on Mac OS Mountain Lion
Attempting to develop for Android and iPhone
Currently on my third trial, and still finding LiveCode to be difficult for mobile applications in general, and particularly poor for Android

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

Re: Script Editor features

Post by marksmithhfx » Sat Oct 01, 2011 3:57 am

mwieder wrote:You may want to give the open-source glx2 script editor a try. It's got autocomplete and links to handlers, etc.

https://bitbucket.org/mwieder/glx2/downloads?
Hey Mark, I'm to daft to be able to figure out how to use this. When I run the glx2 code.rev program I just get a thin blue or black line under the traditional RR editor menu bar??

Any hints as to what to do next?

Thanks

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

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Location: California
Contact:

Re: Script Editor features

Post by dglass » Sat Oct 01, 2011 4:10 am

If you hover the cursor over it, there's probably a message like "Using LiveCode Script Editor..."

There should also be a "GLX2" all the way to the right. Hover over that, and there should be a "Click to start using..." message.

Click the GLX2 'button' and it will be the script editor when you starting writing/editing your code.

dglass
Posts: 519
Joined: Thu Sep 24, 2009 9:10 pm
Location: California
Contact:

Re: Script Editor features

Post by dglass » Sat Oct 01, 2011 4:14 am

Also, it can be a bit confusing because the menu names don't change much, but if you go to the 'LiveCode' menu it will be populated with GLX2 stuff instead.

Of particular note will be the GLX2 preferences.

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

Re: Script Editor features

Post by mwieder » Sat Oct 01, 2011 5:09 am

Right. Normally you'll have the glx2 editor in your user plugins folder and you can turn it on or off by clicking the GLX icon at the right of the menubar. When you edit the script of an object you'll be using the new editor.

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

Re: Script Editor features

Post by marksmithhfx » Sat Oct 01, 2011 11:32 pm

Mark, David, thanks for the suggestions... I'm going to give it a try. (David, good to see you back here again!)

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

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

Re: GLX2

Post by marksmithhfx » Sun Oct 02, 2011 12:14 am

Hi Mark, interesting editor... however preferences, help and things like that are taking me to a weird website...

http://www.daniels-mara.com/glx2/featur ... ences.html

????

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

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

Re: Script Editor features

Post by mwieder » Sun Oct 02, 2011 1:46 am

<sigh> I guess I haven't quite pulled all those out yet. Jerry used to have a web site set up with some documentation. Sadly it disappeared a while back.

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

Re: Script Editor features

Post by marksmithhfx » Sun Oct 02, 2011 6:39 am

mwieder wrote:<sigh> I guess I haven't quite pulled all those out yet. Jerry used to have a web site set up with some documentation. Sadly it disappeared a while back.

No problem really. I was looking for prefs because it seems to treat ## ok as a comment but if the line starts with -- it goes ahead and colorizes some of the text in the comment (as if it was code). I was going to see if there was an option to get lines starting with -- recognized as comments. Anyway, I sort of gave up and went back to the old editor. My wife tells me I find change hard :-)

Thanks muchly for posting it though. I'm always interested in seeing what other people are doing in LC.

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

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

Re: Script Editor features

Post by mwieder » Sun Oct 02, 2011 8:00 am

Interesting. I use "--" for comments and I haven't seen it *not* format them properly. Can you post a sample stack/script that messes up the editor?

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

Re: Script Editor features

Post by marksmithhfx » Sun Oct 02, 2011 8:18 am

mwieder wrote:Interesting. I use "--" for comments and I haven't seen it *not* format them properly. Can you post a sample stack/script that messes up the editor?
Hi Mark, as luck would have it I just posted one :) check the enhanced scrolling list field - revisited msg. I've attached a screen shot here. I use -- for my comments, Bernd uses ## for his. As you can see, various words in my comments (script, and, for, popup, some people's name?) get highlighted while in Bernd's comments its all pretty much light purple.

(I apologize for the somewhat poor quality... I had to drop it down a bit to get it onto the board)

-- Mark
Attachments
Screen shot glx2.zip
(218.01 KiB) Downloaded 268 times
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”