Author Topic: How to access method's Behaviour/InitialCode?  (Read 4467 times)

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
How to access method's Behaviour/InitialCode?
« on: June 28, 2007, 12:29:37 pm »
Hi,

I need to access a method's Initial Code (to write down my check constraint code there). Does anybody have an idea how to do that via Automation?

I tried to fill Behaviour / Initial Code of a method manually in EA with "xxx" and then tried to print out various method values but the "xxx" value never appeared.
For example myMethod.getBehaviour() returns just an empty string "".

Isn't there another way of setting check constraint code?
Radek

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: How to access method's Behaviour/InitialCode?
« Reply #1 on: June 28, 2007, 04:25:35 pm »
I have not tried this, but see what you get from the Default() property.
No, you can't have it!

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: How to access method's Behaviour/InitialCode?
« Reply #2 on: June 28, 2007, 06:08:42 pm »
Try myMethod.getCode().

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
Re: How to access method's Behaviour/InitialCode?
« Reply #3 on: June 29, 2007, 04:14:09 am »
Oh yeah, that's it :-)
Thanks a lot.

However, I'm rather confused that the solution is to access an attribute (i.e. Code) which shouldn't have been used so far (according to EA help file), nevertheless it works. :-)

By the way, wouldn't it be easier for users and more comfortable for you, the EA administrators, if Sparx released a kind of more detailed documentation to Automation Interface? We wouldn't bother you with thousands of quite simple problems (simple for you)...
Radek

thomaskilian

  • Guest
Re: How to access method's Behaviour/InitialCode?
« Reply #4 on: June 29, 2007, 05:47:24 am »
 ;D Join us in waiting for that. It has improved a bit. However, navigating in the help for needed information is still a nightmare. There is an EA model of EA somewhere on the EA Users Group site...

chrvi

  • EA User
  • **
  • Posts: 75
  • Karma: +0/-0
  • There are so many hidden features...
    • View Profile
Re: How to access method's Behaviour/InitialCode?
« Reply #5 on: July 13, 2007, 11:21:26 am »
I don't mind navigating in the help file but I'm missing a lot of stuff there.
The most I'm disappointed with partial info such as Package.Flags: "Extended information about package"
Then you can only try to find out what useful info can be stored in such object...
Radek