Eliot Miranda uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-eem.63.mcz
==================== Summary ====================
Name: Sound-eem.63
Author: eem
Time: 19 May 2017, 1:17:46.463283 pm
UUID: da2f7750-4acd-43c7-923e-757bb7a80737
Ancestors: Sound-pre.62
Add the "new" Terf SoundPlugin primitives that deal with multiple devices etc.
=============== Diff against Sound-pre.62 ===============
Item was added:
+ ----- Method: SoundPlayer class>>primGetDefaultSoundPlayer (in category 'private') -----
+ primGetDefaultSoundPlayer
+ "Answer the name of the default output device."
+ <primitive: 'primitiveGetDefaultSoundPlayer' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primGetDefaultSoundRecorder (in category 'private') -----
+ primGetDefaultSoundRecorder
+ "Answer the name of the default input device."
+ <primitive: 'primitiveGetDefaultSoundRecorder' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primGetNumberOfSoundPlayerDevices (in category 'private') -----
+ primGetNumberOfSoundPlayerDevices
+ "Answer the number of output devices."
+ <primitive: 'primitiveGetNumberOfSoundPlayerDevices' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primGetNumberOfSoundRecorderDevices (in category 'private') -----
+ primGetNumberOfSoundRecorderDevices
+ "Answer the number of input devices."
+ <primitive: 'primitiveGetNumberOfSoundRecorderDevices' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primGetSoundPlayerDeviceName: (in category 'private') -----
+ primGetSoundPlayerDeviceName: n
+ "Answer the name of the n'th output device."
+ <primitive: 'primitiveGetSoundPlayerDeviceName' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primGetSoundRecorderDeviceName: (in category 'private') -----
+ primGetSoundRecorderDeviceName: n
+ "Answer the name of the n'th input device."
+ <primitive: 'primitiveGetSoundRecorderDeviceName' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primSetDefaultSoundPlayer: (in category 'private') -----
+ primSetDefaultSoundPlayer: deviceName
+ "Set the default output device by supplying its name."
+ <primitive: 'primitiveSetDefaultSoundPlayer' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primSetDefaultSoundRecorder: (in category 'private') -----
+ primSetDefaultSoundRecorder: deviceName
+ "Set the default input device by supplying its name."
+ <primitive: 'primitiveSetDefaultSoundRecorder' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primSoundEnableAEC: (in category 'private') -----
+ primSoundEnableAEC: aBooleanInteger
+ "Enable or disable acoustic echo-cancellation (AEC). aBooleanInteger should be 0 for false, and 1 for true."
+ <primitive: 'primitiveSoundEnableAEC' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primSoundGetRecordLevel (in category 'private') -----
+ primSoundGetRecordLevel
+ "Return sound as array of doubles left then right channel, range is 0.0 to 1.0 but may be overdriven"
+ <primitive: 'primitiveSoundGetRecordLevel' module: 'SoundPlugin'>
+ self primitiveFailed!
Item was added:
+ ----- Method: SoundPlayer class>>primSoundSupportsAEC (in category 'private') -----
+ primSoundSupportsAEC
+ "Answer if the plugin supports echo-cancellation on this OS/hardware."
+ <primitive: 'primitiveSoundSupportsAEC' module: 'SoundPlugin'>
+ self primitiveFailed!
Patrick Rein uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-pre.1105.mcz
==================== Summary ====================
Name: Kernel-pre.1105
Author: pre
Time: 19 May 2017, 2:22:29.00196 pm
UUID: 7e22498c-7586-584c-a2a9-81331c572590
Ancestors: Kernel-pre.1104
Removes a redundancy in CompiledCode.
=============== Diff against Kernel-nice.1103 ===============
Item was changed:
----- Method: CompiledCode class>>headerFlagForEncoder: (in category 'method encoding') -----
headerFlagForEncoder: anEncoder
- anEncoder class == PrimaryBytecodeSetEncoderClass ifTrue:
- [^0].
- anEncoder class == SecondaryBytecodeSetEncoderClass ifTrue:
- [^SmallInteger minVal].
"This allows subclasses for compiler variants such as the ScriptEncoder in EToys
to continue to function."
+ (anEncoder isKindOf: PrimaryBytecodeSetEncoderClass) ifTrue:
- (anEncoder class inheritsFrom: PrimaryBytecodeSetEncoderClass) ifTrue:
[^0].
+ (anEncoder isKindOf: SecondaryBytecodeSetEncoderClass) ifTrue:
- (anEncoder class inheritsFrom: SecondaryBytecodeSetEncoderClass) ifTrue:
[^SmallInteger minVal].
self error: 'The encoder is not one of the two installed bytecode sets'!
Item was added:
+ ----- Method: Number>>** (in category 'mathematical functions') -----
+ ** aNumber
+
+ ^ self raisedTo: aNumber!
Patrick Rein uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-pre.110.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-pre.110
Author: pre
Time: 15 May 2017, 9:34:18.749328 pm
UUID: 86628552-c37c-c34b-ba1d-f11ec0a31a35
Ancestors: ToolBuilder-Kernel-jr.109
Adds double click capabilities to PluggableTreeSpecs
=============== Diff against ToolBuilder-Kernel-jr.109 ===============
Item was changed:
PluggableWidgetSpec subclass: #PluggableTreeSpec
+ instanceVariableNames: 'roots getSelectedPath setSelected getSelected setSelectedParent getChildren hasChildren label icon unusedVar menu keyPress doubleClick dropItem dropAccept autoDeselect dragItem nodeClass columns vScrollBarPolicy hScrollBarPolicy dragStarted'
- instanceVariableNames: 'roots getSelectedPath setSelected getSelected setSelectedParent getChildren hasChildren label icon unusedVar menu keyPress dropItem dropAccept autoDeselect dragItem nodeClass columns vScrollBarPolicy hScrollBarPolicy dragStarted'
classVariableNames: ''
poolDictionaries: ''
category: 'ToolBuilder-Kernel'!
!PluggableTreeSpec commentStamp: 'mvdg 3/21/2008 20:59' prior: 0!
A pluggable tree widget. PluggableTrees are slightly different from lists in such that they ALWAYS store the actual objects and use the label selector to query for the label of the item. PluggableTrees also behave somewhat differently in such that they do not have a "getSelected" message but only a getSelectedPath message. The difference is that getSelectedPath is used to indicate by the model that the tree should select the appropriate path. This allows disambiguation of items. Because of this, implementations of PluggableTrees must always set their internal selection directly, e.g., rather than sending the model a setSelected message and wait for an update of the #getSelected the implementation must set the selection before sending the #setSelected message. If a client doesn't want this, it can always just signal a change of getSelectedPath to revert to whatever is needed.
Instance variables:
roots <Symbol> The message to retrieve the roots of the tree.
getSelectedPath <Symbol> The message to retrieve the selected path in the tree.
setSelected <Symbol> The message to set the selected item in the tree.
getChildren <Symbol> The message to retrieve the children of an item
hasChildren <Symbol> The message to query for children of an item
label <Symbol> The message to query for the label of an item.
icon <Symbol> The message to query for the icon of an item.
help <Symbol> The message to query for the help of an item.
menu <Symbol> The message to query for the tree's menu
keyPress <Symbol> The message to process a keystroke.
wantsDrop <Symbol> The message to query whether a drop might be accepted.
dropItem <Symbol> The message to drop an item.
enableDrag <Boolean> Enable dragging from this tree.
autoDeselect <Boolean> Whether the tree should allow automatic deselection or not.
unusedVar (unused) This variable is a placeholder to fix problems with loading packages in 3.10.!
Item was added:
+ ----- Method: PluggableTreeSpec>>doubleClick (in category 'accessing') -----
+ doubleClick
+ "Answer the selector for reacting to a double click"
+ ^ doubleClick!
Item was added:
+ ----- Method: PluggableTreeSpec>>doubleClick: (in category 'accessing') -----
+ doubleClick: selector
+ "Set the selector for reacting to a double click"
+ doubleClick := selector!
Patrick Rein uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-pre.1337.mcz
==================== Summary ====================
Name: Morphic-pre.1337
Author: pre
Time: 15 May 2017, 9:28:31.344328 pm
UUID: 31e536bc-642b-bb40-b690-5415d15803eb
Ancestors: Morphic-mt.1336
Reworks how the explorer contents are determined to make the standard behavior both more discoverable and reusable.
=============== Diff against Morphic-mt.1336 ===============
Item was added:
+ ----- Method: Object>>explorerContents (in category '*Morphic-Explorer') -----
+ explorerContents
+ "Override that method to define which properties of the object should be shown in the
+ object explorer. See for example the implementation in Integer>>#explorerContents."
+
+ ^ (self class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |
+ ObjectExplorerWrapper
+ with: (self instVarAt: index)
+ name: each
+ model: self]) ,
+ ((1 to: self basicSize) collect: [:index |
+ ObjectExplorerWrapper
+ with: (self basicAt: index)
+ name: index printString
+ model: self ])!
Item was changed:
ListItemWrapper subclass: #ObjectExplorerWrapper
instanceVariableNames: 'itemName parent'
classVariableNames: 'ShowContentsInColumns'
poolDictionaries: ''
category: 'Morphic-Explorer'!
+ !ObjectExplorerWrapper commentStamp: 'pre 5/15/2017 21:23' prior: 0!
+ ObjectExplorerWrappers represent an item displayed in an object explorer tree. In addition to the common ListItemWrapper behavior it adds methods to refresh the list entry with updated values from the model. It is mostly used in #explorerContents methods to describe which instance variables of an object should be displayed in the explorer.
+
+ Additionally, the value displayed can be visualized with a small icon which is defined by the class of the value object through the method #iconOrThumbnailOfSize:.
+
- !ObjectExplorerWrapper commentStamp: '<historical>' prior: 0!
Contributed by Bob Arning as part of the ObjectExplorer package.
!
Item was changed:
----- Method: ObjectExplorerWrapper>>contents (in category 'accessing') -----
contents
+ ^ self object explorerContents
+ do: [:wrapper | wrapper parent: self];
+ yourself!
- (self object respondsTo: #explorerContents) ifTrue: [
- ^ self object explorerContents
- do: [:wrapper | wrapper parent: self];
- yourself].
- "For all others, show named vars first, then indexed vars"
- ^(self object class allInstVarNames asOrderedCollection withIndexCollect: [:each :index |
- self class
- with: (self object instVarAt: index)
- name: each
- model: self object
- parent: self]) ,
- ((1 to: self object basicSize) collect: [:index |
- self class
- with: (self object basicAt: index)
- name: index printString
- model: self object
- parent: self])!
Item was changed:
----- Method: ObjectExplorerWrapper>>refresh (in category 'monitoring') -----
refresh
- "hack to refresh item given an object and a string that is either an index or an instance variable name."
self parent ifNil: [^ self].
+ [model explorerContents detect: [:wrapper | wrapper itemName = self itemName]
+ ifFound: [:wrapper | ^ self object: wrapper object ]
+ ifNone: [^ self object: nil]]
+ on: Error
+ do: [ :ex | self object: nil ]!
- [ | index |
- (model class allInstVarNames includes: self itemName)
- ifTrue: [ self object: (model instVarNamed: self itemName) ]
- ifFalse: [ index := self itemName asNumber.
- (index between: 1 and: model basicSize) ifTrue: [ self object: (model basicAt: index)]]
- ] on: Error do: [ :ex | self object: nil ]!
Item was changed:
ListItemWrapper subclass: #PluggableListItemWrapper
instanceVariableNames: 'string getContentsSelector getStringSelector hasContentsSelector'
classVariableNames: ''
poolDictionaries: ''
category: 'Morphic-Explorer'!
+ !PluggableListItemWrapper commentStamp: 'pre 5/15/2017 21:08' prior: 0!
+ PluggableListItemWrapper makes it more easy for clients to use hierarchical lists. Rather than having to write a subclass of ListItemWrapper, a PluggableListItemWrapper can be used to provide the appropriate information straight from the model:
- !PluggableListItemWrapper commentStamp: 'ar 10/14/2003 23:51' prior: 0!
- luggableListItemWrapper makes it more easy for clients to use hierarchical lists. Rather than having to write a subclass of ListItemWrapper, a PluggableListItemWrapper can be used to provide the appropriate information straight from the model:
string - an explicit string representation (contrary to the 'item' which contains any kind of object)
getStringSelector - a message invoked to retrieve the sting representation of its item dynamically from its model (when a constant representation is undesirable)
hasContentsSelector - a message invoked in the model to answer whether the item has any children or not.
getContentsSelector - a message invoked in the model to retrieve the contents for its item.
All callback selectors can have zero, one or two arguments with the item and the wrapper as first and second argument.!
Patrick Rein uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-pre.9.mcz
==================== Summary ====================
Name: Chronology-Core-pre.9
Author: pre
Time: 12 May 2017, 5:38:53.048874 pm
UUID: a643e5e5-bb82-e841-99c6-fbecce3e6e5f
Ancestors: Chronology-Core-ul.8
tiny change of code formatting
=============== Diff against Chronology-Core-ul.8 ===============
Item was changed:
----- Method: DateAndTime>>setJdn:seconds:nano:offset: (in category 'squeak protocol') -----
setJdn: j seconds: s nano: n offset: o
+ jdn := j.
+ seconds := s.
+ nanos := n.
+ offset := o
- jdn := j.
- seconds := s.
- nanos := n.
- offset := o
!