Ignore:
Timestamp:
02/13/04 21:01:06 (20 years ago)
Author:
Nicholas Riley
Message:

Integrates SCPatch and mach_inject; unfinished, buggy.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Cocoa/F-Script Anywhere/Source/FSAViewAssociationController.m

    r19 r153  
    3131#import <FScript/FSInterpreter.h>
    3232#import <FScript/System.h>
    33 
    34 // XXX workaround for lack of identifier validation; should go away when F-Script adds (promised) direct support for this
    35 @interface Compiler
    36 + (BOOL)isValidIndentifier:(NSString *)str;
    37 @end
    3833
    3934@implementation FSAViewAssociationController
     
    7772    [statusField setStringValue: @""];
    7873    if ([variableName length] != 0) {
    79         if (![Compiler isValidIndentifier: variableName]) {
     74        if (![FSInterpreter validateSyntaxForIdentifier: variableName]) {
    8075            [statusField setStringValue: @"Invalid name: contains spaces, punctuation or non-ASCII characters"];
    8176        } else if (selectedElement != nil) {
     
    10297}
    10398
    104 - (void)_addElement:(id)element withLabel:(NSString *)label toSubmenuForItem:(NSMenuItem *)item;
     99- (void)_addElement:(id)element withLabel:(NSString *)label toSubmenuForItem:(id<NSMenuItem>)item;
    105100{
    106101    NSMenu *submenu = [item submenu];
    107     NSMenuItem *subItem;
     102    id<NSMenuItem> subItem;
    108103    if (submenu == nil) {
    109104        id superElement = [item representedObject];
     
    127122}
    128123
    129 - (void)_addValueForSelector:(SEL)sel withLabel:(NSString *)label toSubmenuForItem:(NSMenuItem *)item;
     124- (void)_addValueForSelector:(SEL)sel withLabel:(NSString *)label toSubmenuForItem:(id<NSMenuItem>)item;
    130125{
    131126    id obj = [item representedObject];
     
    139134- (void)_addElementToMenu:(id)element;
    140135{
    141     NSMenuItem *item;
     136    id<NSMenuItem> item;
    142137    if (element == nil) return;
    143138    item = [viewHierarchyMenu addItemWithTitle: [@"  "
     
    271266- (IBAction)defineVariable:(id)sender;
    272267{
    273 #warning this should change when F-Script supports a public API for identifier validation
    274268    NS_DURING
    275269        NSString *variableName = [variableNameField stringValue];
Note: See TracChangeset for help on using the changeset viewer.