On Thu, Apr 19, 2012 at 3:07 PM, Mariano Martinez Peck <
[email protected]> wrote:

>
>
> On Thu, Apr 19, 2012 at 12:21 AM, Fernando Olivero <
> [email protected]> wrote:
>
>> Hi Mariano, we should be able to  "silently" create temporal classes,
>> without notifying the system.
>>
>> Have you tried something like this:
>>
>>
>> default := RPackage organizer.
>> [
>>        default unregister.
>>        SystemChangeNotifier uniqueInstance doSilently: [
>>                 Object subclass: #TemporalClassForFuel
>>                        instanceVariableNames: ''
>>                        classVariableNames: ''
>>                        poolDictionaries: ''
>>                        category: 'FuelTests'].
>>
>> ] ensure:[
>>          (Smalltalk globals classNamed: 'TemporalClassForFuel' )
>> removeFromSystem:false.
>>          default register].
>>
>>
> Hi Fernando. Thanks, but it doesn't seem to work.
> I put a halt in SystemChangeNotifier >> classAdded: aClass inCategory:
> aCategoryName
> Then I modfified ClassFactoryForTestCase:
>
> newSubclassOf: aClass instanceVariableNames: ivNamesString
> classVariableNames:  classVarsString category: category
>     | newClass default |
>
>     default := RPackage organizer.
>     [
>         default unregister.
>         SystemChangeNotifier uniqueInstance doSilently: [
>         newClass := aClass
>             subclass: self newName
>             instanceVariableNames: ivNamesString
>             classVariableNames: classVarsString
>             poolDictionaries: ''
>             category: (self packageName, '-', category) asSymbol.
>         ].
>     ] ensure:[
>          default register].
>
>     self createdClasses add: newClass.
>     ^newClass
>
>
> And when creating a class, it still halts on #classAdded: aClass
> inCategory: aCategoryName
>

If I proceed the halt it continues up to RPackage >>
systemClassAddedActionFrom:
and it fails trying to import an OBSOLETE class.


>
>
> Look attached screenshot.
>
> Thanks
>
>
>
>> Saludos,
>> Fernando
>>
>> On Wed, Apr 18, 2012 at 11:49 PM, Mariano Martinez Peck
>> <[email protected]> wrote:
>> > Hi guys. I am running some tests with Fuel. In such test I create
>> classes and traits. The problem is that I get a: "MessageNotUnderstood:
>> receiver of "isProvided" is nil"
>> > Everything starts (it seems) when I do #addToComposition:   and I
>> receive a MethodRecategorized event and RPackage calls
>> #systemMethodRecategorizedActionFrom:
>> > There, the problem is with  ->  method isProvidedByATrait
>> > the class of the method is 'AnObsoleteClassForTestToBeDeleted1'
>> > And the error finally arrives to #providedLocatedMethod where it does
>> "each method isProvided"  the problem is that "each" is a
>> RGMethodDefinition with everything in nil except 'name'  and 'annotations'.
>> > I attach PharoDebug.log.
>> > Any help is really appreaciated.
>> >
>> > Thanks,
>> >
>> > --
>> > Mariano
>> > http://marianopeck.wordpress.com
>> >
>>
>>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>


-- 
Mariano
http://marianopeck.wordpress.com

Reply via email to