Hi, I have a question about where to find what actually gets executed when you click a button. sq3.10-7159dev08.04.1 with UI Enhancements
eg. Open a simple ChangeSorter, opt-click to make a new ChangeSet, enter the name. What gets done when you click ok? I've dragged a copy of the button off and explored and inspected but cannot find what the button action actually is. I seem to be missing some key understanding on how the button in this case works.
My goal, and reason for looking into this particular thing, is to programmatically create a new ChangeSet in an Installer script, so answering how to do that would help too.
Thx, Ken G. Brown
On Wed, Apr 09, 2008 at 01:11:32PM -0600, Ken G. Brown wrote:
Hi, I have a question about where to find what actually gets executed when you click a button. sq3.10-7159dev08.04.1 with UI Enhancements
eg. Open a simple ChangeSorter, opt-click to make a new ChangeSet, enter the name. What gets done when you click ok? I've dragged a copy of the button off and explored and inspected but cannot find what the button action actually is. I seem to be missing some key understanding on how the button in this case works.
You started debugging too late. You want to know what the menu item does, not the dialog box. The dialog box is a generic text entry box for anything. Here is what I do to find out what menu items do:
1. Open the change sorter 2. Right-click, and get the context menu 3. Shift-click the entry "new change set... (n)" to edit the text of the menu 4. Press Cmd-Shift-E to search for that string in all source code 5. This will take you to the place where the menu item is defined:
aMenu add: 'new change set... (n)' action: #newSet.
6. Double-click newSet and press Cmd-m to find implementers of #newSet 7. Place a self halt at the beginning of the newSet method, or look through it and find more implementers (Cmd-m), or browse the class (mouse-over the top pane and Cmd-b)
Once you get this down, you can go from menu item to debugger in about 20 seconds.
My goal, and reason for looking into this particular thing, is to programmatically create a new ChangeSet in an Installer script, so answering how to do that would help too.
ChangeSet newChangeSet: 'KenStuff'
At 5:21 PM -0700 4/10/08, Matthew Fulmer apparently wrote:
On Wed, Apr 09, 2008 at 01:11:32PM -0600, Ken G. Brown wrote:
Hi, I have a question about where to find what actually gets executed when you click a button. sq3.10-7159dev08.04.1 with UI Enhancements
eg. Open a simple ChangeSorter, opt-click to make a new ChangeSet, enter the name. What gets done when you click ok? I've dragged a copy of the button off and explored and inspected but cannot find what the button action actually is. I seem to be missing some key understanding on how the button in this case works.
You started debugging too late. You want to know what the menu item does, not the dialog box. The dialog box is a generic text entry box for anything. Here is what I do to find out what menu items do:
- Open the change sorter
- Right-click, and get the context menu
- Shift-click the entry "new change set... (n)" to edit the
text of the menu 4. Press Cmd-Shift-E to search for that string in all source code 5. This will take you to the place where the menu item is defined:
aMenu add: 'new change set... (n)' action: #newSet.
- Double-click newSet and press Cmd-m to find implementers of
#newSet 7. Place a self halt at the beginning of the newSet method, or look through it and find more implementers (Cmd-m), or browse the class (mouse-over the top pane and Cmd-b)
Once you get this down, you can go from menu item to debugger in about 20 seconds.
My goal, and reason for looking into this particular thing, is to programmatically create a new ChangeSet in an Installer script, so answering how to do that would help too.
ChangeSet newChangeSet: 'KenStuff'
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list UI@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/ui
Thx!
This does what I want for now, also setting the new ChangeSet as current, although any open ChangeSorters will not get updated:
ChangeSet newChanges: (ChangeSorter newChangeSet: 'tmpNewChgSet').
I've found how to update them if I could find the open ChangeSorters...
-- ChangeSorter>>newCurrent "make my change set be the current one that changes go into"
ChangeSet newChanges: myChangeSet. self update. "Because list of changes in a category may thus have changed" self changed: #relabel. --
Ken G. Brown
At 5:21 PM -0700 4/10/08, Matthew Fulmer apparently wrote:
On Wed, Apr 09, 2008 at 01:11:32PM -0600, Ken G. Brown wrote:
Hi, I have a question about where to find what actually gets executed when you click a button. sq3.10-7159dev08.04.1 with UI Enhancements
eg. Open a simple ChangeSorter, opt-click to make a new ChangeSet, enter the name. What gets done when you click ok? I've dragged a copy of the button off and explored and inspected but cannot find what the button action actually is. I seem to be missing some key understanding on how the button in this case works.
You started debugging too late. You want to know what the menu item does, not the dialog box. The dialog box is a generic text entry box for anything. Here is what I do to find out what menu items do:
- Open the change sorter
- Right-click, and get the context menu
- Shift-click the entry "new change set... (n)" to edit the
text of the menu
Hmmm...Shift-click does not seem to work to get the text, on Mac.
Ken
- Press Cmd-Shift-E to search for that string in all source
code 5. This will take you to the place where the menu item is defined:
aMenu add: 'new change set... (n)' action: #newSet.
- Double-click newSet and press Cmd-m to find implementers of
#newSet 7. Place a self halt at the beginning of the newSet method, or look through it and find more implementers (Cmd-m), or browse the class (mouse-over the top pane and Cmd-b)
Once you get this down, you can go from menu item to debugger in about 20 seconds.
My goal, and reason for looking into this particular thing, is to programmatically create a new ChangeSet in an Installer script, so answering how to do that would help too.
ChangeSet newChangeSet: 'KenStuff'
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list UI@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/ui
On Thu, Apr 10, 2008 at 07:02:17PM -0600, Ken G. Brown wrote:
- Shift-click the entry "new change set... (n)" to edit the
text of the menu
Hmmm...Shift-click does not seem to work to get the text, on Mac.
You must be on an image with UIEnhancements, such as squeak-dev-beta. Sorry.
At 6:51 PM -0700 4/10/08, Matthew Fulmer apparently wrote:
On Thu, Apr 10, 2008 at 07:02:17PM -0600, Ken G. Brown wrote:
- Shift-click the entry "new change set... (n)" to edit the
text of the menu
Hmmm...Shift-click does not seem to work to get the text, on Mac.
You must be on an image with UIEnhancements, such as squeak-dev-beta. Sorry.
Oops, shoulda had my sig line as someone on #Squeak suggested! :)
Ken G. Brown sq3.10-7159dev08.04.1 + Installer: LPF + Sake + MinorFixesStable + MinorFixesUnstable, Squeak 3.8.18beta1U.app, MacOS X 10.5.2
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list UI@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/ui
--
Shift-click works ok with the UI Enhancements here, at least on Win and Linux. I find use of Halos/inspect is quicker for me though.
Gary.
-----Original Message----- From: ui-bounces@lists.squeakfoundation.org [mailto:ui-bounces@lists.squeakfoundation.org]On Behalf Of Matthew Fulmer Sent: 11 April 2008 2:52 AM To: ui@lists.squeakfoundation.org Subject: Re: [UI] how to find button action target?
On Thu, Apr 10, 2008 at 07:02:17PM -0600, Ken G. Brown wrote:
- Shift-click the entry "new change set... (n)" to edit the
text of the menu
Hmmm...Shift-click does not seem to work to get the text, on Mac.
You must be on an image with UIEnhancements, such as squeak-dev-beta. Sorry.
-- Matthew Fulmer -- http://mtfulmer.wordpress.com/ _______________________________________________ UI mailing list UI@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/ui