Add my custom menu item to the Tools menu

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

Add my custom menu item to the Tools menu

hernanmd
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibHMm4OqPVCDeB_XYn7B2Vkx%3DqP%3D3%3D3VtfuEwJ_yO%2BsmkA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
BTW, you may want to take a look at implementers of #addToSystemMenu.  
One simple example is the configuration map "Mastering ENVY/ Developer Script Manager". Once loaded, check the class side methods of MedScriptManagerApp.
Does it help?

Best, 


On Wed, May 20, 2020 at 5:54 PM Mariano Martinez Peck <[hidden email]> wrote:
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibFBAMYAuTDWFPu1tFcpDNmzVPZHx%2B21zND63sUpMSc9QA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Mariano Martinez Peck-2
Hi Mariano,

With shortcut I mean a way (keys combination) to type a String anywhere and find it in the image, just as the Ctrl+Shift+E in Pharo/Squeak.
It is not directly related to the menu entry, but any String in the image.

El mié., 20 may. 2020 a las 17:54, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibHMm4OqPVCDeB_XYn7B2Vkx%3DqP%3D3%3D3VtfuEwJ_yO%2BsmkA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvieKkeq%3D_W22qjN%2Bvgo50MN0h9Uy-As9ZeiREiu1HH5A%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
Hi Hernan,

So....are you talking about the:

Browse Methods -> Including String ... 

?

On Wed, May 20, 2020 at 6:11 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Mariano,

With shortcut I mean a way (keys combination) to type a String anywhere and find it in the image, just as the Ctrl+Shift+E in Pharo/Squeak.
It is not directly related to the menu entry, but any String in the image.

El mié., 20 may. 2020 a las 17:54, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibHMm4OqPVCDeB_XYn7B2Vkx%3DqP%3D3%3D3VtfuEwJ_yO%2BsmkA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvieKkeq%3D_W22qjN%2Bvgo50MN0h9Uy-As9ZeiREiu1HH5A%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibGY2bB24i9CWr8%2B6Bu8_pgfrdsQJMcL3XApTeAYXJ1zpw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Richard Sargent
Administrator
In reply to this post by hernanmd
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
Richard, I don't see any attachment, 

On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibG_G8FMLhdZOU0MBjfV2PuRFjx8v8%3D8N6jy8euQB8pP7w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Richard Sargent
Administrator
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KiZziRZbBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">richard...@gemtalksystems.com> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KiZziRZbBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-sma...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Email: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KiZziRZbBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mp...@instantiations.com
Twitter: <a href="https://twitter.com/MartinezPeck" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

FindString.png (36K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Mariano Martinez Peck-2
Yes thanks Mariano.
I am already playing with it.

Cheers!

Hernán

El mié., 20 may. 2020 a las 18:02, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
BTW, you may want to take a look at implementers of #addToSystemMenu.  
One simple example is the configuration map "Mastering ENVY/ Developer Script Manager". Once loaded, check the class side methods of MedScriptManagerApp.
Does it help?

Best, 


On Wed, May 20, 2020 at 5:54 PM Mariano Martinez Peck <[hidden email]> wrote:
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibFBAMYAuTDWFPu1tFcpDNmzVPZHx%2B21zND63sUpMSc9QA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsojivP99PQYjUFEYS7KFY%2B0VnGb5uaE4ujtGrYow3usQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Richard Sargent
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEOwW0gbdnsz7noLVfW4%3DQiCu4P%3D9ewm4hNCyBAKxOppg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Simon Franz
+1 for a default implementation for this action with CTRL+Shift+E ;-)

Am Donnerstag, 21. Mai 2020 16:27:13 UTC+2 schrieb Mariano Martinez Peck:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LM3cZRWOBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">hernan...@...> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<<a href="javascript:" target="_blank" gdf-obfuscated-mailto="LM3cZRWOBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">richard...@gemtalksystems.com>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Twitter: <a href="https://twitter.com/MartinezPeck" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LM3cZRWOBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-sma...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LM3cZRWOBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-sma...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Email: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="LM3cZRWOBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">mp...@instantiations.com
Twitter: <a href="https://twitter.com/MartinezPeck" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
Cool. So let me know if what I sent works as expected and if so, I can integrate it for next release.
BTW, I may prefer CTRL+SHIFT+F rather than "E" as we already have "CTRL+F" for "Find". 
Opinions?

