Error after compiling

Discussion in 'Questions (Windows Mobile)' started by J12345T, Oct 21, 2008.

  1. J12345T

    J12345T Member Licensed User

    Hi,

    I have compiled a project which runs perfectly well under B4PPC and compiles without error. When trying to execute the file however, I get the following error:-

    Unable to cast object of type 'del1' to type 'del0'.

    Any ideas?

    Thanks.

    JT
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload your source code?
     
  3. J12345T

    J12345T Member Licensed User

    OK Here it is.
     
  4. agraham

    agraham Expert Licensed User

    It's this line
    Code:
    AddEvent("Imagebuttonsearch",click,"search")
    Event Subs cannot have parameters, that's the del0 bit. Your event Sub has one parameter, that's the del1 bit. You are trying to use a del1 type of Sub where a del0 type is expected.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    Just a small correction. The "added" event sub must have the same number of parameters as a similar event sub that was added by the designer.
    For most events there are no parameters at all.
     
  6. agraham

    agraham Expert Licensed User

    :signOops: I forgot that some "built-in" events did have parameters. I'm too used to dealing with events, mainly from libraries, that don't have parameters and need a different data passing mechanism (properties).:sign0013:
     
  7. J12345T

    J12345T Member Licensed User

    OK Thanks,

    I removed the (airline) parameter and it works now.

    JT
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice