error "DPSConversion: 'scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, NULL, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer])"
where "<priority>" isOneOf {
"NX_BASETHRESHOLD",
"NSBaseThreshhold",
"NX_BASETHRESHOLD + 1",
"NSBaseThreshhold + 1",
}
/* no user info, priority = NX_RUNMODALTHRESHOLD */
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, NULL, <priority>);" with "
error "DPSConversion: 'timerWithTimerInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, NULL, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer])"
where "<priority>" isOneOf {
"NX_RUNMODALTHRESHOLD",
"NSRunModalThreshold",
"NX_RUNMODALTHRESHOLD + 1",
"NSRunModalThreshold + 1",
}
/* no user info, priority = NX_MODALRESPTHRESHOLD */
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, NULL, <priority>);" with "
error "DPSConversion: 'timerWithTimerInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, NULL, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer])"
where "<priority>" isOneOf {
"NX_MODALRESPTHRESHOLD",
"NSModalResponseThreshold",
"NX_MODALRESPTHRESHOLD + 1",
"NSModalResponseThreshold + 1",
}
/* no user info, priority is something else */
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, NULL, <priority>);" with "
error "DPSConversion: 'timerWithTimerInterval:target:selector:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, NULL, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer]), and <priority> should be converted to an NSRunLoop mode (NSDefaultRunLoopMode, NSModalPanelRunLoopMode, and NSEventTrackingRunLoopMode are predefined)"
error "DPSConversion: 'scheduledTimerWithTimeInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer]). The argument to userInfo: needs to be converted to an object and can be retrieved with [timer userInfo]."
where "<priority>" isOneOf {
"NX_BASETHRESHOLD",
"NSBaseThreshhold",
"NX_BASETHRESHOLD + 1",
"NSBaseThreshhold + 1",
}
/* with user info, priority = NX_RUNMODALTHRESHOLD or NX_MODALRESPTHRESHOLD */
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>);" with "
error "DPSConversion: 'timerWithTimeInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer]). The argument to userInfo: needs to be converted to an object and can be retrieved with [timer userInfo]."
where "<priority>" isOneOf {
"NX_RUNMODALTHRESHOLD",
"NSRunModalThreshold",
"NX_RUNMODALTHRESHOLD + 1",
"NSRunModalThreshold + 1",
}
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>);" with "
error "DPSConversion: 'timerWithTimeInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer]). The argument to userInfo: needs to be converted to an object and can be retrieved with [timer userInfo]."
where "<priority>" isOneOf {
"NX_MODALRESPTHRESHOLD",
"NSModalResponseThreshold",
"NX_MODALRESPTHRESHOLD + 1",
"NSModalResponseThreshold + 1",
}
/* with user info, priority is something else */
replace "<tag> = DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>);" with "
error "DPSConversion: 'timerWithTimeInterval:target:selector:userInfo:repeats:' used to be DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>). <handler> should be converted to a method with one argument (the timer), and <target> should be converted to the implementor of that method ([aTarget aSelector:timer]). The argument to userInfo: needs to be converted to an object and can be retrieved with [timer userInfo], and <priority> should be converted to an NSRunLoop mode (NSDefaultRunLoopMode, NSModalPanelRunLoopMode, and NSEventTrackingRunLoopMode are predefined)"
/* whatever has been left out */
replace "DPSAddTimedEntry(<period>, <handler>, <userData>, <priority>)" with same
error "DPSConversion: DPSAddTimedEntry is obsolete. Use the NSTimer class instead: [[NSTimer timerWithTimeInterval:<period> target:<target> selector:<handler> userInfo:<userData> repeats:YES] retain]. <target> should be an objects that implements method ([aTarget <handler>:timer])"
/* cleanup, since &proc is often used with DPSAddTimedEntry */
/* target is of type balanced because the rules above insert "<target>" */
error "DPSConversion: 'addPort:forMode:' used to be DPSAddPort(<port>, <handler>, <max>, <userdata>, <priority>). <port> should be retained to avoid loss through deallocation, and the functionality of <handler> should be implemented by a delegate of the NSPort in response to 'handleMachMessage:' or 'handlePortMessage:'."
where "<priority>" isOneOf {
"NX_BASETHRESHOLD",
"NSBaseThreshhold",
"NX_BASETHRESHOLD + 1",
"NSBaseThreshhold + 1",
}
replace "DPSAddPort(<port>, <handler>, <max>, <userdata>, <priority>)" with "
error "DPSConversion: 'addPort:forMode:' used to be DPSAddPort(<port>, <handler>, <max>, <userdata>, <priority>). <port> should be retained to avoid loss through deallocation, and the functionality of <handler> should be implemented by a delegate of the NSPort in response to 'handleMachMessage:' or 'handlePortMessage:'."
where "<priority>" isOneOf {
"NX_RUNMODALTHRESHOLD",
"NSRunModalThreshold",
"NX_RUNMODALTHRESHOLD + 1",
"NSRunModalThreshold + 1",
}
replace "DPSAddPort(<port>, <handler>, <max>, <userdata>, <priority>)" with "
error "DPSConversion: 'addPort:forMode:' used to be DPSAddPort(<port>, <handler>, <max>, <userdata>, <priority>). <port> should be retained to avoid loss through deallocation, and the functionality of <handler> should be implemented by a delegate of the NSPort in response to 'handleMachMessage:' or 'handlePortMessage:'."
error "DPSConversion: 'addPort:forMode:' used to be DPSAddPort(<b port>, <b handler>, <b max>, <b userdata>, <b priority>). <b port> should be retained to avoid loss through deallocation, the functionality of <b handler> should be implemented by a delegate of the NSPort in response to 'handleMachMessage:' or 'handlePortMessage:', and <b priority> should be converted to an NSRunLoop mode (NSDefaultRunLoopMode, NSModalPanelRunLoopMode, and NSEventTrackingRunLoopMode are predefined)."
replace "DPSRemovePort(<port>)" with "[[NSRunLoop currentRunLoop] removePort:[NSPort portWithMachPort:<port>] forMode:<mode>]"
warning "DPSConversion: 'removePort:forMode:' used to be DPSRemovePort(<port>). <port> should be retained to avoid loss through deallocation, and <mode> should be the mode for which the port was added."
/**************** DPSAddFD() ******************/
replace "DPSAddFD(<fd>, <handler>, <userdata>, <priority>);" with "
{
#warning __fd should really be created before here, since this one gets leaked
id __fd = [[NSFileHandle allocWithZone:NULL] initWithFileDescriptor:<fd> closeOnDealloc:NO]
[[NSNotificationCenter defaultCenter] addObserver:/* handler object goes here */
selector:@selector(/* handler object's handling selector goes here */)
name:NSFileHandleReadCompletionNotification
object:__fd];
#warning notification handler object should be removed from the notification center at some appropriate time
error "DPSConversion: 'readInBackgroundAndNotifyForModes:' used to be DPSAddFD(<fd>, <handler>, <userdata>, <priority>). The functionality of <handler> should be implemented by some object as a method."
where "<priority>" isOneOf {
"NX_BASETHRESHOLD",
"NSBaseThreshhold",
"NX_BASETHRESHOLD + 1",
"NSBaseThreshhold + 1",
}
replace "DPSAddFD(<fd>, <handler>, <userdata>, <priority>)" with "
{
#warning __fd should really be created before here, since this one gets leaked
id __fd = [[NSFileHandle allocWithZone:NULL] initWithFileDescriptor:<fd> closeOnDealloc:NO]
[[NSNotificationCenter defaultCenter] addObserver:/* handler object goes here */
selector:@selector(/* handler object's handling selector goes here */)
name:NSFileHandleReadCompletionNotification
object:__fd];
#warning notification handler object should be removed from the notification center at some appropriate time
error "DPSConversion: 'readInBackgroundAndNotifyForModes:' used to be DPSAddFD(<fd>, <handler>, <userdata>, <priority>). The functionality of <handler> should be implemented by some object as a method."
where "<priority>" isOneOf {
"NX_RUNMODALTHRESHOLD",
"NSRunModalThreshold",
"NX_RUNMODALTHRESHOLD + 1",
"NSRunModalThreshold + 1",
}
replace "DPSAddFD(<fd>, <handler>, <userdata>, <priority>)" with "
{
#warning __fd should really be created before here, since this one gets leaked
id __fd = [[NSFileHandle allocWithZone:NULL] initWithFileDescriptor:<fd> closeOnDealloc:NO]
[[NSNotificationCenter defaultCenter] addObserver:/* handler object goes here */
selector:@selector(/* handler object's handling selector goes here */)
name:NSFileHandleReadCompletionNotification
object:__fd];
#warning notification handler object should be removed from the notification center at some appropriate time
error "DPSConversion: 'readInBackgroundAndNotifyForModes:' used to be DPSAddFD(<fd>, <handler>, <userdata>, <priority>). The functionality of <handler> should be implemented by some object as a method."
where "<priority>" isOneOf {
"NX_MODALRESPTHRESHOLD",
"NSModalResponseThreshold",
"NX_MODALRESPTHRESHOLD + 1",
"NSModalResponseThreshold + 1",
}
replace "DPSAddFD(<fd>, <handler>, <userdata>, <priority>)" with "
{
#warning __fd should really be created before here, since this one gets leaked
id __fd = [[NSFileHandle allocWithZone:NULL] initWithFileDescriptor:<fd> closeOnDealloc:NO]
[[NSNotificationCenter defaultCenter] addObserver:/* handler object goes here */
selector:@selector(/* handler object's handling selector goes here */)
name:NSFileHandleReadCompletionNotification
object:__fd];
#warning notification handler object should be removed from the notification center at some appropriate time
[__fd readInBackgroundAndNotifyForModes:[NSArray arrayWithObjects:/* One or more of: NSDefaultRunLoopMode, NSModalPanelRunLoopMode, NSEventTrackingRunLoopMode, or user-defined */ nil]];
}"
error "DPSConversion: 'readInBackgroundAndNotifyForModes:' used to be DPSAddFD(<fd>, <handler>, <userdata>, <priority>). The functionality of <handler> should be implemented by some object as a method. The <priority> argument needs to be converted to one or more NSRunLoop modes (NSDefaultRunLoopMode, NSModalPanelRunLoopMode, and NSEventTrackingRunLoopMode are predefined)"
error "DPSConversion: DPSRemoveFD(<fd>) is obsolete. When monitoring of a file descriptor should be discontinued, the notification handler should simply not re-start the background operation."
/**************** others ******************/
replace "DPSAddNotifyPort(<b args>)" with same
error "DPSConversion: DPSAddNotifyPort() is obsolete. Use NSPort and NSRunLoop instead."
replace "DPSRemoveNotifyPortProc(<b args>)" with same
error "DPSConversion: DPSRemoveNotifyPortProc() is obsolete. Use NSPort and NSRunLoop instead."
replace "DPSStartWaitCursorTimer()" with "[[NSDPSContext currentContext] startWaitCursorTimer]"
/*********** DPSConversion: tracing ***********/
replace "DPSTraceContext(DPS_ALLCONTEXTS, <flag>)" with "[NSDPSContext setAllContextsOutputTraced:<flag>]"
replace "DPSTraceContext(<ctxt>, <flag>)" with "[<ctxt> setOutputTraced:<flag>]"
replace "DPSTraceEvents(<ctxt>, <flag>)" with "[NSDPSServerContext setEventsTraced:<flag>]"
/*********** DPSConversion: events ***********/
replace "DPSGetEvent(<balanced args>)" with same
error "DPSConversion: DPSGetEvent(...) must be converted by hand. Watch for return value. Threshold must become a mode. Also consider using an NSApplication or NSWindow method."
replace "DPSPeekEvent(<balanced args>)" with same
error "DPSConversion: DPSPeekEvent(...) must be converted by hand. Watch for return value. Threshold must become a mode. Also consider using an NSApplication or NSWindow method."
replace "DPSPostEvent(<balanced args>)" with same
error "DPSConversion: DPSPostEvent(...) must be converted by hand to 'postEvent:' method in NSWindow or NSApplication."
replace "DPSDiscardEvents(<balanced args>)" with same
error "DPSConversion: DPSDiscardEvents(...) must be converted by hand to the 'discardEventsMatchingMask:' method in NSWindow."
/*********** DPSConversion: other DPS functions ***********/
replace "DPSSendTaggedMsg(<ctxt>, <message>)" with "[<ctxt> sendTaggedMsg:<message>]"
replace "DPSSendPort(<ctxt>, <port>, <sendAllRights>)" with "[<ctxt> sendPort:<port> withAllRights:<sendAllRights>]"
replace "DPSSendEOF(<ctxt>)" with "[<ctxt> sendEOF]"
replace "DPSSetTracking(<flag>)" with "[NSDPSServerContext setEventCoalescingEnabled:<flag>]"
replace "DPSSetDeadKeysEnabled(<ctxt>, <flag>)" with "[NSDPSServerContext setDeadKeyProcessingEnabled:<flag>]"
replace "DPSAsynchronousWaitContext(<balanced args>)" with same
error "DPSConversion: DPSAsynchronousWaitContext(...) must be converted to '-notifyObjectWhenFinishedExecuting:'"
replace "DPSPrintError(<fp>, <error>)" with same
error "DPSConversion: DPSPrintError(...) must be converted to '+stringForDPSError:'. Maybe use NSLog([NSDPSContext stringForDPSError:<error>])"
replace "DPSPrintErrorToStream(<stream>, <error>)" with same
error "DPSConversion: DPSPrintErrorToStream(...) must be converted to '+stringForDPSError:'. Maybe use NSLog([NSDPSContext stringForDPSError:<error>])"
replace "DPSSynchronizeContext" with "DPSSetWrapSynchronization"