I’m trying to develop my first WebDialog.
I used Martin Rinehart’s sample code for the WebDialog HTML page and the Ruby script that calls it, and it works to pass static messages back and forth.
But as soon as I put the [ClickMe!] button inside
<form></form> tags, it stops working and nothing is communicated back to the Ruby console.
I haven’t been able to find a simple example of a WebDialog that uses a form to set parameters for a Tool in Ruby, and wonder where I could find one? Or do I not need to use a form, but just ‘raw’
And I thought I remembered that ThomThom had written some wrapper code to simplify the development of WebDialogs. I have just found a reference to his SKUI code, on GitHub, but it seems very old (refers to SU 6 and says it is still a ‘work in progress’). I’ve also found a reference on this forum that says ‘avoid the skp: protocol’, which is what Martin Rinehart uses. There’s also a tutorial on engineeringtheworld, but again, it is old (2010), and doesn’t use an html form. And tt_su’s Wiki “Web Dialogs, the Lost Manual” is mostly a list of ‘gotchas’ - important, but I haven’t got that far yet.
I’ve tried looking at Jim Foltz’s MoveIt tool, which I saw recommended as a model, but it is large and complex - several hundred lines of code - so it’s difficult to see the essence of it.
Feeling stuck at the moment, and would welcome some pointers to get to the next stage of developing my first WebDialog. Maybe I’m just being dense in not finding recent good examples - is there a simple (preferably written, not video) tutorial that I just haven’t found that someone could point me to?
I’ve designed the web HTML form I want to use, and can get Ruby to open it ready for the user to fill in the form, but I just can’t see how to pass the data back to Ruby at the moment.
And I want Ruby to populate the form with the most recently used values, if that’s possible too.