Search results

  1. S

    OS 9 to OS X Dialog programming confusion

    Do not use your old dialogs and do not use the Dialog Manager. You're on the right path with the CreateWindowFromNib() file call. That will load the dialog from the nib. What you have to do is replace the Dialog Manager calls with HIView calls. Call HIViewFindByID() to retrieve a reference to...
  2. S

    How do I solve this error? (C+)

    You declared the variable floatpi as an integer. You can't give an integer variable a floating-point value. Change the variable declaration in line 5 from int to either float or double.
  3. S

    C++ keypresses

    Do you need Standard C++ code that works on multiple operating systems or do you need to interpret keypresses in a Mac program? If all you need is a tutorial for a Mac program, I wrote an article on reading the keyboard with Carbon Events. The code that accompanies the article is written in C++.
  4. S

    Odd XCode debug issue

    1. Make sure you create groups for your subdirectories in the Groups and Files list. Choose File > New Group to create a new group. 2. Make sure your files' path types are set to Relative to Enclosing Group. Select a file, click the Info, and click the General tab to see the file's path type...
  5. S

    Odd XCode debug issue

    One thing I know that slows down debugging is using the GuardMalloc library. GuardMalloc makes your program run up to 100 times slower. Make sure the Enable Guard Malloc menu item isn't set in the Debug menu. The Debug menu shows the default keyboard equivalents for common debugging commands...
  6. S

    ZeroLink: unknown symbol ' '

    Turn off ZeroLink and rebuild your project. Your run time error should become a link error. The usual cause of link errors is Xcode not being able to find a library or header file. Your #import statements look OK, and I'll assume you have added the GSL library to your project. You most likely...
  7. S

    Using a different compiler?

    You can tell Xcode to use gcc 3.3 instead of 4.0. To set the compiler Xcode uses for your project, Select the target from the Groups and Files list. Click the Info button in the project window toolbar to open the target's inspector. Click the Rules tab in the inspector. There is a System...
  8. S

    (Programming) Generating mouse events

    If you read the Carbon Event Programming Guide, in the Carbon Event Manager Tasks section is documentation on how to create your own events. Using the method described in the documentation requires you to write C code. If you want to use Python, have a look at PyObjC. It lets you write Cocoa...
  9. S

    XCode Build Problem - Please HELP!

    When you say you can't run the actual executable, does that mean you can run the program from Xcode, but when you double-click the executable, you get errors? If the answer is Yes, the most likely cause of your problem is ZeroLink. When you build with ZeroLink, Xcode skips the linking stage...
  10. S

    Simple carbon question.

    I would start over by creating a Carbon application in Xcode. If you build the project and run the program, it opens a blank window that you can move, resize, minimize, and zoom. The program does all that just by calling RunApplicationEventLoop(). From that base you can install the standard...
  11. S

    Simple carbon question.

    You have to call RunApplicationEventLoop() to dispatch events to the standard event handlers.
  12. S

    A Couple of Questions about Carbon

    Core Foundation has functions for parsing XML files that you can call from a Carbon program. You must add the Core Foundation framework to your project to use these functions. You can read the documentation on the XML parsing functions in Xcode (Choose Help > Documentation in Xcode) or at...
Back
Top