Browse files

Fixed some compilation errors in the Demo

  • Loading branch information...
1 parent b132b37 commit f44b6c0e0b3756d4c152c56e8d0ad5060e757103 @davedelong committed Mar 3, 2012
Showing with 4 additions and 3 deletions.
  1. +2 −0 Demo/DemoController.h
  2. +2 −3 Demo/DemoController.m
View
2 Demo/DemoController.h
@@ -8,6 +8,7 @@
#import <Cocoa/Cocoa.h>
+@class DDMathEvaluator;
@interface DemoController : NSObject <NSTableViewDelegate, NSTableViewDataSource> {
NSTextField * inputField;
@@ -17,6 +18,7 @@
NSArray * orderedVariables;
NSMutableDictionary * variables;
+ DDMathEvaluator *evaluator;
}
@property (nonatomic, retain) NSArray * orderedVariables;
View
5 Demo/DemoController.m
@@ -42,11 +42,10 @@ - (void) awakeFromNib {
- (DDMathEvaluator *)evaluator {
if (evaluator == nil) {
- NSDictionary *parameters = nil;
__block DemoController *blockSelf = self;
- DDMathEvaluator *evaluator = [[DDMathEvaluator alloc] init];
- [evaluator setFunctionResolver:^(NSString *name) {
+ evaluator = [[DDMathEvaluator alloc] init];
+ [evaluator setFunctionResolver:^DDMathFunction(NSString *name) {
NSLog(@"resolving function: %@", name);
DDMathFunction resolved = ^DDExpression* (NSArray *args, NSDictionary *substitutions, DDMathEvaluator *evaluator, NSError **error) {

0 comments on commit f44b6c0

Please sign in to comment.