Trouble getting slate gui started from instructions

Timmy Douglas timmy+slate at cc.gatech.edu
Mon Apr 10 18:53:57 PDT 2006


Brian Rice <water at tunes.org> writes:

> On Apr 8, 2006, at 11:54 AM, Timmy Douglas wrote:
>
>> Brian Rice <water at tunes.org> writes:
>>> Okay. Unfortunately I wasn't able to test it myself since the setup
>>> on this machine won't build against cairo correctly.
>>>
>>> The #formats bug in cairo.slate can be traced to (using grep) line
>>> 56, which I have patched and uploaded.
>>>
>>> I'll try to fix my build issue tonight and figure out the rest of
>>> the bugs. Thanks.
>>
>> Have you had time to work on this?
>
> Not really. My life just became extremely busy and seems like it will  
> be until then end of the month.

ok

well I've hit a bump. If you can't reply maybe someone else can. I got
a little displaying but it 'crashes' into the debugger after less than
a second:


from windows.slate:

entry@(Windows EventTableEntry traits) construct
[| event | 
  event: entry prototype copy.
  entry constructors do: [| :name | event construct: name].
  event
]

entry constructors do: [| :name | event construct: name]

entry: ("EventTableEntry" prototype: ("MouseMotionEvent" ...). constructors: #MouseMotionEvent)
event: ("MouseMotionEvent" timeStamp: Nil. source: Nil. pointer: Nil. position: Nil)



First of all, it'd be nice if the debugger would put an arrow or
something before that single line with "entry constructors do: ...". I
think it'd make it easier to read since I keep (incorrectly) thinking
it is separate code that comes after the block.


The problem is that "entry constructors" = #MouseMotionEvent or
something. This actually works with the do loop (which I think is a
little bizzare... I think "#blah is: Collection" should return false.)

Anyways, I think since the symbol is a collection, the following code
results:

"event construct: $M"

and obviously, the method lookup fails there. It might even fail if it
had worked since I think this is more broken later on. But anyways,
I'm not sure what approach I should take to fixing this since I think
this symbol-as-collection is a little quirky (if you want that
behavior you should probably convert it to a string, imo. what's your
view?) and I wasn't sure if I should just change constructors to be a
list when it is created, like this:

{
 snip snip snip

    151 -> #(MouseEnterEvent                    (osWindow mouseMotionPosition)).
    152 -> #(MouseLeaveEvent                    (osWindow mouseMotionPosition)).
} do: [|:each|
    Windows eventTable at: each key put:
      (Windows EventTableEntry
         newPrototype: (events atSlotNamed: each value first)
         constructors: {each value first.})].



thanks



More information about the Slate mailing list