Sep 21, 2012, 7:17 AM
[CLOSED] Toggle Panel substr error
Hi,
With new revision I found a problem with a custom case to expand or collapse panel.
This is my test case:
TEST CASE
ASPX
Thanks
With new revision I found a problem with a custom case to expand or collapse panel.
This is my test case:
TEST CASE
ASPX
<!DOCTYPE html>
<html>
<head runat="server">
<title>GridPanel with FitLayout - Ext.NET Examples</title>
<script type="text/javascript">
var isPanelWorking = false;
var onToggle = function () {
if (isPanelWorking == false) {
isPanelWorking = true;
var wasCollapsed = pnlAsigMasiva.collapsed != false;
if (wasCollapsed)
pnlAsigMasiva.expand();
else
pnlAsigMasiva.collapse("bottom", true);
isPanelWorking = false;
}
}
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server" Layout="FitLayout" Border="false">
<Items>
<ext:Panel runat="server" Border="false" Layout="BorderLayout">
<Items>
<ext:Panel runat="server" Border="false" Region="Center">
<Items>
<ext:Button runat="server" Text="Expand/Collapse">
<Listeners>
<Click Fn="onToggle" />
</Listeners>
</ext:Button>
</Items>
</ext:Panel>
<ext:Panel ID="pnlAsigMasiva" runat="server" Layout="FitLayout" Collapsed="true"
Collapsible="true" Height="300" Region="South" Title="Collapsed Panel"
Split="true" Hidden="false">
<Items>
<ext:Label runat="server" Text="My Text in Panel" />
</Items>
<Listeners>
<BeforeCollapse Fn="onToggle" />
<BeforeExpand Fn="onToggle" />
</Listeners>
</ext:Panel>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
</html>
As I see my buttom works well as expected but pressing panel expand button now internally fires toggleButton function and when this delegates to expand method without parameter internally pass a true in animate parameter and crashes when it does a substr of this boolean. I don't know if this is the error.Thanks
Last edited by Daniil; Sep 21, 2012 at 10:29 AM.
Reason: [CLOSED]