Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor mit@indianic.com's Avatar
    Join Date
    Feb 2009
    Location
    Ahmedabad
    Posts
    51
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    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 mit@indianic.com's Avatar
    Join Date
    Feb 2009
    Location
    Ahmedabad
    Posts
    51
    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 Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,671
    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 C++
    Replies: 20
    Last Post: 2008-12-04, 00:28
  2. Replies: 6
    Last Post: 2007-08-03, 04:04
  3. problem adding an active Object to a another thread
    By adinkesp in forum Symbian C++
    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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved