Class hierarchy problem

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Class hierarchy problem

Gérard Bunel
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.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Class hierarchy problem

James Ladd
I suspect the problem is because Nil hasn't got a superclass set.
Ill look into it

Sent from Hyperspace.

On 26/04/2013, at 9:32 PM, Gérard Bunel <[hidden email]> wrote:

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.
 
 

--
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.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Class hierarchy problem

Gérard Bunel
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,

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.
 
 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Class hierarchy problem

James Ladd
Nil is the object and prim_nil is the primitive - during bootstrap prim_nil is used and after nil

Sent from Hyperspace.

On 09/05/2013, at 8:47 PM, Gérard Bunel <[hidden email]> wrote:

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,

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.
 
 

--
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.
 
 
Loading...