Author Topic: InvokeConstructPicker limited to 6 selections?  (Read 4588 times)

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
InvokeConstructPicker limited to 6 selections?
« on: November 30, 2023, 03:35:22 am »
EA 16.1.1627 - 64 bit

Hello,
in an attempt to mitigate the RefGUIDList limit of 6 elements I'm currently looking into the AddinBroadcast topic.
My EA_OnElementTagEdit() function invokes InvokeConstructPicker("IncludedTypes=DataType;MultiSelect=True;") and I'm able to select up to 6 DataTypes in the dialog.
But why only 6?
Did Sparx put the limit into the function because of the RefGUIDList limit?
How to resolve this issue?
Thanks for any pointers!

Michael
« Last Edit: November 30, 2023, 08:58:30 pm by MichPaule »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #1 on: November 30, 2023, 10:45:52 pm »
Send a feature request - but hope for nothing.

q

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #2 on: December 01, 2023, 08:12:52 am »
It goes into a field with a length of 255 characters. 7 x 38 is 266.

The recommendation is to use multiple RefGUID tags.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #3 on: December 01, 2023, 09:44:37 pm »
Good reason to have 255 byte field limits in times when laptops only have terabyte disks.

q.

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #4 on: December 02, 2023, 01:53:24 am »
It goes into a field with a length of 255 characters. 7 x 38 is 266.
Of course the DB field is limited to 255 bytes.
But I'm talking about the InvokeConstructPicker() implementation.
Is there also some internal limit of 255 bytes?
Or did you just limit the selection in order to keep the DB happy?

The recommendation is to use multiple RefGUID tags.
My scenario would require literally hundreds of RefGUID tags.
Most of them would be empty but just in case someone wants to add multiple references I would have to provide the space.
Not the way I'd like to go...
Or did I miss your point?

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #5 on: December 04, 2023, 08:43:29 am »
Yes, you missed my point.

You can use the tagged values window to add a new "value" associated with a profile property. You only need to define the same number of properties as you would have for RefGuidList.

For the record, that recommendation isn't because of the field length limitation. It's about indexing on the value of the property to allow functionality like the traceability window to find tagged values referencing your current selection. It's not practical to do that in a non-trivial model for a RefGuidList.

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #6 on: December 04, 2023, 09:22:56 pm »
Thanks for the clarification, Eve.
I think I got it now and it would be a completely new approach:
  • Replace the limited RefGUIDList with multiple RefGUID tags.
  • Pull them into the profile's Properties using your technique.
  • Find ways to add/remove RefGUID elements (via AddinBroadcast?)
I like the challenges EA raises...  8)

MichPaule

  • EA User
  • **
  • Posts: 65
  • Karma: +0/-0
    • View Profile
Re: InvokeConstructPicker limited to 6 selections?
« Reply #7 on: March 17, 2025, 07:16:07 pm »
Thanks for the clarification, Eve.
I think I got it now and it would be a completely new approach:
  • Replace the limited RefGUIDList with multiple RefGUID tags.
  • Pull them into the profile's Properties using your technique.
  • Find ways to add/remove RefGUID elements (via AddinBroadcast?)
I like the challenges EA raises...  8)
Ok, as a final summary to the readers I have taken the challenge and after a lot of struggling managed to replace the RefGUIDList with multiple RefGUID tags.
Using EA_OnNotifyContextItemModified() the GUID of the tags will be adjusted after creation.
Deleting a property is done in the built-in Tagged Values... dialog by selecting <none> for it and let the following EA_OnNotifyContextItemModified() callback remove the now empty RefGUID tag.
The key was to let the EA_OnNotifyContextItemModified() callback do all the housekeeping around the tags.
Unfortunately there is now a tight coupling between the profile containing the RefGUID tags and the EA_OnNotifyContextItemModified() code.
I wish this would not be the case but haven't found a solution. :(
But anyways: The RefGUIDList limit now is gone!