I've been studying the snap2 code and this is how I think it works:peebee wrote:...
Made the changes you suggested - did not change behaviour on Upup Precise 54x4......still warning and not possible to select tab#1
...
There's a big while loop at line 249 which looks as though it envelopes the entire application and this is used to restart it. When the main dialog exits, its output is evaluated and if you haven't supplied some necessary information then you'll get a warning in a message box, a variable called maintab will be set to something and then it goes back to the top of the while loop and runs again which will present the tab associated with the widget that you must enter data into.
You should see the main dialog first (line 659), then the message box (line 1288) and then the main dialog restarts showing the BACKUP STORAGE tab. Well, that's under normal operation if the conditions are met at line 1286 -- $dst = "none" or $dst = "". So, you're seeing the message box first, then the main dialog showing the BACKUP STORAGE tab (#2), then you click the DIRECTORIES TO BACK UP tab (#1) which causes the same message box to reappear (is the main dialog still open now or not?).
I'm going to guess that the execution of the main dialog at line 659 initially falied, but you can't tell because all of the output is being captured in a variable, evaluated and then discarded and because it didn't run, there's no valid output to evaluate so $dst = "none" or $dst = "" causes the messsage box to appear. Then we go back to the top of the while loop and do it again but this time the main dialog does appear and then I don't know after that. There's a possibility that something on the DIRECTORIES TO BACK UP tab (#1) is causing it to crash but this isn't activated when the application restarts showing the BACKUP STORAGE tab (#2) which is why you can see it. Sherlock Holmes: eat my deerstalker
I recommend that above the code that invokes the main dialog (line 659) you should simply try $GTKDIALOG --program=MAIN_DIALOG; exit and then dump the output here. You'll want to put this underneath the debugging message #echo "$MAIN_DIALOG" which is at line 655.
Regards,
Thunor