summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 11:52:55 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-06-15 11:52:55 +0200
commit77fd838075b8729e7911a522465e92eacf1e0545 (patch)
tree1285425444d078eeade468b0ff125fa8fa2ade3b
parentb17e5884d8427a6d162b87a9706ca4fd1046d9e5 (diff)
MLKDynamicContext: Add method -addValue:forBinding:.
-rw-r--r--MLKDynamicContext.h1
-rw-r--r--MLKDynamicContext.m12
2 files changed, 8 insertions, 5 deletions
diff --git a/MLKDynamicContext.h b/MLKDynamicContext.h
index 22014a4..0bfac44 100644
--- a/MLKDynamicContext.h
+++ b/MLKDynamicContext.h
@@ -49,6 +49,7 @@
-(id) findCatchTag:(MLKSymbol *)symbol;
-(id) valueForBinding:(MLKSymbol *)symbol;
-(void) setValue:(id)value forBinding:(MLKSymbol *)symbol;
+-(void) addValue:(id)value forBinding:(MLKSymbol *)symbol;
-(void) dealloc;
@end
diff --git a/MLKDynamicContext.m b/MLKDynamicContext.m
index 63c8ad7..9b61bb6 100644
--- a/MLKDynamicContext.m
+++ b/MLKDynamicContext.m
@@ -144,15 +144,17 @@
-(id) valueForBinding:(MLKSymbol *)symbol
{
- return [[[MLKDynamicContext currentContext] environment]
- valueForBinding:symbol];
+ return [[self environment] valueForBinding:symbol];
}
-(void) setValue:(id)value forBinding:(MLKSymbol *)symbol
{
- [[[MLKDynamicContext currentContext] environment]
- setValue:value
- forBinding:symbol];
+ [[self environment] setValue:value forBinding:symbol];
+}
+
+-(void) addValue:(id)value forBinding:(MLKSymbol *)symbol
+{
+ [[self environment] addValue:value forBinding:symbol];
}
-(void) dealloc