From 77fd838075b8729e7911a522465e92eacf1e0545 Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Sun, 15 Jun 2008 11:52:55 +0200 Subject: MLKDynamicContext: Add method -addValue:forBinding:. --- MLKDynamicContext.h | 1 + MLKDynamicContext.m | 12 +++++++----- 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 -- cgit v1.2.3