×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Smile Dailogs and his features

    i want to design an application, in it i decided to start with a dialog and in this dialog i want to say the user to enter an real value so i intend to start with simple dialog:

    i follow thes steps:
    1. creat new project
    2. select hellow world project and adjust in it (remove some generated code and make it simple with application window only) //this is right
    3. now i would like to create dialog so design it in rss file with code

    RESOURCE DIALOG r_simple_dialog
    {
    buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    flags = EEikDialogFlagWait;
    items =
    {
    DLG_LINE
    {
    type = EEikCtEdwin;
    id = ESimpleExText;
    prompt = "Insert a value";
    control = EDWIN {
    width = 20;
    maxlength = 20;
    };

    }
    };
    }

    and now i would like to complete this dialog
    what is steps i do to complete ?
    note i would like to handle user input
    i wait for your response while i searching in refernces

    good luck
    Ahmed Mahfouz
    Researcher
    Handset

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,167

    Re: Dailogs and his features

    You could always have a look into Wiki and see what we have in there, here's link to one page that could maybe help you: http://wiki.forum.nokia.com/index.php/Querying_Strings

  3. #3
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    i'm trying and reach for:
    i create :
    //--------------------------------------------
    //dialog class
    //--------------------------------------------
    class CSimpleExDialog : public CAknDialog
    {
    public:
    CSimpleExDialog(TDes& aText, TRgb& aColor);

    private:
    //inherited from CEikDialog
    void PreLayoutDynInitL();
    TBool OKToExitL(TInt aKeycode);

    TDes& iText;
    TRgb& iColor;
    };

    and implements its function:
    //---------------------------------------------
    //dailog class methods declaration
    //-----------------------------------------------
    CSimpleExDialog::CSimpleExDialog(TDes &aText, TRgb &aColor) : iText(aText), iColor(aColor)
    {
    }

    void CSimpleExDialog::PreLayoutDynInitL()
    {
    STATIC_CAST(CEikEdwin*,Control(ESimpleExText))->SetTextL(&iText);
    }

    TBool CSimpleExDialog::OKToExitL(TInt /*aKeycode*/)
    {
    STATIC_CAST(CEikEdwin*,Control(ESimpleExText))->GetText(iText);
    }

    and handel manu item ESimpleExDialog which view dialog:
    case ESimpleExDialog:
    {
    CSimpleExDialog* dialog = new (ELeave) CSimpleExDialog( iAppContainer->iDisplayText, iAppContainer->iTextColor );
    dialog->ExecuteLD(R_SIMPLEEX_DIALOG);
    break;
    }
    but this errors appears :

    1>src\Symbian1.cpp(146) : error: undefined identifier 'R_SIMPLEEX_DIALOG' //resource name
    1>src\Symbian1.cpp(276) : error: undefined identifier 'ESimpleExText' //id of EDWIN DLG_LINE
    1>src\Symbian1.cpp(281) : error: undefined identifier 'ESimpleExText'
    Ahmed Mahfouz
    Researcher
    Handset

  4. #4
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    i solve 2nd and 3rd error:
    ESimpleExText not define in hrh file and i add it to enum

    merci
    but why cpp file can not read dialog resource name: R_SIMPLEEX_DIALOG
    Ahmed Mahfouz
    Researcher
    Handset

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

    Re: Dailogs and his features

    You should #include the .rsg file generated from the .rss (HelloWorld.rss -> #include <HelloWorld.rsg>)

  6. #6
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    Quote Originally Posted by wizard_hu_ View Post
    You should #include the .rsg file generated from the .rss (HelloWorld.rss -> #include <HelloWorld.rsg>)
    there is no .rsg file generated
    Ahmed Mahfouz
    Researcher
    Handset

  7. #7
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Dailogs and his features

    That means that you have an error in the RSS file and the resource compiler tells you that. Read the error messages (as we discussed before, they are in the Console window) and fix the problems one by one.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  8. #8
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    Quote Originally Posted by ltomuta View Post
    That means that you have an error in the RSS file and the resource compiler tells you that. Read the error messages (as we discussed before, they are in the Console window) and fix the problems one by one.
    this is my resource file you can help me to discover error:

    Code:
    NAME MHWA // 4 letter ID
    
    //  Include Files
    #include <eikon.rh>             // Global command ids
    #include <avkon.rsg>            // Avkon resource ids
    #include <avkon.rh>             // Avkon resource structure definitions
    #include <avkon.mbg>            // Avkon bitmap ids
    #include "Symbian1.hrh"        // Application command ids
    //#include "Symbian1.loc"      // Localized strings
    
    //  Resource File Sigunature
    RESOURCE RSS_SIGNATURE {}
    
    //  Default Document Name
    RESOURCE TBUF { buf=""; }
    
    //  Application Information
    RESOURCE EIK_APP_INFO {
    	menubar = r_symbian1_menubar;
    	
    	cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    }
    
    //---------------------------------------------------------------------------
    //    R_SYMBIAN1_MENUBAR - Menu bar and menu pane
    //---------------------------------------------------------------------------
    
    RESOURCE MENU_BAR r_symbian1_menubar {
    	titles = {
    		MENU_TITLE { txt = "File"; menu_pane = r_symbian1_file_menu; }
    	};
    }
    
    RESOURCE MENU_PANE r_symbian1_file_menu {
    	items = {
    		MENU_ITEM { txt = "settings"; command = ESimpleExDialog; },
    		MENU_ITEM { txt = "Exit"; command = EAknCmdExit; }
    	};
    }
    
    RESOURCE DIALOG R_SIMPLEEX_DIALOG
    {
    	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    	flags = EEikDialogFlagWait;
    	items = 
    			{
    				DLG_LINE
    					{
    						type = EEikCtEdwin;
    						id = ESimpleExText;
    						prompt = "Insert a value";
    						control = EDWIN {
    											width = 20;
    											maxlength = 20;
    										 };
    						
    					}
    			};
    }
    Ahmed Mahfouz
    Researcher
    Handset

  9. #9
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Dailogs and his features

    I am not a resource compiler but you already have one in your SDK and it will either generate the compiled resources or tell you where/what is wrong with them. All you have to do is have a look at the output and fix the reported issues.

    If you want help post the compiler output here (and similar in the eddl.lib thread).
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  10. #10
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    Quote Originally Posted by ltomuta View Post
    I am not a resource compiler but you already have one in your SDK and it will either generate the compiled resources or tell you where/what is wrong with them. All you have to do is have a look at the output and fix the reported issues.

    If you want help post the compiler output here (and similar in the eddl.lib thread).
    all this warning generated later after add .rsg or library to mmp file
    Code:
    Updating Symbian1.mmp based on Deb_S60_20_CW_WINSCW
    Making a backup of the mmp file with the name 'Symbian1.mmp'.bak
    Mmp file has been updated
    WINSCW (emulator) build
    Set build parameters for Deb_S60_20_CW_WINSCW
    1>------ Build started: Project: Symbian1, Configuration: Deb_S60_20_CW_WINSCW Win32 ------
    1>Performing Pre-Build Event...
    1>* Current build configuration: WINSCW UDEB
    1>Copying exports for sdk: S60_20_CW
    1>Done
    1>Linking...
    1>Symbian1.obj : warning LNK4078: multiple '.data' sections found with different attributes (40301040)
    1>   Creating library C:\Symbian\7.0s\Series60_v20_CW\\Epoc32\release\winscw\udeb\z\\system\apps\symbian1\Symbian1.lib and object C:\Symbian\7.0s\Series60_v20_CW\\Epoc32\release\winscw\udeb\z\\system\apps\symbian1\Symbian1.exp
    1>Symbian1.obj : error LNK2019: CBDERR -- unresolved external symbol "public: class CCoeControl * __thiscall CEikDialog::Control(int)const " (?Control@CEikDialog@@QBEPAVCCoeControl@@H@Z) referenced in function "private: virtual void __thiscall CSimpleExDialog::PreLayoutDynInitL(void)" (?PreLayoutDynInitL@CSimpleExDialog@@EAEXXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "private: virtual class CCoeControl * __thiscall CEikDialog::FadedComponent(int)" (?FadedComponent@CEikDialog@@EAEPAVCCoeControl@@H@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "private: virtual int __thiscall CEikDialog::CountFadedComponents(void)" (?CountFadedComponents@CEikDialog@@EAEHXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual class CEikCaptionedControl * __thiscall CEikDialog::GetFirstLineOnFirstPageOrNull(void)" (?GetFirstLineOnFirstPageOrNull@CEikDialog@@MAEPAVCEikCaptionedControl@@XZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual int __thiscall CEikDialog::MappedCommandId(int)" (?MappedCommandId@CEikDialog@@MAEHH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual int __thiscall CEikDialog::BorderStyle(void)" (?BorderStyle@CEikDialog@@MAEHXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::SetSizeAndPosition(class TSize const &)" (?SetSizeAndPosition@CEikDialog@@MAEXABVTSize@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::HandleInteractionRefused(int)" (?HandleInteractionRefused@CEikDialog@@MAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::HandleControlStateChangeL(int)" (?HandleControlStateChangeL@CEikDialog@@MAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::SetInitialCurrentLine(void)" (?SetInitialCurrentLine@CEikDialog@@MAEXXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::PostLayoutDynInitL(void)" (?PostLayoutDynInitL@CEikDialog@@MAEXXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::HandleControlEventL(class CCoeControl *,enum MCoeControlObserver::TCoeEvent)" (?HandleControlEventL@CEikDialog@@MAEXPAVCCoeControl@@W4TCoeEvent@MCoeControlObserver@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "private: virtual void __thiscall CEikDialog::Reserved_2(void)" (?Reserved_2@CEikDialog@@EAEXXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "private: virtual void __thiscall CEikDialog::ConstructFromResourceL(class TResourceReader &)" (?ConstructFromResourceL@CEikDialog@@EAEXAAVTResourceReader@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "private: virtual class TSize __thiscall CEikDialog::MinimumSize(void)" (?MinimumSize@CEikDialog@@EAE?AVTSize@@XZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual class CCoeControl * __thiscall CEikDialog::ComponentControl(int)const " (?ComponentControl@CEikDialog@@MBEPAVCCoeControl@@H@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual int __thiscall CEikDialog::CountComponentControls(void)const " (?CountComponentControls@CEikDialog@@MBEHXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::WriteInternalStateL(class RWriteStream &)const " (?WriteInternalStateL@CEikDialog@@MBEXAAVRWriteStream@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::PrepareContext(class CWindowGc &)const " (?PrepareContext@CEikDialog@@MBEXAAVCWindowGc@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual void __thiscall CEikDialog::GetCustomAutoValue(void *,int,class CCoeControl const *)" (?GetCustomAutoValue@CEikDialog@@UAEXPAXHPBVCCoeControl@@@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual enum MEikDialogPageObserver::TFormControlTypes __thiscall CEikDialog::ConvertCustomControlTypeToBaseControlType(int)const " (?ConvertCustomControlTypeToBaseControlType@CEikDialog@@UBE?AW4TFormControlTypes@MEikDialogPageObserver@@H@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual struct SEikControlInfo __thiscall CEikDialog::CreateCustomControlL(int)" (?CreateCustomControlL@CEikDialog@@UAE?AUSEikControlInfo@@H@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::LineChangedL(int)" (?LineChangedL@CEikDialog@@MAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::PageChangedL(int)" (?PageChangedL@CEikDialog@@MAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "protected: virtual void __thiscall CEikDialog::PrepareForFocusTransitionL(void)" (?PrepareForFocusTransitionL@CEikDialog@@MAEXXZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual void __thiscall CEikDialog::MakeVisible(int)" (?MakeVisible@CEikDialog@@UAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual class TCoeInputCapabilities __thiscall CEikDialog::InputCapabilities(void)const " (?InputCapabilities@CEikDialog@@UBE?AVTCoeInputCapabilities@@XZ)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual void __thiscall CEikDialog::HandleResourceChange(int)" (?HandleResourceChange@CEikDialog@@UAEXH@Z)
    1>Symbian1.obj : warning LNK2001: CBDWRN -- unresolved external symbol "public: virtual void __thiscall CEikDialog::GetColorUseListL(class CArrayFix<class TCoeColorUse> &)const " (?GetColorUseListL@CEikDialog@@UBEXAAV?$CArrayFix@VTCoeColorUse@@@@@Z)
    1>C:\Symbian\7.0s\Series60_v20_CW\\Epoc32\release\winscw\udeb\z\\system\apps\symbian1\Symbian1.app : error CBDERR: Deleting the corrupted output.
    1>Build log was saved at "file://c:\Symbian\7.0s\Series60_v20_CW\Epoc32\ProjectLap\Symbian1\Symbian1\Deb_S60_20_CW_WINSCW\BuildLog.htm"
    1>Symbian1 - 2 error(s), 29 warning(s)
    Unset build parameters for Deb_S60_20_CW_WINSCW
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Ahmed Mahfouz
    Researcher
    Handset

  11. #11
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Re: Dailogs and his features

    haw can i use resources in code ?
    i can use directly by resource name or !!!!!!!!!!!1
    Ahmed Mahfouz
    Researcher
    Handset

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

    Re: Dailogs and his features

    As you can see, all messages are complaining about missing methods of class CEikDialog. Search for the class in the SDK Help, and check which .lib files are required for using it (the "Ling against: xy.lib" line at the top of the documentation page).

  13. #13
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Smile Re: Dailogs and his features

    i start to design this application by :
    -creat new symbian project and select project type is simple hello world project and adjust in this project by delete 2 labels and some other CWindowGc such as colore and ... and add dialog class

    this manner is right or not and
    what is the best way to creat an application conatain dialog? (note: i use Vs.net2005)
    Ahmed Mahfouz
    Researcher
    Handset

  14. #14
    Registered User
    Join Date
    Jun 2008
    Posts
    283

    Smile Re: Dailogs and his features

    to design dialog appliaction what the templet of project i sellect it note i useing vs.net 2005
    Ahmed Mahfouz
    Researcher
    Handset

  15. #15
    Nokia Developer Champion
    Join Date
    Jan 2008
    Location
    Moscow, Russia
    Posts
    3,348

    Re: Dailogs and his features

    Read this: Dialogs API: Using Dialogs API

    See simple example:

    // add to .rss
    Code:
    RESOURCE DIALOG r_dialog1
    	{ 
    	flags= EEikDialogFlagFillAppClientRect | EEikDialogFlagCbaButtons |  EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar ;
    	buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
    	items = 
    		{
    		DLG_LINE
    			{
    			type = EEikCtLabel;
    			id = ESimpleDlgCtlLabel;
    			control = LABEL 
    				{ 
    				txt = "ESimpleDlgCtlLabel";
    				};
    			},
    		DLG_LINE
    			{
    			type = EEikCtLabel;
    			id = ESimpleDlgCtlLabel2;
    			control = LABEL 
    				{ 
    				txt = "ESimpleDlgCtlLabel2";
    				};
    			}
    		};
    	}
    and show dialog :
    Code:
    //.cpp
    #include <YourAppName.rsg>
    ...
    CEikDialog* dlg = new(ELeave) CEikDialog;
    dlg->ExecuteLD(R_DIALOG1);

Posting Permissions

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