Archived
1

Removed Expression Tree Notification Methods

This commit is contained in:
Kim Wittenburg
2014-04-21 18:50:01 +02:00
parent f1953baafa
commit 027ef4271f
4 changed files with 6 additions and 20 deletions

View File

@@ -22,8 +22,6 @@ extern NSString *MPDivisionOperator;
#pragma mark Working With the Expression Tree
@property (nonatomic, weak) MPFunction *parent; // Documentation: Do not set, may be nil
- (void)functionSymbolChanged:(MPFunction *)symbol
atLocalIndexPath:(NSIndexPath *)indexPath; // Index path of change in symbol
- (void)fixSymbols;

View File

@@ -50,14 +50,6 @@ NSString *MPDivisionOperator = @"/";
#pragma mark Working With the Expression Tree
- (void)functionSymbolChanged:(MPFunction *)symbol atLocalIndexPath:(NSIndexPath *)indexPath
{
NSUInteger index = [_symbols indexOfObject:symbol];
if (index != NSNotFound) {
[self.parent childChanged:self atLocalIndexPath:[indexPath indexPathByAddingIndex:index]];
}
}
- (void)fixSymbols
{
_symbols = [self fixedSymbols:_symbols];
@@ -445,8 +437,12 @@ NSString *MPDivisionOperator = @"/";
// Locate the position, split the symbols
NSUInteger startIndex;
[self splitSymbolsAtLocation:range.location
insertionIndex:&startIndex];
if ([self numberOfSymbols] == 0) {
startIndex = 0;
} else {
[self splitSymbolsAtLocation:range.location
insertionIndex:&startIndex];
}
// Perform the deletion
if (range.length > 0) {

View File

@@ -17,8 +17,6 @@
#pragma mark Working With the Expression Tree
@property (nonatomic, weak) MPExpression *parent; // Documentation: Do not set
- (void)childChanged:(MPExpression *)child
atLocalIndexPath:(NSIndexPath *)indexPath;
- (NSUInteger)numberOfChildren;
- (MPExpression *)childAtIndex:(NSUInteger)index;

View File

@@ -23,12 +23,6 @@
#pragma mark Working With the Expression Tree
- (void)childChanged:(MPExpression *)child atLocalIndexPath:(NSIndexPath *)indexPath
{
[self.parent functionSymbolChanged:self
atLocalIndexPath:[indexPath indexPathByAddingIndex:0]];
}
- (NSUInteger)numberOfChildren
{
return 0;