|
Re: common understand, let blocks [message #689881 is a reply to message #689674] |
Tue, 28 June 2011 14:36   |
|
Hi,
In Acceleo, the "let x : Type = something" block is strickly equals to "if (something instanceof Type) {Type x = (Type)something;". SO in your case, "node.outgoing.target" is not an instance of TargetString. I believe that outgoint or target is null. You can test it with something like this:
[template public next (node : ActivityNode) post (trim())]
node.outgoing = null: [node.oclIsUndefined()/]
node.outgoing = null: [node.outgoing.oclIsUndefined()/]
node.outgoing.target = null: [node.outgoing.targetoclIsUndefined()/]
[/template]
You could also use the Acceleo debugger with a well placed breakpoint to examine the state of the variables.
Regards,
Stephane Begaudeau, Obeo
--
Twitter: @sbegaudeau
Blog: http://stephanebegaudeau.tumblr.com
Acceleo Documentation: http://docs.obeonetwork.com/acceleo
|
|
|
|
Powered by
FUDForum. Page generated in 0.01948 seconds