Skip to content

Commit

Permalink
Fixed some compilation errors in the Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
davedelong committed Mar 3, 2012
1 parent b132b37 commit f44b6c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Demo/DemoController.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>


@class DDMathEvaluator;


@interface DemoController : NSObject <NSTableViewDelegate, NSTableViewDataSource> { @interface DemoController : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
NSTextField * inputField; NSTextField * inputField;
Expand All @@ -17,6 +18,7 @@


NSArray * orderedVariables; NSArray * orderedVariables;
NSMutableDictionary * variables; NSMutableDictionary * variables;
DDMathEvaluator *evaluator;
} }


@property (nonatomic, retain) NSArray * orderedVariables; @property (nonatomic, retain) NSArray * orderedVariables;
Expand Down
5 changes: 2 additions & 3 deletions Demo/DemoController.m
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ - (void) awakeFromNib {


- (DDMathEvaluator *)evaluator { - (DDMathEvaluator *)evaluator {
if (evaluator == nil) { if (evaluator == nil) {
NSDictionary *parameters = nil;
__block DemoController *blockSelf = self; __block DemoController *blockSelf = self;


DDMathEvaluator *evaluator = [[DDMathEvaluator alloc] init]; evaluator = [[DDMathEvaluator alloc] init];
[evaluator setFunctionResolver:^(NSString *name) { [evaluator setFunctionResolver:^DDMathFunction(NSString *name) {
NSLog(@"resolving function: %@", name); NSLog(@"resolving function: %@", name);


DDMathFunction resolved = ^DDExpression* (NSArray *args, NSDictionary *substitutions, DDMathEvaluator *evaluator, NSError **error) { DDMathFunction resolved = ^DDExpression* (NSArray *args, NSDictionary *substitutions, DDMathEvaluator *evaluator, NSError **error) {
Expand Down

0 comments on commit f44b6c0

Please sign in to comment.