×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2012
    Posts
    82

    taking user input in the starting screen of the application & save the data.

    hi,

    i am trying to build a registration form in my screen & i have to save these data which will be entered by the user. For this i took the help of the ex - Registration.

    But in this when i am trying to save the data which has been entered by user i am not able to save thi

    Here is the code...........


    in .rss file i mentioned........


    RESOURCE AVKON_SETTING_ITEM_LIST r_registration_setting_item_list
    {
    title = rls_setting_title;

    items =
    {
    AVKON_SETTING_ITEM //Login ID
    {
    identifier = EregistrationSettingLogin;
    setting_page_resource = r_registration_login_setting_page;
    name = rls_login_title;
    },
    AVKON_SETTING_ITEM
    {
    identifier = EPassWord;
    setting_page_resource = r_registration_password_setting_page;
    name = "PASSWORD";
    },
    AVKON_SETTING_ITEM
    {
    identifier = EConfirmPassWord;
    setting_page_resource = r_registration_password_setting_page;
    name = "CONFIRM_PASSWORD";
    },
    AVKON_SETTING_ITEM
    {
    identifier = Esecurity;
    setting_page_resource = r_registration_security_setting_page;
    name = "SECURITY_QUESTION";
    },
    AVKON_SETTING_ITEM
    {
    identifier = Esecurityans;
    setting_page_resource = r_registration_security_setting_page;
    name = "SECURITY_ANSWER";
    }
    };
    }




    in registration listbox.cpp i mentioned...


    CAknSettingItem* CRegistrationListbox::CreateSettingItemL(TInt aIdentifier)
    {

    CAknSettingItem* settingItem = NULL;

    switch ( aIdentifier )
    {

    case EregistrationSettingLogin:
    settingItem = new ( ELeave ) CAknTextSettingItem( aIdentifier,
    iItemData->iLogin );

    StoreSettingsL();


    break;

    case EPassWord:
    settingItem = new ( ELeave ) CAknPasswordSettingItem(
    aIdentifier, CAknPasswordSettingItem::EAlpha,iItemData->iPw );
    StoreSettingsL();


    break;
    case EConfirmPassWord:
    settingItem = new ( ELeave ) CAknPasswordSettingItem(
    aIdentifier, CAknPasswordSettingItem::EAlpha, iItemData->iPw1 );
    StoreSettingsL();

    break;
    case Esecurity:
    settingItem = new ( ELeave ) CAknTextSettingItem(
    aIdentifier,iItemData->iSecurityQuestion);
    StoreSettingsL();


    break;
    case Esecurityans:
    settingItem = new ( ELeave ) CAknTextSettingItem(
    aIdentifier, iItemData->iSecurityAnswer);
    StoreSettingsL();

    break;
    default:
    break;
    }
    return settingItem;
    }

    IN the registrationview.cpp we have ...


    void CRegistrationView::ConstructL()
    {
    BaseConstructL();

    iListbox = new ( ELeave ) CRegistrationListbox;
    iListbox->SetData( &iItemData );
    iListbox->SetMopParent( this );
    iListbox->ConstructFromResourceL( R_REGISTRATION_SETTING_ITEM_LIST );

    AppUi()->AddToStackL( *this, iListbox );
    iListbox->MakeVisible( ETrue );
    iListbox->SetRect(ClientRect());
    iListbox->ActivateL();
    iListbox->DrawNow();
    }


    from the registrationappui.cpp i called ....

    BaseConstructL( CAknAppUi::EAknEnableSkin );

    iAppView = CRegistrationView::NewL();
    CleanupStack::PushL( iAppView );
    AddViewL( iAppView );
    CleanupStack::Pop( iAppView );
    ActivateLocalViewL( iAppView->Id() );

    from constructL.

    now i took the global variable in registrationappui.ccp & want to copy the value entered by user like....

    iItemData->iLogin;
    iItemData->iPw;
    iItemData->iPw1;
    iItemData->iSecurityQuestion;
    iItemData->iSecurityAnswer;


    to the global variables. BUt i am unable to do the same.
    Please Help.....

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: taking user input in the starting screen of the application & save the data.

    Usage of global variables is usually a bit suspicious, but generally it should work. What is the actual problem, what happens and when?

  3. #3
    Regular Contributor
    Join Date
    Jul 2012
    Posts
    82

    Re: taking user input in the starting screen of the application & save the data.

    At the time of build i don't have any issue but when i am running it on emulator then it is giving the error Application exit ekern.exe on that particular line.

    i took the TBuf<20> iUserName; in Cregistrationappui class.
    Took the pointer of Cregistrationappui class in Registrationlistbox.h as CRegistrationAppUi* iPhotoAppui;
    & performed the operation iPhotoAppui->iUserName.Copy(iItemData->iLogin) ;

    Itemdata is the pointer of TRegistrationItemdata* iItemData;
    in the class TRegistrationItemdata we have declared the variable TBuf<50> iLogin;




    iPhotoAppui->iUserName.Copy(iItemData->iLogin) ;
    In this particular line i am getting error on the emulator.

  4. #4
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    3,988

    Re: taking user input in the starting screen of the application & save the data.

    Only declaration of Appui's pointer is not enough, you need to return valid pointer as well.Something like this:

    iPhotoAppui= (CRegistrationAppUi*) (CEikonEnv::Static()->AppUi());

    & now you can utilize the iPhotoAppui

Similar Threads

  1. data input through gui screen
    By sujithkannan in forum Symbian
    Replies: 7
    Last Post: 2010-09-16, 07:18
  2. getting data save to RMS after taking by form
    By apnasi in forum Mobile Java General
    Replies: 1
    Last Post: 2010-04-07, 10:36
  3. Replies: 7
    Last Post: 2009-06-12, 09:14
  4. Is there any tools for taking screen shot of J2ME application?
    By keikochiyou in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2008-09-30, 07:32
  5. Input user data into the textfield.
    By nagesh.chetana in forum Mobile Java General
    Replies: 2
    Last Post: 2008-07-30, 05:45

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×