enyo.kind({
name: "HelloWorld",
kind: "VFlexBox",
style: "margin:8px 0px 10px 0px;" ,
components: [
{name: "panefile", kind: "Pane", flex: 1, onSelectView: "viewSelected",
components: [
{name: "search", className: "enyo-bg", kind: "MyApps.Search"}
]
}
],
create: function(){
this.yourInit();
},
yourInit: function(){
//HERE I HAVE MY CODE THAT GIVES ME MY INITIAL LAYOUT
in b/w i have the line ...
{BUTTON PRESS FUNCTION}
this.$.panefile.selectViewByName("search");
Now My app is giving me the initial layout! but it is not giving me the search scene which i should get upon pressing one button in the layout?? i have included my search file in depends.js!
probably i think i have put my layout code in YourInit() that is being called everytime through create function..
ny help??
thanx.
0 • •
Comments
Where exactly is your call to selectViewByName? In a separate method or in the yourInit method?
Oh, and add the line
this.inherited(arguments);abovethis.yourInit();in the create function.- Spam
- Abuse
0 • Off Topic Insightful •- Spam
- Abuse
0 • Off Topic Insightful •this.inherited(arguments)calls the same method on the super-kind (in this case the create method is called).If you don't call this nothing will be rendered. It's possible that none of your code is functioning correctly simply because this call is missing.
Also, I think you misunderstand about the Pane: the first view in the pane will be loaded when the app starts up regardless of whether you tell it to or not. This is the default behaviour of a Pane.
- Spam
- Abuse
0 • Off Topic Insightful •