Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Mar 2007

    Question Multiple markers at this line with RThread

    I am trying to create an RThread object in my AppUi but my compiler is giving me the following error message . Please help .

    Multiple Markers at ths line
    '-RThread::Create(const TDesC16 & ,(int*)(void*),int,int,int,void*,
    TOwnerType)non static
    -RThread::Create(const TDesC16 & ,(int*)(void*),int,RHeap*,void*,
    TOwnerType)non static
    -RThread::Create(const TDesC16 & ,(int*)(void*),int,void*,RLibrary*,RHeap*,int,int,
    TOwnerType)non static
    -function call [RThread].Create({lval} const TLitC< 13 >,(int*)(void*)(CAknExGridAppUi::*)(),int,int,int,void*,
    TOwnerType)' does not match

    iThreadTicker.Create( KThreadTicker ,RunTicker, 4096, 1000, 5120,(void*)NULL,EOwnerProcess);
    TThreadFunction CAknExGridAppUi::RunTicker()
    // mark the heap start
      // create the obligatory cleanup stack
    	  CTrapCleanup* cleanup=CTrapCleanup::New();
    	  // execute the init console function, trapped
    	  {iDrawer0 =new (ELeave) CDrawer();
    			 iDrawer0->ConstructL( TRect(TPoint(0,0), TSize(ClientRect().Width(),16))
    			       		   			,0 ,KRgbDarkBlue,KRgbWhite,1);
    		iDrawer1 =new (ELeave) CDrawer();
    		iDrawer1->SetMopParent( this );
    		iDrawer1->ConstructL(  TRect(TPoint(0,0), TSize(ClientRect().Width(),16))
    			       		   			,1,KRgbWhite, KRgbDarkBlue,1);
    	   // no error or panic
    	  	  __ASSERT_ALWAYS(!error,User::Panic(_L("Error in thread"),error));
    	  	  // clean the cleanup stack
    	  	  delete cleanup;
    	  	  // mark the end
    	        return NULL;

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Oslo, Norway

    Re: Multiple markers at this line with RThread

    Consider re-reading what TThreadFunction is. It is not a return type, it defines how the thread function should look like.
    Quote Originally Posted by SDK Help
    typedef TInt(* TThreadFunction)(TAny*);
    The green(lime) part shows that it is a function pointer, imagine RunTicker there (replacing the full string), and remove the typedef:
    static TInt RunTicker(TAny *aAny);
    should appear in the header file (note the static: thread can not run "inside" an object, it has to be a global function)
    - so the "this" references will not work
    - unfortunately the whole concept will not work, since accessing the GUI part of your application directly from a secondary thread is not possible, CONE is designed to be used from a single thread.

    What do you need exactly? Remember the signature of Paul Todd (http://discussion.forum.nokia.com/fo...r.php?u=113310)

Similar Threads

  1. i cant build helloworld project
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 2
    Last Post: 2008-12-22, 12:38
  2. Error while making sis file
    By lalitjadiya in forum Symbian
    Replies: 9
    Last Post: 2008-05-20, 17:18
  3. carbidec++ helloworld project problem
    By akhin in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2007-03-11, 12:40
  4. carbide build problem help please
    By berkcekisbas in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2006-09-26, 19:41

Posting Permissions

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