Question

I'm developing an UI App and trying to use CAlertDialogPtr with IwNUI system. I'm getting an error that I cannot decipher, I have tried adding other libraries and systems and still no use. The error is:

IwAssert failure (GX, 1339). Message: Could not find resource named alertdialog (of type CIwUIElement)
Callstack: CIwResManager::GetResNamed

Please help me/send some feedback, I need to solve this. Here is some of my code:

class AppPorBen {

//public attribute
    CAlertDialogPtr home_aTest;


//this comes from my main method

    home_aTest = CreateAlertDialog(CAttributes()
    .Set("name", "AlertDialog")
    .Set("title", "s3eNUIAlertDialog")
    .Set("message", "Quiere cerrar esta alerta?")//.Set("message", scrollPosition.m_Y)
    .Set("positiveButtonCaption",   "Yes")
    .Set("negativeButtonCaption",   "No")
    .Set("neutralButtonCaption",    "Maybe")
    );

//this uses the alert dialog on a handler

    home_aTest->Show();

};

Thanks!

Was it helpful?

Solution 2

The point of using the IwNUI is to use a higher level abstraction layer when developing your app. If I cannot use the code directly as mentioned on the documents, and then I get an unknown problem using the default files provided by Marmalade, then the actual problem no longer matters as it is a Marmalade package related fault.

Turnaround solution was to use lower level code, using the S3eDialog extension directly, such as the following example:

{//This version number isn't known
    s3eDialogAlertInfo info;
    info.m_Message = "The database is in the format of a later version. \n\nPlease update the app to the latest version and try again.";
    info.m_Title = "Error";
    info.m_Button[0] = "OK";
    s3eDialogAlertBox(&info);
    return false;
}

Cheers!

OTHER TIPS

you don't have all the resources in your project, grab the ones from the kitchen sink example and edit your mkb

and then you want to use the back key or keyboard with iwnui you will need this:

while (!s3eDeviceCheckQuitRequest())
{

        s3eKeyboardUpdate();

        if ((s3eKeyboardGetState(s3eKeyBack) & S3E_KEY_STATE_PRESSED) == S3E_KEY_STATE_PRESSED)
        {
            s3eDeviceRequestQuit();

        }

        app->Update();

    }

as apposed to

app->Run();

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top