Happy stress free coding

Sep 19, 2008

OCL if statements (object constraint language)

For some reason I have a hard time to remember the syntax of ocl if statements.

Using ECO I frequently feel the need for setting up an expression handle to display stuff differently depending on type, like so:

_diagramsExpressionHandle.Columns[0].Name="Name";

_diagramsExpressionHandle.Columns[0].Expression="if self.ocltype=Diagram then self.oclastype(Diagram).Name else 'State:' endif";

 

Now, at least I will know where to go to find the syntax.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home