Hola,
in part of the code of LRP I work with arrows, and I need to get the shape, but this triggers a DNU. I guess I need to set something on the arrow before I can get the element, or get it via another route. What should I do?
Relevant code below:
arrow := RTArrowedLine new color: trans color; edgeFrom: efrom to: eto; withOffsetIfMultiple. element := arrow element.
Gives me:
RTElement(Object)>>doesNotUnderstand: #to RTShorterDistanceWithOffsetAttachPoint(RTAbstractShorterDistanceAttachPoint)>>basicStartingPointOf: RTShorterDistanceWithOffsetAttachPoint>>basicStartingPointOf: RTShorterDistanceWithOffsetAttachPoint(RTAttachPoint)>>startingPointOf: RTLine(RTAbstractLine)>>updateFor:trachelShape: RTLine(RTShape)>>trachelShapeFor: RTArrowedLine>>trachelShapeFor: RTElement(RTShapedObject)>>addShape: RTArrowedLine(RTShape)>>element LRPProgramVisualization>>buildTransition:withElements:forView:
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
element := arrow element.
This is very odd line, why do you do this? You don't ask line shapes for elements, because they have none, they are edges.
Didn't you mean to write this instead?
arrow := RTArrowedLine new color: trans color; withOffsetIfMultiple. edge := arrow edgeFrom: efrom to: eto.
Gives me:
RTElement(Object)>>doesNotUnderstand: #to
RTShorterDistanceWithOffsetAttachPoint(RTAbstractShorterDistanceAttachPoint)>>basicStartingPointOf: RTShorterDistanceWithOffsetAttachPoint>>basicStartingPointOf: RTShorterDistanceWithOffsetAttachPoint(RTAttachPoint)>>startingPointOf: RTLine(RTAbstractLine)>>updateFor:trachelShape: RTLine(RTShape)>>trachelShapeFor: RTArrowedLine>>trachelShapeFor: RTElement(RTShapedObject)>>addShape: RTArrowedLine(RTShape)>>element LRPProgramVisualization>>buildTransition:withElements:forView:
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Moose-dev mailing list Moose-dev@list.inf.unibe.ch https://www.list.inf.unibe.ch/listinfo/moose-dev
On Mar 9, 2016, at 16:54, Peter Uhnák i.uhnak@gmail.com wrote:
element := arrow element.
This is very odd line, why do you do this? You don't ask line shapes for elements, because they have none, they are edges.
Didn't you mean to write this instead?
arrow := RTArrowedLine new color: trans color; withOffsetIfMultiple. edge := arrow edgeFrom: efrom to: eto.
I needed to do a when: TRMouseClick do: on the element, plus keep it around for later reference. But the edge seems to work equally well, so that’s great, thanks! :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Yes it does
Hi Johan,
I have improved the error message.
Alexandre