diff --git a/ChangeLog b/ChangeLog index c39f538..35b2b11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2012-11-03 Wolfgang Lux + * Frameworks/StepTalk/STConversation.h + (-conversationWithContext:language:): + * Frameworks/StepTalk/STConversation.m + (-conversationWithContext:language:): + Implement method which is advertised as replacement for the + deprecated method -conversationWithEnvironment:language:. + * Frameworks/StepTalk/STConversation.m (-runScriptFromString:, -conversationWithEnvironment:language:, -initWithEnvironment:language:, -environment): diff --git a/Frameworks/StepTalk/STConversation.h b/Frameworks/StepTalk/STConversation.h index 4429459..4a42943 100644 --- a/Frameworks/StepTalk/STConversation.h +++ b/Frameworks/StepTalk/STConversation.h @@ -26,6 +26,7 @@ #import +@class NSArray; @class STEngine; @class STContext; @@ -50,6 +51,8 @@ STContext *context; id returnValue; } ++ conversationWithContext:(STContext *)aContext + language:(NSString *)aLanguage; - initWithContext:(STContext *)aContext language:(NSString *)aLanguage; diff --git a/Frameworks/StepTalk/STConversation.m b/Frameworks/StepTalk/STConversation.m index a0a1420..9cdc3b7 100644 --- a/Frameworks/StepTalk/STConversation.m +++ b/Frameworks/StepTalk/STConversation.m @@ -44,6 +44,13 @@ return AUTORELEASE([[self alloc] initWithContext:env language:nil]); } ++ conversationWithContext:(STContext *)aContext + language:(NSString *)aLanguage +{ + return AUTORELEASE([[self alloc] initWithContext:aContext + language:aLanguage]); +} + - (bycopy id)resultByCopy { return [self result]; @@ -52,7 +59,7 @@ - (id)runScriptFromString:(NSString *)aString { NSLog(@"Warning: runScriptFromString: in STConversation is deprecated," - @" use -interpretScript: and -returnValue."); + @" use -interpretScript: and -result instead."); [self interpretScript:aString]; return [self result]; } @@ -68,7 +75,7 @@ /** Creates a new conversation with environment created using default description and language with name langName. */ + conversationWithEnvironment:(STEnvironment *)env - language:(NSString *)langName + language:(NSString *)langName { STConversation *c;