c++user-interfacedialogalertmarmalade

AlertDialog error using Marmalade IwNUI: Could not find resource named alertdialog


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!


Solution

  • 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!