help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] What's wrong with this script??


From: Rick Flower
Subject: [Help-smalltalk] What's wrong with this script??
Date: Thu, 25 Feb 2010 09:35:16 -0800
User-agent: RoundCube Webmail/0.2.1

This is my first gst script -- I've used VW quite a bit but just
don't see why this very basic code is not happy.. Ideas?  When I
run the script I get the following results (DNU on #retname)..
I guess I was spoiled by the GUI in Squeak and VW.. Perhaps I'm
missing some sort of formatting marks?  Is there an Eclipse plugin
for editing GST code?

Object: TestFile error: did not understand #retname
MessageNotUnderstood(Exception)>>signal (AnsiExcept.st:216)
TestFile class(Object)>>doesNotUnderstand: #retname (AnsiExcept.st:1556)
UndefinedObject>>executeStatements (rcslog2.st:42)


#!/usr/local/bin/gst -f 

Object subclass: #TestFile
                instanceVariableNames: 'fname reports'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'My-Scripting'!

 TestFile comment: 
'This class represents a single controlled file which has a collection of
 reports associated with it.' !

!TestFile class methodsFor: 'instance creation'!
        new [ ^super new initialize ] !
!


!TestFile methodsFor: 'instance creation'!
        initialize
        fname    := String new.
        reports  := OrderedCollection new.
        Transcript show: 'TestFile created!'; cr. !
!
        
!TestFile methodsFor: 'accessing'!

setname: aName
        fname := aName.!
                
retname
        ^fname!
                
reports
        ^reports !
!

"main program starts here...
 Stuff.."
| aFile |

                aFile := TestFile new.
                Transcript show: aFile retname.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]