剛剛開始使用紅色並且難以理解如何評估塊。下面給了我一個*** Script Error: panel has no value錯誤: Red [
needs: 'view
]
my-panel: [
panel 300x300 [
text "World"
]
]
view [
title "Hello"
do my-pa
我想下面的代碼,用戶輸入2個數字,然後點擊計算按鈕,應顯示答案。還有用於清除字段和退出的按鈕。 REBOL[]
fields: [f-ht f-wt ans]
reset-fields: does [
unfocus
f-ht/text: " " ; Changing this to "ENTER NUMBER HERE" does not help
f-wt/
我編譯使用下面簡單的代碼的可執行文件(從紅語言的網站): Red [title: "test" needs: 'view]
view [
below
button
field
text "Red is really pretty easy to program."
text-list
check
]
我用下面的命令: red -c
我有一個帶有文本字段和按鈕的小型GUI應用程序。該按鈕會觸發一個試圖從文本字段中讀取數字的函數。如果文本字段爲空白或具有非數字文本,則會引發異常。 我試圖抓住錯誤,如果文本字段不具有價值或者具有文本值,而不是一個有效的數字: calc: does [
try [x: to integer! num_field/text]
catch [ print "Could not get
我想創建一個面板,動態創建GUI元素: sentlist: ["A" "B" "C"]
main: function [slist] [
view collect [
keep [below]
repeat i length? slist [
keep[
text slist/i ; THIS STEP IS NOT WORKI