--- Begin Message ---
Subject: |
Re: GNUstep-guile example |
Date: |
Thu, 8 May 2003 15:38:10 +0100 |
On Thursday, May 8, 2003, at 02:29 pm, MJ Ray wrote:
Can anyone give me an example of how to create a small GNUstep-guile
application, please?
Here you go -
(use-modules (languages gstep-guile))
(display ([] ($$ "Hello world\n") cString)
Basically, the syntax of a method call changes from
[anObject aName: anArgument]
to
([] anObject aName: anArgument)
Where you would use a literal class name in ObjC, you have to use a
quoted string in guile, so
[NSArray array]
becomes
([] "NSArray" array)
Where you would use the @"literal string" syntax in ObjC, you would do
($$ "literal string") in guile.
Assuming you are using the latest code, you can use the (gstep-gui) or
(gstep-gdl2) procedures to load in the gui library or gdl2 library in
addition to the default base library code, thus making gui/database
classes available for use.
_______________________________________________
Discuss-gnustep mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/discuss-gnustep
--- End Message ---