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. |
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:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibHMm4OqPVCDeB_XYn7B2Vkx%3DqP%3D3%3D3VtfuEwJ_yO%2BsmkA%40mail.gmail.com. |
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:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibFBAMYAuTDWFPu1tFcpDNmzVPZHx%2B21zND63sUpMSc9QA%40mail.gmail.com. |
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ó:
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. |
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:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibGY2bB24i9CWr8%2B6Bu8_pgfrdsQJMcL3XApTeAYXJ1zpw%40mail.gmail.com. |
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:
--
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).
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. |
Richard, I don't see any attachment, On Wed, May 20, 2020 at 6:48 PM Richard Sargent <[hidden email]> wrote:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibG_G8FMLhdZOU0MBjfV2PuRFjx8v8%3D8N6jy8euQB8pP7w%40mail.gmail.com. |
Administrator
|
On Wednesday, May 20, 2020 at 3:52:43 PM UTC-7, Mariano Martinez Peck wrote:
--
Doh! Added here.
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 |
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ó:
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. |
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ó:
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. |
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:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibEOwW0gbdnsz7noLVfW4%3DQiCu4P%3D9ewm4hNCyBAKxOppg%40mail.gmail.com. |
+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:
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. |
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:
Mariano Martinez Peck Software Engineer, Instantiations Inc. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibF6Pc0WJgi2WK3AgBavg-pCqyUTayGfJjnXXHgxNSERxw%40mail.gmail.com. |
Administrator
|
On Thu, May 21, 2020 at 2:28 PM 'Mariano Martinez Peck' via VA Smalltalk <[hidden email]> wrote:
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.
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. |
Great enhancement idea! - Seth On Thursday, May 21, 2020 at 5:33:35 PM UTC-4, Richard Sargent wrote:
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. |
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ó:
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
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. |
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ó:
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. |
In reply to this post by hernanmd
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. Email: [hidden email] Twitter: https://twitter.com/MartinezPeck Blog: 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/CAOUkibEGLJXQHtNY%3DYEB8A3fanqmP_-sg2UK%2BR0LYubs%2B8JvoQ%40mail.gmail.com. |
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ó:
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 |
Free forum by Nabble | Edit this page |