home *** CD-ROM | disk | FTP | other *** search
- id componentName;
- id pathForTemplateFile;
- id pathForDeclarationsFile;
- id pathForScriptFile;
- id showSource;
- id templateFile;
- id declarationsFile;
- id scriptFile;
-
- - displaySourceLink {
- if (showSource) {
- return nil;
- } else {
- return YES;
- }
- }
-
- - hideSourceLink {
- if (showSource) {
- return YES;
- } else {
- return nil;
- }
- }
-
- - hideSource {
- showSource = nil;
- }
-
- - viewSource {
- id pathForComponent;
- id codePage;
- id nameOfHTMLFile = [componentName stringByAppendingString:@".html"];
- id nameOfWODFile = [componentName stringByAppendingString:@".wod"];
- id nameOfWOSFile = [componentName stringByAppendingString:@".wos"];
-
- showSource = YES;
- pathForComponent = [WOApp pathForResource:componentName ofType:@"wo"];
-
- pathForTemplateFile = [pathForComponent stringByAppendingPathComponent:nameOfHTMLFile];
- templateFile = [NSString stringWithContentsOfFile:pathForTemplateFile];
-
- pathForDeclarationsFile = [pathForComponent stringByAppendingPathComponent:nameOfWODFile];
- declarationsFile = [NSString stringWithContentsOfFile:pathForDeclarationsFile];
-
- pathForScriptFile = [pathForComponent stringByAppendingPathComponent:nameOfWOSFile];
- scriptFile = [NSString stringWithContentsOfFile:pathForScriptFile];
- }
-
-
-