×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Get secret editor input

    Hi,

    I'm using SECRETED control in my form. How to get input from user?
    I know for EDWIN control we use GetTextInHBufL.. but how about SECRETED?

    i refer to eikseced.h and found GetText(TDes& aText) const; function but don't know the correct way how to use it



    CEikSecretEditor* oldPassword = static_cast <CEikSecretEditor*> (ControlOrNull(ESMSExampleCIdOldCode));
    if (oldPassword)
    {
    HBufC* old = oldPassword->GetTextInHBufL();
    }

    thanks
    Last edited by ninidotnet; 2006-08-21 at 05:20.

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

    Re: Get secret editor input

    Try
    Code:
    ...
    {
    TBuf<40> old;
    oldPassword->GetText(old);
    ...
    }

  3. #3
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Re: Get secret editor input

    Hi wizard,
    Thanks. It's work :)

  4. #4
    Registered User
    Join Date
    Jul 2006
    Location
    Australia
    Posts
    7

    Re: Get secret editor input

    Hi.

    I'm enjoying developing for Symbian at the moment quite a lot (a Symbian 7.1 device at the moment). Thanks to the community for being supportive of a newcomer.

    However, I seem to have a strange error when reading a password from a secret editor. That is, instead of being getting "password" when I call GetText on my CEikSecretEditor, the debugger tells me GetText is getting L"\x4C28\x7480\xCCCC\xCCCC\x6094\x16FF\x6E18\x14C1". I thought it might be a Unicode problem, but running that value through a CnvUtfConverter::ConvertFromUnicodeToUtf() gave me complete rubbish.

    Do SecretEditors store the text in an encripted format internally or something? If so, how do get it out?

    Otherwise, is the code I'm using (below) incorrect?

    Code:
    TBuf<50> temp;
    
    // Get the text of the username (works fine)
    CEikEdwin* userText = static_cast<CEikEdwin *>(this->Control(EDialogUserPassUser));
    userText->GetText(temp);
    iSettings->SetUsername(temp);
    
    // Get the text of the password (THIS IS BROKEN!)
    CEikSecretEditor* passText = static_cast<CEikSecretEditor *>(this->Control(EDialogUserPassPass));
    passText->GetText(temp); // temp is the crazy value after this line here.
    iSettings->SetPassword(temp);
    I'm confident my iSettings lines are irrelevant here as temp has the strange value before that line.

    Hopefully its a simple thing for experienced Symbian developers to point out.

    Thankyou for your help.

    -Grit.

  5. #5
    Regular Contributor
    Join Date
    Apr 2006
    Location
    Malaysia
    Posts
    246

    Re: Get secret editor input

    Hi,
    I'm have problem with code below. Previuosly i'm using query for my sms but now want to change to form. but every time i want to send sms value to other function.. it crash. I think the problem is the size of TBuf. Anybody know how to handle this.

    TBuf<160> sms;
    CEikEdwin* message = static_cast <CEikEdwin*> (ControlOrNull(ESMSExampleCIdMessage));
    if (message)
    {
    message->GetText(sms);
    }



    p/s:To Gritter...I'm not very sure but maybe because you use the same variable for both editors.

Similar Threads

  1. secret editor dont show * and ...
    By saurbh_g in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-12-31, 13:33
  2. problems in secret editor in symbian.
    By platinnum in forum Symbian
    Replies: 3
    Last Post: 2005-04-25, 08:02
  3. Series 60 Alphanumeric Secret Editor
    By robgregson in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-01-10, 17:10
  4. Secret Editor In Series90
    By WinHw in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-03-17, 06:55
  5. Secret PC Connectivity SDK for 3650?
    By jurcso in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2004-01-22, 20:47

Posting Permissions

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