Hi all
Romain gave me a presentation of his enhancements and they are REALLLLLLLLY cool. For example we can start to code a method in the middle of doing it doubleclick on a word in the text and jump in the implementors then go back (without having lost the code we were typing). by simply double clicking on a symbol in a method text we can jump into the senders, implementers...
I asked romain to do a video. I really think that what he is doing is important for the improvement of the usability of the environment. So try and give feedback to romain. We could get a really cool environment with his extensions, shout, eCompletion, RoelTyper.
Stef
Hi,
I just released two packages on squeakmap for further testing: - Services-All contains several packages related to services
grouped together for convenient downloads: -- Services-Base should go into the image at one point -- Services-RB is the refactorings services -- Services-Keymapping provide keyboard shortcuts for services -- Services-IDE provides a few nifty features describe later
- BrowseUnit has been updated to use the new version of the
Services framework.
This new version of services provides: - A cleaner way to define and register services, by subclassing a ServiceProvider class - Possibilities to add services in button bars such as in browsers - Better update mechanism, allowing menus and button bars to be dynamically changed (no need to open a new Browser when you install BrowseUnit for example) - Better support for disabled services in menus (they are grayed out) - Possibilities to enable or disable set of services in the Preferences
On to the nifty IDE features ;-) : - Histories in browsers, inspired by Alain Plantec's add on. The differences are: -- no additional instance variable in browser -- triggered by keyboard shortcut (apple-[ and
apple-] on the mac, the alt key for windows or linux) -- histories in message lists (apple-{ and } ) as well - An hypertext mechanism: double-click on a code entity (variable, message send), to be transported here. combined with histories, it makes the class browser really feel like a web browser. - Possibility of leaving unnaccepted methods, and restoring them later, which improves the browsing experience as well -Senders, implementors ... can be restricted to the image, package or hierarchy levels -There is a teleporting device ;-) : press apple-t or alt- t, enter some text, press enter, and you will be teleported where you wanted... Here are some examples: -- enter "ord.col" to browse the OrderedCollection class. -- enter "do:" to browse the implementors of do: -- enter "ord.col do:' to browse OrderedCollection>>#do: --enter "h" to get further help. This was inspired by some Mac utilities such as Quicksilver or Launchbar, only much more limited ;-)
So I encourage you to try this out, and send me feedback about
what doesn't work and what should be improved...
Cheers, Romain
On 29-Sep-05, at 12:18 PM, stéphane ducasse wrote:
in the middle of doing it doubleclick on a word in the text and
jump in the implementors then go back (without having lost the code we were typing). by simply double clicking on a symbol in a method text we can jump into the senders, implementers...
The obvious question here is how this affects the traditional usage of double-click on a word to select that word for cut/cop/paste/etc. Is there some extra gesture you missed out?
tim
On Sep 29, 2005, at 10:02 PM, tim Rowledge wrote:
On 29-Sep-05, at 12:18 PM, stéphane ducasse wrote:
in the middle of doing it doubleclick on a word in the text
and jump in the implementors then go back (without having lost the code we were typing). by simply double clicking on a symbol in a method text we can jump into the senders, implementers...
The obvious question here is how this affects the traditional usage of double-click on a word to select that word for cut/cop/paste/ etc. Is there some extra gesture you missed out?
Well ... that's kind of a problem now ;-)
The way it works now is that it select the word, and then try to do an action. so if you select a local variable, it will just select it, and not leave the method.
I did not really find an easy way to do it otherwise ... I tried with control-doubleclicking or stuff like that but this kind of events are not really detected. I was thinking of introducing a kind of 'mode' here (even if some people don't really like this idea, but hey, I'm a vim user ;-) ). Then you could switch between 'navigation mode' and 'edition mode' for example (or even have other modes if useful ones where to be found).
Other than that, I don't override some other gestures (well some keyboard shortcuts if you install keymapping). I also have some code somewhere dealing with mapping screen corners to services that I have yet to integrate.
Romain
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
-- Romain Robbes http://www.inf.unisi.ch/~robbes/
On 29-Sep-05, at 4:22 PM, Romain Robbes wrote:
On Sep 29, 2005, at 10:02 PM, tim Rowledge wrote:
The obvious question here is how this affects the traditional usage of double-click on a word to select that word for cut/cop/ paste/etc. Is there some extra gesture you missed out?
Well ... that's kind of a problem now ;-)
Ah. This ought to be sorted out pretty quickly then. Introducing modes is a good way to become the subtract of a number of voodoo practices so I'd avoid it if I were you. What is the problem with simply leaving the selection behaviour alone and using the same ctl-m/n hotkeys that we already have as ways of getting the implementors and senders? There isn't much point in making a simpler UI for getting to them at the cost of completely ruining the normal editing actions.
If you're original impetus for the change was to get to senders/ implementors faster it would probably be more widely useful if you could make the building and opening of the dratted message set browsers faster.
tim
On Sep 30, 2005, at 1:57 AM, tim Rowledge wrote:
On 29-Sep-05, at 4:22 PM, Romain Robbes wrote:
On Sep 29, 2005, at 10:02 PM, tim Rowledge wrote:
The obvious question here is how this affects the traditional usage of double-click on a word to select that word for cut/cop/ paste/etc. Is there some extra gesture you missed out?
Well ... that's kind of a problem now ;-)
Ah. This ought to be sorted out pretty quickly then. Introducing modes is a good way to become the subtract of a number of voodoo practices so I'd avoid it if I were you. What is the problem with simply leaving the selection behaviour alone and using the same ctl-m/n hotkeys that we already have as ways of getting the implementors and senders? There isn't much point in making a simpler UI for getting to them at the cost of completely ruining the normal editing actions.
For me, navigating in the code is more "normal" than copy/pasting, ie I use it way more often. Then I recognize than I can get bitten by it from time to time. But I think using the mouse for this really help in quickening the navigation. I'd really like to have something like alt-clicking for this, but most of these keys are taken already. Since I never use the halo (even if I trigger it all the time ...), I was also thinking of including a 'mode' there (as some people still need it). I'd really like to remove the mode, but finding a good keystroke+clicking combination is tough. The same thing applies to keyboard shortcuts by the way.
If you're original impetus for the change was to get to senders/ implementors faster it would probably be more widely useful if you could make the building and opening of the dratted message set browsers faster.
Well the idea is to have the smalltalk browser behaving like a web browser: click on something and go there in the same window (senders, implementors, references to class and instance variables). then you can go back and forward in your history, all of this without opening a new window (and not being bugged when you have some code you were editing still not accepted).
Romain
tim
tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim
-- Romain Robbes http://www.inf.unisi.ch/~robbes/
Romain Robbes wrote:
some people still need it). I'd really like to remove the mode, but finding a good keystroke+clicking combination is tough. The same thing applies to keyboard shortcuts by the way.
How might we *emacsify* the keyboard bindings?
One of my favourite things about emacs is being able to
(defun word-count nil "Count words in buffer" (interactive) (shell-command-on-region (point-min) (point-max) "wc -w"))
...and, by virtue of the "(interactive)" subform, my brand new function is suddenly available for user-configurable keybinding and/or execution via M-x.
How can we do a similar thing in Squeak?
Could method annotations help here?
Regards, Tony
Hi Tony,
When you use services and keymapping you can do that. The process is a bit longer though, since we want more information, such as the name and description of the action, where it can fit in menus, which keyboard shortcut to define ... possibly a condition to enable or disable it based on context.
You have to: - Subclass ServiceProvider for your application (you usually want to define several of those in a row, so it makes sense to group them in a dedicated class) - Define a method returning a ServiceAction object, in the 'services' method protocol.
anExampleOfAService ^ ServiceAction text: 'service example' button: 'ex' condition: [:r | "code fits here, the argument is an object so that you fetch the data needed"] action: [:r | "same thing"]
- describe in the "categories" method where your new action would fit (method menu, world menu ...), and it's keyboard shortcut. Thanks to keymapping, it can be something like "<m-x><c-c>r2d2" if you enjoy the emacs way ;-) (Actually, it is the only way to define new keyboard shortcuts in squeak, the keymap being quite crowded already).
then you can try it.
Note that in an earlier version of services, I had a kind of command line which worked like the emacs one, featuring auto-completion of service names. Right now it is removed to keep the code base smaller, but it could be implemented again.
Concerning annotations, it could be done in the same way, but the annotations will be quite big, since there is a bit of description to do. so right now it is not implemented.
Cheers, Romain
On Sep 30, 2005, at 12:14 PM, Tony Garnock-Jones wrote:
Romain Robbes wrote:
some people still need it). I'd really like to remove the mode, but finding a good keystroke+clicking combination is tough. The same thing applies to keyboard shortcuts by the way.
How might we *emacsify* the keyboard bindings?
One of my favourite things about emacs is being able to
(defun word-count nil "Count words in buffer" (interactive) (shell-command-on-region (point-min) (point-max) "wc -w"))
...and, by virtue of the "(interactive)" subform, my brand new function is suddenly available for user-configurable keybinding and/ or execution via M-x.
How can we do a similar thing in Squeak?
Could method annotations help here?
Regards, Tony
-- Romain Robbes http://www.inf.unisi.ch/~robbes/
Romain Robbes wrote:
When you use services and keymapping you can do that. [... instructions ...]
Thank you! I'll try it out.
Note that in an earlier version of services, I had a kind of command line which worked like the emacs one, featuring auto-completion of service names. Right now it is removed to keep the code base smaller, but it could be implemented again.
I really like that idea. Emacs does seem to get some win out of having the M-x command-line be different from a full-blown evaluator (the scratch buffer), and so I imagine Squeak could benefit from a services-invocation command-line as distinct from a full Workspace or a simple doit.
Regards, Tony
Tony Garnock-Jones wrote:
Romain Robbes wrote:
some people still need it). I'd really like to remove the mode, but finding a good keystroke+clicking combination is tough. The same thing applies to keyboard shortcuts by the way.
How might we *emacsify* the keyboard bindings?
One of my favourite things about emacs is being able to
(defun word-count nil "Count words in buffer" (interactive) (shell-command-on-region (point-min) (point-max) "wc -w"))
...and, by virtue of the "(interactive)" subform, my brand new function is suddenly available for user-configurable keybinding and/or execution via M-x.
How can we do a similar thing in Squeak?
Could method annotations help here?
Regards, Tony
Tony,
Romain suggested that you can provide a "word count service". As he noted it is a bit more work than a ELISP function. Also, if all you want is a keyboard shortcut you could simply create a class to house your favorite ones and then use Keymapping to activate the methods. This is a bit shorter than services but also less capable. I'll code up your example just to prove that it isn't much harder than ELISP:
Object subclass: #MyShortcuts instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Keymapping-Examples'
" clas side " countWords: event forMorph: aMorph | words | (aMorph isKindOf: TextMorph) ifFalse: [^nil]. words := (aMorph contents asString findTokens: {Character space. Character cr. Character lf. Character tab}) size. self inform: 'Words: ' , words printString
Then, in a TextMorph press <c-k> to raise the keymap editor. Select the "TextMorph" tab, press <m-a> (or use the popup menu) to add an entry (see attached image).
That should do it. Press <c-o> in any TextMorph and you get a word count. You can, of course, save your keymap so that you can use it in all of your images.
David
David Shaffer wrote:
Romain suggested that you can provide a "word count service". As he noted it is a bit more work than a ELISP function. Also, if all you want is a keyboard shortcut you could simply create a class to house your favorite ones and then use Keymapping to activate the methods.
Thanks for the tip!
Regards, Tony
So I keep hear about this RoelTyper. Where can I read about it, install it?
Daniel
stéphane ducasse wrote:
Hi all
Romain gave me a presentation of his enhancements and they are REALLLLLLLLY cool. For example we can start to code a method in the middle of doing it doubleclick on a word in the text and jump in the implementors then go back (without having lost the code we were typing). by simply double clicking on a symbol in a method text we can jump into the senders, implementers...
I asked romain to do a video. I really think that what he is doing is important for the improvement of the usability of the environment. So try and give feedback to romain. We could get a really cool environment with his extensions, shout, eCompletion, RoelTyper.
Stef
Hi,
I just released two packages on squeakmap for further testing: - Services-All contains several packages related to services
grouped together for convenient downloads: -- Services-Base should go into the image at one point -- Services-RB is the refactorings services -- Services-Keymapping provide keyboard shortcuts for services -- Services-IDE provides a few nifty features describe later
- BrowseUnit has been updated to use the new version of the
Services framework.
This new version of services provides: - A cleaner way to define and register services, by subclassing a ServiceProvider class - Possibilities to add services in button bars such as in browsers - Better update mechanism, allowing menus and button bars to be dynamically changed (no need to open a new Browser when you install BrowseUnit for example) - Better support for disabled services in menus (they are grayed out) - Possibilities to enable or disable set of services in the Preferences
On to the nifty IDE features ;-) : - Histories in browsers, inspired by Alain Plantec's add on. The differences are: -- no additional instance variable in browser -- triggered by keyboard shortcut (apple-[ and
apple-] on the mac, the alt key for windows or linux) -- histories in message lists (apple-{ and } ) as well - An hypertext mechanism: double-click on a code entity (variable, message send), to be transported here. combined with histories, it makes the class browser really feel like a web browser. - Possibility of leaving unnaccepted methods, and restoring them later, which improves the browsing experience as well -Senders, implementors ... can be restricted to the image, package or hierarchy levels -There is a teleporting device ;-) : press apple-t or alt- t, enter some text, press enter, and you will be teleported where you wanted... Here are some examples: -- enter "ord.col" to browse the OrderedCollection class. -- enter "do:" to browse the implementors of do: -- enter "ord.col do:' to browse OrderedCollection>>#do: --enter "h" to get further help. This was inspired by some Mac utilities such as Quicksilver or Launchbar, only much more limited ;-)
So I encourage you to try this out, and send me feedback about
what doesn't work and what should be improved...
Cheers, Romain
On 29 sept. 05, at 22:04, Daniel Vainsencher wrote:
So I keep hear about this RoelTyper. Where can I read about it, install it?
Daniel
Roel do not want to have it on MC (but wants to manage everything from VW) I found that not really ideal. I asked alex to publish the code on SqueakSource. I hope that we will have it soon.
Stef
squeak-dev@lists.squeakfoundation.org