Removed Server example as it was obsoleted by remote conversations and shared environments

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/steptalk/trunk@21702 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Stefan Urbanek 2005-09-05 20:17:56 +00:00
parent 65055d8964
commit 6d2a2ba9c0
5 changed files with 0 additions and 132 deletions

View file

@ -1,7 +0,0 @@
*.app
*.debug
*.profile
shared_*obj
*.bundle
*.stmodule
*.stlanguage

View file

@ -1,5 +0,0 @@
2003 Apr 04 David Ayers <d.ayers@inode.at>
* ChangeLog: Added new file.
* GNUmakefile: Added flags to show all warnings except for import.

View file

@ -1,35 +0,0 @@
#
# StepTalk examples
#
# Copyright (C) 2000 Stefan Urbanek
#
# This file is part of the StepTalk.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02111, USA.
#
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = Server
Server_OBJC_FILES = Server.m
ADDITIONAL_TOOL_LIBS = -lStepTalk
ADDITIONAL_OBJCFLAGS = -Wall -Wno-import
-include GNUmakefile.preamble
include $(GNUSTEP_MAKEFILES)/tool.make
-include Makefile.postamble

View file

@ -1,65 +0,0 @@
/*
Server.m
StepTalk scriptable server example
*/
#import <Foundation/NSAutoreleasePool.h>
#import <Foundation/NSConnection.h>
#import <Foundation/NSHost.h>
#import <Foundation/NSRunLoop.h>
#import <StepTalk/StepTalk.h>
#include <stdio.h>
@interface Server:NSObject
- say:(NSString *)string;
@end
@implementation Server
- (STEnvironment *)scriptingEnvironment
{
/* here we should add some objects or class references ... */
return [STEnvironment defaultScriptingEnvironment];
}
- (NSDate *)date
{
return [NSDate date];
}
- say:(NSString *)string
{
printf("%s\n",[string cString]);
return self;
}
@end
int main(int argc, const char **argv)
{
NSAutoreleasePool *pool;
NSConnection *connection;
Server *server = [Server new];
pool = [NSAutoreleasePool new];
connection = [NSConnection newRegisteringAtName:@"Server"
withRootObject:server];
if (!connection)
{
NSLog(@"Unable to register server");
[pool release];
return 1;
}
NSLog(@"Server started");
[[NSRunLoop currentRunLoop] run];
RELEASE(connection);
RELEASE(pool);
return 0;
}

View file

@ -1,20 +0,0 @@
" talkToServer.stalk
Server script example
Ussage:
stalk Server talkToServer.st [message]
"
| message |
((Args count) < 1 )
ifTrue:
[
message := 'Hello!'. ^0
]
ifFalse:
[
message := Args objectAtIndex: 0. ^0
].
Server say:message