Advertisement
Guest User

ASTDataSearchStock>formulaScript

a guest
Jan 3rd, 2012
33
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. formulaScript
  2.     | formula model |
  3.    
  4.     model  := (ASFSearchSystem new).
  5.     formula := ILFormula on: model.
  6.     formula buttons: {'Search' -> #save}.
  7.    
  8.     (formula addField: (ASCAutocompleInputFieldWithUnderscore on: formula selector: #reference))
  9.         options: (ASWarehouse theWarehouse onlyReference).
  10.     (formula inputOn: #designation).
  11.     (formula inputOn: #location).
  12.     (formula selectOn: #allStock)
  13.         options: #( 'All Stock' 'Used Stock').
  14.    
  15.     formula saveAction: [ :m |
  16.         formula answer: nil.
  17.         formula commit.
  18.         self doSearch: m.
  19.     ].
  20.     formula cancelAction: [
  21.         formula answer: nil.
  22.     ].
  23.    
  24.     ^ formula
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement