Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-KLC.1318.mcz ==================== Summary ==================== Name: Morphic-KLC.1318 Author: KLC Time: 10 March 2017, 3:57:38.932783 pm UUID: 968604ea-690e-e84d-9905-e1ffc9b5dfc2 Ancestors: Morphic-bp.1317 Update Squeak Swiki link in Morph class comment. =============== Diff against Morphic-bp.1316 =============== Item was changed: Object subclass: #Morph instanceVariableNames: 'bounds owner submorphs fullBounds color extension' classVariableNames: 'IndicateKeyboardFocus PreferredCornerRadius UseSoftDropShadow' poolDictionaries: '' category: 'Morphic-Kernel'! + !Morph commentStamp: 'KLC 3/10/2017 15:50' prior: 0! + A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at http://wiki.squeak.org/squeak/30. - !Morph commentStamp: 'efc 2/26/2003 20:01' prior: 0! - A Morph (from the Greek "shape" or "form") is an interactive graphical object. General information on the Morphic system can be found at http://minnow.cc.gatech.edu/squeak/30. Morphs exist in a tree, rooted at a World (generally a PasteUpMorph). The morphs owned by a morph are its submorphs. Morphs are drawn recursively; if a Morph has no owner it never gets drawn. To hide a Morph and its submorphs, set its #visible property to false using the #visible: method. The World (screen) coordinate system is used for most coordinates, but can be changed if there is a TransformMorph somewhere in the owner chain. My instance variables have accessor methods (e.g., #bounds, #bounds:). Most users should use the accessor methods instead of using the instance variables directly. Structure: instance var Type Description bounds Rectangle A Rectangle indicating my position and a size that will enclose me. owner Morph My parent Morph, or nil for the top-level Morph, which is a or nil world, typically a PasteUpMorph. submorphs Array My child Morphs. fullBounds Rectangle A Rectangle minimally enclosing me and my submorphs. color Color My primary color. Subclasses can use this in different ways. extension MorphExtension Allows extra properties to be stored without adding a or nil storage burden to all morphs. By default, Morphs do not position their submorphs. Morphs may position their submorphs directly or use a LayoutPolicy to automatically control their submorph positioning. Although Morph has some support for BorderStyle, most users should use BorderedMorph if they want borders.! Item was changed: MorphicModel subclass: #SystemWindow + instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox savedBounds' - instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive isLookingFocused menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand DragToEdges ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows RoundedWindowCorners TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '<historical>' prior: 0! SystemWindow is the Morphic equivalent of StandardSystemView -- a labelled container for rectangular views, with iconic facilities for close, collapse/expand, and resizing. The attribute onlyActiveOnTop, if set to true (and any call to activate will set this), determines that only the top member of a collection of such windows on the screen shall be active. To be not active means that a mouse click in any region will only result in bringing the window to the top and then making it active.! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- handleListenEvent: aUserInputEvent "See #mouseEnterDragging:. Watch for finished drag-and-drop action and lock contents accordingly." - (aUserInputEvent isMouse and: [ aUserInputEvent hand hasSubmorphs not ]) ifTrue: [ self isKeyWindow ifFalse: [ self passivateIfNeeded ]. + aUserInputEvent hand removeMouseListener: self ]. + + (aUserInputEvent hand submorphs includes: self) ifTrue: [ + | clearArea selector | + clearArea := ActiveWorld clearArea. + (self class dragToEdges and: [(selector := self dragToEdgesSelectorFor: aUserInputEvent cursorPoint in: clearArea) notNil]) + ifTrue: [ + savedBounds ifNil: [savedBounds := self bounds]. + self newBounds: (clearArea perform: selector)] + ifFalse: [ + savedBounds ifNotNil: [ + self newBounds: savedBounds. + savedBounds := nil]]]! - aUserInputEvent hand removeMouseListener: self ].! Item was changed: ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') ----- justDroppedInto: aMorph event: anEvent + savedBounds := nil. - isCollapsed ifTrue: [self position: ((self position max: 0@0) grid: 8@8). collapsedFrame := self bounds] ifFalse: [fullFrame := self bounds]. self beKeyWindow. self hasDropShadow: Preferences menuAppearance3d. "See #startDragFromLabel:." aMorph == self world ifTrue: [self assureLabelAreaVisible]. (Project uiManager openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop)) ifTrue: [ self removeProperty: #initialDrop. (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: []) ifNotNil: [:grip | grip referencePoint: anEvent position; setProperty: #targetHadDropShadow toValue: true "See MorphicToolBuilder >> #open:". self hasDropShadow: false. anEvent hand newMouseFocus: grip]]. ^super justDroppedInto: aMorph event: anEvent! Item was changed: ----- Method: SystemWindow>>startDragFromLabel: (in category 'events') ----- startDragFromLabel: evt "When label events are active, we need to pass dragging to the window explicitely The window only recognizes a drag with an offset of more than 3 pixels" self isSticky ifTrue: [^ self]. self fastFramingOn ifTrue: [self doFastFrameDrag: evt cursorPoint] ifFalse: [ self hasDropShadow: false. + evt hand grabMorph: self topRendererOrSelf. + evt hand addMouseListener: self] - evt hand grabMorph: self topRendererOrSelf] ! |
Maybe I moved it a bit fast to trunk because it's based on Morphic-bp.1317 But Morphic-bp.1317 does not work that great for me: After activating Drag To Edges and disabling fastDragWindowForMorphic, windows are effectively resized... But they are kind of bouncing on the edge when I release mouse button 2017-03-10 23:03 GMT+01:00 <[hidden email]>: Nicolas Cellier uploaded a new version of Morphic to project The Trunk: |
I can't seem to replicate that on Windows with a 32bit image at least. However I found a much more serious issue that appears to have entered with jr.1315 which is when trying to quit, a debugger pops up with an MNU for PasteUpMorph>>removeModalWindow. Did you not see that? This seems to be related to a change in the ShutDown behavior around World but the ShutDown list is not properly modified.
Would I have been more correct to submit my change against the latest version in the squeak51 Morphic-mt.1296.mcz. I'm sorry it has been a long time since I have done any Squeaking and to say that I'm rusty would be an understatement. |
Hi Ken,
2017-03-11 5:39 GMT+01:00 KenCausey <[hidden email]>: I can't seem to replicate that on Windows with a 32bit image at least. No, I did not see that. Would I have been more correct to submit my change against the latest The best is to submit a change based on head revision in trunk. Basing the change on any ancestor of head is OK, the newer the better to avoid possible conflicts. Basing the changes on a branch is not OK, because we either have to merge the changes of the whole branch, or cherry pick the diff. I'm sorry it has been a long time since I have done any Squeaking and to say No, no need to apologize, it's me who thought that I could push directly to trunk from web interface without double checking in an image because the changes were trivial enough. As if I never was caught before by excess of confidence, despite my age ;) Anyway, thanks for contributing and welcome back !
|
Thanks Nicolas. I've continued looking into the missing removeModalWindow issue and I suspect that it was removed in Morphic-tfel.1310 based on the comment, but I can't find that version to actually confirm. To continue to display my ignorance: Isn't there a mechanism for running a 'script' on installation of a mcz or something like that? I'm thinking there must have been such a script to remove or method the actionMap for PasteUpMorph since the modal window support was deprecated/removed. And somehow when I load or merge a later version I don't end up running that.On Sat, Mar 11, 2017 at 2:16 AM, Nicolas Cellier <[hidden email]> wrote:
|
Yes, it's possible to attach scripts to a .mcz. (preamble, postscript for install, same for removal) - see the 'Scripts' on Monticello browser. If you merge a .mcz directly from the Monticello interface, then there is no provision that intermediate scripts will run. Only the lastest will. There might also be dependencies on changes made on other packages. But this process does not allow for easy cherry picking. 2017-03-11 9:25 GMT+01:00 Ken Causey <[hidden email]>:
|
2017-03-11 9:41 GMT+01:00 Nicolas Cellier <[hidden email]>:
Err, only the latest will run IF you first install the package OR if the script did change.
|
So after a little sleep and a bit more looking around I realize the reason I had the removeModalWindow problem is that I had a version of Morphic loaded where the modal window stuff was deprecated but not the matching 60Deprecated so the methods would be properly deprecated and not simply removed. Again sorry to everyone. At this point I've forgotten more than I know and I'm not sure I ever really had a deep understanding of Monticello and related.On Sat, Mar 11, 2017 at 2:36 AM, Nicolas Cellier [via Smalltalk] <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |