[squeak-dev] Cuis-Squeak portability.

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

[squeak-dev] Cuis-Squeak portability.

R. Clayton
If I file out Collections-SkipLists from Cuis (1.0) and try to file in the
result to Squeak (3.10 beta), I get an error:

  Nothing more expected ->classDefinition: #SkipList category: #'Collections-SkipLists'

Skip lists is just an example; filing in to Squeak from Cuis doesn't work for
anything I tried.  This is broken, right?



Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Cuis-Squeak portability.

Juan Vuletich-4
Hi.

R. Clayton wrote:
> If I file out Collections-SkipLists from Cuis (1.0) and try to file in the
> result to Squeak (3.10 beta), I get an error:
>
>   Nothing more expected ->classDefinition: #SkipList category: #'Collections-SkipLists'
>
> Skip lists is just an example; filing in to Squeak from Cuis doesn't work for
> anything I tried.  This is broken, right?
>  

Squeak change sets do class definitions via doits. In addition to the
doIt, Cuis supports a new type of change, ClassDefinition. But the doIt
is also generated.
So what you need to do is to remove those changes that start 'preamble:
classDefinition'. After that, everything should work ok.

Cheers,
Juan Vuletich

Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Cuis-Squeak portability.

R. Clayton
So what you need to do is to remove those changes that start preamble:
classDefinition'. After that, everything should work ok.

  In unix talk,

    $ sed 's/!classDefinition:[^!]*!//g' < cuis.st > squeak.st

    $

  did the trick.  Thanks.


Reply | Threaded
Open this post in threaded view
|

[squeak-dev] Re: Cuis-Squeak portability.

Klaus D. Witzel
In reply to this post by Juan Vuletich-4
On Wed, 10 Jun 2009 23:45:09 +0200, Juan Vuletich wrote:

> Hi.
>
> R. Clayton wrote:
>> If I file out Collections-SkipLists from Cuis (1.0) and try to file in  
>> the
>> result to Squeak (3.10 beta), I get an error:
>>
>>   Nothing more expected ->classDefinition: #SkipList category:  
>> #'Collections-SkipLists'
>>
>> Skip lists is just an example; filing in to Squeak from Cuis doesn't  
>> work for
>> anything I tried.  This is broken, right?
>>
>
> Squeak change sets do class definitions via doits. In addition to the  
> doIt, Cuis supports a new type of change, ClassDefinition.

How do you mean that? It is just a line with invalid syntax in a file that  
pretends to be part of the Smalltalk world (ya know: receiver and message  
selector and things). Example generated by Cuis:

!classDefinition: #Imports category: #'System-Support'!

Wouldn't it be easier to stick with the Smalltalk way of formulating  
messages, like

!nil classDefinition: #Imports category: #'System-Support'!

and then supply an implementor of #classDefinition:category: which is also  
good documentation (ya know: alt-m and alt-W and things).

?

> But the doIt is also generated.
> So what you need to do is to remove those changes that start 'preamble:  
> classDefinition'. After that, everything should work ok.
>
> Cheers,
> Juan Vuletich
>

--
"If at first, the idea is not absurd, then there is no hope for it".  
Albert Einstein


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Re: Cuis-Squeak portability.

Juan Vuletich-4
Klaus D. Witzel wrote:

> On Wed, 10 Jun 2009 23:45:09 +0200, Juan Vuletich wrote:
>
>> Hi.
>>
>> R. Clayton wrote:
>>> If I file out Collections-SkipLists from Cuis (1.0) and try to file
>>> in the
>>> result to Squeak (3.10 beta), I get an error:
>>>
>>>   Nothing more expected ->classDefinition: #SkipList category:
>>> #'Collections-SkipLists'
>>>
>>> Skip lists is just an example; filing in to Squeak from Cuis doesn't
>>> work for
>>> anything I tried.  This is broken, right?
>>>
>>
>> Squeak change sets do class definitions via doits. In addition to the
>> doIt, Cuis supports a new type of change, ClassDefinition.
>
> How do you mean that? It is just a line with invalid syntax in a file
> that pretends to be part of the Smalltalk world (ya know: receiver and
> message selector and things). Example generated by Cuis:
>
> !classDefinition: #Imports category: #'System-Support'!
>
> Wouldn't it be easier to stick with the Smalltalk way of formulating
> messages, like
>
> !nil classDefinition: #Imports category: #'System-Support'!
>
> and then supply an implementor of #classDefinition:category: which is
> also good documentation (ya know: alt-m and alt-W and things).
>
> ?

In Squeak, change sets support several types: #method, #classComment,
#doit, #preamble. I don't like #doIts because a ChangeList can't do
'remove up-to-date versions' with them. So I just added
#classDefinition. Some day I'd also add #methodRemove and #classRemove
for the same reasons.
>
>> But the doIt is also generated.
>> So what you need to do is to remove those changes that start
>> 'preamble: classDefinition'. After that, everything should work ok.
Cheers,
Juan Vuletich