私は openlaszlo の初心者で、vomplex 天文時計の表示をシミュレートするインタラクティブな Web インターフェイスを作成したいと考えています。たとえば、座標と日付/時刻を入力したり、リアルタイムまたはタイムラプス モードを選択したりできる必要があります。
edittext フィールドとボタン、ラジオボタン グループを使用して情報を選択し、選択に従って画像を移動しようとしました。edittext フィールドとボタンのみを使用すると、機能します。テキスト入力は出力 edittext フィールドに表示され、画像は指定された円弧を実際に回転させます。ラジオボタン グループを追加すると、選択した円弧が出力 edittext フィールドに表示されますが、画像の回転は発生しません。誰か助けてくれませんか?
ここにコードがあります
<canvas>
<!-- Load of the image -->
<view name="Zeiger" x="100" y="100" resource="images/Kal_Ring_Stundenzeiger.gif" id="HandID">
<!-- Methode to rotate the image, Arc is set by the argument -->
<method name="rotate" args="Arc">
var increment = 0 + Arc;
var dur = 700;
this.animate('rotation',increment,dur);
</method>
</view>
<!-- Control unit -->
<view name="Bedienung" x="200" y="10">
<simplelayout axis="y" inset="8"/>
<text text="Output:"/>
<edittext id="outputID" text = "0"/>
<text text="Arc:"/>
<edittext id="WinkelID" text = "51"/>
<button x="000" y="160">
Rotation
<!-- Handler to execute the Method -->
<handler name="onclick">
var x = WinkelID.getText();
HandID.rotate(x);
outputID.setAttribute('text',x);
</handler>
</button>
<!-- when I remove the radiogroup, then the image rotates -->
<radiogroup id="group1ID">
<handler name="onselect">
var Arcchoice = this.getValue();
HandID.rotate(Arcchoice);
outputID.setAttribute('text',Arcchoice);
</handler>
<radiobutton value="0" text="0°" selected="true"/>
<radiobutton value="90" text="90°"/>
<radiobutton value="180" text="180°"/>
<radiobutton value="270" text="270°"/>
<radiobutton value="360" text="360°"/>
</radiogroup>
</view>
</canvas>