advertisement

Article:
  Giving the Simple Text Editor 'Legs'
Subject:   Can't Run
Date:   2004-09-14 07:58:41
From:   Briani
Thanks for the articles. They have helped alot, but...


I've done everything to make an application that will save and load. When I compile I get five errors. They all say:


parse error before '{' token


Heres the code:


-------------------------------
//
// MyDocument.m
// SimpleTextEditer
//
// Created by Brian Allred on Mon Sep 13 2004.
// Copyright (c) 2004 __MyCompanyName__. All rights reserved.
//


#import "MyDocument.h"


@implementation MyDocument


- (id)init
{self = [super init];
if (self) {

// Add your subclass-specific initialization here.
// If an error occurs here, send a [self release] message and return nil.

}
return self;
}


- (NSString *)windowNibName
{return @"MyDocument";
}


- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];


if ( fileData != nil ) {
[textView replaceCharactersInRange:NSMakeRange(0, 0) withRTFD:fileData];
}
}



- (NSData *)dataRepresentationOfType:(NSString *)aType
{
NSRange range = NSMakeRange(0, [[textView textStorage] length]);
return [textView RTFDFromRange:range];
}


- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
{
fileData = data;
return fileData != nil;
}


@end
------------------


1 to 1 of 1
  1. Can't Run
    2004-10-13 15:23:08  ctatar [View]

1 to 1 of 1