Roassal DNU getting the element from an RTArrowedLine

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Roassal DNU getting the element from an RTArrowedLine

jfabry
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

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal DNU getting the element from an RTArrowedLine

Peter Uhnak
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
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal DNU getting the element from an RTArrowedLine

jfabry

On Mar 9, 2016, at 16:54, Peter Uhnák <[hidden email]> 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


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal DNU getting the element from an RTArrowedLine

abergel
In reply to this post by jfabry
Hi Johan,

I have improved the error message. 

Alexandre
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Mar 9, 2016, at 4:18 PM, Johan Fabry <[hidden email]> wrote:

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

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Roassal DNU getting the element from an RTArrowedLine

abergel
In reply to this post by jfabry
Yes it does
-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



On Mar 9, 2016, at 5:50 PM, Johan Fabry <[hidden email]> wrote:

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! :-)


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev