{
if (this.tokens[0].data == 'Pman.on') {
- // then it's a layout style..
-
- //Seed.quit();
-
-
- //console.dump(this.tokens);
- // the list of statements inside of function..?
-
-
- var stmts = this.tokens[1].items[1][2].items;
-
- // look for register..
- var topp = false;
- stmts.map( function(s, i) {
- if (s[0].data == 'Pman.register') {
- topp = brace = s[1].items[0][0].props;
- }
- });
- if (!topp) {
- console.dump(this.tokens);
- throw "could not find top props...";
-
- }
-
- this.cfg = this.parseProps(topp);
- this.cfg.name = this.tokens[3].data;
-
-
- // ( { add { this.panel ( {
- var cfg = this.tokens[7].items[0][0].props.add.val[2].items[2][3].items[0][0].props;
- this.cfg.items = [ this.parseProps(cfg) ];
- //console.dump(this.cfg);
+ this.parsePmanLayout();
return;
+
}
//print(JSON.stringify(this.tokens,null,4)); Seed.quit();
// Standard Pman Dialog -
if (this.tokens[2].props && typeof(this.tokens[2].props.create) != 'undefined') {
- //console.dump(this.tokens);
- this.cfg.name = this.tokens[0].data;
-
-
-
- var cfg = this.tokens[2].props.create.val[2].items[1][3].items[0][0].props;
- //console.dump(this.tokens);
- //print(JSON.stringify(cfg,null,4)); Seed.quit();
-
- // print("Trying standard dialog");Seed.quit();;
-
- this.cfg.items = [ this.parseProps(cfg) ];
- return;
+ this.parsePmanDialog();
}
// perfect for dialogs...
+ },
+
+ parsePmanLayout : function()
+ {
+ // then it's a layout style..
+
+ //Seed.quit();
+
+
+ //console.dump(this.tokens);
+ // the list of statements inside of function..?
+
+
+ var stmts = this.tokens[1].items[1][2].items;
+
+ // look for register..
+ var topp = false;
+ stmts.map( function(s, i) {
+ if (s[0].data == 'Pman.register') {
+ topp = brace = s[1].items[0][0].props;
+ }
+ });
+ if (!topp) {
+ console.dump(this.tokens);
+ throw "could not find top props...";
+
+ }
+
+ this.cfg = this.parseProps(topp);
+ this.cfg.name = this.tokens[3].data;
+
+
+ // ( { add { this.panel ( {
+ var cfg = this.tokens[7].items[0][0].props.add.val[2].items[2][3].items[0][0].props;
+ this.cfg.items = [ this.parseProps(cfg) ];
+ //console.dump(this.cfg);
+ },
+ parsePmanDialog : function() {
+
+ //console.dump(this.tokens);
+ this.cfg.name = this.tokens[0].data;
+
+
+
+ var cfg = this.tokens[2].props.create.val[2].items[1][3].items[0][0].props;
+ //console.dump(this.tokens);
+ //print(JSON.stringify(cfg,null,4)); Seed.quit();
+
+ // print("Trying standard dialog");Seed.quit();;
+
+ this.cfg.items = [ this.parseProps(cfg) ];
+ return;
+
},
parseProps: function(o)