×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    waitnote flickering

    Hello friends,
    I am developing one application,which sends some files to server (while sending it shows wait note)and after recieving files on server it shows confirmation note on screen,upto all files send.

    But Problem is this ,that while showing wait note and confirmation note it flickers,so we can not see notes properly...i tried double buffering.http://wiki.forum.nokia.com/index.ph...uble_buffering
    .still i m not getting output...

    if any buddy knows about that plz help me..and tell me from where to call which function..
    Last edited by anamikapathak; 2009-09-08 at 07:07.

  2. #2
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    Plesae do check in this process you are not calling draw function again and again, it could lead to flicker of wait note and progress bar.
    Regards,
    Shafali

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    Thanks shafalig
    in my application problem is this,that waitnote and confirmation are very frequent,so how to avoid flickering....

  4. #4
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    As you show notes after every send and recieve of file form server, it shows up frequently. You can start the progress note with first sending and show confirmation note when your task is done. ANd keep counter for tracking how many files have been send and receive.

    If you can specify what exactly you are trying to achieve then i would be in better position to provide you with good suggestions.
    Regards,
    Shafali

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

    Re: waitnote flickering

    You could also try using the CEikProgressInfo::SetTextL() for updating the wait notes text, so you wouldn't need to use the confirmation dialog all of the time..

  6. #6
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    Quote Originally Posted by symbianyucca View Post
    You could also try using the CEikProgressInfo::SetTextL() for updating the wait notes text, so you wouldn't need to use the confirmation dialog all of the time..
    Thanks yucca and shafalig

    here i m giving u some code which i m using

    view class
    container class
    Http client class

    Here from Esend i m calling httpclient for each file sending...but wen it complete 1 file sending ,next sending time it flickers.....(thats a problem)
    =============================
    view class
    =============================
    case ESend:

    {
    if(iWaitScheduler)
    {
    if(iWaitScheduler->IsStarted())
    {
    iWaitScheduler->AsyncStop();
    }
    delete iWaitScheduler;
    iWaitScheduler = NULL;
    }

    STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iFlgSentFailure = EFalse;
    TInt countTotal; // Total number of files to be sent
    TInt countCurrent; //Current file while sending

    // open file server session

    TFindFile findFile(CEikonEnv::Static()->FsSession()); //Find the number of files available in the selected folder

    CDir* dirList = NULL;
    TInt err;
    TFileName ImagePath;
    // E:\Images\MPS\CAF\"cafno"\

    ImagePath.Append(KImagePath);
    TBuf<20> cafNo;
    cafNo.Copy(ireadCAF);
    ImagePath.Append(cafNo);
    ImagePath.Append(KPath);
    TFileName fullName;
    err = findFile.FindWildByPath(KFileFind,&ImagePath,dirList);
    if(err == KErrNone)
    {
    TInt countNo = 0 ;

    TFileName path = findFile.File();

    CHttpClient* httpCli;
    for(countNo = 0; countNo < dirList->Count(); countNo++)
    {
    countTotal = dirList->Count(); //Total no of files
    countCurrent= countNo + 1 ; //number of file out of total
    if(iCountTimedOut >= 4 )
    {
    CEikonEnv::Static()->InfoWinL(_L("Timed out."),_L(""));
    break ;
    }
    if(STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iFlgSentFailure) //If files recieved successfully keep sending files
    {
    if(STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iFlgCouldNotConnectToServer == EFalse)
    CEikonEnv::Static()->InfoWinL(_L("Server could not receive all the files."),_L("Please resend image(s)."));
    iCountTimedOut = iCountTimedOut + 1 ;
    //CEikonEnv::Static()->InfoWinL(_L("Server could not receive all the files."),_L("Please resend image(s)."));
    STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess = 0;
    /*CActiveSchedulerWait* waitScheduler = NULL;*/


    iWaitScheduler = new (ELeave) CActiveSchedulerWait;
    iWaitScheduler->Start();



    break; // break the for loop

    }
    else
    {

    TParse fileName;
    fileName.Set((*dirList)[countNo].iName,&path,NULL);
    fullName = fileName.FullName();
    iPath = fullName;


    //Start wait scheduler to wait until one by one file is sent
    // CActiveSchedulerWait* waitScheduler = NULL;
    iWaitScheduler = new (ELeave) CActiveSchedulerWait;

    //Start sending file
    httpCli = NULL;
    httpCli =CHttpClient::NewL(*iWaitScheduler) ;
    httpCli->StartClientL(iPath,ireadCAF,ETrue,countTotal,countCurrent);

    //Wait until 1 file is sent
    iWaitScheduler->Start();

    if(httpCli) //If files recieved successfully keep sending files
    {
    delete httpCli;
    httpCli = NULL;
    }
    if(iWaitScheduler)
    {
    delete iWaitScheduler;
    iWaitScheduler = NULL;
    }

    }


    } // end of For Loop
    //All the files are sent successfully...Send process request to the server.
    if(STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess == countTotal)
    {

    // CActiveSchedulerWait* waitScheduler = NULL;
    iWaitScheduler = new (ELeave) CActiveSchedulerWait;
    //Start sending file
    httpCli = NULL;
    httpCli =CHttpClient::NewL(*iWaitScheduler) ;
    httpCli->StartClientL(iPath,ireadCAF,ETrue,countTotal,countCurrent);
    //Wait until 1 file is sent
    iWaitScheduler->Start();
    if(httpCli)
    {
    delete httpCli;
    httpCli = NULL;
    }
    if(iWaitScheduler)
    {
    delete iWaitScheduler;
    iWaitScheduler = NULL;
    }
    }

    httpclient class
    ===============================================

    container class
    ================================
    voidMyContainer::Draw(const TRect& aRect) const
    {
    CWindowGc& gc = SystemGc();
    gc.DrawRect( aRect );
    gc.Clear(aRect);

    gc.SetPenStyle( CGraphicsContext::ENullPen );
    gc.SetBrushColor( KRgbWhite );
    gc.SetBrushStyle( CGraphicsContext::ESolidBrush );
    gc.UseFont(LatinBold19());

    _LIT(Ktext,"xyz");
    gc.SetPenColor(KRgbBlue);
    TPoint pos(15,40);
    gc.DrawText(Ktext,pos);



    // Copy backbuffer to the screen
    gc.BitBlt(TPoint(0, 0), iBackBuffer);

    }

  7. #7
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    Here in this code progress note is not being shown. there would definitily be some other class showing progress dialo.
    Just see that class doent get initialise with every time you send the request.
    Regards,
    Shafali

  8. #8
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    sorry i forgot to mension http class


    http class
    ======================
    if(STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess == iCountTotal)
    {
    dispText.Delete(0,dispText.Length());
    _LIT(KSending, "Sending request to server for processing CAF. Please wait...");
    dispText.Append(KSending);
    }
    else
    {
    dispText.Delete(0,dispText.Length());
    _LIT(KSending1, "Sending ");
    _LIT(KSending2," image(s) to the server. Please wait...");
    TInt64 no;
    no = iCountTotal - STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess ;
    dispText.Append(KSending1);
    dispText.AppendNum(no);
    dispText.Append(KSending2);


    }

    iDialog->SetTextL(dispText);
    iDialog->ExecuteLD(WAITDIALOG);

  9. #9
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    As in the code you are executing dialog again and again that is why it is flickering with every request.

    You should make dilaog in your UI class not engine, Create dialog in the class from where you send the request, at the place which is not called again and again or put some cndition like when count==0 and delete the dialog when your work is done i think (STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess == countTotal) with in this condiiton
    .
    Regards,
    Shafali

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

    Re: waitnote flickering

    Yep, I would recommending readin my last post for a helpful hint..

  11. #11
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    Thanks
    symbianyucca and shafalig
    Its working..

  12. #12
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    Hi symbianyucca ,
    Again that flickering problem started,Can u plz check below (which i have post alredy) given code once again and suggest me to do something...


    Plz its argent

    Thanks

  13. #13
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    Quote Originally Posted by anamikapathak View Post
    Hi symbianyucca ,
    Again that flickering problem started,Can u plz check below (which i have post alredy) given code once again and suggest me to do something...


    Plz its argent

    Thanks

    You forgot to post your new code, how your are handling dialog now?
    Regards,
    Shafali

  14. #14
    Registered User
    Join Date
    Jan 2009
    Posts
    32

    Re: waitnote flickering

    Quote Originally Posted by shafali gupta View Post
    You forgot to post your new code, how your are handling dialog now?
    Hi shafali,
    Code is same like previous,here i m giving a Brief ...

    view class= having a loop to send 5 files to server,so it is using CActiveWaitScheduler

    httpClient class make connection,and uses a CAknWaitNote, it implements MHFRunL().

    When httpclient starts wait dialogue ,it returns to view class and uses iWaitScheduler->Start();,then wait note starts.

    Problem is while printing response 4m server it flickers and then for further loop also it starts flicking..

    What to do....plz check posted code...

  15. #15
    Super Contributor
    Join Date
    Nov 2004
    Posts
    1,009

    Re: waitnote flickering

    Quote Originally Posted by anamikapathak View Post
    Hi shafali,
    Code is same like previous,here i m giving a Brief ...

    view class= having a loop to send 5 files to server,so it is using CActiveWaitScheduler

    httpClient class make connection,and uses a CAknWaitNote, it implements MHFRunL().

    When httpclient starts wait dialogue ,it returns to view class and uses iWaitScheduler->Start();,then wait note starts.

    Problem is while printing response 4m server it flickers and then for further loop also it starts flicking..

    What to do....plz check posted code...
    I have already suggested you to optimise the way you are using wait dialog.

    As in the code you are executing dialog again and again that is why it is flickering with every request.

    You should make dilaog in your UI class not engine, Create dialog in the class from where you send the request, at the place which is not called again and again or put some cndition like when count==0 and delete the dialog when your work is done i think (STATIC_CAST(CMobilePhoneScannerAppUi *,CEikonEnv::Static()->EikAppUi())->iCountSuccess == countTotal) with in this condiiton
    .

    Dont create wait dialoga again and again with evry request when you need to show confirmation , dismiss dialog and then show it again after confirmation.
    Regards,
    Shafali

Similar Threads

  1. waitnote display problem
    By ash_leo in forum Symbian
    Replies: 2
    Last Post: 2008-12-10, 13:27
  2. Flickering problem in Nokia-e61
    By aravindra in forum Mobile Java General
    Replies: 3
    Last Post: 2008-01-15, 11:39
  3. How to avoid flickering when using flashBacklight?
    By MobileVisuals in forum Mobile Java General
    Replies: 0
    Last Post: 2007-12-08, 08:33
  4. how to display a flickering cursor in RESOURCE SECRETED
    By zasdfaaa in forum Symbian User Interface
    Replies: 0
    Last Post: 2006-11-09, 01:48
  5. Replies: 0
    Last Post: 2006-11-09, 01:44

Posting Permissions

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