On Thu, May 21, 2020 at 6:22 PM Simon Franz <[hidden email]> wrote:
+1 for a default implementation for this action with CTRL+Shift+E ;-)

Am Donnerstag, 21. Mai 2020 16:27:13 UTC+2 schrieb Mariano Martinez Peck:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Richard Sargent
Administrator
On Thu, May 21, 2020 at 2:28 PM 'Mariano Martinez Peck' via VA Smalltalk <[hidden email]> wrote:
Cool. So let me know if what I sent works as expected and if so, I can integrate it for next release.
BTW, I may prefer CTRL+SHIFT+F rather than "E" as we already have "CTRL+F" for "Find". 

I like that. Ctrl+F finds in the current text pane (if there is one) and Ctrl+Shift+F finds everywhere in the image.
Good use of Shift to convey scope.

Opinions?

On Thu, May 21, 2020 at 6:22 PM Simon Franz <[hidden email]> wrote:
+1 for a default implementation for this action with CTRL+Shift+E ;-)

Am Donnerstag, 21. Mai 2020 16:27:13 UTC+2 schrieb Mariano Martinez Peck:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/Q4gjsFTx1E4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAGNapEPZQhCx-BiEWw8cYJsEfcvP34JVavDJSpobadNFon3Tvg%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Seth Berman
Great enhancement idea!

+1 to "Ctrl+Shift+F"


- Seth

On Thursday, May 21, 2020 at 5:33:35 PM UTC-4, Richard Sargent wrote:
On Thu, May 21, 2020 at 2:28 PM 'Mariano Martinez Peck' via VA Smalltalk <[hidden email]> wrote:
Cool. So let me know if what I sent works as expected and if so, I can integrate it for next release.
BTW, I may prefer CTRL+SHIFT+F rather than "E" as we already have "CTRL+F" for "Find". 

I like that. Ctrl+F finds in the current text pane (if there is one) and Ctrl+Shift+F finds everywhere in the image.
Good use of Shift to convey scope.

Opinions?

On Thu, May 21, 2020 at 6:22 PM Simon Franz <[hidden email]> wrote:
+1 for a default implementation for this action with CTRL+Shift+E ;-)

Am Donnerstag, 21. Mai 2020 16:27:13 UTC+2 schrieb Mariano Martinez Peck:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<richard...@gemtalksystems.com>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Twitter: <a href="https://twitter.com/MartinezPeck" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Twitter: <a href="https://twitter.com/MartinezPeck" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.
Twitter: <a href="https://twitter.com/MartinezPeck" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Ftwitter.com%2FMartinezPeck\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFPV-7Bnc-U6phGEh-VZU0iUtY7vw&#39;;return true;">https://twitter.com/MartinezPeck
LinkedIn: <a href="https://www.linkedin.com/in/mariano-mart%C3%ADnez-peck/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.linkedin.com%2Fin%2Fmariano-mart%25C3%25ADnez-peck%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGyJTUAWXPstaw4J3OpFUYRyFAqmw&#39;;return true;">www.linkedin.com/in/mariano-martinez-peck
Blog: <a href="https://marianopeck.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fmarianopeck.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHAOaIsyMIYgmQWdQZRuKRdD6gBfw&#39;;return true;">https://marianopeck.wordpress.com/

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/va-smalltalk/Q4gjsFTx1E4/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/va-smalltalk/Q4gjsFTx1E4/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/va-smalltalk/Q4gjsFTx1E4/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/va-smalltalk/Q4gjsFTx1E4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/bd6f205a-0dc6-4da6-8d77-ece83f36cffe%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Mariano Martinez Peck-2


