very basic listbox code request for comments
Timmy Douglas
timmy+slate at cc.gatech.edu
Tue May 16 20:12:51 PDT 2006
Timmy Douglas <timmy+slate at cc.gatech.edu> writes:
> Brian Rice <water at tunes.org> writes:
>
>> On May 16, 2006, at 1:38 PM, Timmy Douglas wrote:
>>
>>> Brian Rice <water at tunes.org> writes:
>>>> I think you don't understand what what your change does. Let me
>>>> explain:
>>>>
>>>> When you use #addImmutableDelegate:valued: in that code, you make the
>>>> HOLDER of the new slot inherit from the VALUE you're putting in that
>>>> overridable slot. In this paragraph, however, you're talking about
>>>> wanting to delegate from some other object to the HOLDER of the slot,
>>>> and this is what #addDynamicSlot:valued: is for.
>>>
>>> Ok, yeah, I totally misunderstood what delegate slots were
>>> for. Somehow I thought these were the slots that were inherited (only
>>> exist in the base object) while the data slots got copied (into
>>> another memory location) into the child object everytime you used
>>> #define:&parents:. Thanks for clearing this up.
>>
>> Whew, I'm glad that was all the confusion was about. Incidentally, I
>> should re-iterate that I am not entirely happy with the way Slate
>> handles inheritance; that basically we have been working from the
>> Self model and customizing it as we go.
>
> ok, well things have become a lot clearer. thanks
or so I thought. I thought I could do something like make an object,
#addDynamicSlot: all the theme properties into it, then try doing a:
SceneElement addImmutableDelegate: #theme valued: Themeable.
right after SceneElement is defined in graphics.slate, but when I try
loading the other files after that, it goes pretty far but blows up:
Library slate-cairo was successfully loaded.
Loading P'demo/ui.slate'
Slate: Growing heap to 11984424 bytes.
Slate: Growing heap to 16178728 bytes.
Slate: Growing heap to 24567328 bytes.
Slate: Attempted to grow heap beyond limits
(crash)
apparently it's dying on:
WindowSceneElement newWidth: 640 height: 480
which dies on: SceneElement new.
I think it's a little weird that it'd crash like that. Apparently it
works if I do it like this instead:
se addImmutableDelegate: #theme before: #traitsWindow valued: Themeable.
which contrasts the morph.slate file which uses #after: (which crashes
also when I tried it, but it's commented out). I'll attach the patch I
made with darcs:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timmydarcspatch
Type: application/octet-stream
Size: 29972 bytes
Desc: not available
Url : /archives/slate/attachments/20060516/1a20c628/timmydarcspatch-0001.obj
More information about the Slate
mailing list