Seeing all the code of a LiveCode app?

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

Post Reply
kcorey
Posts: 62
Joined: Fri Nov 25, 2011 6:06 pm

Seeing all the code of a LiveCode app?

Post by kcorey » Thu Jan 19, 2012 5:04 pm

Hi All,

I'm thinking that it's awfully easy to squirrel away scripts in obscure places in a LiveCode app (or Hypercard, or visual basic, etc).

Is there a way to see all the code of a LiveCode app in one place, no matter which object the code is identified with?

something like this maybe:

Code: Select all

-- card "Main Card"  -- this is the card script
on something
  blah
end something

-- card "Main Card" field "testing"  -- this is the field's script
on textChanged
  answer "I keep changing!"
end textChanged

-- card "Silliness"  -- this card has no scripts...perhaps it doesn't need an entry here?

-- card "foo"
-Ken (of the messy code)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Seeing all the code of a LiveCode app?

Post by FourthWorld » Thu Jan 19, 2012 5:44 pm

There are a number of reporting tools available in RevOnline which aggregate scripts into a single text file.

I used to make such tools myself, but over the years I've come to find them less useful because they take the code out of the context in which I can do anything meaningful with it.

Instead, I've spent more time with ways to find what I'm looking for in the scripts themselves. In recent years the LiveCode IDE's script editor added the ability to look up the definition of a handler, and to search for strings across everything in a stack or even the current message path I made a little tool called "4W Script Search" which is available in the Stacks section of RevNet - in the IDE choose Development->Plugins->Go RevNet.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

gpb01
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 281
Joined: Sat Jun 04, 2011 5:41 pm

Re: Seeing all the code of a LiveCode app?

Post by gpb01 » Thu Jan 19, 2012 6:50 pm

kcorey wrote:Hi All,

I'm thinking that it's awfully easy to squirrel away scripts in obscure places in a LiveCode app (or Hypercard, or visual basic, etc).

Is there a way to see all the code of a LiveCode app in one place, no matter which object the code is identified with?
...........
The Script Reporter is a good solution : http://revonline2.runrev.com/stack/282/Script-Reporter :)

Guglielmo

kcorey
Posts: 62
Joined: Fri Nov 25, 2011 6:06 pm

Re: Seeing all the code of a LiveCode app?

Post by kcorey » Thu Jan 19, 2012 10:07 pm

That's exactly the kind of thing I was thinking of. Perfect.

Thanks!

-Ken

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10049
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Seeing all the code of a LiveCode app?

Post by FourthWorld » Fri Jan 20, 2012 3:44 pm

Ken, after you've used that a while I would be interested in learning how it works out for you. I'm very interested in the use cases for such tools, and if there's some utility in viewing scripts out of context that I could learn from I may get back to crafting more of those sorts of tools.

Thanks -
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

raulvelazquez
Posts: 54
Joined: Fri Jan 20, 2012 6:08 pm

Re: Seeing all the code of a LiveCode app?

Post by raulvelazquez » Fri Jan 20, 2012 10:29 pm

I was thinking the same, that it would be a good idea.
Now I believe that is a good idea only when you did not write the code, just to make sure that you are looking at every place.

Post Reply