×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Location
    Ahmedabad
    Posts
    51

    [moved] Active Object Timer Problem

    I am working in Carbide C++ for S60 5th editon.

    I have created one(Active objects) class for Set the timer(sheduler) functionality.

    I have 3 Class
    (1) HelloIndiaAppUi.cpp
    Method(1) DisplayImage();
    (2) CExampleTimer.cpp
    Method(1) RunL();
    (3) HelloIndiaAppView.cpp


    I want to call DisplayImage function in RunL Function so what can i do for that ?
    as of now i have created one object of my timer class into AppView.cpp file and call the StartL(10000000) and is working fine for me.
    but my question is that how can i call DisplayImage() function in Timer.cpp file

    I have already tryied to create object of AppUI.cpp class object into Timer class but i could not get any idea.

    Thanks

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

    Re: Active Object Timer Problem

    Have you checked Wiki for timer examples ?

    Basically I suppose the wiki example has a callback interface defined, thus you could call the function defined in that interface inside your timer classes RunL to inform the upper levels, then basically you would derive the interface in your Appui class, implement the function, and call your DisplayImage function inside it.

  3. #3
    Regular Contributor
    Join Date
    Feb 2009
    Location
    Ahmedabad
    Posts
    51

    Re: Active Object Timer Problem

    Thanks for your reply.

    but still i have face the problem, i am not able to create object of AppUI Class in ExampleTimer Class.

    i am getting the error:
    illegal use of incomplete struct/union/class 'CImageConverterAppUi'

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

    Re: Active Object Timer Problem

    You don't need to have a Appui in your timer class, just define a interface, and use it. Basically it is better not to bind classes too much together.

    You could check any asyncronous CTelephony example from the Wiki for hints on how the callback thing can be implemented.

Similar Threads

  1. Wrong implementation of active object
    By petr_kovar in forum Symbian
    Replies: 20
    Last Post: 2008-12-04, 00:28
  2. Replies: 6
    Last Post: 2007-08-03, 04:04
  3. Replies: 6
    Last Post: 2007-06-14, 22:02
  4. Active Object in S60 3rd Emulator problem
    By senyasumkin1 in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-12-14, 13:36
  5. Replies: 1
    Last Post: 2002-08-28, 09:12

Posting Permissions

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