Author Topic: This is the only sub forum where I can post...  (Read 8211 times)

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
This is the only sub forum where I can post...
« 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: This is the only sub forum where I can post...
« Reply #1 on: February 15, 2022, 09:19:36 pm »
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

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #2 on: February 15, 2022, 09:26:03 pm »
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.

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #3 on: February 15, 2022, 09:32:39 pm »
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?
« Last Edit: February 15, 2022, 09:36:49 pm by ZuluTen »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #4 on: February 15, 2022, 09:38:32 pm »
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).
« Last Edit: February 15, 2022, 09:40:56 pm by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: This is the only sub forum where I can post...
« Reply #5 on: February 15, 2022, 09:44:31 pm »
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

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #6 on: February 15, 2022, 09:55:11 pm »
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.

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #7 on: February 15, 2022, 10:03:24 pm »
shape Main{
   DrawNativeShape();
   SetCompartmentName("Reference");
   AppendCompartmentText("#TAG:Ref ID#");
   
}

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: This is the only sub forum where I can post...
« Reply #8 on: February 15, 2022, 10:12:47 pm »
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

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #9 on: February 15, 2022, 10:51:26 pm »
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.


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #10 on: February 16, 2022, 03:19:30 am »
IIRC the SetCName must be inside the compartment shape, not the main shape.

q.

P.S. I found this example in my book:
Code: [Select]
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...
}
« Last Edit: February 16, 2022, 03:22:24 am by qwerty »

ZuluTen

  • EA User
  • **
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #11 on: February 16, 2022, 05:15:47 am »
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#");
   }

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: This is the only sub forum where I can post...
« Reply #12 on: February 16, 2022, 06:01:54 am »
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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #13 on: February 16, 2022, 09:57:34 am »
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.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: This is the only sub forum where I can post...
« Reply #14 on: February 17, 2022, 08:15:15 am »
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
The Sparx Team
[email protected]