I get that I can post dialogs/forms from a menu, and can manage my application by starting with a menu item, it runs until it stops/succeeds, then I can use another menu item to post a dialog to put in input and then run the program again with the same or different menu item.
But can you post a dialog from within a running predicate? This would allow the program to pause while it waits for input then the OK button could resume where it stopped.
I don't see anything about this in the tutorial, and I'm guessing it doesn't work that way, but I wanted to ask.
-
- VIP Member
- Posts: 1468
- Joined: 28 Feb 2000 0:01
Re: Call dialog from predicate?
You can show a dialog from any part of your code.
But usually it is a bad idea to "block" the program and ask for input (using a modal dialog).
Have you read Dialogs and Forms and looked at Dialogs and Forms: Modeless dialogs example.
Code: Select all
D = myDialog::display(applicationWindow::get(), .......),
Have you read Dialogs and Forms and looked at Dialogs and Forms: Modeless dialogs example.
Regards Thomas Linder Puls
PDC
PDC
-
- VIP Member
- Posts: 459
- Joined: 5 Nov 2000 0:01
Re: Call dialog from predicate?
The 'continueDialog' project referenced in the Dialogs and Forms: Modeless dialogs example
( http://discuss.visual-prolog.com/viewtopic.php?t=8218 ) uses an older VP syntax and could pose some challenges to people new to VP. I have attached a tweaked version that compiles smoothly with Vip9x.
( http://discuss.visual-prolog.com/viewtopic.php?t=8218 ) uses an older VP syntax and could pose some challenges to people new to VP. I have attached a tweaked version that compiles smoothly with Vip9x.
You do not have the required permissions to view the files attached to this post.