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 -
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 -
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 -
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: beginners-bounces@lists.squeakfoundation.org [mailto:beginners- bounces@lists.squeakfoundation.org] 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 Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
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" bert@freudenbergs.de wrote in message news:DCE389A3-1435-4B36-9420-8A6D7A628CA5@freudenbergs.de...
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 -
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" itsme213@hotmail.com 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" bert@freudenbergs.de wrote in message news:DCE389A3-1435-4B36-9420-8A6D7A628CA5@freudenbergs.de...
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 :)
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
Ah, thanks. Yes, I do have UIEnhancements.
"Matthew Fulmer" tapplek@gmail.com wrote in message news:20071204043543.GC24660@tacobell.ph.cox.net...
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
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
beginners@lists.squeakfoundation.org