Creating class with empty Catagory!

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

Creating class with empty Catagory!

volkert-2
Would it be nicer to open a Altert box?

BW,
Volkert

Reply | Threaded
Open this post in threaded view
|

Re: Creating class with empty Catagory!

Marcus Denker-4
Yes, this could definitely be inmproved. An idea would be a dialog with a pre-filled class definition that has
useful defaults.
This way when demoing, you can just accept the empty and nevertheless a class is created just by pressing “ok”
in this dialog.


> On 08 Sep 2015, at 11:28, Volkert <[hidden email]> wrote:
>
> Would it be nicer to open a Altert box?
>
> BW,
> Volkert
>
> <gabhajcb.png>


Reply | Threaded
Open this post in threaded view
|

Re: Creating class with empty Catagory!

Ben Coman
In reply to this post by volkert-2


On Tue, Sep 8, 2015 at 5:28 PM, Volkert <[hidden email]> wrote:
Would it be nicer to open a Alert box?

Yes. Now maybe it should not be done directly from here...

    SlotClassBuilder >> category: aCategory
  aCategory isEmpty ifTrue: [ InvalidPackageName signal: 'The Category should not be empty' ].
  category := aCategory  

...since that might(?) introduce a dependency from the kernel to the UI. But maybe further down the stack in one of...

    PackageTreeNautilusUI(AbstractNautilusUI)
        >> compileAClassFrom: aString notifying: aController
        >> compileSource: aText notifying: aController

there could be an error handler. Would you like to have a go at it?

cheers -ben
Reply | Threaded
Open this post in threaded view
|

Re: Creating class with empty Catagory!

stepharo
In reply to this post by Marcus Denker-4
Marcus I would simply not put empty we have unpackaged let us use it by
default.
The empty category is a bad idea and we should address it because many
people are getting burned.

> Yes, this could definitely be inmproved. An idea would be a dialog with a pre-filled class definition that has
> useful defaults.
> This way when demoing, you can just accept the empty and nevertheless a class is created just by pressing “ok”
> in this dialog.
>
>
>> On 08 Sep 2015, at 11:28, Volkert <[hidden email]> wrote:
>>
>> Would it be nicer to open a Altert box?
>>
>> BW,
>> Volkert
>>
>> <gabhajcb.png>
>
>