FROM : Michael Ash
DATE : Sun Aug 06 22:46:21 2006
On 8/6/06, Mike Abdullah <mike.<email_removed>> wrote:
> Well here's my test class:
>
> #import "Controller.h"
>
> @implementation Controller
>
> static void statusCallback(FSFileOperationRef fileOp, const FSRef
> *currentItem, FSFileOperationStage stage, OSStatus error,
> CFDictionaryRef statusDictionary, void *info)
> {
> printf("statusCallback called");
> }
Unless you follow this printf with an fflush or a newline, it is
unlikely to actually appear on the screen unless you do a lot of other
IO afterwards. Are you *sure* this function never gets called? As
written, I would bet that it's getting called and you just aren't
seeing it because the printfs never get flushed to the screen.
To be absolutely sure, NSLog it, or fprintf to stderr and follow it up
with an fflush. Also put a breakpoint in the debugger so you can see
if it's actually reached that way.
Mike
DATE : Sun Aug 06 22:46:21 2006
On 8/6/06, Mike Abdullah <mike.<email_removed>> wrote:
> Well here's my test class:
>
> #import "Controller.h"
>
> @implementation Controller
>
> static void statusCallback(FSFileOperationRef fileOp, const FSRef
> *currentItem, FSFileOperationStage stage, OSStatus error,
> CFDictionaryRef statusDictionary, void *info)
> {
> printf("statusCallback called");
> }
Unless you follow this printf with an fflush or a newline, it is
unlikely to actually appear on the screen unless you do a lot of other
IO afterwards. Are you *sure* this function never gets called? As
written, I would bet that it's getting called and you just aren't
seeing it because the printfs never get flushed to the screen.
To be absolutely sure, NSLog it, or fprintf to stderr and follow it up
with an fflush. Also put a breakpoint in the debugger so you can see
if it's actually reached that way.
Mike
| Related mails | Author | Date |
|---|---|---|
| Mike Abdullah | Aug 6, 01:36 | |
| Jordan Krushen | Aug 6, 03:39 | |
| Mike Abdullah | Aug 6, 10:45 | |
| John Stiles | Aug 6, 17:42 | |
| Michael Ash | Aug 6, 19:31 | |
| Mike Abdullah | Aug 6, 22:10 | |
| Michael Ash | Aug 6, 22:46 | |
| Rosyna | Aug 6, 23:35 | |
| Mike Abdullah | Aug 7, 13:22 |






Cocoa mail archive