El jue., 21 may. 2020 a las 11:27, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 



I'd like to suggest to distinguish between searching any kind of literals inside a method, and search only in the real Strings contained in a method, which is what I expected as default behavior. For example if you highlight Breakpoints in a Workspace and Ctrl+Shift+E, now it returns all the methods with the subword Breakpoint, even if it is part of a Symbol, i.e. in this method:

>>stsClearBreakpoints
   super stsClearBreakpoints.
   sourceCodeNotebook
   callCallbacks: XmNresizeCallback
   callData: nil.

the results includes literals containing "Breakpoints" as substrings: stsClear"Breakpoints", they don't make a distinction if it is a real String or a message send.
Anyway, I tested with a dummy method:

>>sampleMethod

^ 'myBreakpoint'
 
And it returns 1 result as expected, so ultimately it works :)

Thank you Mariano


Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEOwW0gbdnsz7noLVfW4%3DQiCu4P%3D9ewm4hNCyBAKxOppg%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHuSnZaRYV8GjXABvC1oRm5ecS1axXvDtFFR7Lb_0mO0WA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Mariano Martinez Peck-2
My 0.0002 devalued ARS is to provide al least two methods: One keybinding for exact String search and one for approximate search up to k mismatches. There are different algorithms depending if you want to consider diacritics, capital letters, phrases, or even k, and speed (Levenshtein could be really slow).
Cheers

Hernán

El jue., 21 may. 2020 a las 18:28, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
Cool. So let me know if what I sent works as expected and if so, I can integrate it for next release.
BTW, I may prefer CTRL+SHIFT+F rather than "E" as we already have "CTRL+F" for "Find". 
Opinions?

On Thu, May 21, 2020 at 6:22 PM Simon Franz <[hidden email]> wrote:
+1 for a default implementation for this action with CTRL+Shift+E ;-)

Am Donnerstag, 21. Mai 2020 16:27:13 UTC+2 schrieb Mariano Martinez Peck:
Hernán, 

I think what you said makes sense and it's quite easy to implement. I just did a quick prototype which we could eventually include in the next release. Please, give it a try:

Add these 2 methods:

EmSystemConfiguration >> stsMethodsIncluding: aString

"Open a browser on all the methods including aString specified by the user."


(aString isNil or: [aString isEmpty])

ifTrue: [self stsMethodsIncludingString]

ifFalse: [

(System stsConfirm: 'This is a very lengthy operation. Continue?' title: 'Find String')

ifFalse: [^self].

self stsAllMethodsIncludingString: aString]


EtWindow >> stsMethodsIncludingString

"Open a browser on all the methods including aString specified by the user."


| text widget |


self convertSelectionText: (widget := self targetTextWidget).

text := widget getSelection.

System stsMethodsIncluding: text



And then change EtWindow >> stsEditMenu:   and add the following at the end of the method:

add: #stsMethodsIncludingString

label: 'Browse Methods Including String'

enable: [true]

for: nil

accelerator: (CwAccelerator mask: ControlMask | ShiftMask keysym: XKe)

acceleratorText: 'Ctrl+Shift+E';



The behavior should be: If you have text selected, then it will search on that. If you have nothing selected, then it will prompt. 

Let me know if it works. 

Cheers, 



On Wed, May 20, 2020 at 11:44 PM Hernán Morales Durand <[hidden email]> wrote:
Hi Richard,

Cool, I was just looking at the wrong place.
Thank you!

Hernán

El mié., 20 may. 2020 a las 20:37, Richard Sargent (<[hidden email]>) escribió:
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
Richard, I don't see any attachment, 

Doh!
Added here.


On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
On Wednesday, May 20, 2020 at 1:34:56 PM UTC-7, Hernán Morales Durand wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.

See the attached screen print. It is from the Transcript window, but I believe the same menu item is available on most development tools windows.

