Sparx Systems Forum
Enterprise Architect => Bugs and Issues => Topic started by: ZuluTen on February 15, 2022, 08:57:30 pm
-
This is about a bug on this Board rather than in EA:
Whenever I try to post in the Automation Interface, Add-Ins and Tools sub-forum I receive this message:
"Database Error
Please try again. If you come back to this error screen, report the error to an administrator."
Unfortunately I can't see a means of contacting an admin, so am posting here.
Does anyone know why, after 40+ posts in the past, I am apparently barred?
Thanks
-
It's probably has more to do with the content than with permissions.
Did you by any chance try to post a "special" character?
Even a guillemet (the "<<" character used in stereotypes) apparently causes issues these days
Geert
-
Thanks for the suggestion.
My next post to this sub-forum will be my original question, in its original form, so let's see what happens.
If there isn't a next post then, yes, it's content related.
-
Yes, you're right it's content related, but the only characters were
apostrophe '
inverted commas "
semi-colon ;
full colon:
hyphen -
hash #
brackets ()
square brackets []
curved brackets {}
So why did it get upset, and just out of interest, how did you manage to include guillemets?
...and why has it permitted me to post this message, but refused my original?
-
You're not the only one having complained about that issue. They (boldly spoken) fucked it up some time ago. Pretty sure I was posting any UTF char in the former past without issues. But now it croaks. Maybe they changed the underlying database of this forum? How knows? But nobody took care so far.
q.
P.S. Even some user names where migled (I remember one from Poland or Czech whose name now looks like someone smashed a keyboard when typing).
-
Yes, you're right it's content related, but the only characters were
apostrophe '
inverted commas "
semi-colon ;
full colon:
hyphen -
hash #
brackets ()
square brackets []
So why did it get upset, and just out of interest, how did you manage to include guillemets?
...and why has it permitted me to post this message, but refused my original?
It depends. If you copy single or double quotes from something like Word, you get these "smart quotes" who are a bit curled.
These are not standard ASCII characters and pose a problem these days.
For hyphens, the same thing. There are many characters that look like a hyphen. Word tends to automatically replace some of these to non ASCII characters.
Geert
PS. I'm not able to post the "real" guillement, I get the same database error if I try. If you ever want to type it, you can do that with the combination ALT+174 and ALT+175
-
Ah...interesting.
So I have tried to sterilise my post by going through MS Notepad but still have same problem.
I'll now summarise my question by typing direct into here:
I have a custom MDG stereotype element which has ten tagged values.
On a diagram, to declutter, I would like to see only one of the values whose name is Ref ID.
I have used a shape script to define a procedure called Main and in there are two instructions to set compartment name and then append compartment text. Oh and a draw native shape.
Unfortunately I can not see my tagged value.
If I change the name of main to child element, then I see the tagged value for the associated children, so I am confident that the code is picking up the correct value.
Have I missed something obvious about why the shape script is not picking up the value of its own tagged value?
Many thanks.
-
shape Main{
DrawNativeShape();
SetCompartmentName("Reference");
AppendCompartmentText("#TAG:Ref ID#");
}
-
There was something that when you add a compartment, it then becomes available in the list of compartments when you use the context menu option Compartment Visibility (or on in the diagram properties)
I believe you have to set it to be visible before you can actually see it (or something like that)
Geert
-
Thank you, but sadly that doesn't work: the name of my new compartment isn't visible amongst the 'Show Element Compartments' list in the Compartment Visibility window for a newly created element.
Also, when I altered my shape script to call up the tagged values for child elements, I saw the results immediately, without having to modify visibility settings, so suspect that there's something else going on.
-
IIRC the SetCName must be inside the compartment shape, not the main shape.
q.
P.S. I found this example in my book:
shape ChildElement { // add Child Compartments to the parent.
if(HasProperty("stereotype", "part")) {
SetCompartmentName("Parts");
}
else if(HasProperty("stereotype", "mystereotype")) {
SetCompartmentName("My Stereotype");
}
AppendCompartmentText("#NAMe#"); // case insensitive...
}
-
Yes, your book is exactly where I started, and tested out an amended version of your script which works perfectly for those elements which have children, and can return the 'Ref ID' Tagged Value of any child element.
Unfortunately, when the code is run as main, so that the element shape script is looking at its own Tagged Value, nothing happens.
So this works:
shape ChildElement{
DrawNativeShape();
SetCompartmentName("Reference");
AppendCompartmentText("#TAG:Ref ID#");
}
...but isn't what I want, whereas this doesn't:
shape Main{
DrawNativeShape();
SetCompartmentName("Reference");
AppendCompartmentText("#TAG:Ref ID#");
}
-
I don't think you can add a compartment to the main shape like that.
But you don't necesarrily need a compartment to print tagged values.
You can add a simple rectangle as well and then print the tagged values there.
It won't expand automatically with the number of tagged values printed, but it might just be enough for your needs
Geert
-
Unfortunately, when the code is run as main, so that the element shape script is looking at its own Tagged Value, nothing happens.
Won't work. The shape is executed from EA for each sub-element of a class.
q.
-
Unfortunately, when the code is run as main, so that the element shape script is looking at its own Tagged Value, nothing happens.
Won't work. The shape is executed from EA for each sub-element of a class.
q.
Correct, you can't loop through tagged values in a shape script
-
Thanks Gentlemen.
Time for Plan B...