Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6936833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:17:07+00:00 2026-05-27T12:17:07+00:00

I’m trying to upgrade a Bada app from 1.2 to 2.0 with no experience

  • 0

I’m trying to upgrade a Bada app from 1.2 to 2.0 with no experience of Bada. I have the project building and can run it in the emulator but I get a load of warnings and I cant click the text boxes to get a keyboard and enter anything in the emulator.

Unfortunately the warning messages are completely cryptic to me, for example

SearchForm::SearchForm(void) :

gives the warning message “when initialized here”

What when initialized here??!!

Also, all the TryCatch statements show syntax error, and nothing I have found on the internet seems to make it happy:

result OnDraw()
{
    result r = E_SUCCESS;

    Canvas* readerCanvas = GetCanvasN();
    TryCatch(E_SUCCESS == GetLastResult(), "Failed to get canvas: %S", GetErrorMessage(r));

     if (readerCanvas)
     {
         Rectangle tempRect(0, 0, GetBounds().width, GetBounds().height);
         Point tempPoint(0, 0);
         r = readerCanvas->Copy(tempPoint, *iDrawingCanvas, tempRect);
         TryCatch(E_SUCCESS == r, "Failed to copy canvas: %S", GetErrorMessage(r));
         delete readerCanvas;
     }

    return r;

    CATCH:
        delete readerCanvas;
        return r;
}

The TryCatch line says “statement has no effect”, if I try edit it to match the examples I’v found I get a syntax error.

What’s up with this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:17:07+00:00Added an answer on May 27, 2026 at 12:17 pm

    It seems like you are trying to outdo your IDE’s supposed bad messages by quoting them entirely out of context and only partially. Let me break it down:

    TryCatch

    The macro is defined as

    TryCatch(condition, cleanup, message)
    

    When the condition is evaluated to false, this will goto CATCH. You could think of the macro like this:

    if (!condition)
    {
        goto CATCH;
    }
    

    For example, you can use it like this:

    void TryCatchDemo::UseTryCatch(void)
    {
        TryCatch(1==2, , "1 is NOT 2");
    
        AppLog("This should not appear");
    
        CATCH:
            AppLog("Catch block");
    }
    

    Now, your second parameter is a string literal, "Failed to get canvas: %S", which unsurprisingly, doesn’t have an effect when used as statement:

        "does nothing";
        123;              // just like this
    

    So the compiler is being nice to warn you of the fact that you probably had something else in mind. Note also, that statement has no effect is not a syntax error.

    “when initialized here”

    Know your language! The code quoted isn’t legal C++ to begin with:

      SearchForm::SearchForm(void) :
    

    At best this is the beginning of a constructor definition, with a missing initializer list and body. In the C++ language spec, class members are initialized in the order in which they were declared, not in the order in which they appear in the initializer list. A minimal example:

    struct X
    {
         int a, b;
         X() : b(), a() {}
    };
    

    This results in the compiler warning:

    /tmp/test.cpp|3 col 13| warning: ‘X::b’ will be initialized after [-Wreorder]
    /tmp/test.cpp|3 col 10| warning:   ‘int X::a’ [-Wreorder]
    /tmp/test.cpp|4 col 6| warning:   when initialized here [-Wreorder]
    

    As you can see, you not only clipped the code but also the warnings! If you read the whole message and the whole code, the fix would be pretty obvious:

    struct X
    {
         int a, b;
         X() : a(), b() {}
    };
    

    Bonus: In case you were wondering, why the ordering matters, consider what happens when you do:

    struct X
    {
         int a, b;
         X() : b(), a(b) {} // OOPS!
    };
    

    Hope this helps

    Using a Format String with the Macros

    Edit I just noted this: it is probably not supported to use format strings inside the Try/Catch macros:

    Each of the macros that support a message parameters actually support format strings. A format string is similar to the format string of printf on systems that support it (bada does NOT support it)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
This could be a duplicate question, but I have no idea what search terms
I have a text area in my form which accepts all possible characters from
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Does anyone know how can I replace this 2 symbol below from the string
I have a view passing on information from a database: def serve_article(request, id): served_article
I am trying to loop through a bunch of documents I have to put
I have a bunch of posts stored in text files formatted in yaml/textile (from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.