some additions and clarifications
We will look at the code and try to explain what is does.
The dialog is set-up like a normal nasal namespace:
And called (opened) though a menu entry in /Dialogs/extra500-menu.xml just like any other classical menu entry.
This means there needs to be a loaded Class called
failuredialog with an internal function called openDialog.
=== File structure ===
var Failuredialog = FailureClass.new();
Other files used are the .svg files, which are located in the same folder. We will be looking at the MenuFaildialog.svg and GearFaildialog.svg files in this example.
=== openDialog ===
The next function hold all the things we want to do if we open the window.
We are making the window:
me._gfd = MyWindow.new([750,512],"dialog");
In this example we will only look at the "menu" and the "gear" tab. Their names are: me._svg_menu and me._svg_gear respectively.
In the next section all the elements from the individual .svg files are linked, declared and named. This is only necessary for elements which actually do something. Like you want to make it interactive (click on it) or change its color or hide it etc. etc.
So for the menu we have the gear tab which has 3 elements: