Closed blerner closed 5 months ago
Here's a screenshot of a silly example. Note that you cannot get interactivity with the Pyret values in here unless there is no on-mouse
handler, since that'll steal mouse focus first.
r = reactor:
init: table: n, o, p end,
on-key:
{(t, _):
t.add-row(t.row({ x: random(100), y: random(200) }, { x: random(100), y: random(200) }, { x: random(100), y: random(200) }))
},
end
r.interact()
@shriram ^
@jpolitz please review; I think this is safe since the original toRepr
call was already in a safeCall
, so this should be stack-safe, but I'm not sure what other interactions might break because of this.
Huh, cool. I can't see this being worse than what we have.
The request is to render the
display
ed version of a Pyret value instead of itsto-repr
rendering. Note that this interacts oddly with mouse handlers and key handlers, since displayed values are interactive but so is a reactor, and keyboard focus can get screwed up. There's also no limit to the size of the window; we might want to impose a maximum size and a overflow: scroll on these...but I don't understand the cssFunction well enough to know how to apply that.Potentially fixes #534