Hi James,
palying around redline I tried the following code: | cls | cls := Class. [cls == nil] whileFalse: [ Transcript cr; show: cls. cls := cls superclass. ] This code fails as follow: Class ClassDescription Behavior Object ProtoObjectException in thread "main" java.lang.NullPointerException at st.redline.core.PrimObject.perform0(PrimObject.java:774) at st.redline.core.PrimObject.perform0(PrimObject.java:760) at st.redline.core.PrimObject.perform(PrimObject.java:716) while, using Pharo, it produces the following output: Class ClassDescription Behavior Object ProtoObject I looked at Bootstrapper As I suspected a maybe not Nil superclass on ProtoObject. But I see that: PrimObjectMetaclass protoObjectClass = protoObjectMetaclass.basicCreate("ProtoObject", PrimObject.PRIM_NIL, "", "", "", ""); Which seems correct to me. So, I don't understand!! Any advice ? Gérard You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
I suspect the problem is because Nil hasn't got a superclass set. Ill look into it Sent from Hyperspace. -- You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
In reply to this post by Gérard Bunel
Hi James,
Could you explain the differences between PrimObject.NIL and PrimObject.PRIM_NIL. What's the purpose of PRIM_NIL? Gérard
-- Le vendredi 26 avril 2013 13:32:22 UTC+2, Gérard Bunel a écrit : Hi James, You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Nil is the object and prim_nil is the primitive - during bootstrap prim_nil is used and after nil Sent from Hyperspace. -- You received this message because you are subscribed to the Google Groups "Redline Smalltalk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/groups/opt_out. |
Free forum by Nabble | Edit this page |