[FIXED] [V0.7] Menu Exception

Page 1 of 2 12 LastLast
  1. #1

    [FIXED] [V0.7] Menu Exception

    Hello,

    Good to be back online, here is an example of the issue:

    Exception received: Unable to cast object of type 'Coolite.Ext.Web.Menu' to type 'Coolite.Ext.Web.Component'.

    Example.aspx:
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <script runat="server">
    
    </script>
    
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head runat="server">
        <title>Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
        <ext:ScriptManager ID="ScriptManager2" runat="server" StateProvider="PostBack" />
        
        <ext:SplitButton ID="Button11" runat="server" Text="Text">
            <Menu>
                <ext:Menu ID="Menu2" runat="server">
                    <Items>                    
                        <ext:MenuItem ID="MenuItem4" runat="server" Text="Item 1" Icon="GroupAdd" />
                        <ext:MenuItem ID="MenuItem5" runat="server" Text="Item 2" Icon="GroupDelete" />
                        <ext:MenuItem ID="MenuItem6" runat="server" Text="Item 3" Icon="GroupEdit" />
                    </Items>
                </ext:Menu>
            </Menu>
        </ext:SplitButton>
        
    
        </form>
    </body>
    </html>
    Load page, immediate exception.

    Cheers,
    Timothy
  2. #2

    RE: [FIXED] [V0.7] Menu Exception

    Hi Timothy,

    Welcome back.


    What are your system specs? running 32-bit or 64bit system? IIS6 or IIS7 (or other)?


    There was another similar report, although we have yet to reproduce, see*http://forums.ext.net/showthread.php...4631-16-1.aspx


    We're on this.*


    Geoffrey McGill
    Founder
  3. #3

    RE: [FIXED] [V0.7] Menu Exception

    Hello Geoffrey,

    Weird question to ask; but I'm on a 32-bit with Microsoft Windows XP Professional with IIS5.0 ;)

    Cheers,
    Timothy
  4. #4

    RE: [FIXED] [V0.7] Menu Exception

    Hi Timothy,

    Can you tell me what source file and what line the exception occurs?


  5. #5

    RE: [FIXED] [V0.7] Menu Exception

    Here is the entire stack:

    Server Error in '/' Application.
    Unable to cast object of type 'Coolite.Ext.Web.Menu' to type 'Coolite.Ext.Web.Component'.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    
    Exception Details: System.InvalidCastException: Unable to cast object of type 'Coolite.Ext.Web.Menu' to type 'Coolite.Ext.Web.Component'.
    
    Source Error:
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    
    Stack Trace:
    
    [InvalidCastException: Unable to cast object of type 'Coolite.Ext.Web.Menu' to type 'Coolite.Ext.Web.Component'.]
       Coolite.Ext.Web.WebControl.get_ParentWebControl() +73
       Coolite.Ext.Web.WebControl.get_IDMode() +228
       Coolite.Ext.Web.WebControl.get_ClientID() +70
       Coolite.Ext.Web.ItemCollectionJsonConverter.Format(Control control) +182
       Coolite.Ext.Web.ItemCollectionJsonConverter.WriteJson(JsonWriter writer, Object value) +1078
       Coolite.Ext.Web.ClientConfig.ToExtConfig(PropertyInfo property, Object obj, ClientConfigAttribute attr, Object defaultValue) +3934
       Coolite.Ext.Web.ClientConfig.Process(Object obj) +263
    
    [Exception: Error during ClientConfig initialization. Items - Unable to cast object of type 'Coolite.Ext.Web.Menu' to type 'Coolite.Ext.Web.Component'.]
       Coolite.Ext.Web.ClientConfig.Process(Object obj) +388
       Coolite.Ext.Web.ClientConfig.Serialize(Object obj, Boolean ignoreCustomSerialization) +938
       Coolite.Ext.Web.ClientConfig.Serialize(Object obj) +36
       Coolite.Ext.Web.WebControl.get_InitialConfig() +94
       Coolite.Ext.Web.WebControl.GetClientConstructor(Boolean instanceOnly, String body) +466
       Coolite.Ext.Web.WebControl.GetClientConstructor() +35
       Coolite.Ext.Web.InnerObservable.RegisterScript(Boolean inTop) +484
       Coolite.Ext.Web.InnerObservable.ParentComponent_BeforeClientInit(Observable sender) +31
       Coolite.Ext.Web.OnBeforeClientInitializedHandler.Invoke(Observable sender) +0
       Coolite.Ext.Web.Observable.OnBeforeClientInitHandler() +56
       Coolite.Ext.Web.Observable.OnClientInit() +27
       Coolite.Ext.Web.WebControl.SetResources() +149
       Coolite.Ext.Web.WebControl.PreRenderAction() +642
       Coolite.Ext.Web.WebControl.OnPreRender(EventArgs e) +28
       Coolite.Ext.Web.Container.OnPreRender(EventArgs e) +155
       System.Web.UI.Control.PreRenderRecursiveInternal() +86
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Control.PreRenderRecursiveInternal() +170
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
    
    
    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433
    Cheers,
    Timothy
  6. #6

    RE: [FIXED] [V0.7] Menu Exception

    Maybe just post the full exception details and stacktrace if you could.*

    We haven't been able to reproduce, so it's difficult to track down the problem.*


    Geoffrey McGill
    Founder
  7. #7

    RE: [FIXED] [V0.7] Menu Exception

    geoffrey.mcgill (12/2/2008)Maybe just post the full exception details and stacktrace if you could.

    We haven't been able to reproduce, so it's difficult to track down the problem.

    You got what you want from my last post? Or need more?

    Cheers,
    Timothy
  8. #8

    RE: [FIXED] [V0.7] Menu Exception

    You got what you want from my last post?* Or need more?
    Yes, perfect. We posted 45 seconds apart and in the time it took for me to write the response, you had posted the stacktrace.*


    We're disecting the stack and trying to reproduce.*


    Geoffrey McGill
    Founder
  9. #9

    RE: [FIXED] [V0.7] Menu Exception

    Would appear to be with the new additions to the WebControl.cs with addition of the IDMode. I'm going to play around with it.

    Cheers,
    Timothy
  10. #10

    RE: [FIXED] [V0.7] Menu Exception

    Ok, we found and fixed the bug.*

    Just running a few tests to confirm everything, but it was a very obvious casting bug.


    I'll be committing fix within a few minutes.*


    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: Nov 26, 2012, 2:33 PM
  2. Replies: 2
    Last Post: Jun 24, 2011, 5:33 PM
  3. [FIXED] [V0.8] No Controls Exception
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Apr 01, 2009, 10:20 AM
  4. Replies: 2
    Last Post: Apr 01, 2009, 7:02 AM
  5. [FIXED] [V0.7] RowExpander Exception
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Nov 05, 2008, 9:48 AM

Posting Permissions