The Trunk: Morphic-ul.454.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-ul.454.mcz

commits-2
Levente Uzonyi uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ul.454.mcz

==================== Summary ====================

Name: Morphic-ul.454
Author: ul
Time: 22 July 2010, 4:36:40.557 am
UUID: 809d8126-c77f-0943-afe3-86cacfcd897b
Ancestors: Morphic-cmm.453

Updated an example in the class comment of SimpleButtonMorph to send #beep to Beeper instead of Smalltalk which doesn't work. Thanks to Enrico Spinielli for the report.

=============== Diff against Morphic-cmm.453 ===============

Item was changed:
  RectangleMorph subclass: #SimpleButtonMorph
  instanceVariableNames: 'target actionSelector arguments actWhen oldColor mouseDownTime'
  classVariableNames: ''
  poolDictionaries: ''
  category: 'Morphic-Widgets'!
 
+ !SimpleButtonMorph commentStamp: 'ul 7/22/2010 04:30' prior: 0!
- !SimpleButtonMorph commentStamp: 'efc 3/7/2003 17:46' prior: 0!
  I am labeled, rectangular morph which allows the user to click me. I can be configured to send my "target" the message "actionSelector" with "arguments" when I am clicked. I may have a label, implemented as a StringMorph.
 
  Example:
 
  SimpleButtonMorph new
+ target: Beeper;
- target: Smalltalk;
  label: 'Beep!!';
  actionSelector: #beep;
  openInWorld
 
  Structure:
  instance var Type Description
  target Object The Object to notify upon a click
  actionSelector Symbol The message to send to Target (#messageName)
  arguments Array Arguments to send with #actionSelection (optional)
  actWhen Symbol When to take action: may be #buttonUp (default), #buttonDown,
  #whilePressed, or #startDrag
  oldColor Color Used to restore color after click
 
  Another example: a button which quits the image without saving it.
 
  SimpleButtonMorph new
  target: Smalltalk;
  label: 'quit';
  actionSelector: #snapshot:andQuit:;
  arguments: (Array with: false with: true);
  openInWorld
 
  !