[squeak-dev] Re: About OmniBrowser support in Squeak 4.1 trunk
Levente Uzonyi
leves at elte.hu
Fri Apr 23 23:53:49 UTC 2010
On Fri, 23 Apr 2010, Levente Uzonyi wrote:
> On Fri, 23 Apr 2010, Andreas Raab wrote:
>
>> On 4/23/2010 4:00 AM, Levente Uzonyi wrote:
>>> On Fri, 23 Apr 2010, Hannes Hirzel wrote:
>>>
>>>> Dear all
>>>>
>>>> Sean DeNigris found out that refactoring with OmniBrowser (OB) does
>>>> not (yet) work in Squeak 4.1 trunk.
>>>>
>>>> He loaded it following the instructions in the 'Extending the system'
>>>> workspace (help menu).
>>>>
>>>> Comments?
>>>
>>> The versions of OB and Refactoring Engine loaded by that script are
>>> developement snapshots, not releases. A "previous snapshot" worked well
>>> with Squeak 4.1, but the OB/RE stuff got broken recently.
>>
>> Can you provide the "correct" package versions? I used your earlier outline
>> and it fetched the latest versions too :-)
>
> I don't know which they were, but when I posted the installer script the
> "then latest versions" worked well together. So we should check out which
> versions were the latest at the time and create a script which loads those.
>
>
> Levente
There are (at least) two kind of incompatibilities:
1) Squeak changes are not backwards compatible. Adding the following
methods fix two of these issues:
SmalltalkImage >> #keyAtValue: value
"Answer the key that is the external name for the argument, value. If
there is none, answer nil."
^globals keyAtValue: value
SystemDictionary >> #hasSpecialSelector: aLiteral ifTrueSetByte: aBlock
^Smalltalk hasSpecialSelector: aLiteral ifTrueSetByte: aBlock
2) OB uses Pharo-only methods. Adding the following methods fixes three
issues:
Behavior >> #withAllSuperAndSubclassesDo: aBlock
self allSuperclassesDo: aBlock.
aBlock value: self.
self allSubclassesDo: aBlock
KeyboardEvent >> #setType: aSymbol buttons: anInteger position: pos keyValue: aValue charCode: code hand: aHand stamp: stamp
^self setType: aSymbol buttons: anInteger position: pos keyValue: aValue hand: aHand stamp: stamp
KeyBoardEvent >> #scanCode: anInteger
^self
With these five methods the script from the Help menu is able to load OB
and RE, and all OB and RE tests are green (you have to load them
yourself).
This doesn't mean that everything works as it should, for example the
browse button in the Code Critics window doesn't work.
Levente
>
>>
>> Cheers,
>> - Andreas
>>
>>>>
>>>> Regards
>>>> Hannes
>>>>
>>>> P.S. I'm sorry but currently though being interested of having OB in
>>>> Squeak 4.1 I cannot follow up on this (too many other threads open)
>>>>
>>>>
>>>> On 4/23/10, DeNigris Sean <sean at clipperadams.com> wrote:
>>>>>> Go to 'Help menu' / 'Extending the system'
>>>>>> <snip>
>>>>>> "Omnibrowser"
>>>>>> <snip>
>>>>>> "Refactoring engine and OB integration"
>>>>>
>>>>>
>>>>>
>>>>> I followed the instructions and they now load okay, yay!
>>>>> Except... the refactoring seems to be unusable, doh :(
>>>>>
>>>>> My first two refactoring attempts:
>>>>> * rename method - MessageNotUnderstood:
>>>>> SystemDictionary>>hasSpecialSelector:ifTrueSetByte:
>>>>> * extract method - clicking accept on the 'Changes: refactor source,
>>>>> extract method' pop-up does nothing - change is not made and pop-up
>>>>> stays
>>>>> there.
>>>>>
>>>>> Should I file bugs for these? If so, for the package, or Squeak? Are
>>>>> these
>>>>> packages even intended/supported to run in Squeak?
>>>>>
>>>>> Squeak 4.2-10006
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Sean DeNigris
>>>>
>>>>
>>>
>>>
>>
>>
>>
>
>
More information about the Squeak-dev
mailing list
|