How does one find code in LK?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

How does one find code in LK?

Andy Burnett
Hello list

I am just starting to explore LK scripting. I opened one of the tutorials - adding methods to a button - and wanted to know more about the Button class. So, I opened an inspector on the button, and saw that it was an instance of lively.morphic.Button. I then opened a system browser, and tried to find the Button class, under lively/morphic. Unfortunately, I couldn't find anything - the class list when from AdditionalMorphs.js to Canvas.js.

Clearly, the code is there somewhere. So, could someone explain where I should be looking, or what I am doing wrong?

Thanks
Andy

_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: How does one find code in LK?

Fabian Bornhofen-2
Hi Andy -

the code you're looking for is in lively/morphic/Widgets.js. And of
course you're right, it's not obvious where to look for it.

Since I haven't been active in LK dev for a while: is anyone still
working on source code management without files? Because if not, Andy
just pointed to a spot that might be worth a Trac ticket.

Best
Fabian

On Sun, Jul 22, 2012 at 10:35 PM, Andy Burnett
<[hidden email]> wrote:

> Hello list
>
> I am just starting to explore LK scripting. I opened one of the tutorials -
> adding methods to a button - and wanted to know more about the Button class.
> So, I opened an inspector on the button, and saw that it was an instance of
> lively.morphic.Button. I then opened a system browser, and tried to find the
> Button class, under lively/morphic. Unfortunately, I couldn't find anything
> - the class list when from AdditionalMorphs.js to Canvas.js.
>
> Clearly, the code is there somewhere. So, could someone explain where I
> should be looking, or what I am doing wrong?
>
> Thanks
> Andy
>
> _______________________________________________
> lively-kernel mailing list
> [hidden email]
> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>
_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: How does one find code in LK?

Andy Burnett
In reply to this post by Andy Burnett
Hi Fabian
Thanks very much for the info. Now for the important question: "how
should I have found that"? Is it simply a case if grepping the source
code, or are there more sophisticated tools?

Just to give another example. I saw some code snippets sending
messages to Color. I was hoping to opens workspace and do something
like 'Color browse' so that I could explore its hierarchy, but I
couldn't find any tools to do that.

Cheers
Andy



On 22 Jul 2012, at 18:33, Fabian Bornhofen <[hidden email]> wrote:

> Hi Andy -
>
> the code you're looking for is in lively/morphic/Widgets.js. And of
> course you're right, it's not obvious where to look for it.
>
> Since I haven't been active in LK dev for a while: is anyone still
> working on source code management without files? Because if not, Andy
> just pointed to a spot that might be worth a Trac ticket.
>
> Best
> Fabian
>
> On Sun, Jul 22, 2012 at 10:35 PM, Andy Burnett
> <[hidden email]> wrote:
>> Hello list
>>
>> I am just starting to explore LK scripting. I opened one of the tutorials -
>> adding methods to a button - and wanted to know more about the Button class.
>> So, I opened an inspector on the button, and saw that it was an instance of
>> lively.morphic.Button. I then opened a system browser, and tried to find the
>> Button class, under lively/morphic. Unfortunately, I couldn't find anything
>> - the class list when from AdditionalMorphs.js to Canvas.js.
>>
>> Clearly, the code is there somewhere. So, could someone explain where I
>> should be looking, or what I am doing wrong?
>>
>> Thanks
>> Andy
>>
>> _______________________________________________
>> lively-kernel mailing list
>> [hidden email]
>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>>
_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
Reply | Threaded
Open this post in threaded view
|

Re: How does one find code in LK?

Robert Krahn-4
The shortcut CMD+Shift+f (or Ctrl+Shift+f on windows) should help. If a text is focused it will start the code search from its selection, otherwise it will open a prompt where you can type in a substring of source code / method name. This will open a list of search results that can be used for viewing and changing methods (changes are applied only to runtime) or opening the System code browser.

Screencast: https://vimeo.com/46211102

Best,
Robert

On Sun, Jul 22, 2012 at 4:18 PM, Andy Burnett <[hidden email]> wrote:
Hi Fabian
Thanks very much for the info. Now for the important question: "how
should I have found that"? Is it simply a case if grepping the source
code, or are there more sophisticated tools?

Just to give another example. I saw some code snippets sending
messages to Color. I was hoping to opens workspace and do something
like 'Color browse' so that I could explore its hierarchy, but I
couldn't find any tools to do that.

Cheers
Andy



On 22 Jul 2012, at 18:33, Fabian Bornhofen <[hidden email]> wrote:

> Hi Andy -
>
> the code you're looking for is in lively/morphic/Widgets.js. And of
> course you're right, it's not obvious where to look for it.
>
> Since I haven't been active in LK dev for a while: is anyone still
> working on source code management without files? Because if not, Andy
> just pointed to a spot that might be worth a Trac ticket.
>
> Best
> Fabian
>
> On Sun, Jul 22, 2012 at 10:35 PM, Andy Burnett
> <[hidden email]> wrote:
>> Hello list
>>
>> I am just starting to explore LK scripting. I opened one of the tutorials -
>> adding methods to a button - and wanted to know more about the Button class.
>> So, I opened an inspector on the button, and saw that it was an instance of
>> lively.morphic.Button. I then opened a system browser, and tried to find the
>> Button class, under lively/morphic. Unfortunately, I couldn't find anything
>> - the class list when from AdditionalMorphs.js to Canvas.js.
>>
>> Clearly, the code is there somewhere. So, could someone explain where I
>> should be looking, or what I am doing wrong?
>>
>> Thanks
>> Andy
>>
>> _______________________________________________
>> lively-kernel mailing list
>> [hidden email]
>> http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel
>>
_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel


_______________________________________________
lively-kernel mailing list
[hidden email]
http://lists.hpi.uni-potsdam.de/listinfo/lively-kernel