Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 11th, 2005, 03:48 AM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Unhappy MultiThreading issue

I'm trying to create a multithreaded application and beside the fact that I have to use Synchronize() everytime I call VCL procedures or set properties (which I got used to) ... I have a big problem ...
While transforming my old app to this new shiny multithreaded one I realised that my old app used some procedures with 5-6 parameters (ex: procedure(par1,par2, ...) and if I try to convert that procedure call to a Synchronize call (ex: Synchronize(procedure(par1,par2, ... ))
Code:
[Error] uThread1.pas(199): Incompatible types: 'TThreadMethod' and 'procedure, untyped pointer or untyped parameter'


Is there anything I can do to avoid that, besides moving the procedure to the main form ?
__________________
If i've been helpful, please add to my reputation.
My unfinished site: http://www.dever.ro

Last edited by SilverDB : May 11th, 2005 at 06:55 AM.

Reply With Quote
  #2  
Old June 12th, 2005, 12:26 PM
CyberAlien CyberAlien is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Posts: 24 CyberAlien User rank is Private First Class (20 - 50 Reputation Level)CyberAlien User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 h 57 m 16 sec
Reputation Power: 0
Create new dummy procedure and use some variables in thread class to pass parameters to it and in that procedure call correct procedure with all parameters.

Reply With Quote
  #3  
Old June 15th, 2005, 12:17 PM
SilverDB's Avatar
SilverDB SilverDB is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Location: Romania
Posts: 173 SilverDB User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 45 m 53 sec
Reputation Power: 5
Send a message via Yahoo to SilverDB
Thank you for your reply ... after all there was no need for multiple threads, but it's good to know what to do in that kind of situation

P.S. The answer was right in front of my eyes

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > MultiThreading issue


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT