how to search for text?

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

how to search for text?

Sophie424
How do I search all method bodies for a text string?

Thanks!



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Chris Cunnington-5


> How do I search all method bodies for a text string?
>
> Thanks!
>
>

Put the string in the Workspace. Highlight it. Summon the menu with do
it/print it. Scroll down to the bottom where it says "more". Select. Scroll
down to "method with source". Voila.

Chris
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Tapple Gao
In reply to this post by Sophie424
On Fri, Nov 30, 2007 at 02:11:26PM -0600, itsme213 wrote:
> How do I search all method bodies for a text string?

There are a lot of ways, depending on what you are looking for.
Hilinght some text in a browser, workspace, or any other text
editor in squeak, and explore the right-click menu

implementors: shows all methods that could respond if you send a
message with the hilgighted name
senders: shows all methods that send the hilighted message at
some point

These are the two most common things you want to search for, and
they have shortcuts: cmd-m and cmd-n, respectively. Try typing
'new', select it , and try all the options

you can seach for an arbitrary string in all code by the menu
item 'method source with it', under the 'more...' menu.

other useful search tools
In the system browser, put the mouse over the top-left pane and
press cmd-f to find a class by name

in the world > open menu, there is the method finder, which lets
you search methods by name or example input/output

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Bert Freudenberg
In reply to this post by Chris Cunnington-5

On Nov 30, 2007, at 21:23 , Chris Cunnington wrote:

>
>
>> How do I search all method bodies for a text string?
>>
>> Thanks!
>>
>>
>
> Put the string in the Workspace. Highlight it. Summon the menu with do
> it/print it. Scroll down to the bottom where it says "more".  
> Select. Scroll
> down to "method with source". Voila.

Ugh, that does a full-text search on all method sources, very slow.  
Much faster is pressing Cmd-Shift-E (or "method strings with ir" from  
the menu) which only looks at string literals..

- Bert -


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Chris Cunnington-5
Very cool! That is so much faster. It's instantaneous.
Thanks.

Chris


>
> Ugh, that does a full-text search on all method sources, very slow.
> Much faster is pressing Cmd-Shift-E (or "method strings with ir" from
> the menu) which only looks at string literals..
>
> - Bert -
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Bert Freudenberg
Indeed. A cool trick if you want to find the implementation behind a  
menu item: bring up the menu, shift-click the item, press Cmd-Shift-E :)

- Bert -

On Nov 30, 2007, at 23:34 , Chris Cunnington wrote:

> Very cool! That is so much faster. It's instantaneous.
> Thanks.
>
> Chris
>
>
>>
>> Ugh, that does a full-text search on all method sources, very slow.
>> Much faster is pressing Cmd-Shift-E (or "method strings with ir" from
>> the menu) which only looks at string literals..
>>
>> - Bert -
>>
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Chris Cunnington-5
Whoa. I thought you were just being polite, saying something that just
re-enforced what you'd already said. I skimmed over your email.

It's the early morning when all real computer science gets done. For no real
reason, hours and hours later, I re-read your email, and realized I hadn't
caught what you were saying at all. Bert, that IS a cool trick!

Chris

> Indeed. A cool trick if you want to find the implementation behind a
> menu item: bring up the menu, shift-click the item, press Cmd-Shift-E :)
>
> - Bert -
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

RE: how to search for text?

Ron Teitelbaum
HAHAHA!!  You know I was thinking the same thing too when I read this.  Wow
what a cool trick this one is!!  I had no idea.

Ron

