Thread Rating:
  • 291 Vote(s) - 2.65 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Worksheetにセットした値を表示する
09-19-2012, 10:14 AM,
#4
RE: Worksheetにセットした値を表示する
このサンプルに限ってはとりあえず以下のようにすれば動きました。

・{wks.model.clear-data}をセル毎の初期化処理に変更
・ui-spec = {TextField}をui-spec = TextFieldに変更
・セルを空文字で初期化

Code:
{let wst:Worksheet = {Worksheet 5, 5, {widths 10pt, 2in},
                         row = 2, col = 1,
                         {CommandButton
                             label = "set-value",
                             {on Action at cb:CommandButton do
                                 {type-switch cb.selection-context
                                  case wks:Worksheet do
                                     {wks.model.set-value 2,3,"aa"}
                                     {wks.model.set-value 2,4,"bb"}
                                 }
                             }
                         },
                         row = 2, col = 2,
                         {CommandButton
                             label = "clear-data",
                             {on Action at cb:CommandButton do
                                 {type-switch cb.selection-context
                                  case wks:Worksheet do
                                     ||{wks.model.clear-data}
                                     {wks.set-value 2,3,""}
                                     {wks.set-value 2,4,""}
                                 }
                             }
                         },
                         row = 2, col = 3,
                         {input-cell {TextField}
                             ||, ui-spec = {TextField}
                             , ui-spec = TextField
                         },
                         row = 2, col = 4,
                         {input-cell {TextField}
                             ||, ui-spec = {TextField}
                             , ui-spec = TextField
                         }
                     }
}
{value
    {wst.set-value 2,3,""}
    {wst.set-value 2,4,""}
    wst
}
Reply


Messages In This Thread
RE: Worksheetにセットした値を表示する - by ashimo - 09-19-2012, 10:14 AM
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('625')