I'm using Smartclient LGPL v8, sometimes testing with nightly builds
Something happened to the menu bar that I display in my application between snapshots 2011-04-22 and 2011-04-25. I built a standalone case and tested it in firefox 4 , safari 5 and Chrome (MacOS X) and got the same results. Since v7 and up to snapshot 22, everything worked well. From snapshot 25, the menu bar does not appear anymore. I get no errors from the javascript or smartclient consoles.
the standalone case is made of two files :
application.js and menu.js
application.js manages the main layout and menu.js defines a subclass of menubar.
Apparently, the setMenus function has been modified between these snapshots, and is likely to be the cause of this new behaviour. Is it a bug or should I write my menubar subclass in a different way ?
menu.js
index.html (I made several copies to test the various snapshots)
Something happened to the menu bar that I display in my application between snapshots 2011-04-22 and 2011-04-25. I built a standalone case and tested it in firefox 4 , safari 5 and Chrome (MacOS X) and got the same results. Since v7 and up to snapshot 22, everything worked well. From snapshot 25, the menu bar does not appear anymore. I get no errors from the javascript or smartclient consoles.
the standalone case is made of two files :
application.js and menu.js
application.js manages the main layout and menu.js defines a subclass of menubar.
Apparently, the setMenus function has been modified between these snapshots, and is likely to be the cause of this new behaviour. Is it a bug or should I write my menubar subclass in a different way ?
Code:
/* application.js */
var corps = isc.SectionStack.create({
ID: "corps",
autoDraw: false,
visibilityMode: "multiple",
sections: [
isc.LayoutSpacer.create({width:"100%",height:"100%"})
]
});
var interfaceMenu = isc.InterfaceMenu.create();
var appLayout = isc.VLayout.create({
autoDraw:false,
width: "100%",
height: "100%",
members: [interfaceMenu, corps],
initWidget: function(){
this.Super("initWidget", arguments);
isc.Page.setEvent("load",this,"once","draw");
}
});
Code:
isc.ClassFactory.defineClass("InterfaceMenu","MenuBar");
isc.InterfaceMenu.addProperties({
autoDraw: false,
width:"100%",
initWidget: function(){
this.Super("initWidget", arguments);
this.menuOne = isc.Menu.create({
autoDraw: false,
width: 100,
title: "menu1" ,
showIcons: false,
showShadow: true,
data: [
{
title: "one 1" ,
click: function() {
isc.warn("one 1");
}
},
{
title: "one 2" ,
click: function() {
isc.warn("one 2");
}
},
]
});
this.menuTwo = isc.Menu.create({
autoDraw: false,
width: 100,
title: "menu2" ,
showIcons: false,
showShadow: true,
data: [
{
title: "two 1" ,
click: function() {
isc.warn("two 1");
}
},
{
title: "two 2" ,
click: function() {
isc.warn("two 2");
}
}
]
});
this.setMenus([
this.menuOne,
this.menuTwo
]);
}, //initWidget
});
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content= "HTML Tidy, see www.w3.org" />
<meta http-equiv="Content-Type" content= "text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<script type="text/javascript">
var isomorphicDir = "isomorphic22/";
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Core.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Foundation.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Containers.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Grids.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Forms.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_DataBinding.js">
</script>
<script type="text/javascript" src="isomorphic22/system/modules/ISC_Calendar.js">
</script>
<script type="text/javascript" src="isomorphic22/skins/EnterpriseBlue/load_skin.js">
</script>
<script type="text/javascript" src="isomorphic22/locales/frameworkMessages_fr_FR.properties">
</script>
<title>testmenubar</title>
</head>
<body>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript" src="application.js"></script>
</body>
</html>
Comment