Page 1 of 1

Seeing all the code of a LiveCode app?

Posted: Thu Jan 19, 2012 5:04 pm
by kcorey
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)

Re: Seeing all the code of a LiveCode app?

Posted: Thu Jan 19, 2012 5:44 pm
by FourthWorld
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.

Re: Seeing all the code of a LiveCode app?

Posted: Thu Jan 19, 2012 6:50 pm
by gpb01
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

Re: Seeing all the code of a LiveCode app?

Posted: Thu Jan 19, 2012 10:07 pm
by kcorey
That's exactly the kind of thing I was thinking of. Perfect.

Thanks!

-Ken

Re: Seeing all the code of a LiveCode app?

Posted: Fri Jan 20, 2012 3:44 pm
by FourthWorld
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 -

Re: Seeing all the code of a LiveCode app?

Posted: Fri Jan 20, 2012 10:29 pm
by raulvelazquez
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.