mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-23 19:30:54 +00:00
structure to avoid build failure during documentation build. * Documentation/GDL2Intro/Examples/connection.m, * Documentation/GDL2Intro/Examples/eoexample.m, * Documentation/GDL2Intro/Examples/eoexample2.m: Minor formatting tweaks for documentation build. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@25112 72102866-910b-0410-8b05-ffd578937521
36 lines
932 B
Objective-C
36 lines
932 B
Objective-C
#include <Foundation/Foundation.h>
|
|
#include <EOAccess/EOAccess.h>
|
|
#include <EOControl/EOControl.h>
|
|
|
|
int
|
|
main(int arcg, char *argv[], char **envp)
|
|
{
|
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
EOModelGroup *modelGroup = [EOModelGroup defaultGroup];
|
|
EOModel *model = [modelGroup modelNamed:@"library"];
|
|
EOAdaptor *adaptor;
|
|
EOAdaptorContext *context;
|
|
EOAdaptorChannel *channel;
|
|
|
|
/* Tools don't have resources so we have to add the model manually. */
|
|
if (!model)
|
|
{
|
|
NSString *path = @"./library.eomodel";
|
|
model = [[EOModel alloc] initWithContentsOfFile: path];
|
|
[modelGroup addModel:model];
|
|
[model release];
|
|
}
|
|
|
|
adaptor = [EOAdaptor adaptorWithName:[model adaptorName]];
|
|
context = [adaptor createAdaptorContext];
|
|
channel = [context createAdaptorChannel];
|
|
|
|
[channel openChannel];
|
|
|
|
/* insert code here */
|
|
|
|
[channel closeChannel];
|
|
[pool release];
|
|
return 0;
|
|
}
|
|
|