Likewise, the accelerator sequences are associated with the menus of each window. As far as I know, there is no global accelerator sequences.
e.g. Ctrl+S typically triggers the Save menu item from the File menu. Ctrl+C triggers the Copy menu item from the Edit menu. In the absence of these menus, the corresponding key sequence has no effect (unless some other menu on that window defines a binding).


Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/e72eac78-5463-45dd-bddb-f20275ac4744%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/01d48ae9-f27b-4729-8a6a-f493da31c8f1%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvDa8-xk_YBRfu5dfM_wfw385fszHS7Y99rLJWTBJwWGw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/2ef482fa-38c4-43a2-9125-2d062d3c4ff7%40googlegroups.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHuWuNy4T9Y%3D3MD-%2BZtMB4w_yEGb%3DcBSw8OSZC%2BO57p70w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

Mariano Martinez Peck-2
In reply to this post by hernanmd


I'd like to suggest to distinguish between searching any kind of literals inside a method, and search only in the real Strings contained in a method, which is what I expected as default behavior. For example if you highlight Breakpoints in a Workspace and Ctrl+Shift+E, now it returns all the methods with the subword Breakpoint, even if it is part of a Symbol, i.e. in this method:

>>stsClearBreakpoints
   super stsClearBreakpoints.
   sourceCodeNotebook
   callCallbacks: XmNresizeCallback
   callData: nil.

the results includes literals containing "Breakpoints" as substrings: stsClear"Breakpoints", they don't make a distinction if it is a real String or a message send.
Anyway, I tested with a dummy method:

>>sampleMethod

^ 'myBreakpoint'
 
And it returns 1 result as expected, so ultimately it works :)



We already have both. The one that looks in all source code is the one you already knew and we already discussed in this thread. This is usually the "slow one" but matches everything. 

But...we also have one that only look for "references" (literals, etc). Go to Transcript -> Tools -> Browse References. And there, type the string, number or whatever you want. 

Let me know if that's what you were looking for. 

Best, 

--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibEGLJXQHtNY%3DYEB8A3fanqmP_-sg2UK%2BR0LYubs%2B8JvoQ%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Add my custom menu item to the Tools menu

hernanmd
In reply to this post by Mariano Martinez Peck-2
Sorry for the late feedback on this.

A small problem which you may want to check is that if I use #addToSystemMenu then some "Tools" menu items are duplicated.
So I had to use a different callback name.
Thank you Mariano.

Cheers,

Hernán

El mié., 20 may. 2020 a las 18:02, 'Mariano Martinez Peck' via VA Smalltalk (<[hidden email]>) escribió:
BTW, you may want to take a look at implementers of #addToSystemMenu.  
One simple example is the configuration map "Mastering ENVY/ Developer Script Manager". Once loaded, check the class side methods of MedScriptManagerApp.
Does it help?

Best, 


On Wed, May 20, 2020 at 5:54 PM Mariano Martinez Peck <[hidden email]> wrote:
Hernan, sorry for the question but by "shortcut" you mean a way to get quicking to the place in code that defines the menu entry, or to add keyboard shortcuts to that menu entry? I guess the former, but just in case....

On Wed, May 20, 2020 at 5:34 PM Hernán Morales Durand <[hidden email]> wrote:
Hi everyone,

I'm using VA Smalltalk 9.1.
It is possible in this version to add my own menu item to the Tools menu in the System Transcript window?

Normally I would search the strings in the image to see how it's done but I didn't found any shortcut.
Any example would be appreciated.

Cheers,

Hernán

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHsYkQ2vo9tWhATEhNiUKFuXmh072ELbcyt33aboiFW6dw%40mail.gmail.com.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.


--
Mariano Martinez Peck
Software Engineer, Instantiations Inc.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAOUkibFBAMYAuTDWFPu1tFcpDNmzVPZHx%2B21zND63sUpMSc9QA%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/va-smalltalk/CAKHmnHvhDS0a07PmCB0SkdLuN1cYuHxyu%2BnCeWbnL%3DGtwnDOWw%40mail.gmail.com.

Captura de pantalla 2020-06-11 a la(s) 19.25.20.png (50K) Download Attachment