The Trunk: ToolBuilder-MVC-ct.60.mcz

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

The Trunk: ToolBuilder-MVC-ct.60.mcz

commits-2
Marcel Taeumel uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-ct.60.mcz

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

Name: ToolBuilder-MVC-ct.60
Author: ct
Time: 27 June 2020, 10:37:01.784959 pm
UUID: dd09ecec-d16e-854c-8564-d21576eb58fc
Ancestors: ToolBuilder-MVC-mt.59

Don't fail in MVCToolBuilder when opening a menu

The semantics of ToolBuilder >> #open: are to work regardless of the build state of the passed object (thus "anObject"). As a consequence, [MVCToolBuilder new open: (MVCToolBuilder new build: PluggableMenuSpec new)] should work, too.

=============== Diff against ToolBuilder-MVC-mt.59 ===============

Item was changed:
  ----- Method: MVCToolBuilder>>open: (in category 'opening') -----
  open: anObject
  "Build and open the object. Answer the widget opened."
  | window |
+ window := (anObject isKindOf: View orOf: PopUpMenu)
- window := (anObject isKindOf: View)
  ifTrue: [anObject]
  ifFalse: [self build: anObject].
  (window isKindOf: PopUpMenu)
  ifTrue: [window invokeOn: nil].
  (window isKindOf: View)
  ifTrue: [window controller open].
  ^window!