[squeak-dev] The Trunk: Tools-ul.277.mcz

Bert Freudenberg bert at freudenbergs.de
Tue Nov 16 19:33:49 UTC 2010


I don't think there's a precedent for "control" meaning "copy" in Squeak. Shift as a modifier for mouse events is used occasionally.
  
In any case, direct references to Sensor are evil. This should be in the tool builder code, not the browser. 

- Bert -

On 16.11.2010, at 16:39, Chris Muller wrote:

> Usually the Control key is used to indicate copy..
> 
> On Sun, Nov 7, 2010 at 8:41 PM,  <commits at source.squeak.org> wrote:
>> Levente Uzonyi uploaded a new version of Tools to project The Trunk:
>> http://source.squeak.org/trunk/Tools-ul.277.mcz
>> 
>> ==================== Summary ====================
>> 
>> Name: Tools-ul.277
>> Author: ul
>> Time: 8 November 2010, 3:41:44.565 am
>> UUID: 21959a81-fb7f-7942-af9d-26b4f38b869d
>> Ancestors: Tools-ul.276
>> 
>> - copy methods instead of moving when they're dragged to another Browser's method categories and shift is pressed. Don't ask questions in this case.
>> 
>> =============== Diff against Tools-ul.276 ===============
>> 
>> Item was changed:
>>  ----- Method: Browser>>dropOnMessageCategories:at: (in category 'drag and drop') -----
>>  dropOnMessageCategories: method at: index
>> +
>> +       | dstClass category copy |
>> +       copy := Sensor shiftPressed.
>> -       | dstClass category |
>>        (method isKindOf: CompiledMethod)
>>                ifFalse:[^self inform: 'Can only drop methods'].
>>        dstClass := self selectedClassOrMetaClass.
>>        (dstClass == method methodClass) ifTrue:[
>>                category := self messageCategoryList at: index.
>>                dstClass organization classify: method selector  under: category.
>>                ^true].
>> +       copy ifFalse: [
>> +               (self confirm: (
>> +                       'Classes {1} and {2} are unrelated.{3}Are you sure you want to move this method?'
>> +                               format: { method methodClass. dstClass. Character cr }))
>> +                                       ifFalse: [ ^false ] ].
>> -       (self confirm: (
>> -               'Classes {1} and {2} are unrelated.{3}Are you sure you want to move this method?'
>> -                       format: { method methodClass. dstClass. Character cr })) ifFalse: [ ^false ].
>>        dstClass
>>                compile: method getSource
>>                classified: (self messageCategoryList at: index)
>>                withStamp: method timeStamp
>>                notifying: nil.
>> +       copy ifFalse: [
>> +               method methodClass removeSelector: method selector ].
>> -       method methodClass removeSelector: method selector.
>>        ^true!
>> 
>> 
>> 
> 




More information about the Squeak-dev mailing list