Implement method which is advertised in warning message

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@35781 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2012-11-03 14:40:52 +00:00
parent f683714c79
commit ea1fed4269
3 changed files with 19 additions and 2 deletions

View file

@ -1,5 +1,12 @@
2012-11-03 Wolfgang Lux <wolfgang.lux@gmail.com>
* 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):

View file

@ -26,6 +26,7 @@
#import <Foundation/NSObject.h>
@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;

View file

@ -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 <var>langName</var>. */
+ conversationWithEnvironment:(STEnvironment *)env
language:(NSString *)langName
language:(NSString *)langName
{
STConversation *c;