Author Topic: Method Constraints - Major SNAFU?  (Read 495 times)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6264
  • Karma: +104/-89
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Method Constraints - Major SNAFU?
« on: August 17, 2005, 11:56:54 pm »
Classes can have constraints.
Open constraint tab, you can set the expression, add some documentation, set the type (user extensible)  8) 8)
Attributes can have constraints.
Just like Classes - in fact, the dialog looks very similar (but not identical - the status is missing - but that's OK, that's in line with EA's view that attributes can't have status - weird, but consistently wrong)  8)

So there I am, writing the code to emit the attribute metadata.  Done that.
Now I need to write the code to emit the method metadata...

Clone the attribute code, change the names from attribute to method and see how far we get...

Error: method does not have property Constraint. ???

Sure enough!  The UI shows, not a clone of the Constraint tab but two tabs, "Pre" and "Post".  OK, time to send a bug report to Sparx (about minor inconsistency), but should be usable in the mean time...

Look in the Pre tab... There's a type dropdown... Why?  Oh... Maybe they are letting me get access to my additional constraint types (the user extensible ones above)!

Press dropdown - a list of Requirement types appear ??? ???

Consistency, Consistency, Consistency! TM      [size=16]PLEASE![/size]

I put a question mark on the topic since there may be some rationale for this user interface, but I can't find it.  Can anyone enlighten me?


« Last Edit: August 18, 2005, 12:51:01 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
Helsinki Principle Rules!