Can't <BlSpace> addChild: <BlSpartaMozCanvasBuilder>
| canvas space node text | . BlUniverse reset . space := BlSpace new . space show . space title: 'Test Space' . space extent: 800@400 . space root background: Color lightBlue . space position: 1@25 . canvas := BlSpartaMozCanvasBuilder extent: 400@250 . space root addChild: canvas This fails. Any ideas how to create a Sparta Canvas, to draw some text on?
Hi, addChild: expects a BlElement not a canvas. A BlElement draws on a canvas object that is passed to it. SpartaCanvas is an abstract class. If you want to instantiate a canvas, pick one of the subclasses. For example, for MozCanvas, see MozExamples. Cheers, Tudor
On Feb 25, 2019, at 4:55 PM, David Richards <david.i.richards.iii@gmail.com> wrote:
| canvas space node text |
. BlUniverse reset
. space := BlSpace new . space show . space title: 'Test Space' . space extent: 800@400 . space root background: Color lightBlue . space position: 1@25
. canvas := BlSpartaMozCanvasBuilder extent: 400@250
. space root addChild: canvas
This fails.
Any ideas how to create a Sparta Canvas, to draw some text on?
-- www.feenk.com "There are no old things, there are only old ways of looking at them."
participants (2)
-
David Richards -
Tudor Girba