Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / May 2004



Tip: Looking for answers? Try searching our database.

SystemTask() replacement in Carbon

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vincent Predoehl - 28 May 2004 23:03 GMT
hello, I am porting my application from MacOS 9 to Carbon.  I have a
while loop that SystemTask() while the mouse button is held down.

Since SystemTask() is not available in Carbon, is there another function
more appropriate I should call in this loop so my application doesn't
hog CPU resources?

Signature

Vincent

Milton Aupperle - 28 May 2004 23:51 GMT
> hello, I am porting my application from MacOS 9 to Carbon.  I have a
> while loop that SystemTask() while the mouse button is held down.
>
> Since SystemTask() is not available in Carbon, is there another function
> more appropriate I should call in this loop so my application doesn't
> hog CPU resources?

Yes.

See "Tracking the mouse with TrackMouseLocation"

http://developer.apple.com/documentation/Carbon/Conceptual/Carbon_Event_
Manager/Tasks/chapter_18_section_10.html

HTH..

Milton Aupperle
Miro Jurisic - 29 May 2004 21:02 GMT
> hello, I am porting my application from MacOS 9 to Carbon.  I have a
> while loop that SystemTask() while the mouse button is held down.
>
> Since SystemTask() is not available in Carbon, is there another function
> more appropriate I should call in this loop so my application doesn't
> hog CPU resources?

Reimplement your code to use mouse tracking events. See TrackMouseLocation and
TrackMouseRegion.

hth

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

Toby Thain - 30 May 2004 11:10 GMT
> hello, I am porting my application from MacOS 9 to Carbon.  I have a
> while loop that SystemTask() while the mouse button is held down.
>
> Since SystemTask() is not available in Carbon, is there another function
> more appropriate I should call in this loop so my application doesn't
> hog CPU resources?

If you use WaitNextEvent, which is in Carbon[1], then SystemTask is
not needed at all.

(Unless you wish to rewrite around Carbon Events[2])

Toby

[1] http://developer.apple.com/documentation/Carbon/Reference/Event_Manager/event_mg
r_ref/function_group_5.html#//apple_ref/c/func/WaitNextEvent

[2] http://developer.apple.com/documentation/Carbon/Conceptual/Carbon_Event_Manager/
Concept/chapter_17_section_4.html

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.