Book a Demo

Author Topic: Repository.InvokeConstructPicker(): None or Cancel?  (Read 2917 times)

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Repository.InvokeConstructPicker(): None or Cancel?
« on: February 04, 2020, 11:15:05 pm »
Hi all,


Repository.InvokeConstructPicker() allows you to launch an EA-provided dialog to prompt the user to select one or more items from the project's model data, presented in a tree view.

If the user clicks Cancel in this dialog, the method returns 0.

But the dialog's tree view also includes a special "None" node, which allows the user to explicitly select nothing. Selecting this, and clicking OK, also returns 0.

These aren't the same case. If for instance you have a RefGUID tagged value, selecting None means "clear the tag's value" while clicking Cancel means "ignore any selections made in this dialog." The same applies when selecting a Classifier, or any other situation where EA pops this same dialog.

So is there a way to tell these two cases apart when using the API?


/Uffe
My theories are always correct, just apply them to the right reality.