OSX Carbon Console???

Ask a Question related to Mac Programming, Design and Development.

  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]mmcohen@ranx.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. Similar Questions and Discussions

    1. Carbon Bundle projectors??
      I found the page on Macromedia.com explaining how to do it, and it works in OS X but i can't get it to open in OS9... are there anything i should do?...
    2. KeyFilters (Carbon)
      I have an EditUnitcodeTextControl and what I want is for the keystrokes to be converted to uppercase (ie when the user types 'a' in the control, it...
    3. Using Image Well with Carbon API
      On Sun, 10 Aug 2003, yelko wrote: The obvious way would be to use an image well control, if not there's always DrawThemeGenericWell (from...
    4. Resource files and Carbon - PLEASE HELP!
      I've been messing with this for hours, and am at my wit's end. If anyone has an ideas, please help! I find that when using FSpOpenResFile as a...
    5. Carbon Window Help
      Michael Austin wrote: My Quickdraw is a little rusty, but shouldn't you be setting the device too? You can use SetGWorld. -Peter
  3. #2

    Default Re: OSX Carbon Console???

    In article <3F626831.3ECB67F8@ranx.ucsc.edu>,
    "Dr. Michael M. Cohen" <mmcohen@ranx.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

  4. #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

  5. #4

    Default Re: OSX Carbon Console???

    In article <BB8BFFC69668670DCD@10.0.1.2>,
    [email]slavins@hearsay.demon.co.uk[/email]@localhost (Simon Slavin) wrote:
    > In article <3F626831.3ECB67F8@ranx.ucsc.edu>,
    > "Dr. Michael M. Cohen" <mmcohen@ranx.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

Posting Permissions

  • You may not post new threads
  • You may 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