help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] [VisualGST] Smalltalk commands refactored


From: Holger Hans Peter Freyther
Subject: Re: [Help-smalltalk] [VisualGST] Smalltalk commands refactored
Date: Mon, 17 Jun 2013 17:28:48 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Mon, Jun 17, 2013 at 02:20:01PM +0200, Gwenaël Casaccio wrote:
> 
> Here is the new version of it (without the copyright header changes).

Thanks. For renames like these you might also want to help git format-patch
and pass the -M option to it. And the patch starts to be easily reviewable.
You have replaced precondition with valid.. removed the undo.. and renamed
the redo to execute.

> diff --git a/packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st 
> b/packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st
> index 996669e..f7c06a2 100644
> --- a/packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st
> +++ b/packages/visualgst/Commands/SmalltalkMenus/AcceptItCommand.st
> @@ -74,11 +74,11 @@ Command subclass: AcceptItCommand [
>       <category: 'command'>
>  
>          target state hasSelectedCategory ifFalse: [ ^ self 
> acceptClassDefinition ].
> -        (AddMethodUndoCommand
> +        SysAddMethodCommand
>           add: target sourceCode
>           classified: target state category 
>           in: target state classOrMeta
> -         browser: target) push
> +         browser: target


when/how is this command executed now?

> +    execute [
> +     <category: 'events'>
> +
> +     newClass := parentClass subclass: newClassName environment: namespace.
> +     namespace at: newClass name put: newClass.
> +        newClass category: classCategory fullname.


mixing tabs and spaces?


> diff --git a/packages/visualgst/Gtk/GtkEntry.st 
> b/packages/visualgst/Gtk/GtkEntry.st
> new file mode 100644
> index 0000000..fc34fdb
> --- /dev/null
> +++ b/packages/visualgst/Gtk/GtkEntry.st
> @@ -0,0 +1,9 @@
> +GTK.GtkEntry extend [
> +
> +    getText [
> +
> +        ^ self getBuffer getText
> +    ]
> +
> +]
> +
> diff --git a/packages/visualgst/Gtk/GtkEntryBuffer.st 
> b/packages/visualgst/Gtk/GtkEntryBuffer.st
> new file mode 100644
> index 0000000..eceb980
> --- /dev/null
> +++ b/packages/visualgst/Gtk/GtkEntryBuffer.st
> @@ -0,0 +1,9 @@
> +GTK.GtkEntryBuffer extend [
> +
> +    getText [
> +    
> +        <cCall: 'gtk_entry_buffer_get_text' returning: #string args: #( 
> #self #cObject )>
> +    ]
> +
> +]


I think these belong to another patch?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]