I am trying to launch a dialog window from an
If I click the reload button again I can see that it attempts to open the file matching the string I passed in on the previous attempt. Any ideas why it does not take the filename I pass in the first time round?
showing 5 of 6
show 1 more comments
|
I don't think this is a bug. The I think the right way to code this in Lua is to put the rest of the logic that is currently after
|
I guess, we would need more of your code to recreate the problem.
Essentially all you need to do is invoke a new dialog from within a button function. You can see above that aw:add_button calls reloadApList when the button is clicked. In reloadApList I call new_dialog with an inline function to assign the string to a local variable (not shown in code snippet).
The dialog box launches, but the message call after the new_dialog prints the filename from the previous button click.
I hope that helps..
can you please test the following code and post the output of message() here?
This is the output in the console
The first log entry appeared when I clicked the button. The second and third appeared after I entered a string and clicked OK.
Note that test.csv does not exist and I was expecting the assert on io.open to detect that.
The assert came when I clicked the button for a second time. It looks like the code after the new_dialog executes before the dialog is closed.
strange thing... please file a bug report at https://bugs.wireshark.org