Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
14420 What to do with Polymorph-Geometry https://pharo.fogbugz.com/f/cases/14420 14950 Spec help added to the Help Browser https://pharo.fogbugz.com/f/cases/14950 15013 enable recompile on run:with:in: https://pharo.fogbugz.com/f/cases/15013 15015 GradientFillStyle color selection broken https://pharo.fogbugz.com/f/cases/15015 http://files.pharo.org/image/40/40521.zip
- Loading branch information
Jenkins Build Server
authored and
ci
committed
Feb 27, 2015
1 parent
f4d7ae1
commit 4834e88
Showing
66 changed files
with
424 additions
and
41 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 3 additions & 2 deletions
5
Morphic-Base.package/extension/GradientFillStyle/instance/changeColorOf_rampIndex_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
changeColorOf: aMorph rampIndex: rampIndex | ||
| originalColor | | ||
originalColor := (colorRamp at: rampIndex) value. | ||
UIManager default chooseColor: originalColor for: [:color | | ||
UIManager default theme | ||
chooseColorIn: World title: 'Color' color: originalColor for: [:color | | ||
self changeColorAt: rampIndex to: color. | ||
aMorph changed] | ||
aMorph changed] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
... - creation/testInvalidateWithLinCount.st → ...- creation/testInvalidateWithLinkCount.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
Reflectivity.package/ReflectiveMethod.class/instance/evaluation/recompileAST.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
recompileAST | ||
self flag: #TBD. "compile the AST" | ||
self flag: #TBD. "Here we need to use the transforming compiler pluging in the fututer" | ||
compiledMethod := self ast generate: compiledMethod trailer. |
6 changes: 2 additions & 4 deletions
6
Reflectivity.package/ReflectiveMethod.class/instance/evaluation/run_with_in_.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
run: aSelector with: anArray in: aReceiver | ||
"we install the old one as the compiler might need it" | ||
self methodClass basicAddSelector: self selector withMethod: compiledMethod. | ||
self hasLinks | ||
ifTrue: [self recompileAST. ] | ||
ifFalse: [self destroyTwin]. | ||
self installCompiledMethod. | ||
self recompileAST. | ||
^compiledMethod valueWithReceiver: aReceiver arguments: anArray |
2 changes: 1 addition & 1 deletion
2
Reflectivity.package/ReflectiveMethod.class/instance/invalidate/destroyTwin.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
destroyTwin | ||
self methodClass basicAddSelector: self selector withMethod: compiledMethod. | ||
self installCompiledMethod. | ||
compiledMethod reflectiveMethod: nil. |
2 changes: 2 additions & 0 deletions
2
Reflectivity.package/ReflectiveMethod.class/instance/invalidate/installCompiledMethod.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
installCompiledMethod | ||
self methodClass basicAddSelector: self selector withMethod: compiledMethod. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
ScriptLoader40.package/ScriptLoader.class/instance/pharo - updates/update40520.st
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
ScriptLoader40.package/ScriptLoader.class/instance/pharo - updates/update40521.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
update40521 | ||
"self new update40521" | ||
self withUpdateLog: '14420 What to do with Polymorph-Geometry | ||
https://pharo.fogbugz.com/f/cases/14420 | ||
14950 Spec help added to the Help Browser | ||
https://pharo.fogbugz.com/f/cases/14950 | ||
15013 enable recompile on run:with:in: | ||
https://pharo.fogbugz.com/f/cases/15013 | ||
15015 GradientFillStyle color selection broken | ||
https://pharo.fogbugz.com/f/cases/15015'. | ||
self loadTogether: self script521 merge: false. | ||
self flushCaches. |
13 changes: 11 additions & 2 deletions
13
ScriptLoader40.package/ScriptLoader.class/instance/public/commentForCurrentUpdate.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
commentForCurrentUpdate | ||
^ '14993 Integrate GTools | ||
https://pharo.fogbugz.com/f/cases/14993' | ||
^ '14420 What to do with Polymorph-Geometry | ||
https://pharo.fogbugz.com/f/cases/14420 | ||
14950 Spec help added to the Help Browser | ||
https://pharo.fogbugz.com/f/cases/14950 | ||
15013 enable recompile on run:with:in: | ||
https://pharo.fogbugz.com/f/cases/15013 | ||
15015 GradientFillStyle color selection broken | ||
https://pharo.fogbugz.com/f/cases/15015' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
Spec-Help.package/SpecExamples.class/class/accessing/bookName.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bookName | ||
^ 'Examples' |
2 changes: 2 additions & 0 deletions
2
Spec-Help.package/SpecExamples.class/class/accessing/pages.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pages | ||
^#(firstExample secondExample moreExamples) |
49 changes: 49 additions & 0 deletions
49
Spec-Help.package/SpecExamples.class/class/pages/firstExample.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
firstExample | ||
^HelpTopic | ||
title: 'A first example: ModelList' | ||
contents: 'Creating a specific UI always starts with the subclassing of Composable-Model. Each sub widget is stored into an instance variable of the newly created class. All the code presented here is already in the image so you can simply do: | ||
ModelList browse | ||
And follow the tutorial while browsing the code. So let''s subclass ComposableModel. | ||
ComposableModel subclass: #ModelList | ||
instanceVariableNames: ''list'' | ||
classVariableNames: '' | ||
category: ''Spec-Examples'' | ||
The first required step then is to instantiate and define the sub widgets. This step is done in the method initializeWidgets. It creates the list and populates it with the required classes, in alphabetical order. | ||
ModelList>>initializeWidgets | ||
list := self newList. | ||
list items: (AbstractWidgetModel allSubclasses | ||
sorted: [:a :b | a name < b name ]). | ||
self focusOrder add: list | ||
The second required step is to define a layout, which is done on the class side. Since there is here only one sub widget, the layout is quite simple. It simply returns a layout that contains only the list: | ||
ModelList class>>#defaultSpec | ||
<spec: #default> | ||
^ SpecLayout composed | ||
add: #list; | ||
yourself | ||
The three last methods to define on ModelList are a getter, a method to display the UI title and a method to register to list selection changes. | ||
"accessing" | ||
ModelList>>list | ||
^ list | ||
"protocol" | ||
ModelList>>title | ||
^ ''Widgets'' | ||
"protocol-events" | ||
ModelList>>whenSelectedItemChanged: aBlock | ||
list whenSelectedItemChanged: aBlock | ||
The first UI is now done. The result can be seen by executing the following snippet of code: | ||
ModelList new openWithSpec. | ||
' |
34 changes: 34 additions & 0 deletions
34
Spec-Help.package/SpecExamples.class/class/pages/moreExamples.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
moreExamples | ||
^HelpTopic | ||
title: 'More Examples' | ||
contents: 'If you browse the Spec-Examples package you will find a lot more examples that will help you understand Spec a little more. | ||
ApplicationWithToolbar new openWithSpec | ||
CheckBoxExample new openWithSpec | ||
ClassMethodBrowser new openWithSpec | ||
DropListExample new openWithSpec | ||
DynamicWidgetChange new openWithSpec | ||
ListSelectionModel new openWithSpec | ||
MethodBrowser new openWithSpec | ||
ModelList new openWithSpec | ||
ProtocolBrowser new openWithSpec | ||
ProtocolList new openWithSpec | ||
ProtocolViewer new openWithSpec | ||
RadioButtonGroupExample new openWithSpec | ||
ScrollSyncExample new openWithSpec | ||
TabsExample new openWithSpec | ||
TextFieldExample new openWithSpec' |
71 changes: 71 additions & 0 deletions
71
Spec-Help.package/SpecExamples.class/class/pages/secondExample.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
secondExample | ||
^HelpTopic | ||
title: 'A second example: Protocol List' | ||
contents: 'The next user interface is the protocol list. This UI combines two sub widgets: | ||
a list | ||
a label. | ||
So again, we start by subclassing ComposableModel: | ||
ComposableModel subclass: #ProtocolList | ||
instanceVariableNames: ''label protocols'' | ||
classVariableNames: '' | ||
category: ''Spec-Examples'' | ||
The initializeWidgets method for this UI is quite similar to the method in ModelList: | ||
ProtocolList>>initializeWidgets | ||
protocols := self newList. | ||
label := self newLabel. | ||
label text: ''Protocol''. | ||
protocols displayBlock: [ :m | m selector ]. | ||
self focusOrder add: protocols | ||
The layout method is quite different though. Now the sub widgets need to be placed more specifically than in the previous example, we have to build a layout that has a column with the label on top and the list taking all the space that is left. | ||
ProtocolList class>>defaultSpec | ||
<spec: #default> | ||
^ SpecLayout composed | ||
newColumn: [ :column | | ||
column | ||
add: #label | ||
height: self toolbarHeight; | ||
add: #protocols ]; | ||
yourself | ||
The remaining methods are getters, sub widget delegation methods, a method to display the title, and a method to register to list selection changes: | ||
"accessing" | ||
ProtocolList>>label | ||
^ label | ||
"accessing" | ||
ProtocolList>>protocols | ||
^ protocols | ||
"protocol" | ||
ProtocolList>>items: aCollection | ||
protocols items: aCollection | ||
"protocol" | ||
ProtocolList>>label: aText | ||
label text: aText | ||
"protocol" | ||
ProtocolList>>resetSelection | ||
protocols resetSelection | ||
"protocol" | ||
ProtocolList>>title | ||
^ ''Protocol widget'' | ||
"protocol-events" | ||
ProtocolList>>whenSelectedItemChanged: aBlock | ||
protocols whenSelectedItemChanged: aBlock | ||
The ProtocolList UI can be seen by evaluating: | ||
ProtocolList new openWithSpec. | ||
' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
SpecHelpTopics subclass: #SpecExamples | ||
instanceVariableNames: '' | ||
classVariableNames: '' | ||
poolDictionaries: '' | ||
category: 'Spec-Help' |
Oops, something went wrong.