I'm missing the paradigm shift to XCode

Discussion in 'Mac Programming' started by DavidCar, Feb 22, 2005.

  1. DavidCar macrumors 6502a

    Jan 19, 2004
    Simple XCode Question

    I'm quite new to XCode, C and Objective C. I am trying to port an old project from THINK Pascal. I've got the "15 minute text editor" from Apple documentation up and running. I've successfully added a MyDocument class, and I'm starting on a MyTreeItem class. I've answered various questions through the built in documentation, but I've run into a problem that may be too fundamental to easily find in the documentation.

    This is generally what I am trying to port:


    UNIT ParserManager;

    Uses ParserDefs;

    Function MyParser(hPE: PEHandle; var hTree; MyTreeHandle): BOOLEAN;

    Uses ParserProcs;

    Function MyParser(hPE: PEHandle; var hTree; MyTreeHandle): BOOLEAN;
    MyParser := FALSE;
    hTree := NIL;



    So I am expecting in XCode to have a file called ParserManager.h which contains

    #import <Cocoa/Cocoa.h>
    #import "ParserDefs.h"
    #import "MyTreeItem.h"

    (BOOL) MyParser(NSString *Str, MyTreeItem **tree);

    ... and a file called ParserManager.m which contains

    #import "ParserProcs.h"

    (BOOL) MyParser(NSString *Str, MyTreeItem **tree) {
    return NO;

    ... and my file MyDocument.m would contain

    #import "ParserManager.h"


    NSString *Str;
    MyTreeItem *tree;

    if (MyParser(Str, &tree)) {
    // set flag


    I must be failing to navigate a paradigm shift here, because XCode doesn't get what I want it to do. Would enlightened ones be redefining MyParser as a class, or what?
  2. DavidCar thread starter macrumors 6502a

    Jan 19, 2004
    Complaint about vague compiler error messages

    I found my problem, which was just a trivial omission rather than something as grand as missing a paradigm shift. If the complier had given me a clearer error message I would not have had to spend hours trying to find the source of the problem.

Share This Page