Professional Web Applications Themes

OSX Carbon Console??? - Mac Programming

How can I printf() or fprintf(stderr,) using the project builder for OSX Carbon? The debug thingy has a Standard I/O tab, but receives nothing... Please CC me any info. Thanks, MMCohen --================================================== ================== = Dr. Michael M. Cohen [email]mmcohenranx.ucsc.edu[/email] = = Program in Experimental Psychology = = 429G Social Sciences II 831-459-2655 VOICE = = University of California - Santa Cruz 831-459-2700 MESSAGES = = Santa Cruz, CA 95064 USA 831-459-3519 FAX = = WWW URL: [url]http://mambo.ucsc.edu/psl/mmc.html[/url] = ================================================== ====================...

  1. #1

    Default OSX Carbon Console???

    How can I printf() or fprintf(stderr,) using the project builder
    for OSX Carbon? The debug thingy has a Standard I/O tab, but
    receives nothing... Please CC me any info.
    Thanks, MMCohen

    --================================================== ==================
    = Dr. Michael M. Cohen [email]mmcohenranx.ucsc.edu[/email] =
    = Program in Experimental Psychology =
    = 429G Social Sciences II 831-459-2655 VOICE =
    = University of California - Santa Cruz 831-459-2700 MESSAGES =
    = Santa Cruz, CA 95064 USA 831-459-3519 FAX =
    = WWW URL: [url]http://mambo.ucsc.edu/psl/mmc.html[/url] =
    ================================================== ====================
    Dr. Michael M. Cohen Guest

  2. #2

    Default Re: OSX Carbon Console???

    In article <3F626831.3ECB67F8ranx.ucsc.edu>,
    "Dr. Michael M. Cohen" <mmcohenranx.ucsc.edu> wrote:
    >How can I printf() or fprintf(stderr,) using the project builder
    >for OSX Carbon? The debug thingy has a Standard I/O tab, but
    >receives nothing...
    NSLog() is the standard debugging tool. You can NSLog() any
    NSString or anything that coerces into an NSString so.

    NSLog("got to here in the program")

    works.
    >Please CC me any info.
    No. Don't post to groups you don't read. And please don't
    multipost to .misc: that group is for things that don't fit
    in the other groups of that hierarchy.


    Simon Slavin Guest

  3. #3

    Default Re: OSX Carbon Console???

    Dr. Michael M. Cohen wrote:
    > How can I printf() or fprintf(stderr,) using the project builder
    > for OSX Carbon? The debug thingy has a Standard I/O tab, but
    > receives nothing... Please CC me any info.
    > Thanks, MMCohen
    There is a bug in the standard output view for Project Builder that
    sometimes causes it to not flush when a newline is output. Use
    fflush(stdout); or fflush(NULL); explicitly and you should see your
    printf() output.

    -Peter

    Peter Ammon Guest

  4. #4

    Default Re: OSX Carbon Console???

    In article <BB8BFFC69668670DCD10.0.1.2>,
    [email]slavinshearsay.demon.co.uk[/email]localhost (Simon Slavin) wrote:
    > In article <3F626831.3ECB67F8ranx.ucsc.edu>,
    > "Dr. Michael M. Cohen" <mmcohenranx.ucsc.edu> wrote:
    >
    > >How can I printf() or fprintf(stderr,) using the project builder
    > >for OSX Carbon? The debug thingy has a Standard I/O tab, but
    > >receives nothing...
    >
    > NSLog() is the standard debugging tool. You can NSLog() any
    > NSString or anything that coerces into an NSString so.
    >
    > NSLog("got to here in the program")
    >
    > works.
    Although people who say they're using Carbon may be reluctant to link in
    Cocoa just to get NSLog, eh? Especially when printf's already available
    by default.

    I posted a response earlier that doesn't seem to have shown up. The key
    is going to be calling fflush() on the relevant output buffer-- i.e.
    "fflush(stderr)" or "fflush(stdout)".

    --
    Tom "Tom" Harrington
    Macaroni, Automated System Maintenance for Mac OS X.
    Version 1.4: Best cleanup yet, gets files other tools miss.
    See [url]http://www.atomicbird.com/[/url]
    Tom Harrington Guest

Similar Threads

  1. cfmail carbon copy
    By timrande in forum Macromedia ColdFusion
    Replies: 3
    Last Post: June 8th, 09:51 PM
  2. KeyFilters (Carbon)
    By Andrew Clay in forum Mac Programming
    Replies: 0
    Last Post: September 12th, 06:23 AM
  3. Using Image Well with Carbon API
    By Frederick Cheung in forum Mac Programming
    Replies: 0
    Last Post: August 10th, 10:00 PM
  4. Carbon Window Help
    By Peter Ammon in forum Mac Programming
    Replies: 0
    Last Post: July 11th, 05:21 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139