help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Changing the superspace of a namespace


From: Gwenael Casaccio
Subject: Re: [Help-smalltalk] Changing the superspace of a namespace
Date: Fri, 29 Jul 2011 10:38:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 Thunderbird/3.1.11

On 07/29/2011 12:44 AM, ZuLuuuuuu wrote:
Hello,

I was toying with some reflection features. When I try to change a
superspace of a namespace by using #superspace: message I usually get a
"doesNotUnderstand: #recompileAll" error. For example the code below:

Smalltalk addSubspace: #MySpace.
MySpace superspace: Kernel.


gives an error like this:

Object: DisabledPackage error: did not understand #recompileAll
MessageNotUnderstood(Exception)>>signal (ExcHandling.st:254)
Kernel.DisabledPackage class(Object)>>doesNotUnderstand: #recompileAll
(SysExcept.st:1407)
optimized [] in AbstractNamespace>>superspace: (AbstNamespc.st:410)
[] in Dictionary>>do: (Dictionary.st:357)
Dictionary(HashedCollection)>>do: (HashedColl.st:201)
Dictionary>>do: (Dictionary.st:357)
Namespace>>do: (Namespace.st:168)
Namespace(AbstractNamespace)>>superspace: (AbstNamespc.st:411)
UndefinedObject>>executeStatements (Temp/deneme (copy).st:2)


Is this a bug or should I do this in another way?

-----
Canol Gökel
--
View this message in context: 
http://forum.world.st/Changing-the-superspace-of-a-namespace-tp3702742p3702742.html
Sent from the Gnu mailing list archive at Nabble.com.

_______________________________________________
help-smalltalk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-smalltalk

Seems to work with:

diff --git a/kernel/AbstNamespc.st b/kernel/AbstNamespc.st
index 44d44db..9b1fd7b 100644
--- a/kernel/AbstNamespc.st
+++ b/kernel/AbstNamespc.st
@@ -406,14 +406,14 @@ an instance of me; it is called their `environment''. '>
                [:each |
                each isClass
                    ifTrue:
-                       [each recompileAll.
-                       each class recompileAll]].
+                       [each compileAll.
+                       each class compileAll]].
        self allSubassociationsDo:
                [:assoc |
                assoc value isClass
                    ifTrue:
-                       [assoc value recompileAll.
-                       assoc value class recompileAll]]
+                       [assoc value compileAll.
+                       assoc value class compileAll]]
     ]

     subspaces [

Cheers,
Gwen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]