[Glass] Variable - pointer classes, do you have them?
Martin McClure via Glass
glass at lists.gemtalksystems.com
Thu Sep 4 20:38:36 PDT 2014
On 09/04/2014 08:05 PM, Mariano Martinez Peck wrote:
>
>
>
> On Thu, Sep 4, 2014 at 11:59 PM, Martin McClure
> <martin.mcclure at gemtalksystems.com
> <mailto:martin.mcclure at gemtalksystems.com>> wrote:
>
> On 09/04/2014 02:27 PM, Mariano Martinez Peck via Glass wrote:
>
> BTW...one of the examples I am trying to serialize/materialize in
> Gemstone is Interval. And I cannot find a way to recreate them,
> neither
> via #basicNew: or #_basicNew:
>
>
>
> Interval is not a variable class, it's a normal fixed-size pointer
> object. New instances can be created with #basicNew (as opposed to
> #basicNew:).
>
>
> But then my "test" to see if a class is variable is wrong?
> I mean,
>
> Interval isVariable -> true
>
> I guess Interval should NOT be indexable subclass then. Right?
>
My apologies. Interval *is* an indexable class (though it should always
have 0 indexed instance variable). For me, #basicNew: does create a new
instance. What error do you get when creating one that way?
Also, are you sure you want is #isVariable and not #isIndexable?
#isVariable will also get you the NSCs. I think you'll have trouble with
NSCs using #_basicAt: and #basicAt:put:, you probably need to use #do:
and #add: to enumerate and build these.
Regards,
-Martin
More information about the Glass
mailing list