GNU Smalltalk で Seaside を使用してアプリケーションを作成しようとしています。Linux (Fedora 17) で GNU Smalltalk 3.2.5 を実行しています。
私は簡単なカウンターテストアプリをうまく実行しました。私のアプリケーションでは、いくつかのクラスを動的に作成して使用する必要があります。ただし、gst-remote
それらを認識しません。これが私のテストアプリケーションです(の内容test.st
):
Seaside.WAComponent subclass: Test [
| foo |
Test class >> canBeRoot [ ^true ]
initialize [
super initialize.
Object subclass: #Foo instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'test class'.
foo := Foo new.
]
states [ ^{ self } ]
renderContentOn: html [
html heading: 'Foo'.
]
]
Test registerAsApplication: 'test'
「サーバー」側では、リモート サーバーを実行します。
$ gst-remote -I seaside.im --server --start=Seaside
gst-remote server started.
アプリケーション側 (実際には同じ PC で、ターミナル ウィンドウが異なるだけ) で、次のコマンドを実行すると、次のエラーが表示されます。
$ gst-remote -f test.st
gst-remote: error at line 330: Undefined variable 'Foo' referenced.
Foo
未定義の理由がわかりません。インタラクティブなセッションからgst
、それはうまくいきます:
st> Object subclass: #Foo instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'test class'.
Foo
st> foo := Foo new.
a Foo
なぜgst-remote
これを許可しないのですか?