Hi Marco, that's a nice version!
To make a version that would do a preview, you would need to remove the current WaitForDialogDone() event loop at the top of the function and instead make your own event loop (look inside WaitForDialogDone.js for an example), and when any of your UI controls triggers an event you'd need to call factory.cancel() on any factories that you have created.
You would probably want to restructure the code to do that, like keep a list of current factories in a global variable, and move the object generation code into its own separate function so you can call it more easily from different locations because you'll also want to generate things before you go into the event loop so that the use sees the initial result using the initial default values.
- Michael
|