×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    103

    Unhappy Getting error when try to add controls in form

    Hi to all,
    Hope you all will be fine. I am creating form. Form is successfully created. But when i try to add item to form i get kErn-Exe3 error. Please tell me what i am doing wrong. If i comment the code then there is no error.

    Code:
    void CL3_Mazazeek_AssignDefaultToneScreen_ViewContainer::PreLayoutDynInitL()
    	{
    	
    	_LIT( caption, "New Control" );
    	 TInt pageId = ActivePageId();
    	 TInt id = iTotalControls++; 
    	 TInt type = EEikCtEdwin;
    	 TAny* unused=0;
    	 
    	 iNumEditor1 = (CEikNumberEditor*)CreateLineByTypeL(caption, pageId, id, type, unused);
    	 iNumEditor1->ConstructL(0, 100, 0);
    	 Line( id )->ActivateL();
    	 SetEditableL( IsEditable() ) ;
    	 DrawNow();
    	
    	
    	LoadFromDataL();
    	}

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

    Re: Getting error when try to add controls in form

    "type = EEikCtEdwin" and "(CEikNumberEditor*)CreateLineByTypeL" is not a good combination.

  3. #3
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    103

    Re: Getting error when try to add controls in form

    Hmm. But i am again getting error after changing type

    Code:
    ...
    CEikNumberEditor* iNumEditor1;
    
    ....
    
    
    _LIT( caption, "New Control" );
    	 TInt pageId = ActivePageId();
    	 TInt id = iTotalControls++; 
    	 TInt type = EEikCtNumberEditor;
    	 TAny* unused=0;
    	 
    	 iNumEditor1 = (CEikNumberEditor*)CreateLineByTypeL(caption, pageId, id, type, unused);   // This line causing error
    	 iNumEditor1->ConstructL(0, 999, 0);
    	 Line( id )->ActivateL();
    	 SetEditableL( IsEditable() ) ;
    	 DrawNow();
    Am i casting wrong ?

  4. #4
    Regular Contributor
    Join Date
    Jun 2010
    Posts
    103

    Re: Getting error when try to add controls in form

    This is working

    Code:
    _LIT( caption, "New Control" );
    	 TInt pageId = ActivePageId();
    	 TInt id = 1; 
    	 TInt type = EEikCtNumberEditor;
    	 TAny* unused=0;
    	 
    	 iNumEditor1 = (CEikNumberEditor*)CreateLineByTypeL(caption, pageId, id, type, unused);
    	 iNumEditor1->ConstructL(0, 99999, 0);
    	 Line( id )->ActivateL();
    	 SetEditableL( IsEditable() ) ;
    	 DrawNow();

Similar Threads

  1. Replies: 4
    Last Post: 2011-06-08, 10:08
  2. Replies: 6
    Last Post: 2011-03-16, 15:21
  3. Replies: 2
    Last Post: 2009-05-13, 12:52
  4. I'm getting square blocks when I try to display Asian languages
    By Lindron in forum Mobile Java General
    Replies: 2
    Last Post: 2008-07-18, 11:27
  5. Why does it unnamed when I try to add the contactlist
    By pornchaispencer in forum Mobile Java General
    Replies: 1
    Last Post: 2008-06-25, 09:17

Posting Permissions

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