Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: phdare 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.
-
One of the
- EA_OnAttributeTagEdit
- EA_OnConnectorTagEdit
- EA_OnElementTagEdit
- EA_OnMethodTagEdit
Should fire. If not you should report a bug (http://www.sparxsystems.com/support/bug_report.html)
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
-
Hi Geert,
None of these broadcast events are called. I reported a bug for this issue.
Thank for your suggestion, I will try it.
-
Geert, did you even read the description of those functions?
EA_OnAttributeTagEdit is called when the user clicks the ellipsis ( ... ) button for a Tagged Value of type AddinBroadcast on an attribute.
-
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.
-
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
-
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, did you even read the description of those functions?
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 (http://www.sparxsystems.com/support/feature_request.html) I guess, because an event to tell us when a tagged values has been modified would really be useful.
Geert
-
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
-
- 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
-
Yep, 200 (maybe more) for each elements. Til now, I haven't seen any problem related to numbers of tagged values per element.
Hiep
-
[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
-
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