> -----Original Message-----
> From: [hidden email] [mailto:beginners-
> [hidden email]] On Behalf Of Chris Cunnington
> Sent: Saturday, December 01, 2007 2:10 AM
> To: A friendly place to get answers to even the most basic questions
> aboutSqueak.
> Subject: Re: [Newbies] how to search for text?
>
> Whoa. I thought you were just being polite, saying something that just
> re-enforced what you'd already said. I skimmed over your email.
>
> It's the early morning when all real computer science gets done. For no
> real
> reason, hours and hours later, I re-read your email, and realized I hadn't
> caught what you were saying at all. Bert, that IS a cool trick!
>
> Chris
>
> > Indeed. A cool trick if you want to find the implementation behind a
> > menu item: bring up the menu, shift-click the item, press Cmd-Shift-E :)
> >
> > - Bert -
> >
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: how to search for text?

Sophie424
In reply to this post by Bert Freudenberg
The shift-click does not seem to do anything on 3.9 on XP (for me, anyway).
Could it be some other magic keys on XP?

Posting (pointers to) such gems is invaluable to newbies like me (and
apparently to non-so-newbies too). More would be always welcome :)

-- Sophie


"Bert Freudenberg" <[hidden email]> wrote in message
news:[hidden email]...

> Indeed. A cool trick if you want to find the implementation behind a  menu
> item: bring up the menu, shift-click the item, press Cmd-Shift-E :)
>
> - Bert -
>
> On Nov 30, 2007, at 23:34 , Chris Cunnington wrote:
>
>> Very cool! That is so much faster. It's instantaneous.
>> Thanks.
>>
>> Chris
>>
>>
>>>
>>> Ugh, that does a full-text search on all method sources, very slow.
>>> Much faster is pressing Cmd-Shift-E (or "method strings with ir" from
>>> the menu) which only looks at string literals..
>>>
>>> - Bert -
>>>
>>



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: how to search for text?

Chris Cunnington-5

To do Bert's neat trick on Vista (and so I'm assuming XP) with Squeak 3.9 do
the following. Click on the background and call the World menu (or any
menu). Scroll down to open (or whatever). Put your finger on the shift key,
and then hit the left mouse button. The word "open" appears twice, once in
red. Then Alt-Shift-E. A browser comes up with all methods with the string
of the menu name "open". Apparently everything's an object... :)

Chris


On 12/3/07 10:08 PM, "itsme213" <[hidden email]> wrote:

> The shift-click does not seem to do anything on 3.9 on XP (for me, anyway).
> Could it be some other magic keys on XP?
>
> Posting (pointers to) such gems is invaluable to newbies like me (and
> apparently to non-so-newbies too). More would be always welcome :)
>
> -- Sophie
>
>
> "Bert Freudenberg" <[hidden email]> wrote in message
> news:[hidden email]...
>> Indeed. A cool trick if you want to find the implementation behind a  menu
>> item: bring up the menu, shift-click the item, press Cmd-Shift-E :)
>>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: how to search for text?

Tapple Gao
In reply to this post by Sophie424
On Mon, Dec 03, 2007 at 09:08:36PM -0600, itsme213 wrote:
> The shift-click does not seem to do anything on 3.9 on XP (for me, anyway).
> Could it be some other magic keys on XP?

Menu editing (which is what Shift-click is supposed to do) seems
to have been disabled in UIEnhancements. Are you using a new
squeak-dev image? If so, it probably has UIEnhancements. It
works for me on vanilla 3.9, but not under squeak-dev

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/
Help improve Squeak Documentation: http://wiki.squeak.org/squeak/808
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: how to search for text?

Sophie424
Ah, thanks. Yes, I do have UIEnhancements.

"Matthew Fulmer" <[hidden email]> wrote in message
news:[hidden email]...

> On Mon, Dec 03, 2007 at 09:08:36PM -0600, itsme213 wrote:
>> The shift-click does not seem to do anything on 3.9 on XP (for me,
>> anyway).
>> Could it be some other magic keys on XP?
>
> Menu editing (which is what Shift-click is supposed to do) seems
> to have been disabled in UIEnhancements. Are you using a new
> squeak-dev image? If so, it probably has UIEnhancements. It
> works for me on vanilla 3.9, but not under squeak-dev
>



_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners