Book a Demo

Author Topic: Addins problems  (Read 4440 times)

lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Addins problems
« on: October 14, 2007, 07:33:29 am »
Hello,
I try to create some addin and I have met the following problems I couldn't overcome:

1)event EA_OnPostNewAttribute is not called for atributes (<<column>>s) of <<table>> class.

2)this event has input parameter Attribute.AttributeID,
but there is only Repository.GetAttributeByGuid method to lookup attributes.
But AttributeID is not the same as AttributeGUID.
How can I look up the attribute being created?

Thank you for any hint

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Addins problems
« Reply #1 on: October 14, 2007, 04:02:34 pm »
You'll probably need to traverse the Attributes collection of the owning table (or element of whatever kind), searching for the attribute. This could be a bit of a pain.

Perhaps you could make a feature request to Sparx on this.
No, you can't have it!

lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Addins problems
« Reply #2 on: October 14, 2007, 09:43:31 pm »
I suppose you answered ad 2)
But this event has only Repository and AttributeID parameters,
so that I have no Element whose attributes I can inspect ...


lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Addins problems
« Reply #3 on: November 20, 2007, 10:33:19 pm »
Info for all interested:

[20.11.2007 sparx support]
We have been able to reproduce both of you issues and have logged these to be fixed in a later release.

Issue ID: 07111442
Description: PostNewAttribute is not broadcast when adding columns to a table stereotyped element

Issue ID: 07111435
Description: Not possible to retrieve Attribute object during OnPostNewAttribute event

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Addins problems
« Reply #4 on: November 21, 2007, 04:04:22 am »
Ouch, and ouch again!

Thanks for taking this to Sparx. This is one that's going to start causing me real grief in the next couple of months. Let's hope that Sparx can solve it in time for EA 7.1.

David
No, you can't have it!