The Trunk: Morphic-mt.810.mcz

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

The Trunk: Morphic-mt.810.mcz

commits-2
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.810.mcz

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

Name: Morphic-mt.810
Author: mt
Time: 2 April 2015, 11:17:44.865 am
UUID: 644a4b6a-4767-ec45-992c-9ed10ac54871
Ancestors: Morphic-mt.809

Exploring a morph via its halo menu now attaches the explorer also to the hand -- like inspecting does.

=============== Diff against Morphic-mt.809 ===============

Item was changed:
  ----- Method: Morph>>buildDebugMenu: (in category 'debug and other') -----
  buildDebugMenu: aHand
  "Answer a debugging menu for the receiver.  The hand argument is seemingly historical and plays no role presently"
 
  | aMenu aPlayer |
  aMenu := MenuMorph new defaultTarget: self.
  aMenu addStayUpItem.
  (self hasProperty: #errorOnDraw) ifTrue:
  [aMenu add: 'start drawing again' translated action: #resumeAfterDrawError.
  aMenu addLine].
  (self hasProperty: #errorOnStep) ifTrue:
  [aMenu add: 'start stepping again' translated action: #resumeAfterStepError.
  aMenu addLine].
 
  aMenu add: 'inspect morph' translated action: #inspectInMorphic:.
  aMenu add: 'inspect owner chain' translated action: #inspectOwnerChain.
  Smalltalk isMorphic ifFalse:
  [aMenu add: 'inspect morph (in MVC)' translated action: #inspect].
 
  self isMorphicModel ifTrue:
  [aMenu add: 'inspect model' translated target: self model action: #inspect].
  (aPlayer := self player) ifNotNil:
  [aMenu add: 'inspect player' translated target: aPlayer action: #inspect].
 
+      aMenu add: 'explore morph' translated target: self selector: #exploreInMorphic:.
-      aMenu add: 'explore morph' translated target: self selector: #explore.
 
  aMenu addLine.
  aPlayer ifNotNil:
  [ aMenu add: 'viewer for Player' translated target: self player action: #beViewed.
  aMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan "View" halo handle' translated ].
 
  aMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly.
  aMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated.
  aMenu addLine.
 
  aPlayer ifNotNil:
  [aPlayer class isUniClass ifTrue: [
  aMenu add: 'browse player class' translated target: aPlayer action: #browseHierarchy]].
  aMenu add: 'browse morph class' translated target: self selector: #browseHierarchy.
  (self isMorphicModel)
  ifTrue: [aMenu
  add: 'browse model class'
  target: self model
  selector: #browseHierarchy].
  aMenu addLine.
 
  self addViewingItemsTo: aMenu.
  aMenu
  add: 'make own subclass' translated action: #subclassMorph;
  add: 'save morph in file' translated  action: #saveOnFile;
  addLine;
  add: 'call #tempCommand' translated action: #tempCommand;
  add: 'define #tempCommand' translated action: #defineTempCommand;
  addLine;
 
  add: 'control-menu...' translated target: self selector: #invokeMetaMenu:;
  add: 'edit balloon help' translated action: #editBalloonHelpText.
 
  ^ aMenu!

Item was added:
+ ----- Method: Morph>>exploreInMorphic (in category 'menus') -----
+ exploreInMorphic
+ self currentHand attachMorph: (ToolSet explore: self).!

Item was added:
+ ----- Method: Morph>>exploreInMorphic: (in category 'menus') -----
+ exploreInMorphic: evt
+ evt hand attachMorph: (ToolSet explore: self).!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

Chris Muller-3
Hi Marcel, is there any way this could honor the Reuse Windows preference?

One way of course would be to simply open straight into the world.
This would be consistent with how all the other tools work.  Nowhere
else do we open a SystemWindow into the Hand, do we?


On Thu, Apr 2, 2015 at 4:17 AM,  <[hidden email]> wrote:

> Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-mt.810.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-mt.810
> Author: mt
> Time: 2 April 2015, 11:17:44.865 am
> UUID: 644a4b6a-4767-ec45-992c-9ed10ac54871
> Ancestors: Morphic-mt.809
>
> Exploring a morph via its halo menu now attaches the explorer also to the hand -- like inspecting does.
>
> =============== Diff against Morphic-mt.809 ===============
>
> Item was changed:
>   ----- Method: Morph>>buildDebugMenu: (in category 'debug and other') -----
>   buildDebugMenu: aHand
>         "Answer a debugging menu for the receiver.  The hand argument is seemingly historical and plays no role presently"
>
>         | aMenu aPlayer |
>         aMenu := MenuMorph new defaultTarget: self.
>         aMenu addStayUpItem.
>         (self hasProperty: #errorOnDraw) ifTrue:
>                 [aMenu add: 'start drawing again' translated action: #resumeAfterDrawError.
>                 aMenu addLine].
>         (self hasProperty: #errorOnStep) ifTrue:
>                 [aMenu add: 'start stepping again' translated action: #resumeAfterStepError.
>                 aMenu addLine].
>
>         aMenu add: 'inspect morph' translated action: #inspectInMorphic:.
>         aMenu add: 'inspect owner chain' translated action: #inspectOwnerChain.
>         Smalltalk isMorphic ifFalse:
>                 [aMenu add: 'inspect morph (in MVC)' translated action: #inspect].
>
>         self isMorphicModel ifTrue:
>                 [aMenu add: 'inspect model' translated target: self model action: #inspect].
>         (aPlayer := self player) ifNotNil:
>                 [aMenu add: 'inspect player' translated target: aPlayer action: #inspect].
>
> +      aMenu add: 'explore morph' translated target: self selector: #exploreInMorphic:.
> -      aMenu add: 'explore morph' translated target: self selector: #explore.
>
>         aMenu addLine.
>         aPlayer ifNotNil:
>                 [ aMenu add: 'viewer for Player' translated target: self player action: #beViewed.
>         aMenu balloonTextForLastItem: 'Opens a viewer on my Player -- this is the same thing you get if you click on the cyan "View" halo handle' translated ].
>
>         aMenu add: 'viewer for Morph' translated target: self action: #viewMorphDirectly.
>         aMenu balloonTextForLastItem: 'Opens a Viewer on this Morph, rather than on its Player' translated.
>         aMenu addLine.
>
>         aPlayer ifNotNil:
>                 [aPlayer class isUniClass ifTrue: [
>                         aMenu add: 'browse player class' translated target: aPlayer action: #browseHierarchy]].
>         aMenu add: 'browse morph class' translated target: self selector: #browseHierarchy.
>         (self isMorphicModel)
>                 ifTrue: [aMenu
>                                 add: 'browse model class'
>                                 target: self model
>                                 selector: #browseHierarchy].
>         aMenu addLine.
>
>         self addViewingItemsTo: aMenu.
>         aMenu
>                 add: 'make own subclass' translated action: #subclassMorph;
>                 add: 'save morph in file' translated  action: #saveOnFile;
>                 addLine;
>                 add: 'call #tempCommand' translated action: #tempCommand;
>                 add: 'define #tempCommand' translated action: #defineTempCommand;
>                 addLine;
>
>                 add: 'control-menu...' translated target: self selector: #invokeMetaMenu:;
>                 add: 'edit balloon help' translated action: #editBalloonHelpText.
>
>         ^ aMenu!
>
> Item was added:
> + ----- Method: Morph>>exploreInMorphic (in category 'menus') -----
> + exploreInMorphic
> +       self currentHand attachMorph: (ToolSet explore: self).!
>
> Item was added:
> + ----- Method: Morph>>exploreInMorphic: (in category 'menus') -----
> + exploreInMorphic: evt
> +       evt hand attachMorph: (ToolSet explore: self).!
>
>

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
Well, it is now consistent with how inspectors are openend via the halo. ;) I find this quite convenient because the RealEstateManager places new windows in a strange way and I always have to look for them on my 27" monitor. :D

I guess, we can have both reuse-windows and open-in-hand. Let me look into it.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
I double-checked and "Reuse windows" is - at the moment - broken for:

- the main search bar
- inspecting a morph via its halo
- exploring a morph via its halo

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
Fixed something here: http://forum.world.st/The-Trunk-Morphic-mt-815-mcz-td4817141.html

Now, we should think about letting Browser honor this preference, too. The Search Bar opens regular browsers, not hierarchy browsers.

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
Oh my.... I forgot to commit this:
http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-117-mcz-td4817328.html

Now it should work. :-)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

Chris Muller-3
In reply to this post by marcel.taeumel (old)
On Fri, Apr 3, 2015 at 1:39 AM, Marcel Taeumel
<[hidden email]> wrote:
> Well, it is now consistent with how inspectors are openend via the halo. ;) I
> find this quite convenient because the RealEstateManager places new windows
> in a strange way and I always have to look for them on my 27" monitor. :D

Well, that is a problem you already have -- it is not the fault of
Reuse Windows.  :)   Opening windows in the hand is the wrong
solution.  There should be a hot-key which will emphasize the window
with focus on the desktop.  Either #flash it or darken all the other
windows briefly..

We had a discussion about this a while back (search archives for
"Morphic-cmm.728").  I submitted a Inbox proposal to #flash a window
after it was topped by the Reuse Windows preference but failed to
convince this community to adopt it.   :(

PS -- I just saw your fix.  That is much better thanks but I still
think opening in the hand is wrong.  Someday we should make this
consistent and fix your big monitor problem a different way.  :)

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
Hey Chris,

opening the window in the hand is really nice if it already was a mouse interaction. That reuse-windows preference is younger -- I guess -- and now we need some trade-off here.

In my opinion, all moues-based tool-openers should be attached to the hand because that is were the user looks at the moment anyway.

However, the window positioning needs some kind of re-design anyway. :)

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
I guess your #flash implementation included a Delay?^^

Best,
Marcel
Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-mt.810.mcz

marcel.taeumel (old)
In reply to this post by marcel.taeumel (old)
We could check for mouse interaction with "self activeEvent isMouse ifTrue: []" :) maybe in ToolSet or the open-methods of SystemWindow/Morph.

...we could make it a preference. ;)

Best,
Marcel