Sample Local application

Fat Client MVVM
Sample fat client (view it on github)


 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
function main(app, args /* CUSTOM ARGUMENTS */)
{
    var myContainer = app.create("container");
    myContainer.setParent( args["my_cnt"] );
 
    var myTxt = app.create("textfield", myContainer);
    myTxt.Text = "This is a Textfield";
 
    var myButton = app.create("button", myContainer);
    myButton.Caption = "Caption";
    myButton.Width = 123;
    myButton.Height = 22;
    myButton.on("click", function()
        {
            myTxt.Text = "Click!";
        });
 
    var myTabber = app.create("tabber", myContainer);
    var myTab1 = app.create("tab", myTabber);
    myTab1.Caption = "Tab 1";
 
    var myTab2 = app.create("tab", myTabber);
    myTab2.Caption = "Tab 2";
 
    var myButton2 = app.create("button", myTab1);
    myButton2.Caption = "Btn in tab1";
    myButton2.on("click", function()
        {
            /* ... */
        });
}
 
/* mirrorJS.app.local( ( ,  ), ,  ); */
var myApp = new mirrorJS.app.local(
                new mirrorJS.ui.connectors.local( "html" /*, loopback */ ),
                main,
                {
                    /* CONF */
                    "widgets":
                        {
                            "prefixID" : "mjd_"
                        },
                    "args":
                        {
                            /* CUSTOM ARGS */
                        },
                    "events":
                        {
                            "onClose": function(app)
                            {
                                /* ... */
                            }
                        }
                });

Leave a Reply

Your email address will not be published. Required fields are marked *