Book a Demo

Author Topic: CallBehavior  (Read 4174 times)

nike_tv

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
CallBehavior
« on: August 19, 2008, 12:28:08 am »
How I can learn, whether there is property CallBehavior at an element of type Action?

In advance thanks. :-/

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: CallBehavior
« Reply #1 on: August 19, 2008, 01:59:58 am »
Look up Action Notation in EA help. There is a "kind" attribute, which is set from a drop-down list. You can see the list by right-clicking the Action and selecting Advanced | Custom Properties from the context menu.

After setting the kind attribute to CallBehavior you will be presented with a dialog from which you can choose the behavior element.

Try this, then save the results. Having done that you can inspect the resulting database to figure out where everything is stored. The above information should provide you with the clues you need.

HTH, David
No, you can't have it!

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: CallBehavior
« Reply #2 on: August 19, 2008, 12:57:31 pm »
Use the CustomProperties property of Element

http://www.sparxsystems.com/EAUserGuide/index.html?customproperties.htm

to retrieve the "kind" property.

Sort of took David's idea, but used [Export to XMI] to discover where they'd hidden the data.

Jim

nike_tv

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: CallBehavior
« Reply #3 on: August 19, 2008, 07:14:19 pm »
Thank you.

t_xref.description  

But I did not understand how to get access through property Element

jkorman

  • EA User
  • **
  • Posts: 99
  • Karma: +0/-0
    • View Profile
Re: CallBehavior
« Reply #4 on: August 20, 2008, 04:20:16 am »
Assuming an element of type Element from a package

Code: [Select]
Element element = ...

CustomProperty property = element.CustomProperties.GetAt(n)


Where n is the index of the "kind" property.

You can't access an item in a Collection of CustomProperties using GetByName  :'(

Jim
« Last Edit: August 20, 2008, 04:22:32 am by jkorman »

nike_tv

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: CallBehavior
« Reply #5 on: August 20, 2008, 04:56:22 pm »
Thank you.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: CallBehavior
« Reply #6 on: August 20, 2008, 11:31:09 pm »
Depending on the language you are using, make sure that the index variable is a short (16-bit) integer. With some environments this does not seem to matter to EA, but with others it will complain or produce unexpected results.

David
No, you can't have it!