Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the Cocoa equivalent of UpdateSystemActivity?
    primarykey
    data
    text
    <p>I'm converting a Carbon app to a Cocoa app and I can't find the Cocoa equivalent for:</p> <pre><code>UpdateSystemActivity(UsrActivity); </code></pre> <p>Any Mac people out there care to point me in the right direction? Thanks.</p> <p><strong>UPDATE</strong>: I'm building 64bit. Building 32bit works fine, but I get symbol not declared in this scope errors for UpdateSystemActivity (and others) when I build for 64bit.</p> <p><strong>UPDATE2</strong>: I'm importing the following:</p> <pre><code>#import &lt;Cocoa/Cocoa.h&gt; #import &lt;Carbon/Carbon.h&gt; #import &lt;OpenGL/CGLMacro.h&gt; </code></pre> <p>Is there some other thing I need to import when building 64bit?</p> <p><strong>UPDATE3</strong>: Adding <code>#import &lt;CoreServices/CoreServices.h&gt;</code> did not help. I still get compiler errors telling me UpdateSystemActivity and UsrActivity was not declared in this scope.</p> <p><strong>UPDATE4</strong>: Okay, file not found on OSServices/Power.h. I'm building against the 10.5 SDK and a quick search shows:</p> <pre><code>$ pwd /Developer/SDKs $ find . -name Power.h ./MacOSX10.3.9.sdk/Developer/Headers/CFMCarbon/OSServices/Power.h ./MacOSX10.3.9.sdk/Developer/Headers/CFMCarbon/Power.h ./MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon/Power.h ./MacOSX10.3.9.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/Headers/Power.h ./MacOSX10.4u.sdk/Developer/Headers/CFMCarbon/OSServices/Power.h ./MacOSX10.4u.sdk/Developer/Headers/CFMCarbon/Power.h ./MacOSX10.4u.sdk/Developer/Headers/FlatCarbon/Power.h ./MacOSX10.4u.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/Headers/Power.h ./MacOSX10.5.sdk/Developer/Headers/FlatCarbon/Power.h ./MacOSX10.5.sdk/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/Headers/Power.h </code></pre> <p>Yet I get:</p> <pre><code>Mac.mm:6:29: error: OSServices/Power.h: No such file or directory Mac.mm:6:29: error: OSServices/Power.h: No such file or directory </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload