Hi,
I would like to write a Dplot "generate" plugin that queries the user for three numerical values. It would seem that this is potentially possible but would require the DLL to spawn a window with controls such as buttons and input fields and all that. Has anyone ever done this? If so, is there an example out there? Or is there an easier way?
Thanks!
User input in a plugin?
Moderator: DPlotAdmin
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
Several of the generate plugins distributed with DPlot display dialog boxes and take user input. The "Moving Average" plugin is probably the simplest. If you'd like I'll be happy to post the source where you can get it.
Visualize Your Data
support@dplot.com
support@dplot.com
- DPlotAdmin
- Posts: 2312
- Joined: Tue Jun 24, 2003 9:34 pm
- Location: Vicksburg, Mississippi
- Contact:
I'll be happy to help if you have a hard time with this. For old-timers using archaic programming languages as I do there really isn't anything magic about it. But if you're accustomed to, for example, VB then the dialog procedure may look like spaghetti.
Other than that, the only real gotcha is explained in the post you've already found: returning with an error due to insufficient array sizes, whereupon DPlot will adjust the arrays and call your plugin again. At that point (in most cases) you wouldn't want to again display your dialog box. The solution is a little convoluted but works.
Again, don't hesitate to ask if you have problems. I'll be happy to help if I can.
Other than that, the only real gotcha is explained in the post you've already found: returning with an error due to insufficient array sizes, whereupon DPlot will adjust the arrays and call your plugin again. At that point (in most cases) you wouldn't want to again display your dialog box. The solution is a little convoluted but works.
Again, don't hesitate to ask if you have problems. I'll be happy to help if I can.
Visualize Your Data
support@dplot.com
support@dplot.com