Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress bar will not update.



I believe that if you're building a Mach-O app, Apple has explicitly stated that the UPP calls do nothing, don't need to be used, and they even became no-ops in the Leopard headers.
I haven't verified this, it's just what I've heard.


Uli Kusterer wrote:
Am 28.11.2007 um 02:34 schrieb Julie Porter:
void RegisterForEvents(WindowRef myWindow)
{
EventTypeSpec cmdEvent; cmdEvent.eventClass = kEventClassCommand;
cmdEvent.eventKind = kEventProcessCommand;
EventHandlerUPP handlerUPP;
handlerUPP = NewEventHandlerUPP(CommandEventHandler);


  EventTargetRef target;
      target = GetWindowEventTarget(myWindow);

  void * userdata = NULL;
  InstallEventHandler(target, handlerUPP, 1,  & cmdEvent,
      userdata,NULL);
}


A UPP is a structure that wraps a function pointer. As such, you only need it once for every function. What people generally do is define a UPP as static to a function, and then they can allocate it once, re-use it, and it gets disposed with the rest of the application on shutdown.

That said, many of the UPP calls compile down to no-ops on OS X, because they were mainly invented for calling 680x0 function on PowerPC Macs, and thus in many cases you can just pass a straight ProcPtr into UPP-expecting APIs.

Cheers,
-- M. Uli Kusterer
"The Witnesses of TeachText are everywhere..."


_______________________________________________ Do not post admin requests to the list. They will be ignored. Carbon-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >Progress bar will not update. (From: Julie Porter <email@hidden>)
 >Re: Progress bar will not update. (From: Eric Schlegel <email@hidden>)
 >Re: Progress bar will not update. (From: Julie Porter <email@hidden>)
 >Re: Progress bar will not update. (From: Eric Schlegel <email@hidden>)
 >Re: Progress bar will not update. (From: Julie Porter <email@hidden>)
 >Re: Progress bar will not update. (From: Uli Kusterer <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.