add-line and add-dotted-line are imcompatible

add-line and add-dotted-line seem to be incompatible with each other. If I use add-line first, then all lines I draw are solid lines, regardless of whether I use add-dotted-line or specify my own style with the "with-style" keyword. Likewise, if my first line is a dotted line, then all subsequent lines are dotted, even if they should be solid.

Here's a simple code example.


@use PhysicalControl.
@use Mobile.
Controller Visualize.


PhysicalControl : Visualize {
+ variables:
nodes (list).
node-shape (object).


+ to init:
node-shape = (new Sphere init-with radius 0.3).
nodes = {new VisualNode, new VisualNode, new VisualNode}.
nodes{0} move to (-5,5,0).
nodes{1} move to (5,5,0).
nodes{2} move to (-5,-5,0).
nodes{2} add-dotted-line to nodes{1}.
nodes{0} add-line to nodes{1}.


+ to get-node-shape:
return node-shape.
}


Mobile : VisualNode {
+ to init:
self set-shape to (controller get-node-shape).
}

PS. only on some systems

After running this same code on a windows machine, I realized that this error only happens on some systems. For me, the error occurred on an Ubuntu system, but it's a weird Ubuntu variant maintained only by my University, so outside help is unlikely to be forthcoming.

That being said, here are some warning messages I get every time I run breve on these Linux systems. These errors may be completely unrelated to the problem I'm describing, but here they are:

PaHost_OpenStream: could not open /dev/dsp for O_WRONLY
PaHost_OpenStream: ERROR - result = -10000
warning: could not new open sound stream, audio will not be enabled (Host error.)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.