The Trunk: Monticello-cmm.400.mcz

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

The Trunk: Monticello-cmm.400.mcz

commits-2
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.400.mcz

==================== Summary ====================

Name: Monticello-cmm.400
Author: cmm
Time: 19 September 2010, 4:50:02.156 pm
UUID: 815ed4bb-b5b4-420c-9639-018beb254ae9
Ancestors: Monticello-bf.399

Change "copy selector" to copy the signature of the method to the clipboard, not just the selector.

=============== Diff against Monticello-bf.399 ===============

Item was changed:
  ----- Method: MCCodeTool>>copySelector (in category 'menus') -----
  copySelector
  "Copy the selected selector to the clipboard"
+ self selectedMessageName ifNotNilDo:
+ [ : selector | Clipboard clipboardText:
+ (self selectedClassOrMetaClass
+ ifNil: [ selector asString ]
+ ifNotNilDo: [ : cls | (cls >> selector) signature ]) ]!
-
- | selector |
- (selector := self selectedMessageName) ifNotNil:
- [Clipboard clipboardText: selector asString]!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-cmm.400.mcz

Eliot Miranda-2
So if I want to copy a selector, e.g. to paste it into message names I then have to delete the lass>> part?  Please, can we add a "copy signature" instead of change the semantics of something perfectly useful?

Also,isn't "method reference" a better name for aClass>>selector than signature? Signatures typically have arity, return and argument type information .  This is something a little simpler.

On Sun, Sep 19, 2010 at 2:50 PM, <[hidden email]> wrote:
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.400.mcz

==================== Summary ====================

Name: Monticello-cmm.400
Author: cmm
Time: 19 September 2010, 4:50:02.156 pm
UUID: 815ed4bb-b5b4-420c-9639-018beb254ae9
Ancestors: Monticello-bf.399

Change "copy selector" to copy the signature of the method to the clipboard, not just the selector.

=============== Diff against Monticello-bf.399 ===============

Item was changed:
 ----- Method: MCCodeTool>>copySelector (in category 'menus') -----
 copySelector
       "Copy the selected selector to the clipboard"
+       self selectedMessageName ifNotNilDo:
+               [ : selector | Clipboard clipboardText:
+                       (self selectedClassOrMetaClass
+                               ifNil: [ selector asString ]
+                               ifNotNilDo: [ : cls | (cls >> selector) signature ]) ]!
-
-       | selector |
-       (selector := self selectedMessageName) ifNotNil:
-               [Clipboard clipboardText: selector asString]!





Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-cmm.400.mcz

Chris Muller-3
My thought was that if you've had to select the method in order to get
the menu in order to even access the "copy selector" function, then
that means the selector is already displayed in the bottom text pane,
and from there it's exactly same number of gestures to copy and paste
from there as it is to select it from the menu (3 in both cases);
albeit, with the arguments which maybe you don't want..??  Sorry, I
was unclear what use-case you were referring to ("paste it into
message names"?).

Eliot, if it is perfectly useful to you to only copy the selector then
I don't want to disrupt that, of course, so I will put it back..

 - Chris

On Sun, Sep 19, 2010 at 7:14 PM, Eliot Miranda <[hidden email]> wrote:

> So if I want to copy a selector, e.g. to paste it into message names I then
> have to delete the lass>> part?  Please, can we add a "copy signature"
> instead of change the semantics of something perfectly useful?
> Also,isn't "method reference" a better name for aClass>>selector than
> signature? Signatures typically have arity, return and argument type
> information .  This is something a little simpler.
>
> On Sun, Sep 19, 2010 at 2:50 PM, <[hidden email]> wrote:
>>
>> Chris Muller uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-cmm.400.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-cmm.400
>> Author: cmm
>> Time: 19 September 2010, 4:50:02.156 pm
>> UUID: 815ed4bb-b5b4-420c-9639-018beb254ae9
>> Ancestors: Monticello-bf.399
>>
>> Change "copy selector" to copy the signature of the method to the
>> clipboard, not just the selector.
>>
>> =============== Diff against Monticello-bf.399 ===============
>>
>> Item was changed:
>>  ----- Method: MCCodeTool>>copySelector (in category 'menus') -----
>>  copySelector
>>        "Copy the selected selector to the clipboard"
>> +       self selectedMessageName ifNotNilDo:
>> +               [ : selector | Clipboard clipboardText:
>> +                       (self selectedClassOrMetaClass
>> +                               ifNil: [ selector asString ]
>> +                               ifNotNilDo: [ : cls | (cls >> selector)
>> signature ]) ]!
>> -
>> -       | selector |
>> -       (selector := self selectedMessageName) ifNotNil:
>> -               [Clipboard clipboardText: selector asString]!
>>
>>
>
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Monticello-cmm.400.mcz

Eliot Miranda-2


On Mon, Sep 20, 2010 at 11:44 AM, Chris Muller <[hidden email]> wrote:
My thought was that if you've had to select the method in order to get
the menu in order to even access the "copy selector" function, then
that means the selector is already displayed in the bottom text pane,
and from there it's exactly same number of gestures to copy and paste
from there as it is to select it from the menu (3 in both cases);
albeit, with the arguments which maybe you don't want..??

Exactly.  One wants just the selector, not the message pattern.  I'm sick of editing out the arguments from message patterns, e.g. when I need to mention a specific method in an email.
 
 Sorry, I
was unclear what use-case you were referring to ("paste it into
message names"?).

The message names tool.  Try world menu->open...->message names
 

Eliot, if it is perfectly useful to you to only copy the selector then
I don't want to disrupt that, of course, so I will put it back..

I'm not saying don't put in your extension; I'm sure it's useful.  I'm saying don't break backwards-compatibility.  So you can either make it a preference or a different function.
 

 - Chris

On Sun, Sep 19, 2010 at 7:14 PM, Eliot Miranda <[hidden email]> wrote:
> So if I want to copy a selector, e.g. to paste it into message names I then
> have to delete the lass>> part?  Please, can we add a "copy signature"
> instead of change the semantics of something perfectly useful?
> Also,isn't "method reference" a better name for aClass>>selector than
> signature? Signatures typically have arity, return and argument type
> information .  This is something a little simpler.
>
> On Sun, Sep 19, 2010 at 2:50 PM, <[hidden email]> wrote:
>>
>> Chris Muller uploaded a new version of Monticello to project The Trunk:
>> http://source.squeak.org/trunk/Monticello-cmm.400.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Monticello-cmm.400
>> Author: cmm
>> Time: 19 September 2010, 4:50:02.156 pm
>> UUID: 815ed4bb-b5b4-420c-9639-018beb254ae9
>> Ancestors: Monticello-bf.399
>>
>> Change "copy selector" to copy the signature of the method to the
>> clipboard, not just the selector.
>>
>> =============== Diff against Monticello-bf.399 ===============
>>
>> Item was changed:
>>  ----- Method: MCCodeTool>>copySelector (in category 'menus') -----
>>  copySelector
>>        "Copy the selected selector to the clipboard"
>> +       self selectedMessageName ifNotNilDo:
>> +               [ : selector | Clipboard clipboardText:
>> +                       (self selectedClassOrMetaClass
>> +                               ifNil: [ selector asString ]
>> +                               ifNotNilDo: [ : cls | (cls >> selector)
>> signature ]) ]!
>> -
>> -       | selector |
>> -       (selector := self selectedMessageName) ifNotNil:
>> -               [Clipboard clipboardText: selector asString]!
>>
>>
>
>
>
>
>