'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6662] on 8 May 2005 at 10:00:32 am'! CPlayer subclass: #WidgetTest instanceVariableNames: ' input scroll ' classVariableNames: '' poolDictionaries: '' category: 'WidgetTest'! !WidgetTest commentStamp: 'tak 5/8/2005 00:10' prior: 0! WidgetTest new openInHnd! !WidgetTest methodsFor: 'accessing' stamp: 'tak 5/7/2005 14:09'! input "Answer the input of the receiver" ^self propertyValueAt: #input! ! !WidgetTest methodsFor: 'accessing' stamp: 'tak 5/7/2005 14:09'! input: aValue "Modify the receiver's input" ^self propertyValueAt: #input put: aValue with: #inputChanged! ! !WidgetTest methodsFor: 'accessing' stamp: 'tak 5/7/2005 11:11'! scroll "Answer the scroll of the receiver" ^self propertyValueAt: #scroll! ! !WidgetTest methodsFor: 'accessing' stamp: 'tak 5/7/2005 11:11'! scroll: aValue "Modify the receiver's scroll" ^self propertyValueAt: #scroll put: aValue with: #scrollChanged! ! !WidgetTest methodsFor: 'accessing' stamp: 'tak 5/8/2005 09:49'! value: aValue super value: ((aValue asNumber asFloat truncateTo: 0.01) min: 100)! ! !WidgetTest methodsFor: 'events' stamp: 'tak 5/8/2005 09:58'! onValueChanged < on: valueChanged > input contents: value asString. scroll value: value! ! !WidgetTest methodsFor: 'events' stamp: 'tak 5/8/2005 10:00'! onValueChangedInInput < on: valueChanged in: input > value := input contents. ! ! !WidgetTest methodsFor: 'events' stamp: 'tak 5/8/2005 10:00'! onValueChangedInScroll < on: valueChanged in: scroll > value := scroll value ! ! !WidgetTest methodsFor: 'initialize' stamp: 'tak 5/8/2005 09:59'! initialize super initialize. value := 50. self define: #input as: CInputField new. self define: #scroll as: CScrollBar new! ! !WidgetTest methodsFor: 'initialize' stamp: 'tak 5/7/2005 14:23'! setupCostume super setupCostume. self layout: CTableLayout new. self hResizing: #shrinkWrap; vResizing: #shrinkWrap. input extent: 100 @ 10. input autoAccept: false. scroll extent: 100 @ 10. self add: input. self add: scroll. self signal: #valueChanged.! ! !WidgetTest reorganize! ('accessing' input input: scroll scroll: value:) ('events' onValueChanged onValueChangedInInput onValueChangedInScroll) ('initialize' initialize setupCostume) !