Le 09/11/2015 01:33, Yuriy Tymchuk a écrit :
On 08 Nov 2015, at 20:14, Thierry Goubier <thierry.goubier@gmail.com> wrote:
Stef,
I don't understand. I have never set a category in a class creation template for the last three years.
When I teach using Pharo, I allways tell students to create a package, select the package in the browser and add a class there.
Changing #category: for #package: (which is what the fix will be, I bet) is useless.
Because what written there is not a package, itâs a package + tag. So it would make sense to have
⦠package: âPacakgeNameâ tag: âTagNameâ
Trying to make it simpler for new students, I see :(
But what Iâd really enjoy is to have a dedicated UI there. Because we really use class templates as templates. 90% of a time I just change the Superclass, Class and instance variables.
As I said.
And 9% more I also add a tag to the package.
What? You don't do a 'add a tag to a package' operation? You create tags by side effect of a new class creation? (Your numbers don't add up to 100%. What is the one percent left for then? ;))
So why we cannot have a UI with text fields for this values? Later it can be fancier e.g. classVariables are hidden by default and can be expanded on demand or if the are defined (I donât like explaining class vars to people and I donât like them from design point of view). Then also superclass field can have autocompletion only from the defined classes prioritizing the ones from the same package. Instance variables can be converted to slots really fast by lookup, etcâ¦
Look, you're making even more complex everytime. But you're welcome to try; such a GUI can be added, yes, especially behind the add Class menu item instead of reusing the full template. A wizard for class creation :) Note that on current Nautilus, if you use add Class in the menu, opening the menu will auto-select what is behind the mouse click. And the template is prefilled, which makes it a bit more complex to create a new clas on Object.
I mean, itâs nice that we can subclass by sending a message, but we donât develop methods in a template like:
compile: âmethodCodeâ classified: âprotocolNameâ
I do. When the browser is broken, it's sometime the only way left :) Or editing Smalltalk code directly on github :)
So maybe we make use of special UI for classes instead of plain code.
Note that with smart suggestions, you can have both in the same apparently plain code. But think of your usage, and also of the other usage: just beginner, new student. And the last one will show you that our toolset is geared towards the power user. And this is not going to change anytime soon, to the contrary. Thierry