Errorlabel

Discussion in 'Questions (Windows Mobile)' started by JJM, Dec 30, 2007.

  1. JJM

    JJM Active Member Licensed User

    Hi,
    I just bought Basic4PPC version 6.01 and I have an error in compilated program with Errorlabel.
    When the program runs on device or on desktop the errorlabel catches the error but this same program when it's compilated the errorlabel has no function?
    Why?
    Thanks for your help.
    Best regards

    JJM
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. DieterR

    DieterR Member Licensed User

    Errorlabel in v6.01

    I had a similar error when I complied my application the first time with the new optimized compiler. The error was solved after I moved the jump address out of a nested structure (if ... else ...) to the end of the sub.:sign0060:
     
  4. JJM

    JJM Active Member Licensed User

    About Errorlabel

    Hi,
    It's a solution but a function existes in Basic4PPC so I would like to use it.
    Thanks
    Best wishes for new year. :)

    JJ M
     
  5. derez

    derez Expert Licensed User

    And form my experience with the new compiler - you cannot have the error label outside of the sub that declares it (the old compiler allows such jumps)
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    An optimized executable doesn't raise an error when the image file is missing.
    It shows a message instead.
    Therefore ErrorLabel will not catch this error.
    You should use FileExist instead of ErrorLabel:
    Code:
    If FileExist("SomeImage"Then Image1.LoadPicture("SomeImage")
     
  7. JJM

    JJM Active Member Licensed User

    Hi,

    Thank you all guys.

    JJ M
     
Loading...