Basic Dialog Example? Where? Set the name of a created object. [message #1829261] |
Mon, 29 June 2020 19:21 |
Brandon Lewis Messages: 268 Registered: May 2012 |
Senior Member |
|
|
I'm trying to find a very basic example of using a dialog. I have a node creation tool, and I'd like to pop a dialog up to allow the user to edit the name of the node before creating it.
I found an 11 second video on youtube for Sirius 5.0 that appears to do exactly this with the Family tutorial. I got very excited. Alas, there was no documentation and it just has a link to https://www.eclipse.org/sirius/ and I can't find any docs on dialogs other than two very brief paragraphs that mention "let" for setting a variable.
I can't find an example of a dialog in the Family tutorial that matches the video. The current family tutorial "cheats" and calculates the name for you without an intervention dialog.
I just need a basic example of figuring out how to get the value of a text field and use that variable/value in a set command on my model.
Seems easy, but I can't seem to get it right.
An easy example -> What's the "weird" thing I have to type in the set command to access a text field in my dialog?
[Updated on: Tue, 30 June 2020 03:52] Report message to a moderator
|
|
|
|
|
Re: Basic Dialog Example? Where? Set the name of a created object. [message #1829479 is a reply to message #1829478] |
Sat, 04 July 2020 16:14 |
Brandon Lewis Messages: 268 Registered: May 2012 |
Senior Member |
|
|
When I set name, I want the Value Expression of the set operation to be = "the value of the NameTextField" - but I can't figure out how to express that? What do I type in the Value Expression field to obtain the value of the NameFieldField Text object of the dialog I have created?
I put var: and try to auto-complete and it doesn't suggest anything to do with the dialog I'm within.
I don't think the Text field itself is the entity responsible for setting the name. I think the OK operation should do the setting. Have I got that wrong/
[Updated on: Sat, 04 July 2020 16:15] Report message to a moderator
|
|
|
Re: Basic Dialog Example? Where? Set the name of a created object. [message #1829675 is a reply to message #1829479] |
Wed, 08 July 2020 14:39 |
|
Hello Brandon,
You must use a Create Instance and add a dialog in the Create Instance operation and not the inverse.
I put screenshots to explain you how to do what do you want to do.
To answer your question you must use the variable newValue corresponding to text set by the user in the dialog.
Don't hésitate if you have any questions.
Regards,
-
Attachment: ManPage.png
(Size: 23.54KB, Downloaded 137 times) -
Attachment: ManGroup.png
(Size: 20.61KB, Downloaded 129 times) -
Attachment: Name.png
(Size: 17.69KB, Downloaded 130 times) -
Attachment: SetName.png
(Size: 16.58KB, Downloaded 141 times)
|
|
|
Powered by
FUDForum. Page generated in 0.01896 seconds