hazlema
09-09-2007, 02:35 AM
I didn't post this in bugs because it may not be a bug.
Ext may just not be able to handle the new prototype library.
this.focusEl has no properties http://localhost/resize/js/ext-all.js Line 86
Swapping out the new prototype libs for the old has seemingly fixed the issue, but I still wanted to mention it.
Here is the code I was using:
(Basicly its the example reduced to a single html page and simplified for learning purposes)
<html>
<head>
<link rel="stylesheet" href="js/resources/css/ext-all.css" type="text/css">
<script src="js/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="js/ext-all.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="toolbar">
</div>
</div>
<script>
Ext.onReady(function()
{
Ext.QuickTips.init();
var menu = new Ext.menu.Menu({
id: 'mainMenu',
items:
[
new Ext.menu.CheckItem({
text: 'Selection Locked',
checked: true,
checkHandler: onItemCheck
}),
new Ext.menu.CheckItem({
text: 'Maintain Aspect',
checked: true,
checkHandler: onItemCheck
}), '-',
{
text: 'Selection Color',
menu:
{
items:
[
new Ext.menu.ColorItem({selectHandler:function(cp, color){
alert('Color Selected', 'You chose {0}.', color);
}})
]
}
}
]
});
var tb = new Ext.Toolbar('toolbar');
tb.add({
cls: 'x-btn-text-icon bmenu', // icon and text class
text:'Button w/ Menu',
menu: menu // assign menu by instance
});
function onItemCheck(item, checked){
alert('Item Check', 'You {1} the "{0}" menu item.', item.text, checked ? 'checked' : 'unchecked');
}
});
</script>
</body>
</html>
Ext may just not be able to handle the new prototype library.
this.focusEl has no properties http://localhost/resize/js/ext-all.js Line 86
Swapping out the new prototype libs for the old has seemingly fixed the issue, but I still wanted to mention it.
Here is the code I was using:
(Basicly its the example reduced to a single html page and simplified for learning purposes)
<html>
<head>
<link rel="stylesheet" href="js/resources/css/ext-all.css" type="text/css">
<script src="js/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="js/ext-all.js" type="text/javascript"></script>
<script src="js/prototype.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
<div id="toolbar">
</div>
</div>
<script>
Ext.onReady(function()
{
Ext.QuickTips.init();
var menu = new Ext.menu.Menu({
id: 'mainMenu',
items:
[
new Ext.menu.CheckItem({
text: 'Selection Locked',
checked: true,
checkHandler: onItemCheck
}),
new Ext.menu.CheckItem({
text: 'Maintain Aspect',
checked: true,
checkHandler: onItemCheck
}), '-',
{
text: 'Selection Color',
menu:
{
items:
[
new Ext.menu.ColorItem({selectHandler:function(cp, color){
alert('Color Selected', 'You chose {0}.', color);
}})
]
}
}
]
});
var tb = new Ext.Toolbar('toolbar');
tb.add({
cls: 'x-btn-text-icon bmenu', // icon and text class
text:'Button w/ Menu',
menu: menu // assign menu by instance
});
function onItemCheck(item, checked){
alert('Item Check', 'You {1} the "{0}" menu item.', item.text, checked ? 'checked' : 'unchecked');
}
});
</script>
</body>
</html>