Author Topic: Detect change of tagged value (Type=Memo)  (Read 9320 times)

phdare

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Detect change of tagged value (Type=Memo)
« on: December 10, 2015, 04:36:05 pm »
Hi all,
I use tagged value to store large string value (more than 255 characters in length), tagged value type is 'Memo'.
However, when I change these values it doesn't fire any broadcast events. Is it possible to detect changes of tagged values (in this case Type=Memo) immediately after their values are changed?

Thank you in advance.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Detect change of tagged value (Type=Memo)
« Reply #1 on: December 10, 2015, 06:00:48 pm »
One of the
  • EA_OnAttributeTagEdit
  • EA_OnConnectorTagEdit
  • EA_OnElementTagEdit
  • EA_OnMethodTagEdit
Should fire. If not you should report a bug

In the mean time you could get by using the context events. If something is in context you store it in a variable.
If something else is selected then you look at the previous context element and check if anything changed.

Geert

phdare

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #2 on: December 10, 2015, 07:34:27 pm »
Hi Geert,
None of these broadcast events are called. I reported a bug for this issue.
Thank for your suggestion, I will try it.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #3 on: December 11, 2015, 08:31:38 am »
Geert, did you even read the description of those functions?

Quote
EA_OnAttributeTagEdit is called when the user clicks the ellipsis ( ... ) button for a Tagged Value of type AddinBroadcast on an attribute.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #4 on: December 11, 2015, 09:00:20 am »
Probably he didn't (like me). But there is some kind of intentional idea you get when seeing a method named EA_OnAttributeTagEdit which whispers "It will be called on modification and memo is part of that". Yuck.

q.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #5 on: December 11, 2015, 11:36:18 am »
Quote
Probably he didn't (like me). But there is some kind of intentional idea you get when seeing a method named EA_OnAttributeTagEdit which whispers "It will be called on modification and memo is part of that". Yuck.

q.
However (at least in English), that idea is not correct.  The OP was looking for (something like): EA_OnAttributeTagModified or EA_OnAttributeTagChanged (or even,, at a pinch: EA_OnAttributeTagEdited)

EA_OnAttributeTagEdit is a valid name for the intended purpose.

However, since most native English speakers (as I suppose are all native speakers of their own tongue) tend to be rather sloppy in their use; you are excused for making the (relatively) reasonable but (unfortunately) incorrect assumption.  :-*

"Helsinki" Rules!

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Glassboy

  • EA Practitioner
  • ***
  • Posts: 1367
  • Karma: +112/-75
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #6 on: December 11, 2015, 12:27:47 pm »
Quote
However, since most native English speakers (as I suppose are all native speakers of their own tongue) tend to be rather sloppy in their use; you are excused for making the (relatively) reasonable but (unfortunately) incorrect assumption.  :-*

"Helsinki" Rules!

Paolo

It would also be an incorrect assumption to assume there is one globally consistant English language.

My dialect for example contains compound words where one of the words is a loan word from another language.  In one example, the loan word is a homonym for the word for a common English food type.  Which makes any sentence containing the compound word confusing for a speaker of another dialect.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Detect change of tagged value (Type=Memo)
« Reply #7 on: December 11, 2015, 02:39:05 pm »
Quote
Geert, did you even read the description of those functions?

Quote
EA_OnAttributeTagEdit is called when the user clicks the ellipsis ( ... ) button for a Tagged Value of type AddinBroadcast on an attribute.
No, I did not RTFM :-[

So instead of sending a bug report the OP should send a Feature Request I guess, because an event to tell us when a tagged values has been modified would really be useful.

Geert

phdare

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #8 on: December 11, 2015, 05:41:00 pm »
Sparx Team has rejected the defect  :(.
- In client project, Sparx EA element has about 200 tagged values so it seems to be not effective for getting all these tagged values to check if anything.
- I will change the Tagged Value Type to "AddinBroadcast" and develop new 'Tagged Value Note' dialog for editing them. I will handle EA_OnElementTagEdit event to update tagged value and its parent element.
Hiep

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Detect change of tagged value (Type=Memo)
« Reply #9 on: December 11, 2015, 05:52:30 pm »
Quote

- In client project, Sparx EA element has about 200 tagged values so it seems to be not effective for getting all these tagged values to check if anything.
Do you mean 200 tagged values for a single element!?
That feels like much more then it was ever intended for.

Geert

phdare

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #10 on: December 11, 2015, 05:59:22 pm »
Yep, 200 (maybe more) for each elements. Til now, I haven't seen any problem related to numbers of tagged values per element.
Hiep

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Detect change of tagged value (Type=Memo)
« Reply #11 on: December 11, 2015, 06:51:12 pm »
Quote
[SNIP]
It would also be an incorrect assumption to assume there is one globally consistant English language.

My dialect for example contains compound words where one of the words is a loan word from another language.  In one example, the loan word is a homonym for the word for a common English food type.  Which makes any sentence containing the compound word confusing for a speaker of another dialect.
I was trying NOT to make any assumptions.  I DO know that there is NO globally consistent English.

Paolo
« Last Edit: December 11, 2015, 06:51:50 pm by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Detect change of tagged value (Type=Memo)
« Reply #12 on: December 11, 2015, 07:18:09 pm »
Quote
Yep, 200 (maybe more) for each elements. Til now, I haven't seen any problem related to numbers of tagged values per element.
Hiep
Wow :o

Geert