From commits at source.squeak.org Sun May 1 09:29:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 1 09:36:59 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1126.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1126.mcz ==================== Summary ==================== Name: Morphic-mt.1126 Author: mt Time: 1 May 2016, 11:28:52.934127 am UUID: 6d6940ad-4542-d94f-9b90-8df2649f381d Ancestors: Morphic-mt.1125 Refactors the code for the columns cache in tree morphs. =============== Diff against Morphic-mt.1125 =============== Item was changed: ----- Method: IndentingListItemMorph>>widthOfColumn: (in category 'accessing - columns') ----- widthOfColumn: columnIndex + + ^ (container widthOfColumn: columnIndex) ifNil: [self width]! - | widthOrSpec | - container columns ifNil: [ ^ self width ]. - (container columnsCache at: columnIndex) - ifNotNil: [ :cachedWidth | ^ cachedWidth ]. - widthOrSpec := container columns at: columnIndex. - ^ container columnsCache at: columnIndex put: (widthOrSpec isNumber - ifTrue: [ widthOrSpec ] - ifFalse: - [ widthOrSpec isBlock - ifTrue: - [ widthOrSpec - cull: container - cull: self ] - ifFalse: - [ widthOrSpec - ifNil: [ self width ] - ifNotNil: [ "Fall back" - 50 ] ] ])! Item was added: + ----- Method: SimpleHierarchicalListMorph>>widthOfColumn: (in category 'private - caching') ----- + widthOfColumn: index + + self columns ifNil: [^ nil]. + + "Try columns cache." + (self columnsCache at: index) + ifNotNil: [:cachedWidth | ^ cachedWidth]. + + ^ (self columns at: index) + ifNil: [nil] + ifNotNil: [:widthOrSpec | + "Fill columns cache." + self columnsCache + at: index + put: (widthOrSpec isNumber + ifTrue: [widthOrSpec] + ifFalse: [widthOrSpec isBlock + ifTrue: [widthOrSpec cull: self] + ifFalse: [50 "fall back for bad spec"]])]! From commits at source.squeak.org Sun May 1 09:33:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 1 09:42:12 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1127.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1127.mcz ==================== Summary ==================== Name: Morphic-mt.1127 Author: mt Time: 1 May 2016, 11:32:25.144127 am UUID: 5636f362-b347-d842-aaea-fe73bc3eb25b Ancestors: Morphic-mt.1126 Another update regarding sound shutdown code. =============== Diff against Morphic-mt.1126 =============== Item was changed: ----- Method: AbstractSound class>>updateScorePlayers (in category '*Morphic-Sounds-sound library-file in/out') ----- updateScorePlayers | soundsBeingEdited | "Force all ScorePlayers to update their instrument list from the sound library. This may done after loading, unloading, or replacing a sound to make all ScorePlayers feel the change." ScorePlayer allSubInstancesDo: [:p | p pause]. + SoundPlayer shutDown: true. - SoundPlayer shutDown. soundsBeingEdited := EnvelopeEditorMorph allSubInstances collect: [:ed | ed soundBeingEdited]. ScorePlayerMorph allSubInstancesDo: [:p | p updateInstrumentsFromLibraryExcept: soundsBeingEdited]. ! From Marcel.Taeumel at hpi.de Sun May 1 09:40:32 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 1 10:21:16 2016 Subject: [squeak-dev] Re: The Trunk: System-dtl.821.mcz In-Reply-To: References: Message-ID: <1462095632798-4893121.post@n4.nabble.com> Hi Dave, it seems rather difficult to know about all the strong references to the project you want to remove. Here, you assume that you have to care about ProjectViewMorph and ProjectController. We should move that to MVCProject >> #deletingProject: and MorphicProject >> #deletingProject:. I will try something. Best, Marcel P.S.: I will post the projects refactoring soon for everybody to try out. :-) -- View this message in context: http://forum.world.st/The-Trunk-System-dtl-821-mcz-tp4893080p4893121.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From smalltalk at stefan-marr.de Sun May 1 12:13:04 2016 From: smalltalk at stefan-marr.de (Stefan Marr) Date: Sun May 1 12:22:11 2016 Subject: [squeak-dev] A Benchmarking tool for the trunk? In-Reply-To: References: <1461924602498-4892865.post@n4.nabble.com> <04C1532A-346C-4FEB-97C9-50050F2EBF48@stefan-marr.de> Message-ID: <31D3F62A-8B59-44DB-96B1-263FF1FA4F90@stefan-marr.de> Hi Tim: Ok, I checked what I did. See http://smalltalkhub.com/#!/~StefanMarr/SMark/packages/Scripting This implements support for command-line scripting by registering a startup handler, which then calls SMarkHarness class>>#run:. Last time I checked, this was compatible with Squeak and Pharo, because I was using it even with Squeak 3.9 images. All this infrastructure is coming out of the RoarVM project. So, mind you, the code is dating back a while? The `ScriptStarter` class should be the code to look at. The #initialize/#install methods on the class side do the relevant setup. Hope that helps Stefan > On 01 May 2016, at 00:24, Tim Felgentreff wrote: > > Hi Chris and Stefan > > yes, the Squeak cmdline arg processing through a file is what I'm using, but Pharo supports different ( more 'traditional looking') stuff afaict. If there was code specific to the Pharo way of doing it, I'm SMark, I don't know about it, since I haven't used Pharo for a few years (and RSqueak doesn't work with it, because they removed some of the fallback code for primitives that we don't implement). > > I can look at the code, but I would be against a command line interface that doesn't work the same across different Smalltalk distributions. But we can certainly think about how to improve it. > > cheers, > Tim > > On 30 April 2016 at 18:12, Chris Muller wrote: >> Squeak always processes command-line arguments. If the >> #readDocumentAtStartup Preference in the image is set (the default), >> it will treat the first image argument as a URL referring to a >> Smalltalk script to execute, and the subsequent ones as arguments to >> that script: >> >> squeak -vm [vmArgs] myImage.image [urlToSmalltalkScript] >> [scriptArg1 scriptArg2 ...] >> >> There's a convenience method provides easy access to those arguments >> and basic error handling for headless running via >> >> "This code goes in a text file and referred to by the >> urlToSmalltalkScript" >> Smalltalk run: [ :scriptArg1 :scriptArg2 | "... your script..." ] >> >> If readDocumentAtStartup is not set, then each image argument is >> simply passed in as an Array of Strings. >> >> squeak -vm [vmArgs] myImage.image [imageArg1 imageArg2 imageArg3 ...] >> >> On Fri, Apr 29, 2016 at 8:45 AM, Stefan Marr wrote: >>> Hi Tim: >>> >>>> On 29 Apr 2016, at 12:10, timfelgentreff wrote: >>>> >>>> what does your squeak-vm.sh script do? Because on Squeak, I cannot simply >>>> type --help and get output. The mailing list thread you linked refers to >>>> something Pharo specific that I don?t think we have in Squeak. >>> >>> At least in Pharo there was/is a way to register a handler for the startup. >>> SMark used to do that. It then will process the command line arguments. >>> >>> I don?t remember the details, sorry, and currently don?t have access to the code to check. >>> >>> Best regards >>> Stefan >>> >>>> >>>> >>>> Stefan Marr-3 wrote >>>>> Hi Tim: >>>>> >>>>>> On 28 Apr 2016, at 13:01, Tim Felgentreff < >>>> >>>>> timfelgentreff@ >>>> >>>>> > wrote: >>>>>> >>>>>>> - can it be controlled from the command line? >>>>>> >>>>>> Yes, provided you mean "use a .st file argument". To run a benchmark >>>>>> you can write e.g. >>>>>> - BenchmarkAutosizeSuite run: {'BenchmarkSimpleStatisticsReporter'. >>>>>> 'SMarkShootout'. 100}. # runs all shootout benchmarks for 100 outer >>>>>> iterations, reporting statistics in the autosize suite >>>>>> - BenchmarkCogSuite run: {'BenchmarkSimpleStatisticsReporter'. >>>>>> 'SMarkShootout.benchBinaryTrees'. 100}. # runs the binarytrees >>>>>> benchmarks for 100 outer iterations without autosizing, but with one >>>>>> extra iteration for warmup >>>>> >>>>> I look at your changes to the code, but if you didn?t remove any SMark >>>>> features, there is also a proper command-line interface. >>>>> >>>>> See: >>>>> http://forum.world.st/Convention-to-build-cmd-line-interfaces-with-Pharo-td3524056.html >>>>> >>>>> $ squeak-vm.sh Pharo-1.2.image --help >>>>> SMark Benchmark Framework, version: SMark-StefanMarr.12 >>>>> >>>>> Usage: <vm+image> SMarkHarness [runner] [reporter] >>>>> >>>>> >>>>> [iterations [processes [problemSize]]] >>>>> >>>>> Arguments: >>>>> runner optional, a SMarkRunner class that executes the >>>>> benchmarks >>>>> reporter optional, a SMarkReporter class that processes >>>>> and displays the results >>>>> suiteOrBenchmark required, either a SMarkSuite with benchmarks, >>>>> or a benchmark denoted by Suite.benchName >>>>> iterations optional, number of times the benchmarks are repeated >>>>> processes optional, number of processes/threads used by the >>>>> benchmarks >>>>> problemSize optional, depending on benchmark for instance number >>>>> of >>>>> inner iterations or size of used data set >>>>> >>>>> >>>>> Best regards >>>>> Stefan >>>>> >>>>> -- >>>>> Stefan Marr >>>>> Johannes Kepler Universit?t Linz >>>>> http://stefan-marr.de/research/ >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> View this message in context: http://forum.world.st/A-Benchmarking-tool-for-the-trunk-tp4892463p4892865.html >>>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> > From lewis at mail.msen.com Sun May 1 13:12:40 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 1 13:20:45 2016 Subject: [squeak-dev] Re: The Trunk: System-dtl.821.mcz In-Reply-To: <1462095632798-4893121.post@n4.nabble.com> References: <1462095632798-4893121.post@n4.nabble.com> Message-ID: <20160501131240.GA55218@shell.msen.com> On Sun, May 01, 2016 at 02:40:32AM -0700, marcel.taeumel wrote: > Hi Dave, > > it seems rather difficult to know about all the strong references to the > project you want to remove. Here, you assume that you have to care about > ProjectViewMorph and ProjectController. We should move that to MVCProject >> > #deletingProject: and MorphicProject >> #deletingProject:. I will try > something. Yes I agree. I did not try to make that change, but it should be done. The earlier version of Project class>>deletingProject had references to ProjectViewMorph. I added the references to ProjectController, but it would be better if these could be moved to MorphicProject and MVCProject. The test case that I was using was to make a tree of projects that includes both Morphic and MVC projects. It should be possible to enter any of these projects, then do "Project current removeAllOtherProjects". The problem that I saw was that when I did this from an MVC project that had a child Morphic project, the project view for the child project did not go away (and if the child project had been taken out of the project hierarchy, this led to an emergency evaluator). The change to Project class>>deletingProject fixed this. > > Best, > Marcel > > P.S.: I will post the projects refactoring soon for everybody to try out. > :-) > Thanks! Dave From Marcel.Taeumel at hpi.de Sun May 1 16:41:51 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 1 17:26:39 2016 Subject: [squeak-dev] Project Refactoring -- Please test it Message-ID: <1462120911346-4893158.post@n4.nabble.com> Hi, there! Please find attached a somewhat larger refactoring of Squeak's project mechanism. It can be applied to the latest trunk version. projects-refactoring-may.5.cs It's goals were to: - Reduce the code footprint of new project kinds - Move several MVC- or Morphic-specific parts from the base system to their respective packages - Refactor several dependencies on global state/variables in MVC and Morphic - Add support to delete projects that have sub-projects - Improve error handling of severe UI errors such as messing around in LazyListMorph >> #drawOn: - Allow parent projects that have a different code base (i.e. are of a different project kind) to act as fall-back environment before using the emergency REPL (Object >> #primitiveError:). I will provide you with an additional third project kind of play around with in a few days. It will illustrate the simple means in Squeak to write a new user interface from scratch. Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactoring-Please-test-it-tp4893158.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Sun May 1 17:41:14 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 1 17:52:28 2016 Subject: [squeak-dev] Project Refactoring -- Please test it In-Reply-To: <1462120911346-4893158.post@n4.nabble.com> References: <1462120911346-4893158.post@n4.nabble.com> Message-ID: <20160501174114.GA99820@shell.msen.com> On Sun, May 01, 2016 at 09:41:51AM -0700, marcel.taeumel wrote: > Hi, there! > > Please find attached a somewhat larger refactoring of Squeak's project > mechanism. It can be applied to the latest trunk version. > > projects-refactoring-may.5.cs > > > It's goals were to: > - Reduce the code footprint of new project kinds > - Move several MVC- or Morphic-specific parts from the base system to their > respective packages > - Refactor several dependencies on global state/variables in MVC and Morphic > - Add support to delete projects that have sub-projects > - Improve error handling of severe UI errors such as messing around in > LazyListMorph >> #drawOn: > - Allow parent projects that have a different code base (i.e. are of a > different project kind) to act as fall-back environment before using the > emergency REPL (Object >> #primitiveError:). > > I will provide you with an additional third project kind of play around with > in a few days. It will illustrate the simple means in Squeak to write a new > user interface from scratch. Hi Marcel, I loaded the cs into my working trunk image, and it works well. This is a very nice cleanup of the Project structure. +1 for putting it into trunk. Dave From asqueaker at gmail.com Mon May 2 15:26:17 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 2 15:35:07 2016 Subject: [squeak-dev] Project Refactoring -- Please test it In-Reply-To: <1462120911346-4893158.post@n4.nabble.com> References: <1462120911346-4893158.post@n4.nabble.com> Message-ID: > - Improve error handling of severe UI errors such as messing around in > LazyListMorph >> #drawOn: Classically, when an error in #drawOn: would occur, we draw a red box with a X through it. Is that changed? From commits at source.squeak.org Mon May 2 16:05:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 2 16:24:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1128.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1128.mcz ==================== Summary ==================== Name: Morphic-mt.1128 Author: mt Time: 2 May 2016, 6:04:35.298556 pm UUID: 33e9b876-51c7-3840-b392-162231df3805 Ancestors: Morphic-mt.1127 During a non-fast window-resize operation, disable the drop shadow to improve responsiveness. This also affects the non-soft drop shadow. =============== Diff against Morphic-mt.1127 =============== Item was changed: ----- Method: CornerGripMorph>>mouseMove: (in category 'as yet unclassified') ----- mouseMove: anEvent | delta | target ifNil: [^ self]. target fastFramingOn ifTrue: [delta := target doFastWindowReframe: self ptName] ifFalse: [ + target hasDropShadow: false. delta := lastMouse ifNil: [0@0] ifNotNil: [anEvent cursorPoint - lastMouse]. lastMouse := anEvent cursorPoint. self apply: delta. self bounds: (self bounds origin + delta extent: self bounds extent)].! Item was added: + ----- Method: CornerGripMorph>>mouseUp: (in category 'as yet unclassified') ----- + mouseUp: anEvent + + target ifNil: [^ self]. + target fastFramingOn ifFalse: [target hasDropShadow: true].! From commits at source.squeak.org Mon May 2 16:08:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 2 16:31:13 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1129.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1129.mcz ==================== Summary ==================== Name: Morphic-mt.1129 Author: mt Time: 2 May 2016, 6:06:52.387556 pm UUID: e0d9429f-1e41-b144-b7c4-2f636292abdc Ancestors: Morphic-mt.1128 Adds convenience functions for scrolling panes and slides. =============== Diff against Morphic-mt.1128 =============== Item was added: + ----- Method: ScrollPane>>scrollToBottom (in category 'scrolling') ----- + scrollToBottom + + self vScrollBar scrollToMaximum..! Item was added: + ----- Method: ScrollPane>>scrollToLeft (in category 'scrolling') ----- + scrollToLeft + + self hScrollBar scrollToMinimum..! Item was added: + ----- Method: ScrollPane>>scrollToRight (in category 'scrolling') ----- + scrollToRight + + self hScrollBar scrollToMaximum.! Item was added: + ----- Method: ScrollPane>>scrollToTop (in category 'scrolling') ----- + scrollToTop + + self vScrollBar scrollToMinimum.! Item was added: + ----- Method: Slider>>scrollToMaximum (in category 'scrolling') ----- + scrollToMaximum + + self setValue: self maximumValue.! Item was added: + ----- Method: Slider>>scrollToMinimum (in category 'scrolling') ----- + scrollToMinimum + + self setValue: self minimumValue.! From commits at source.squeak.org Mon May 2 16:22:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 2 16:36:44 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1130.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1130.mcz ==================== Summary ==================== Name: Morphic-mt.1130 Author: mt Time: 2 May 2016, 6:21:01.941556 pm UUID: 2f1c4303-1ffe-6045-8d64-e8ae3640dba5 Ancestors: Morphic-mt.1129 Fixes list filter highlight. The filter is case-insensitive and the highlight did not consider this. =============== Diff against Morphic-mt.1129 =============== Item was changed: ----- Method: LazyListMorph>>getFilterOffsets: (in category 'list access') ----- getFilterOffsets: row "Calculate matching character indexes for the current filter term." + | item filter offsets currentIndex | - | item filter filterWidth offsets currentIndex | filter := listSource filterTerm. filter ifEmpty: [^ Array empty]. - filterWidth := font widthOfString: filter. item := (self item: row) asStringOrText asString. "See row drawing. Strings only." offsets := OrderedCollection new. currentIndex := 1. [currentIndex > 0] whileTrue: [ currentIndex := item findString: filter startingAt: currentIndex caseSensitive: false. + currentIndex > 0 ifTrue: [ | left width | - currentIndex > 0 ifTrue: [ | left | left := font widthOfString: item from: 1 to: currentIndex-1. + width := font widthOfString: item from: currentIndex to: currentIndex + filter size - 1. + offsets addLast: (left to: left + width). - offsets addLast: (left to: left + filterWidth). currentIndex := currentIndex + 1] ]. ^ offsets! From Marcel.Taeumel at hpi.de Mon May 2 15:56:07 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 2 16:44:24 2016 Subject: [squeak-dev] Re: Project Refactoring -- Please test it In-Reply-To: References: <1462120911346-4893158.post@n4.nabble.com> Message-ID: <1462204567233-4893335.post@n4.nabble.com> Hi Chris, of course not. Try putting an error in LazyListMorph >> #drawOn:. Before and after the change set. See, what happens. :-) Hint: The Morphic "yellow cross of death" has a serious flaw. After a single error, it aborts the drawing and forgets about the current damage. To recover to a stable state GUI state, we have to keep on redrawing the whole world until no further error occurs. So, after putting an error into LazyListMorph >> #drawOn:, you cannot even open a debugger and hence the emergency REPL appears. Before the change set, you have to hit escape several times before reaching a stable state again. Try it out. :-) Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactoring-Please-test-it-tp4893158p4893335.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Mon May 2 19:04:55 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon May 2 19:21:18 2016 Subject: [squeak-dev] [long] Squeak and High-DPI Message-ID: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> Hi all, [this is a longish post, you might want to use this toc] [TOC] - [INTRO] - [TERMINOLOGY] - [DPI] - [DEFAULT DPI] - [STATUS] - [WINDOWS DPI] - [OSX CARBON DPI] - [OSX COCOA DPI] - [SUGGESTIONS] <<<< PLEASE COMMENT - [OSX COCOA PATCH] - [VM/IMAGE INTERFACE] [INTRO] For some time now, OSX and also Windows support screens of different pixel per inch (DPI, :P). The approaches are slightly different; but both support a fallback mode where the pixel content of non-aware applications is automatically scaled to look like on "default dpi"[See DEFAULT DPI]. Effectively, we end up with pixel doubling. One way or another, this means Squeak looks somewhat pixelated on new hardware. These are some thoughts of mine on how to address this. [TERMINOLOGY] [DPI] Actually "dots-per-inch" but freely used in multiple senses by different people. For displays it used to mean "how many pixels are there approximately in an inch?", but for a long time now, The [DEFAULT DPI] that OSes report usually was fixed/defaulted (Win: 96, OS X: 72), _regardless_ of the actual screen's dpi. [DEFAULT DPI] On OS X, the system reports default DPI as 72 dpi and Retina typically as 144 dpi, _although_ the "actual" dpi is different. For example, My MacBook Pro 15" is reported as 144dpi, but https://www.sven.de/dpi/ calculates that I have 220.53 pixel to the inch. That's why Apple is moving away from DPI and just talking about a "scale factor"[1],[2] and the abstract "point" principle, moving away from actual pixels for "user content"[3]. On Windows, the default dpi is 96 dpi, but Windows always made it a little easier to change that. Squeak also has a default dpi, namely 96.0 dpi. [STATUS] [WINDOWS DPI] Windows supports different levels of DPI awareness[4], available depending on OS Version[5]. Long story short, with calling a special function[6] or (As we did/do/can do) setting a key in the executables ".manifest" file to "true" or "true/PM", Windows treats our Application as DPI-Aware[7]. Currently the effect of enabling this for our VMs means: - Looks ok on non-High-DPI screens - Looks tiny on High-DPI screens - Moving the VM between High-DPI and non-High-DPI screens changes the outer frame size of the application, the pixel size reported _to_ the VM remains the same. [OSX CARBON DPI] DPI-awareness and High-DPI are not possible with the QuickDraw-API the Carbon VM used to use. [OSX COCOA DPI] OS X now has a Device-in-pixel mode and a Userspace-in-"point" mode. When opted-in via Info.plist file, on AppKit-Level, one can convert between those with +[NSScreen backingScaleFactor], -convertRectToBacking:, -convertRectFromBacking and similar. On Quartz2D/CoreGraphics-Level, CGContextGetUserSpaceToDeviceSpaceTransform(), CGContextConvertRectToDeviceSpace(), and CGContextConvertRectToUserSpace() can be used. Both approaches are slightly different. OpenGL needs an additional Opt-in. In contrast (currently) to Windows, when moving between high- and non-high-DPI, the outer frame size of the application stays the same but the pixels of the backing store change. Up until now, the Cocoa branch is not DPI-aware. [SUGGESTIONS] [OSX COCOA PATCH] Attached is a patch that makes the VM High-DPI ready. PLEASE COMMENT. Summary: - Add Info.plist entry to state whether we want High DPI (NSHighResolutionCapable) THIS IS DISABLED BY DEFAULT (as with the Windows VM's manifest) - All Views: -add -sqScreenSize for the Pixel-dimensions to report to Squeak (and use for calculation in Squeak coordinates) -add -sqMousePosition: to convert Mouse coordinates from the View's system (maybe high-dpi) to Squeak coordinates - OpenGL view: - Opt-in for High resolution (-setWantsBestResolutionOpenGLSurface:) (overridden by Info.plist's entry) - Make texture size/tracking rects based on -sqScreenSize - Quartz2D/CoreGraphics view: - Work around deprecation of [[NSGraphicsContext currentContext] graphicsPort] in OS X 10.10 - Draw image in -sqScreenSize size, and position correctly in the View's coordinate system - (remove some duplication from OpenGL view) - iPhone SqueakUIView: - use Fallbacks for -sqScreenSize/-sqMousePosition:, no High-DPI yet. Note: this patch is against the Cog/platform/ios directory, Interpreter needs similar treating. [VM/IMAGE INTERFACE] With the current Windows VM and the Cocoa VM (+patch as above), users can Opt-in for High-DPI. However, the Image does not know that its high pixel count is on a small display (hello Etoys!). I _want_ the image to know and to be able to react. I think that the image should treat DPI changes similar screen size changes. Here are my ideas: - The VM exposes screen size as prim 106, screen depth as 'primitiveScreenDepth' * We should expose 'primitivePixelPerInch' with a fallback of '^ 96.0'. * 96.0 dpi shall be the [DEFAULT DPI] of Squeak. > For OS X that would mean, on non-high-dpi it shall report 96.0 dpi (not 72 dpi), on high-dpi it shall report 192.0 dpi (not 144) > Windows already has 96.0 dpi as [DEFAULT DPI], it shall reuse that and adhere to [8] - The image regularly checks the display size (DisplayScreen class>>checkForNewScreenSize). * We should do the same for DPI (Morphic main loop etc.) - There's already a client of DPI changes, TextStyles. * The image shall store changed dpi settings to TextStyles>>pixelsPerInch: - Projects can react to display size changes via #displaySizeChanged, But only fonts can react to DPI changes via #pixelsPerInchChanged * We shall make project able to react to dpi changes, maybe via #pixelsPerInchChanged - The standard tools are currently pixel-oriented and use hard-coded pixel values * I am unsure. * We could introduce conventions to act dpi-dependent (integers: pixels with autoscaling (pixels / default dpi * actual dpi or so), floats or scaled: dpi-based, via TextStyle class>>pointsToPixels:). * We could introduce actual units and say "this tool is 3 cm wide" and calculate pixels via #pointsToPixels:. * We could eliminate hard-coded values and base tools on font sizes. I tried that with the FontImporterTool (for example: FontImporterTool>>#buttonHeight, #filenameHeight. This may be hard and not very traceable, tho. - We could move the dpi api from TextStyle to somewhere more general. I know there are some rough edges here and there; I'd like to hear your suggestions. Let's make Squeak look nice and sharp :) Best -Tobias PS: Thanks to Marcel for some valuable suggestions and help to get Quartz transformations right. [1]: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Classes/NSScreen_Class/index.html#//apple_ref/occ/instm/NSScreen/backingScaleFactor [2]: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instp/UIView/contentScaleFactor [3]: https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Explained/Explained.html#//apple_ref/doc/uid/TP40012302-CH4-SW2 [4]: https://msdn.microsoft.com/en-us/library/windows/desktop/dn280512(v=vs.85).aspx [5]: https://msdn.microsoft.com/en-us/library/dn469266(v=vs.85).aspx#high_dpi_features_in_windows [6]: https://msdn.microsoft.com/en-us/library/dn302122(v=vs.85).aspx [7]: http://www.squeakvm.org/svn/squeak/branches/Cog/build.win32x86/squeak.cog.spur/Squeak.exe.manifest [8]: https://msdn.microsoft.com/en-us/library/dn469266(v=vs.85).aspx#dpi_and_the_desktop_scaling_factor -------------- next part -------------- A non-text attachment was scrubbed... Name: osx-highdpi.patch Type: application/octet-stream Size: 19320 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160502/d4ad2a40/osx-highdpi-0001.obj From eliot.miranda at gmail.com Tue May 3 02:43:08 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue May 3 03:07:35 2016 Subject: [squeak-dev] New Cog VMs available Message-ID: ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3692 These include stack ARM VMs for Spur and V3. CogVM binaries as per VMMaker.oscog-eem.1855/r3692 General: Fix a bad bug in primitiveVoidVMStateForMethod. One might think that the heap scan is unnecessary if the method does not have a cog method. But it could be the case that the code zone has recently been reclaimed and so not having a cog method is no indication that it didn't have a cog method some time in the recent past, and that there are indeed still contexts with machine code pcs out there. Correct slip in primitiveMethodXray, the flags were not set in each caseOf: branch (thanks to -Wunused-value). Change overflow tests in precondition rather than postcondition for small integer multiplication. Because integer overflow is undefined behaviour, and because we can't rely on undefined behaviour, the compiler has a license to eliminate the post-condition as dead code (at least since iso c89 acception). Post-condition currently works because we use -fwrapv compiler flag, but relying on specific compiler flags is bad practice in the long term. Fix regression in signed 32bit long access (introduced beginning of April). One symptom is: (Alien newGC: 4) signedLongAt: 1 put: -16r7287E552; signedLongAt: 1 Fix positive32BitIntegerFor: for Spur64 which worked only because the constant was generated ULL. Spur: Fix primitiveIsPinned. V3: Fix missing comparison operation in genPrimitiveIdentical on V3. This should fix Character = problem encounterd in Cuis. Debugging: Add printContextReferencesTo: & printActivationsOf: and have them print the pcs of the contexts they find. Cogit: Reorder annotation constants to simplify isPCMappedAnnotation:. Sista Cogit: Added a primitive to answer all the methods present in the machine code zone. allMachineCodeMethods ^#() Fix regression in VMMaker.oscog-eem.1823 when merging the two map enumerators into one that affects Sista. The merged enumerator must extend IsSendAnnotations with the AnnotationExtension. Plugins: Regenerate plugins using the recently revised type inferrence code. Slang: Extend type inference capabilities from the AST. Unify type inference used to #inferReturnTypeFromReturnsIn: with that based on AST. Now that type inference is a bit more thorough, release type restrictions in #isFunctional in order to obtain much more aggressive inlining. With those, a gain of 10% is possible on the LargeIntegersPlugin dominated bench: Use a type inference that better fits C rules (C99 standard section 6.3): - in (float op int), int is promoted to double not float - in (unsigned short op short) both operands are promoted to #int due to int promotion rules. Use minimum generality for generated integer constants: - use int if variable fits in int - else unsigned int - else long long (long would be enough for 64bits versions, but long long works for both 32 and 64) - else unsigned long long This is to avoid spurious unsigned promotion due to improved type inference. Mac OS X: Fix argument processing, so that e.g. myvm -breaksel aSelector my.image works (but -headless still fails). _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160502/e20f8916/attachment.htm From commits at source.squeak.org Tue May 3 06:28:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 06:55:00 2016 Subject: [squeak-dev] The Trunk: Compiler-nice.320.mcz Message-ID: Nicolas Cellier uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-nice.320.mcz ==================== Summary ==================== Name: Compiler-nice.320 Author: nice Time: 3 May 2016, 8:26:42.945884 am UUID: 2c61a7e6-7ce4-4ae9-ab01-21381e4a2e43 Ancestors: Compiler-mt.319 Minor change: avoid generating a pop after the inlined if when both branches return. While at it, avoid invoking super with a different selector. Note: statements following two returning branches are unreachable. Since we avoid the jump over else branch when then branch returns, the Decompiler sees a single then branch and is fooled by the return appearing in middle of statements. We could restore this jump over else when else branch also returns, but we should better generate a Compiler warning and eliminate dead code generation. =============== Diff against Compiler-mt.319 =============== Item was changed: ----- Method: MessageNode>>emitCodeForIf:encoder:value: (in category 'code generation') ----- emitCodeForIf: stack encoder: encoder value: forValue | thenExpr thenSize elseExpr elseSize | thenSize := sizes at: 1. elseSize := sizes at: 2. - (forValue not and: [elseSize * thenSize > 0]) ifTrue: - "Two-armed IFs forEffect share a single pop" - [^super emitCodeForEffect: stack encoder: encoder]. thenExpr := arguments at: 1. elseExpr := arguments at: 2. receiver emitCodeForValue: stack encoder: encoder. + elseSize * thenSize > 0 + ifTrue: "Code for two-armed" - forValue - ifTrue: "Code all forValue as two-armed" [self emitCodeForBranchOn: false dist: thenSize pop: stack encoder: encoder. pc := encoder methodStreamPosition. thenExpr emitCodeForEvaluatedValue: stack encoder: encoder. stack pop: 1. "then and else alternate; they don't accumulate" + thenExpr returns ifFalse: - thenExpr returns not ifTrue: - "...not ifTrue: avoids using ifFalse: alone during this compile)" "Elide jump over else after a return" [self emitCodeForJump: elseSize encoder: encoder]. + elseExpr emitCodeForEvaluatedValue: stack encoder: encoder. + forValue + ifFalse: + ["Two-armed IFs forEffect share a single pop - except if both return" + (arguments allSatisfy: #returns) ifFalse: [encoder genPop]. + stack pop: 1]] + ifFalse: "One arm is empty here (this can only ever be for effect)" - elseExpr emitCodeForEvaluatedValue: stack encoder: encoder] - ifFalse: "One arm is empty here (two-arms code forValue)" [thenSize > 0 ifTrue: [self emitCodeForBranchOn: false dist: thenSize pop: stack encoder: encoder. pc := encoder methodStreamPosition. thenExpr emitCodeForEvaluatedEffect: stack encoder: encoder] ifFalse: [self emitCodeForBranchOn: true dist: elseSize pop: stack encoder: encoder. pc := encoder methodStreamPosition. elseExpr emitCodeForEvaluatedEffect: stack encoder: encoder]]! Item was changed: ----- Method: MessageNode>>sizeCodeForIf:value: (in category 'code generation') ----- sizeCodeForIf: encoder value: forValue + | thenExpr elseExpr branchSize thenSize elseSize popSize requireTwoArms | - | thenExpr elseExpr branchSize thenSize elseSize | thenExpr := arguments at: 1. elseExpr := arguments at: 2. + popSize := 0. + requireTwoArms := forValue or: [ "Code all forValue as two-armed" + arguments noneSatisfy: [:expr | expr isJust: NodeNil]]. + requireTwoArms + ifTrue: - (forValue - or: [(thenExpr isJust: NodeNil) - or: [elseExpr isJust: NodeNil]]) not - "(...not ifTrue: avoids using ifFalse: alone during this compile)" - ifTrue: "Two-armed IFs forEffect share a single pop" - [^super sizeCodeForEffect: encoder]. - forValue - ifTrue: "Code all forValue as two-armed" [elseSize := elseExpr sizeCodeForEvaluatedValue: encoder. thenSize := (thenExpr sizeCodeForEvaluatedValue: encoder) + (thenExpr returns ifTrue: [0] "Elide jump over else after a return" ifFalse: [self sizeCode: encoder forJump: elseSize]). + branchSize := self sizeCode: encoder forBranchOn: false dist: thenSize. + "Two-armed IFs forEffect share a single pop - except if both branches return" + forValue ifFalse: [(arguments allSatisfy: #returns) ifFalse: [popSize := encoder sizePop]]] - branchSize := self sizeCode: encoder forBranchOn: false dist: thenSize] ifFalse: "One arm is empty here (two-arms code forValue)" [(elseExpr isJust: NodeNil) ifTrue: [elseSize := 0. thenSize := thenExpr sizeCodeForEvaluatedEffect: encoder. branchSize := self sizeCode: encoder forBranchOn: false dist: thenSize] ifFalse: [thenSize := 0. elseSize := elseExpr sizeCodeForEvaluatedEffect: encoder. branchSize := self sizeCode: encoder forBranchOn: true dist: elseSize]]. sizes := Array with: thenSize with: elseSize. ^(receiver sizeCodeForValue: encoder) + + branchSize + thenSize + elseSize + popSize! - + branchSize + thenSize + elseSize! From commits at source.squeak.org Tue May 3 06:44:14 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 07:16:00 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1131.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1131.mcz ==================== Summary ==================== Name: Morphic-mt.1131 Author: mt Time: 3 May 2016, 8:42:58.052787 am UUID: ab03d740-8394-1046-89df-c3597a6c6c89 Ancestors: Morphic-mt.1130 Fix minor slip in prior shadow update. Only acitvate shadow in window again after resizing if the preference allows it. =============== Diff against Morphic-mt.1130 =============== Item was changed: ----- Method: CornerGripMorph>>mouseUp: (in category 'as yet unclassified') ----- mouseUp: anEvent target ifNil: [^ self]. + target fastFramingOn ifFalse: [ + target hasDropShadow: Preferences menuAppearance3d].! - target fastFramingOn ifFalse: [target hasDropShadow: true].! From commits at source.squeak.org Tue May 3 06:52:55 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 07:16:56 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1132.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1132.mcz ==================== Summary ==================== Name: Morphic-nice.1132 Author: nice Time: 3 May 2016, 8:51:04.345853 am UUID: 5ea5430b-d2cf-4f37-9270-0348c08d54a9 Ancestors: Morphic-mt.1131 Avoid dead code following a returning if (case when both branches return). =============== Diff against Morphic-mt.1131 =============== Item was changed: ----- Method: TextEditor>>enclose: (in category 'editing keys') ----- enclose: aKeyboardEvent "Insert or remove bracket characters around the current selection." | character left right startIndex stopIndex oldSelection which t | character := aKeyboardEvent shiftPressed ifTrue: ['{}|"<>' at: ('[]\'',.' indexOf: aKeyboardEvent keyCharacter) ifAbsent: [aKeyboardEvent keyCharacter]] ifFalse: [aKeyboardEvent keyCharacter]. self closeTypeIn. startIndex := self startIndex. stopIndex := self stopIndex. oldSelection := self selection. which := '([<{|"''9' indexOf: character ifAbsent: [ ^ false ]. "Allow Control key in lieu of Alt+Shift for (, {, and double-quote." left := ((Preferences cmdKeysInText and: [ aKeyboardEvent controlKeyPressed ]) ifTrue: [ '({<{|""(' ] ifFalse: ['([<{|"''(']) at: which. right := ((Preferences cmdKeysInText and: [ aKeyboardEvent controlKeyPressed ]) ifTrue: [ ')}>}|"")' ] ifFalse: [')]>}|"'')']) at: which. t := self text. ((startIndex > 1 and: [stopIndex <= t size]) and: [ (t at: startIndex-1) = left and: [(t at: stopIndex) = right]]) + ifTrue: + ["already enclosed; strip off brackets" - ifTrue: [ - "already enclosed; strip off brackets" self selectFrom: startIndex-1 to: stopIndex. + self replaceSelectionWith: oldSelection] + ifFalse: + ["not enclosed; enclose by matching brackets" - self replaceSelectionWith: oldSelection. - ^ true] - ifFalse: [ - "not enclosed; enclose by matching brackets" self replaceSelectionWith: (Text string: (String with: left), oldSelection string, (String with: right) attributes: emphasisHere). + self selectFrom: startIndex+1 to: stopIndex]. + ^true! - self selectFrom: startIndex+1 to: stopIndex. - ^ true]. - ^ false! From commits at source.squeak.org Tue May 3 07:03:31 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 07:37:00 2016 Subject: [squeak-dev] The Trunk: Compiler-nice.321.mcz Message-ID: Nicolas Cellier uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-nice.321.mcz ==================== Summary ==================== Name: Compiler-nice.321 Author: nice Time: 3 May 2016, 9:02:56.110078 am UUID: fd182984-c3ab-4477-bbff-44d9b1744ee3 Ancestors: Compiler-nice.320 Be pedantic: refuse to compile until the user eliminate dead code following a returning if (case when both branches return). Do this only when interactive, we don't like when Compiler refuses to load legacy code. =============== Diff against Compiler-nice.320 =============== Item was changed: ----- Method: Parser>>statements:innerBlock:blockNode: (in category 'expression types') ----- statements: argNodes innerBlock: inner blockNode: theBlockNode | stmts returns start | "give initial comment to block, since others trail statements" theBlockNode comment: currentComment. currentComment := nil. stmts := OrderedCollection new. returns := false. hereType ~~ #rightBracket ifTrue: [[theBlockNode startOfLastStatement: (start := self startOfNextToken). (returns := self matchReturn) ifTrue: [self expression ifFalse: [^self expected: 'Expression to return']. self addComment. stmts addLast: (parseNode isReturningIf ifTrue: [parseNode] ifFalse: [ReturnNode new expr: parseNode encoder: encoder sourceRange: (start to: self endOfLastToken)])] ifFalse: [self expression ifTrue: [self addComment. + "if both branches return, following code is unreachable, let's avoid this. + But only if interactive, we don't want to prevent loading of legacy code" + self interactive ifTrue: [returns := parseNode isReturningIf]. stmts addLast: parseNode] ifFalse: [self addComment. stmts size = 0 ifTrue: [stmts addLast: (encoder encodeVariable: (inner ifTrue: ['nil'] ifFalse: ['self']))]]]. returns ifTrue: [self match: #period. (hereType == #rightBracket or: [hereType == #doIt]) ifFalse: [^self expected: 'End of block']]. returns not and: [self match: #period]] whileTrue]. theBlockNode arguments: argNodes statements: stmts returns: returns from: encoder. parseNode := theBlockNode. ^true! From Marcel.Taeumel at hpi.de Tue May 3 08:04:36 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 3 09:16:30 2016 Subject: [squeak-dev] Re: [long] Squeak and High-DPI In-Reply-To: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> References: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> Message-ID: <1462262676039-4893377.post@n4.nabble.com> Hi, there! +1 for updating the OSX VM to support hi-dpi. +1 for adding "pixelsPerInchChanged" to Squeak consistently with "displaySizeChanged". --- Considering the DPI-awareness of Morphic, MVC, and the base system (e.g. text/paragraph rendering), this may need further discussion. However, this is can be deferred until the other two above work. --- We could also provide in-image preference to modify dpi-awareness by editing plist/.manifest and restarting the VM. Is there support for restarting the VM from within Squeak? Best, Marcel -- View this message in context: http://forum.world.st/long-Squeak-and-High-DPI-tp4893349p4893377.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 3 08:14:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 3 09:17:21 2016 Subject: [squeak-dev] Re: Project Refactoring -- Please test it In-Reply-To: <1462204567233-4893335.post@n4.nabble.com> References: <1462120911346-4893158.post@n4.nabble.com> <1462204567233-4893335.post@n4.nabble.com> Message-ID: <1462263262767-4893385.post@n4.nabble.com> Hi, there. I plan to put the changes into trunk until the end of this next weekend if there are no serious bugs or other objections. Here is what you can try out: - Open an MVC project inside a Morphic project and vice versa. - Close project views (these windows for projects in MVC and Morphic) with and without nested projects. - Add a serious bug to Morphic (e.g. LazyListMorph >> #drawOn:) with or without having an MVC project as parent project - Try "MVCProject removeProjectsFromSystem" from within either MVC or Morphic - Try "MorphicProject removeProjectsFromSystem" from within either MVC or Morphic - Try "Project current beTopProject" - Try "Project current addProject: MorphicProject new" - Try "MVCProject unloadMVC" from within a Morphic project - This should not work: "MorphicProject unloadMorphic" from within an MVC project ... :-D Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactoring-Please-test-it-tp4893158p4893385.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Tue May 3 09:11:53 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue May 3 09:34:46 2016 Subject: [squeak-dev] Re: [long] Squeak and High-DPI In-Reply-To: <1462262676039-4893377.post@n4.nabble.com> References: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> <1462262676039-4893377.post@n4.nabble.com> Message-ID: Hi Marcel, On 03.05.2016, at 10:04, marcel.taeumel wrote: > Hi, there! > > +1 for updating the OSX VM to support hi-dpi. > > +1 for adding "pixelsPerInchChanged" to Squeak consistently with > "displaySizeChanged". It's present on TextStyle class. But we might want to move it. > > --- > > Considering the DPI-awareness of Morphic, MVC, and the base system (e.g. > text/paragraph rendering), this may need further discussion. However, this > is can be deferred until the other two above work. > > --- > > We could also provide in-image preference to modify dpi-awareness by editing > plist/.manifest and restarting the VM. Is there support for restarting the > VM from within Squeak? Btw: windows can change this on-the-fly w/o changing the manifest. and changing the plist on osx does not immediately change this, there are caches that must be invalidated. Best regards -Tobias :) > > Best, > Marcel > From commits at source.squeak.org Tue May 3 11:32:39 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 11:51:34 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.329.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.329.mcz ==================== Summary ==================== Name: Graphics-mt.329 Author: mt Time: 3 May 2016, 1:32:06.694235 pm UUID: f04b2de7-6533-e54c-a08f-8a9b4425aa22 Ancestors: Graphics-tfel.328 Fixes computation of dominant color in 8-bit color forms. There, we have to look up the own color table. =============== Diff against Graphics-tfel.328 =============== Item was added: + ----- Method: ColorForm>>dominantColor (in category 'analyzing') ----- + dominantColor + "Overridden to consider color table" + + | tally max maxi | + tally := self tallyPixelValues. + max := maxi := 0. + tally withIndexDo: [:n :i | n > max ifTrue: [max := n. maxi := i]]. + ^ self colors at: maxi! From stephan at stack.nl Tue May 3 11:55:22 2016 From: stephan at stack.nl (Stephan Eggermont) Date: Tue May 3 12:14:30 2016 Subject: [squeak-dev] Re: [long] Squeak and High-DPI In-Reply-To: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> References: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> Message-ID: What happens when the window is on two displays at the same time? Stephan From Marcel.Taeumel at hpi.de Tue May 3 11:40:56 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 3 12:37:16 2016 Subject: [squeak-dev] Re: [long] Squeak and High-DPI In-Reply-To: References: <978E14E2-6619-40DA-876D-9D8641A99B92@gmx.de> Message-ID: <1462275656540-4893428.post@n4.nabble.com> Hi Stephan, when moved from the source screen, it will then look bigger or smaller on the target screen until fully transferred to the target screen, which then applies its DPI. At least in Windows 10. Best, Marcel -- View this message in context: http://forum.world.st/long-Squeak-and-High-DPI-tp4893349p4893428.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From cunningham.cb at gmail.com Tue May 3 17:14:30 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Tue May 3 17:24:30 2016 Subject: [squeak-dev] Having issues getting Maui to work in current trunk 5.0 Message-ID: Hi. I haven't (yet) used Maui, but have a project that I think it would work nicely for, and am trying to get it to work. It loads fine from the Squeak Map into the latest updated trunk image. I can create a Maui morph. But any time I attempt to drag an accesser over to the morph, I get a stylized text box popping up stating: "Hello. Instance methods can only be dragged onto instances of objects, not the desktop." Any idea what is going on? I'd really like to use this. Thanks, cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160503/0e19d006/attachment.htm From Das.Linux at gmx.de Tue May 3 20:49:57 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue May 3 21:02:49 2016 Subject: [squeak-dev] Running headless on a Mac In-Reply-To: References: <89BB0552-672C-401B-9864-4A96CCD8EDEA@gmail.com> <41B24826-B16A-4B4A-9CE6-5C5F7C23BE1C@pieber.com> <6C01AC18-C02A-458C-9AA6-2FB7BDA9139D@pieber.com> Message-ID: On 27.04.2016, at 21:32, Fabio Niephaus wrote: > What window is still showing up? > Are you sure your absolute path to your .st is correct? Note that the Cocoa-Based Mac VMs do not yet interpret -headless correctly. Best regards -Tobias From commits at source.squeak.org Tue May 3 21:41:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 22:07:58 2016 Subject: [squeak-dev] The Inbox: Kernel-nice.1017.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Inbox: http://source.squeak.org/inbox/Kernel-nice.1017.mcz ==================== Summary ==================== Name: Kernel-nice.1017 Author: nice Time: 3 May 2016, 11:40:36.82624 pm UUID: 303ddbb3-6c74-4e3f-9838-501b7b1373f0 Ancestors: Kernel-mt.1016 Avoid dependency on Graphics package just for startup order. Note that it is going to be a bootstrap problem. =============== Diff against Kernel-mt.1016 =============== Item was changed: ----- Method: EventSensor class>>initialize (in category 'class initialization') ----- initialize + Smalltalk addToStartUpList: self before: ProcessorScheduler. - Smalltalk addToStartUpList: self after: Cursor. Smalltalk addToShutDownList: self. self installKeyDecodeTable. self installMouseDecodeTable. self install. ! From commits at source.squeak.org Tue May 3 21:44:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 22:08:00 2016 Subject: [squeak-dev] The Inbox: Graphics-nice.330.mcz Message-ID: Nicolas Cellier uploaded a new version of Graphics to project The Inbox: http://source.squeak.org/inbox/Graphics-nice.330.mcz ==================== Summary ==================== Name: Graphics-nice.330 Author: nice Time: 3 May 2016, 11:43:21.9999 pm UUID: 123836bb-88cf-4378-8cd9-9f8e044d7e62 Ancestors: Graphics-mt.329 Avoid dependency on Morphic just because some examples use Morphic. =============== Diff against Graphics-mt.329 =============== Item was removed: - ----- Method: Form class>>exampleColorSees (in category 'examples') ----- - exampleColorSees - "Form exampleColorSees" - "First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. - Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this - Third shows the hit area - where red touches blue - superimposed on the original scene. - Fourth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - - |formA formB maskA offset tally map intersection left top dCanvas sensitiveColor soughtColor index| - formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - ActiveWorld restoreMorphicDisplay; doOneCycle. - - sensitiveColor := Color red. - soughtColor := Color blue. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". - formB := Form extent: 100@50 depth: 32. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: sensitiveColor. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 1. - - map := Bitmap new: (1 bitShift: (formA depth min: 15)). - map at: (index := sensitiveColor indexInMap: map) put: 1. - - maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. - - "intersect world pixels of the color we're looking for with sensitive pixels mask" - map at: index put: 0. "clear map and reuse it" - map at: (soughtColor indexInMap: map) put: 1. - - maskA - copyBits: intersection - from: formB at: 0@0 clippingBox: formB boundingBox - rule: Form and - fillColor: nil - map: map. - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((sensitiveColor pixelValueForDepth: formA depth) ) to: ((soughtColor pixelValueForDepth: formB depth) ) test: (Form compareMatchColor bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - - ! Item was removed: - ----- Method: Form class>>exampleTouchTest (in category 'examples') ----- - exampleTouchTest - "Form exampleTouchTest" - "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a - non-transparent pixel of the background upon which it is displayed. - First column shows a form with a red block in the midst of transparent area sneaking up on a form with a transparent LHS and blue RHS. The green frame shows the intersection area. - Second column shows in grey the part of the red that is within the intersection. - Third column shows in black the blue that is within the intersection. - Fourth column shows just the A touching B area. - Fifth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - |formA formB maskA maskB offset tally map intersection left top dCanvas| - formA := formB := maskA := maskB := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - - ActiveWorld restoreMorphicDisplay; doOneCycle. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := Form extent: 100@50 depth: 32. - formB := Form extent: 100@50 depth: 16. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color yellow. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color red. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: Color blue. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 2. - formA displayOn: maskA at: offset - intersection origin rule: Form paint. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskB := Form extent: intersection extent depth: 2. - formB displayOn: maskB at: intersection origin negated rule: Form paint. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - map := Bitmap new: 4 withAll: 1. - map at: 1 put: 0. "transparent" - - maskA copyBits: maskA boundingBox from: maskA at: 0@0 colorMap: map. - "maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150." - - maskB copyBits: maskB boundingBox from: maskB at: 0@0 colorMap: map. - "maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150." - - maskB displayOn: maskA at: 0@0 rule: Form and. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA boundingBox area -( maskA tallyPixelValues at: 1)) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((Color transparent pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((Color transparent pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorANotColorB bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - - - ! Item was removed: - ----- Method: Form class>>exampleTouchingColor (in category 'examples') ----- - exampleTouchingColor - "Form exampleTouchingColor" - "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a - particular color pixel of the background upon which it is displayed. - First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. - Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this - Third shows the hit area (black) superimposed on the original scene - Fourth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - |formA formB maskA offset tally map intersection left top dCanvas ignoreColor soughtColor| - formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - ActiveWorld restoreMorphicDisplay; doOneCycle. - - ignoreColor := Color transparent. - soughtColor := Color blue. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". - formB := Form extent: 100@50 depth: 32. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color red. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 1. - - map := Bitmap new: (1 bitShift: (formA depth min: 15)). - map atAllPut: 1. - map at: ( ignoreColor indexInMap: map) put: 0. - - maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. - - "intersect world pixels of the color we're looking for with sensitive pixels mask" - map atAllPut: 0. "clear map and reuse it" - map at: (soughtColor indexInMap: map) put: 1. - - maskA - copyBits: intersection - from: formB at: 0@0 clippingBox: formB boundingBox - rule: Form and - fillColor: nil - map: map. - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((ignoreColor pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((soughtColor pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorAMatchColorB bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - ! From commits at source.squeak.org Tue May 3 21:51:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 3 22:19:54 2016 Subject: [squeak-dev] The Inbox: Morphic-nice.1133.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-nice.1133.mcz ==================== Summary ==================== Name: Morphic-nice.1133 Author: nice Time: 3 May 2016, 11:50:28.750899 pm UUID: 7ee79d7c-f8fb-49ec-8e3b-06d13bc034ee Ancestors: Morphic-nice.1132 Avoid dependency of Graphics on Morphic just because some Form examples use Morphic. Couldn't these examples find their place in some kind of Help? =============== Diff against Morphic-nice.1132 =============== Item was added: + ----- Method: Form class>>exampleColorSees (in category '*Morphic-examples') ----- + exampleColorSees + "Form exampleColorSees" + "First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. + Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this + Third shows the hit area - where red touches blue - superimposed on the original scene. + Fourth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + + |formA formB maskA offset tally map intersection left top dCanvas sensitiveColor soughtColor index| + formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + ActiveWorld restoreMorphicDisplay; doOneCycle. + + sensitiveColor := Color red. + soughtColor := Color blue. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". + formB := Form extent: 100@50 depth: 32. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: sensitiveColor. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 1. + + map := Bitmap new: (1 bitShift: (formA depth min: 15)). + map at: (index := sensitiveColor indexInMap: map) put: 1. + + maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. + + "intersect world pixels of the color we're looking for with sensitive pixels mask" + map at: index put: 0. "clear map and reuse it" + map at: (soughtColor indexInMap: map) put: 1. + + maskA + copyBits: intersection + from: formB at: 0@0 clippingBox: formB boundingBox + rule: Form and + fillColor: nil + map: map. + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((sensitiveColor pixelValueForDepth: formA depth) ) to: ((soughtColor pixelValueForDepth: formB depth) ) test: (Form compareMatchColor bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + + ! Item was added: + ----- Method: Form class>>exampleTouchTest (in category '*Morphic-examples') ----- + exampleTouchTest + "Form exampleTouchTest" + "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a + non-transparent pixel of the background upon which it is displayed. + First column shows a form with a red block in the midst of transparent area sneaking up on a form with a transparent LHS and blue RHS. The green frame shows the intersection area. + Second column shows in grey the part of the red that is within the intersection. + Third column shows in black the blue that is within the intersection. + Fourth column shows just the A touching B area. + Fifth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + |formA formB maskA maskB offset tally map intersection left top dCanvas| + formA := formB := maskA := maskB := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + + ActiveWorld restoreMorphicDisplay; doOneCycle. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := Form extent: 100@50 depth: 32. + formB := Form extent: 100@50 depth: 16. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color yellow. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color red. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: Color blue. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 2. + formA displayOn: maskA at: offset - intersection origin rule: Form paint. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskB := Form extent: intersection extent depth: 2. + formB displayOn: maskB at: intersection origin negated rule: Form paint. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + map := Bitmap new: 4 withAll: 1. + map at: 1 put: 0. "transparent" + + maskA copyBits: maskA boundingBox from: maskA at: 0@0 colorMap: map. + "maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150." + + maskB copyBits: maskB boundingBox from: maskB at: 0@0 colorMap: map. + "maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150." + + maskB displayOn: maskA at: 0@0 rule: Form and. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA boundingBox area -( maskA tallyPixelValues at: 1)) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((Color transparent pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((Color transparent pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorANotColorB bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + + + ! Item was added: + ----- Method: Form class>>exampleTouchingColor (in category '*Morphic-examples') ----- + exampleTouchingColor + "Form exampleTouchingColor" + "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a + particular color pixel of the background upon which it is displayed. + First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. + Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this + Third shows the hit area (black) superimposed on the original scene + Fourth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + |formA formB maskA offset tally map intersection left top dCanvas ignoreColor soughtColor| + formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + ActiveWorld restoreMorphicDisplay; doOneCycle. + + ignoreColor := Color transparent. + soughtColor := Color blue. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". + formB := Form extent: 100@50 depth: 32. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color red. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 1. + + map := Bitmap new: (1 bitShift: (formA depth min: 15)). + map atAllPut: 1. + map at: ( ignoreColor indexInMap: map) put: 0. + + maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. + + "intersect world pixels of the color we're looking for with sensitive pixels mask" + map atAllPut: 0. "clear map and reuse it" + map at: (soughtColor indexInMap: map) put: 1. + + maskA + copyBits: intersection + from: formB at: 0@0 clippingBox: formB boundingBox + rule: Form and + fillColor: nil + map: map. + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((ignoreColor pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((soughtColor pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorAMatchColorB bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + ! From lewis at mail.msen.com Wed May 4 00:45:10 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 4 01:11:02 2016 Subject: [squeak-dev] Re: Project Refactoring -- Please test it In-Reply-To: <1462263262767-4893385.post@n4.nabble.com> References: <1462120911346-4893158.post@n4.nabble.com> <1462204567233-4893335.post@n4.nabble.com> <1462263262767-4893385.post@n4.nabble.com> Message-ID: <20160504004510.GA8548@shell.msen.com> On Tue, May 03, 2016 at 01:14:22AM -0700, marcel.taeumel wrote: > > - This should not work: "MorphicProject unloadMorphic" from within an MVC project ... :-D > Hi Marcel, We should fix that :-) Dave From asqueaker at gmail.com Wed May 4 02:39:58 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed May 4 03:36:52 2016 Subject: [squeak-dev] Having issues getting Maui to work in current trunk 5.0 In-Reply-To: References: Message-ID: Hi Chris, revert PluggableListMorphPlus>>#startDrag: to use the (mt 6/10/2015 10:20) version. That will fix Maui. I will apply a fix that in the next Maui commit. Sorry for the inconvenience. On Tue, May 3, 2016 at 12:14 PM, Chris Cunningham wrote: > Hi. > > I haven't (yet) used Maui, but have a project that I think it would work > nicely for, and am trying to get it to work. > > It loads fine from the Squeak Map into the latest updated trunk image. > > I can create a Maui morph. > > But any time I attempt to drag an accesser over to the morph, I get a > stylized text box popping up stating: > "Hello. > Instance methods can only be dragged onto instances of objects, not the > desktop." > > Any idea what is going on? I'd really like to use this. > > Thanks, > cbc > > > From asqueaker at gmail.com Wed May 4 02:45:30 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed May 4 03:37:29 2016 Subject: [squeak-dev] Having issues getting Maui to work in current trunk 5.0 In-Reply-To: References: Message-ID: Also, recent changes to NewBalloon renders Maui unusable. Be sure to turn NewBalloons are off.. On Tue, May 3, 2016 at 12:14 PM, Chris Cunningham wrote: > Hi. > > I haven't (yet) used Maui, but have a project that I think it would work > nicely for, and am trying to get it to work. > > It loads fine from the Squeak Map into the latest updated trunk image. > > I can create a Maui morph. > > But any time I attempt to drag an accesser over to the morph, I get a > stylized text box popping up stating: > "Hello. > Instance methods can only be dragged onto instances of objects, not the > desktop." > > Any idea what is going on? I'd really like to use this. > > Thanks, > cbc > > > From cunningham.cb at gmail.com Wed May 4 03:10:04 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Wed May 4 03:37:30 2016 Subject: [squeak-dev] Having issues getting Maui to work in current trunk 5.0 In-Reply-To: References: Message-ID: Thank you, that did it. On Tue, May 3, 2016 at 7:39 PM, Chris Muller wrote: > Hi Chris, revert PluggableListMorphPlus>>#startDrag: to use the (mt > 6/10/2015 10:20) version. That will fix Maui. > > I will apply a fix that in the next Maui commit. Sorry for the > inconvenience. > > > On Tue, May 3, 2016 at 12:14 PM, Chris Cunningham > wrote: > > Hi. > > > > I haven't (yet) used Maui, but have a project that I think it would work > > nicely for, and am trying to get it to work. > > > > It loads fine from the Squeak Map into the latest updated trunk image. > > > > I can create a Maui morph. > > > > But any time I attempt to drag an accesser over to the morph, I get a > > stylized text box popping up stating: > > "Hello. > > Instance methods can only be dragged onto instances of objects, not the > > desktop." > > > > Any idea what is going on? I'd really like to use this. > > > > Thanks, > > cbc > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160503/ecb373b2/attachment-0001.htm From Marcel.Taeumel at hpi.de Wed May 4 08:34:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 4 10:05:14 2016 Subject: [squeak-dev] Re: Having issues getting Maui to work in current trunk 5.0 In-Reply-To: References: Message-ID: <1462350841689-4893532.post@n4.nabble.com> Hi Chris, is there still this top-center pop-up feature missing for Maui? I assumed that I managed to got all the traditional features included by now. Best, Marcel -- View this message in context: http://forum.world.st/Having-issues-getting-Maui-to-work-in-current-trunk-5-0-tp4893459p4893532.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed May 4 09:33:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 10:05:15 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1017.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1017.mcz ==================== Summary ==================== Name: Kernel-nice.1017 Author: nice Time: 4 May 2016, 11:38:09.824683 am UUID: 1ffcd709-05e7-2947-b002-099b73ad8920 Ancestors: Kernel-mt.1016 Fix slip in floorLog: fallback, 10 was hardcoded instead of radix parameter =============== Diff against Kernel-mt.1016 =============== Item was changed: ----- Method: Fraction>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" | d n | + radix isInteger ifFalse: [^super floorLog: radix]. - radix isInteger ifFalse: [^super floorLog: 10]. n := numerator floorLog: radix. d := denominator floorLog: radix. ^(numerator * (radix raisedTo: d)) < (denominator * (radix raisedTo: n)) ifTrue: [n - d - 1] ifFalse: [n - d]! Item was changed: ----- Method: Integer>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" + radix isInteger ifFalse: [^super floorLog: radix]. - radix isInteger ifFalse: [^super floorLog: 10]. self <= 0 ifTrue: [^DomainError signal: 'floorLog: is only defined for x > 0.0']. ^(self numberOfDigitsInBase: radix) - 1! From Das.Linux at gmx.de Wed May 4 11:32:45 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed May 4 11:53:55 2016 Subject: [squeak-dev] Code Jeopardy Message-ID: Hi all, without executing, what does the following expression result in? #( 25rFFs2 26rFFs2 27rFFs2 28rFFs2 29rFFs2 30rFFs2 31rFFs2 32rFFs2 ) Best regards -Tobias From commits at source.squeak.org Wed May 4 11:36:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 11:53:56 2016 Subject: [squeak-dev] The Trunk: ST80-mt.206.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.206.mcz ==================== Summary ==================== Name: ST80-mt.206 Author: mt Time: 4 May 2016, 1:35:41.04699 pm UUID: 69676c6d-8920-3746-a21f-d63502700535 Ancestors: ST80-dtl.205 Consistently with Morphic's system windows, allow models to close windows also in MVC. =============== Diff against ST80-dtl.205 =============== Item was changed: ----- Method: StandardSystemView>>update: (in category 'updating') ----- update: aSymbol aSymbol = #relabel ifTrue: [^ self setLabelTo: model labelString]. + aSymbol = #close + ifTrue: [^ self controller closeAndUnscheduleNoTerminate]. + ^ super update: aSymbol! From commits at source.squeak.org Wed May 4 11:37:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 11:53:57 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.96.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.96.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.96 Author: mt Time: 4 May 2016, 1:36:48.21799 pm UUID: 9c962b8d-8449-834d-9f5c-82e7b851768a Ancestors: ToolBuilder-Kernel-mt.95 Add a general hook to retrieve bounds for a window. =============== Diff against ToolBuilder-Kernel-mt.95 =============== Item was added: + ----- Method: ToolBuilder class>>getBoundsForWindow: (in category 'services') ----- + getBoundsForWindow: window + "Return the bounds for the given window." + + self subclassResponsibility.! Item was added: + ----- Method: ToolBuilder class>>setBoundsForWindow:to: (in category 'services') ----- + setBoundsForWindow: window to: rectangle + "Set the bounds for the given window." + + self subclassResponsibility.! From commits at source.squeak.org Wed May 4 11:38:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 11:53:58 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-mt.45.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-mt.45.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-mt.45 Author: mt Time: 4 May 2016, 1:38:11.47599 pm UUID: 38fdc832-d60a-c449-bb47-47197faa4cd1 Ancestors: ToolBuilder-MVC-mt.44 Implement hook to retrieve window bounds. Add list-fallback for tree specs. Do not raise an error anymore. Makes ObjectExplorer basically work in MVC. =============== Diff against ToolBuilder-MVC-mt.44 =============== Item was added: + ----- Method: MVCToolBuilder class>>getBoundsForWindow: (in category 'services') ----- + getBoundsForWindow: view + + ^ view displayBox! Item was added: + ----- Method: MVCToolBuilder class>>setBoundsForWindow:to: (in category 'services') ----- + setBoundsForWindow: standardSystemView to: rectangle + + ^ standardSystemView resizeTo: rectangle! Item was changed: ----- Method: MVCToolBuilder>>buildPluggableTree: (in category 'widgets required') ----- buildPluggableTree: aSpec + "Fall-back to list view. Just show the roots." + + | widget listClass getIndex setIndex | + listClass := PluggableListViewByItem. + getIndex := aSpec getSelected. + setIndex := aSpec setSelected. + widget := PluggableListViewByItem on: aSpec model + list: aSpec roots + selected: aSpec getSelected + changeSelected: aSpec setSelected + menu: aSpec menu + keystroke: aSpec keyPress. + self register: widget id: aSpec name. + self setFrame: aSpec frame in: widget. + parent ifNotNil:[parent addSubView: widget]. + panes ifNotNil:[ + aSpec roots ifNotNil:[panes add: aSpec roots]. + ]. + ^widget! - self shouldBeImplemented.! From commits at source.squeak.org Wed May 4 11:39:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 11:54:00 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.162.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.162.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.162 Author: mt Time: 4 May 2016, 1:39:13.19299 pm UUID: 70119ca1-7c50-a44c-a598-7c4401b952b6 Ancestors: ToolBuilder-Morphic-mt.161 Implement hook to retrieve window bounds. =============== Diff against ToolBuilder-Morphic-mt.161 =============== Item was added: + ----- Method: MorphicToolBuilder class>>getBoundsForWindow: (in category 'services') ----- + getBoundsForWindow: morph + + ^ morph bounds! Item was added: + ----- Method: MorphicToolBuilder class>>setBoundsForWindow:to: (in category 'services') ----- + setBoundsForWindow: morph to: rectangle + + ^ morph bounds: rectangle! From commits at source.squeak.org Wed May 4 11:41:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 12:26:02 2016 Subject: [squeak-dev] The Trunk: Tools-mt.696.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.696.mcz ==================== Summary ==================== Name: Tools-mt.696 Author: mt Time: 4 May 2016, 1:41:03.85699 pm UUID: 00c31901-2039-724b-b287-7e04e0b277c4 Ancestors: Tools-cmm.695 Makes inspector/explorer switch-button work in both MVC and Morphic. =============== Diff against Tools-cmm.695 =============== Item was changed: ----- Method: Inspector>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Inspector openOn: SystemOrganization" + | windowSpec specs buttonOffset | - | windowSpec specs buttonOffset wantsExploreButton | - wantsExploreButton := Smalltalk isMorphic. buttonOffset := (Preferences standardButtonFont widthOfString: 'explore') * 3/2. - self flag: #mvc. "mt: We can remove this if we can build trees in MVC and thus have a working object explorer there." specs := { (0@0 corner: 0.3@0.71) -> [self buildFieldListWith: builder]. + (0.3@0.0corner: 1@0.71) -> [self buildValuePaneWith: builder]. + (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder]. + (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder] + }. - (0.3@0.0corner: 1@0.71) -> [self buildValuePaneWith: builder]}, - (wantsExploreButton - ifTrue: [{ - (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder]. - (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].}] - ifFalse: [{(0.0@0.71 corner: 1@1) -> [self buildCodePaneWith: builder]}]). windowSpec := self buildWindowWith: builder specs: specs. windowSpec extent: self initialExtent. ^builder build: windowSpec! Item was changed: ----- Method: Inspector>>exploreObject (in category 'toolbuilder') ----- exploreObject "Switch to an explorer tool." + | window currentBounds | + currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow. + + "Close first because MVC fiddles around with processes." + self changed: #close. + - | window model | window := self object explore. - model := window model. + "---- In MVC, the lines after this will not be executed ---" + + window model setExpression: self expression. + ToolBuilder findDefault setBoundsForWindow: window to: currentBounds.! - model setExpression: self expression. - window bounds: self containingWindow bounds. - self changed: #close.! Item was changed: ----- Method: ObjectExplorer>>inspectObject (in category 'toolbuilder') ----- inspectObject "Switch to an inspector tool." + | window currentBounds | + currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow. + + "Close first because MVC fiddles around with processes." + self changed: #close. + - | window model | window := self rootObject inspect. - model := window model. + "---- In MVC, the lines after this will not be executed ---" + + window model setExpression: self expression. + ToolBuilder findDefault setBoundsForWindow: window to: currentBounds.! - model setExpression: self expression. - window bounds: self containingWindow bounds. - self changed: #close.! From commits at source.squeak.org Wed May 4 12:30:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 13:01:10 2016 Subject: [squeak-dev] The Trunk: ST80-mt.207.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.207.mcz ==================== Summary ==================== Name: ST80-mt.207 Author: mt Time: 4 May 2016, 2:30:01.391971 pm UUID: 5acb8b03-a5ea-614c-ab2e-b8151e67ff80 Ancestors: ST80-mt.206 Ensure string representation of items in MVC item views. Useful in general for erroneous models and in specific for tree view fall-back in MVC tool builder. =============== Diff against ST80-mt.206 =============== Item was added: + ----- Method: PluggableListViewByItem>>getList (in category 'as yet unclassified') ----- + getList + "Ensure that there are only strings in that list." + + ^ super getList collect: [:ea | ea asString]! From bert at freudenbergs.de Wed May 4 12:37:39 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 4 13:01:12 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: > On 04.05.2016, at 13:32, Tobias Pape wrote: > > Hi all, > > without executing, what does the following expression result in? > > #( > 25rFFs2 > 26rFFs2 > 27rFFs2 > 28rFFs2 > 29rFFs2 > 30rFFs2 > 31rFFs2 > 32rFFs2 > ) > > Best regards > -Tobias Interesting. 16rFFe4 used to be 16711680, now it?s 65508. Try these: #( 10r1e4 11r1e4 12r1e4 13r1e4 14r1e4 15r1e4 16r1e4 17r1e4 18r1e4 ) Maybe we need to raise an error for certain combinations? Better than a surprise. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/710ce3ce/smime.bin From nicolas.cellier.aka.nice at gmail.com Wed May 4 12:54:12 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed May 4 13:23:09 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: Hard to guess without trying indeed... This was broken by Andreas Raab when we decided to accept lower case letter digits 16rff instead of 16rFF... This broke the nice floating point with different radix too... #(10r1.0e5 11r1.0e5 12r1.0e5 13r1.0e5 14r1.0e5 15r1.0e5 16r1.0e5) 2016-05-04 13:32 GMT+02:00 Tobias Pape : > Hi all, > > without executing, what does the following expression result in? > > #( > 25rFFs2 > 26rFFs2 > 27rFFs2 > 28rFFs2 > 29rFFs2 > 30rFFs2 > 31rFFs2 > 32rFFs2 > ) > > Best regards > -Tobias > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/25db1cc6/attachment.htm From nicolas.cellier.aka.nice at gmail.com Wed May 4 12:57:14 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed May 4 13:23:11 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: Anyway, there is Decimal in ScaledDecimal, so any specification of decimal places other than base 10 may end up being surprising. 2016-05-04 14:37 GMT+02:00 Bert Freudenberg : > > > On 04.05.2016, at 13:32, Tobias Pape wrote: > > > > Hi all, > > > > without executing, what does the following expression result in? > > > > #( > > 25rFFs2 > > 26rFFs2 > > 27rFFs2 > > 28rFFs2 > > 29rFFs2 > > 30rFFs2 > > 31rFFs2 > > 32rFFs2 > > ) > > > > Best regards > > -Tobias > > > Interesting. > > 16rFFe4 used to be 16711680, now it?s 65508. Try these: > > #( > 10r1e4 > 11r1e4 > 12r1e4 > 13r1e4 > 14r1e4 > 15r1e4 > 16r1e4 > 17r1e4 > 18r1e4 > ) > > Maybe we need to raise an error for certain combinations? Better than a > surprise. > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/0c7cc19d/attachment.htm From ron at usmedrec.com Wed May 4 13:24:14 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed May 4 14:00:00 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: <0cbb01d1a608$40f0b100$c2d21300$@usmedrec.com> hmmm It's an array. It looks like encoded numbers base 25 through 32 of hex FF but not sure about the s2. Because I'm not sure the numbers will evaluate it could just error. But let's say I'm wrong and this is something that actually does work and I haven't seen it before, base 25-32 FF s2 something, this will return an array of numbers. Not executing it was difficult :). Looking forward to the answer. All the best, Ron Teitelbaum > -----Original Message----- > From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- > bounces@lists.squeakfoundation.org] On Behalf Of Tobias Pape > Sent: Wednesday, May 04, 2016 7:33 AM > To: The general-purpose Squeak developers list > Subject: [squeak-dev] Code Jeopardy > > Hi all, > > without executing, what does the following expression result in? > > #( > 25rFFs2 > 26rFFs2 > 27rFFs2 > 28rFFs2 > 29rFFs2 > 30rFFs2 > 31rFFs2 > 32rFFs2 > ) > > Best regards > -Tobias From commits at source.squeak.org Wed May 4 13:42:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 14:00:04 2016 Subject: [squeak-dev] The Trunk: System-mt.822.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.822.mcz ==================== Summary ==================== Name: System-mt.822 Author: mt Time: 4 May 2016, 3:41:22.823971 pm UUID: 303d3668-90ba-ac46-b7d4-847e945efeb8 Ancestors: System-dtl.821 Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger. =============== Diff against System-dtl.821 =============== Item was added: + ----- Method: Project>>composeDisplayTextIntoForm: (in category 'utilities') ----- + composeDisplayTextIntoForm: displayText + "Compose the given display text into a form. This is at project level so that UI-specific mechanisms can be used. We may want to make this independent from Morphic or MVC in the future. Good-looking text rendering is good for any user interface." + + | port form font width height lines | + font := displayText textStyle defaultFont. + lines := displayText string lines. + + width := lines + ifEmpty: [1] + ifNotEmpty: [(lines collect: [:line | font widthOfString: line]) max]. + height := font height * lines size. + + form := Form extent: width@height depth: 32. + port := BitBlt toForm: form. + + "1) Fill background." + port + fill: form boundingBox + fillColor: displayText backgroundColor + rule: Form over. + + "2) Draw text lines." + port combinationRule: Form paint. + font + installOn: port + foregroundColor: displayText foregroundColor + backgroundColor: Color transparent. + + lines withIndexDo: [:line :index | + font + displayString: line + on: port + from: 1 + to: line size + at: 0@((index-1) * font height) + kern: 0]. + + ^ form! From commits at source.squeak.org Wed May 4 13:45:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 14:00:06 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1133.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1133.mcz ==================== Summary ==================== Name: Morphic-mt.1133 Author: mt Time: 4 May 2016, 3:43:34.666971 pm UUID: 3b022579-b00b-c84b-90be-1b1534c5586f Ancestors: Morphic-nice.1132 Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger. =============== Diff against Morphic-nice.1132 =============== Item was removed: - ----- Method: DisplayText>>composeForm (in category '*Morphic-Text') ----- - composeForm - "For the TT strings in MVC widgets in a Morphic world such as a progress bar, the form is created by Morphic machinery." - | canvas tmpText | - Smalltalk isMorphic - ifTrue: - [tmpText := TextMorph new contentsAsIs: text deepCopy. - foreColor ifNotNil: [tmpText text addAttribute: (TextColor color: foreColor)]. - backColor ifNotNil: [tmpText backgroundColor: backColor]. - tmpText setTextStyle: textStyle. - canvas := FormCanvas on: (Form extent: tmpText extent depth: 32). - tmpText drawOn: canvas. - form := canvas form. - ] - ifFalse: [form := self asParagraph asForm]! Item was added: + ----- Method: MorphicProject>>composeDisplayTextIntoForm: (in category 'utilities') ----- + composeDisplayTextIntoForm: displayText + + | tmpText canvas | + tmpText := TextMorph new contentsAsIs: displayText text deepCopy. + displayText foregroundColor ifNotNil: [:color | + tmpText text addAttribute: (TextColor color: color)]. + displayText backgroundColor ifNotNil: [:color | + tmpText backgroundColor: color]. + tmpText setTextStyle: displayText textStyle. + canvas := FormCanvas on: (Form extent: tmpText extent depth: 32). + tmpText drawOn: canvas. + ^ canvas form! From commits at source.squeak.org Wed May 4 13:45:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 14:00:09 2016 Subject: [squeak-dev] The Trunk: ST80-mt.208.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.208.mcz ==================== Summary ==================== Name: ST80-mt.208 Author: mt Time: 4 May 2016, 3:44:43.013971 pm UUID: f7c73b93-4d3e-2841-af17-ba6d70a046c6 Ancestors: ST80-mt.207 Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger. =============== Diff against ST80-mt.207 =============== Item was added: + ----- Method: MVCProject>>composeDisplayTextIntoForm: (in category 'utilities') ----- + composeDisplayTextIntoForm: displayText + + ^ displayText asParagraph asForm! From commits at source.squeak.org Wed May 4 13:46:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 14:33:06 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.330.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.330.mcz ==================== Summary ==================== Name: Graphics-mt.330 Author: mt Time: 4 May 2016, 3:45:51.954971 pm UUID: 0124a0a6-dfc0-264d-867c-96e10cd5e7d4 Ancestors: Graphics-mt.329 Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger. =============== Diff against Graphics-mt.329 =============== Item was added: + ----- Method: DisplayText>>composeForm (in category 'private') ----- + composeForm + + form := Project current composeDisplayTextIntoForm: self.! From asqueaker at gmail.com Wed May 4 15:15:20 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed May 4 15:37:44 2016 Subject: [squeak-dev] Re: Having issues getting Maui to work in current trunk 5.0 In-Reply-To: <1462350841689-4893532.post@n4.nabble.com> References: <1462350841689-4893532.post@n4.nabble.com> Message-ID: The default behavior seems to be putting it at the center center, which puts it under the hand for small widgets, leading to the focus-shift feedback loop (flickering balloon).. It would be nice if NewBalloon and classic Balloons had same defaults (e.g., #topCenter). On Wed, May 4, 2016 at 3:34 AM, marcel.taeumel wrote: > Hi Chris, > > is there still this top-center pop-up feature missing for Maui? I assumed > that I managed to got all the traditional features included by now. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Having-issues-getting-Maui-to-work-in-current-trunk-5-0-tp4893459p4893532.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From nicolas.cellier.aka.nice at gmail.com Wed May 4 15:48:25 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed May 4 16:20:58 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.842.mcz In-Reply-To: <55257308.03178d0a.2859.5fb0SMTPIN_ADDED_MISSING@mx.google.com> References: <55257308.03178d0a.2859.5fb0SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-04-08 20:26 GMT+02:00 : > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.842.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.842 > Author: mt > Time: 8 April 2015, 8:26:35.712 pm > UUID: 69b4e9ef-0563-9748-a5bf-fe69528f37b8 > Ancestors: Morphic-mt.841 > > Made Slider more pluggable and thus removed PluggableSliderMorph from the > system. The code that was not moved upwards into Slider was moved downwards > into its sole subclass: BracketSliderMorph. > > It was verified that the "new color picker morph", which is the sole user > of that BracketSliderMorph, stays functional. > > Why? The Slider should support custom min/max values whenever the default > (floats with 0.0 to 1.0) is not appropriate. Truncation is supported, too. > Everything was already present in the (removed) PluggableSliderMorph, but > we need that behavior in ScrollBar. > > Note: There is still the SimpleSliderMorph, which duplicates some behavior > of Slider but is a base class of slider. E-Toys uses it. We may want to > remove that duplicated code later. > > =============== Diff against Morphic-mt.841 =============== > > Item was changed: > + Slider subclass: #BracketSliderMorph > + instanceVariableNames: 'getEnabledSelector enabled' > - PluggableSliderMorph subclass: #BracketSliderMorph > - instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'Morphic-Widgets'! > > !BracketSliderMorph commentStamp: 'gvc 5/18/2007 13:39' prior: 0! > Abstract superclass for morphs that are used to select a component (R, > G, B or A) of a colour.! > > Item was added: > + ----- Method: BracketSliderMorph>>adoptPaneColor: (in category > 'accessing - ui') ----- > + adoptPaneColor: paneColor > + "Pass on to the border too." > + super adoptPaneColor: paneColor. > + paneColor ifNil: [ ^ self ]. > + self > + fillStyle: self fillStyleToUse ; > + borderStyle: > + (BorderStyle inset > + width: 1 ; > + baseColor: self color twiceDarker) ; > + sliderColor: > + (self enabled > + ifTrue: [ paneColor twiceDarker ] > + ifFalse: [ self paneColor twiceDarker > paler ])! > > Item was added: > + ----- Method: BracketSliderMorph>>borderStyleToUse (in category > 'accessing - ui') ----- > + borderStyleToUse > + "Answer the borderStyle that should be used for the receiver." > + > + ^self enabled > + ifTrue: [self theme sliderNormalBorderStyleFor: self] > + ifFalse: [self theme sliderDisabledBorderStyleFor: self]! > > Hi Marcel, theme? There's no theme (yet) in Squeak... Is it something that leaked from some other framework? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/b0d6ef70/attachment.htm From commits at source.squeak.org Wed May 4 16:07:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 16:51:34 2016 Subject: [squeak-dev] The Inbox: Morphic-nice.1134.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Inbox: http://source.squeak.org/inbox/Morphic-nice.1134.mcz ==================== Summary ==================== Name: Morphic-nice.1134 Author: nice Time: 4 May 2016, 6:12:01.818683 pm UUID: 4b4eeafc-76a9-ae40-9016-6cf1372bd7d6 Ancestors: Morphic-mt.1133 Pick the GrowlMorph from Pharo (unthemed). It is a nice way to display bits of information without requesting user acknowledge actions (like pressing an OK button) =============== Diff against Morphic-mt.1133 =============== Item was added: + TextMorph subclass: #GrowlMorph + instanceVariableNames: 'dismissHandle vanishTime alpha actionBlock vanishDelay attr labelAttr contentsAttr labelColor contentsColor' + classVariableNames: 'DefaultBackgroundColor Position' + poolDictionaries: '' + category: 'Morphic-Windows'! + + !GrowlMorph commentStamp: 'StephanEggermont 9/5/2014 12:12' prior: 0! + A GrowlMorph is a little Morph to announce event happening. Freely inspired from the MIT Snarl developed by Tony Garnock-Jones. + + GrowlMorph new openInWorld. + + 10 timesRepeat: [ + (GrowlMorph openWithLabel: 'The time' contents: DateAndTime now) + " vanishDelay: 1000; + resetVanishTimer". + World doOneCycle ]. + + (GrowlMorph openWithLabel: 'The time' contents: DateAndTime now) + actionBlock: [Transcript open].! Item was added: + ----- Method: GrowlMorph class>>contents: (in category 'instance creation') ----- + contents: contentString + + ^ self new + label: '' contents: contentString; + yourself! Item was added: + ----- Method: GrowlMorph class>>growlPositionChoices (in category 'settings') ----- + growlPositionChoices + + ^#(topRight 'top right' + bottomLeft 'bottom left' + bottomRight 'bottom right' + topLeft 'topLeft') pairsCollect: [:a :b | b -> a]! Item was added: + ----- Method: GrowlMorph class>>growlSettingsOn: (in category 'settings') ----- + growlSettingsOn: aBuilder + + (aBuilder group: #growl) + label: 'Popup notifiaction' translated; + parent: #appearance; + description: 'All settings concerned with the notifications popup look''n feel' translated; + with: [ + (aBuilder pickOne: #position) + label: 'Popup position' translated; + target: self; + default: #topRight; + order: 1; + domainValues: self growlPositionChoices.]! Item was added: + ----- Method: GrowlMorph class>>label:contents: (in category 'instance creation') ----- + label: aString contents: contentString + + ^ self new + label: aString contents: contentString; + yourself! Item was added: + ----- Method: GrowlMorph class>>openWithContents: (in category 'instance creation') ----- + openWithContents: contentString + + ^ (self contents: contentString) openInWorld! Item was added: + ----- Method: GrowlMorph class>>openWithLabel:contents: (in category 'instance creation') ----- + openWithLabel: aString contents: contentString + + ^ (self label: aString contents: contentString) openInWorld! Item was added: + ----- Method: GrowlMorph class>>openWithLabel:contents:backgroundColor:labelColor: (in category 'instance creation') ----- + openWithLabel: aString contents: contentString backgroundColor: aColor labelColor: aLabelColor + + ^ (self label: aString contents: contentString) + backgroundColor: aColor; + labelColor: aLabelColor; + contentsColor: aLabelColor; + openInWorld! Item was added: + ----- Method: GrowlMorph class>>openWithLabel:contents:color: (in category 'instance creation') ----- + openWithLabel: aString contents: contentString color: aColor + + ^ (self label: aString contents: contentString) + backgroundColor: aColor; + openInWorld! Item was added: + ----- Method: GrowlMorph class>>position (in category 'position') ----- + position + + ^ Position ifNil: [ Position := #topRight ]! Item was added: + ----- Method: GrowlMorph class>>position: (in category 'position') ----- + position: aSymbol + + (self possiblePositions includes: aSymbol) ifFalse: [ ^ self ]. + + Position := aSymbol! Item was added: + ----- Method: GrowlMorph class>>possiblePositions (in category 'position') ----- + possiblePositions + + ^ #( bottomRight bottomLeft topRight topLeft )! Item was added: + ----- Method: GrowlMorph>>actionBlock: (in category 'building') ----- + actionBlock: aBlock + + actionBlock := aBlock! Item was added: + ----- Method: GrowlMorph>>activeGrowlMorphs (in category 'internal') ----- + activeGrowlMorphs + + ^World submorphs select: [ :morph | morph isKindOf: GrowlMorph ].! Item was added: + ----- Method: GrowlMorph>>alpha (in category 'accessing') ----- + alpha + ^ alpha + ! Item was added: + ----- Method: GrowlMorph>>alpha: (in category 'accessing') ----- + alpha: newAlpha + + "self alpha = newAlpha ifTrue: [^ self]." + alpha := newAlpha. + labelAttr color: (self labelColor alpha: alpha). + contentsAttr color: (self contentsColor alpha: alpha). + self backgroundColor: (self nextColorStep: self backgroundColor). + self allMorphsDo: [:m | + m borderColor: (self nextColorStep: m borderColor). + m color: (self nextColorStep: m color)]. + self borderColor isTransparent ifTrue: [self delete].! Item was added: + ----- Method: GrowlMorph>>backgroundColor (in category 'accessing') ----- + backgroundColor + + ^ backgroundColor ifNil: [ backgroundColor := self defaultBackgroundColor ]! Item was added: + ----- Method: GrowlMorph>>contents: (in category 'building') ----- + contents: contentsString + + self streamDo: [ :w | + w withAttributes: self contentsAttributes do: [w nextPutAll: contentsString asString]].! Item was added: + ----- Method: GrowlMorph>>contentsAttributes (in category 'initialization') ----- + contentsAttributes + ^ { contentsAttr. TextAlignment centered. TextFontChange font2. }! Item was added: + ----- Method: GrowlMorph>>contentsColor (in category 'accessing') ----- + contentsColor + ^ contentsColor ifNil: [ contentsColor := self highlightColor ] + ! Item was added: + ----- Method: GrowlMorph>>contentsColor: (in category 'accessing') ----- + contentsColor: aColor + "when you set this contentsColor, it takes precedence over theme one. In certain case (such as for green as in SUnit) it is needed, normally you do not need it." + contentsColor := aColor. + contentsAttr color: aColor. + ! Item was added: + ----- Method: GrowlMorph>>createDismissHandle (in category 'initialization') ----- + createDismissHandle + | handle form image | + form := SystemWindow closeBoxImage. + image := ImageMorph new. + image image: form. + image color: Color yellow. + handle := image. + handle on: #mouseUp send: #delete to: self. + ^ handle! Item was added: + ----- Method: GrowlMorph>>defaultTextStyle (in category 'default') ----- + defaultTextStyle + ^ TextStyle actualTextStyles at: #Accuny! Item was added: + ----- Method: GrowlMorph>>defaultVanishDelay (in category 'default') ----- + defaultVanishDelay + + ^ 1 seconds! Item was added: + ----- Method: GrowlMorph>>enabled (in category 'stepping') ----- + enabled + + ^ false! Item was added: + ----- Method: GrowlMorph>>handlesMouseDown: (in category 'interaction') ----- + handlesMouseDown: evt + ^ actionBlock notNil or: [super handlesMouseDown: evt]! Item was added: + ----- Method: GrowlMorph>>initialize (in category 'initialization') ----- + initialize + super initialize. + self borderStyle: BorderStyle thinGray. + + self setProperty: #autoFitContents toValue: false. + + self initializeLabelAttributes. + self initializeContentsAttributes. + self vanishDelay: self defaultVanishDelay. + self label: 'A cool title' contents: 'Here an important message'. + dismissHandle := self createDismissHandle. + self addMorph: dismissHandle! Item was added: + ----- Method: GrowlMorph>>initializeContentsAttributes (in category 'initialization') ----- + initializeContentsAttributes + contentsAttr := TextColor color: self contentsColor. + ! Item was added: + ----- Method: GrowlMorph>>initializeLabelAttributes (in category 'initialization') ----- + initializeLabelAttributes + labelAttr := TextColor color: self labelColor. + ! Item was added: + ----- Method: GrowlMorph>>is:saneWithRespectTo: (in category 'internal') ----- + is: rect saneWithRespectTo: morphs + + ^(morphs anySatisfy: [ :morph | morph owner isNil not and: [morph bounds intersects: rect]]) not + ! Item was added: + ----- Method: GrowlMorph>>label:contents: (in category 'building') ----- + label: labelString contents: contentsString + + self streamDo: [ :w | + w withAttributes: self labelAttributes do: [w nextPutAll: labelString asString; cr]. + w withAttributes: self contentsAttributes do: [w nextPutAll: contentsString asString]. + ].! Item was added: + ----- Method: GrowlMorph>>labelAttributes (in category 'initialization') ----- + labelAttributes + ^ { labelAttr. TextAlignment centered. TextFontChange font4. TextEmphasis bold. }! Item was added: + ----- Method: GrowlMorph>>labelColor (in category 'accessing') ----- + labelColor + ^ labelColor ifNil: [ labelColor := self highlightColor ]! Item was added: + ----- Method: GrowlMorph>>labelColor: (in category 'accessing') ----- + labelColor: aColor + "when you set this labelColor, it takes precedence over theme one. In certain case (such as for green as in SUnit) it is needed, normally you do not need it." + labelColor := aColor. + labelAttr color: self labelColor.! Item was added: + ----- Method: GrowlMorph>>minimumExtent (in category 'default') ----- + minimumExtent + ^ 256@38! Item was added: + ----- Method: GrowlMorph>>mouseDown: (in category 'interaction') ----- + mouseDown: evt + super mouseDown: evt. + evt yellowButtonPressed ifTrue: [^ self]. + actionBlock ifNotNil: [actionBlock valueWithPossibleArgs: { self }].! Item was added: + ----- Method: GrowlMorph>>nextColorStep: (in category 'initialization') ----- + nextColorStep: aColor + ^ aColor alpha: self alpha! Item was added: + ----- Method: GrowlMorph>>openInWorld (in category 'internal') ----- + openInWorld + + self position: self unoccupiedPosition. + super openInWorld! Item was added: + ----- Method: GrowlMorph>>resetAlpha (in category 'internal') ----- + resetAlpha + ^ self alpha: 0.9! Item was added: + ----- Method: GrowlMorph>>resetVanishTimer (in category 'internal') ----- + resetVanishTimer + + vanishTime := DateAndTime now + self vanishDelay. + self resetAlpha.! Item was added: + ----- Method: GrowlMorph>>step (in category 'stepping') ----- + step + + (self containsPoint: ActiveHand position) ifTrue: [ + self resetAlpha. + ^ self]. + vanishTime ifNotNil: [DateAndTime now < vanishTime ifTrue: [^self]]. + self alpha: self alpha - 0.05.! Item was added: + ----- Method: GrowlMorph>>stepTime (in category 'stepping') ----- + stepTime + ^ 100! Item was added: + ----- Method: GrowlMorph>>streamDo: (in category 'internal') ----- + streamDo: aBlock + + self contentsWrapped: (Text streamContents: aBlock). + self extent: self minimumExtent. + self height: (paragraph extent y + (self borderWidth * 2) + (margins ifNil: [0] ifNotNil: [margins top + margins bottom]) + 2). + + self vanishDelay: ((((self contents size /50)seconds)+1 seconds) max: self defaultVanishDelay).! Item was added: + ----- Method: GrowlMorph>>unoccupiedPosition (in category 'position') ----- + unoccupiedPosition + + self class position = #bottomLeft + ifTrue: [ ^ self unoccupiedPositionBottomLeft ]. + self class position = #topRight + ifTrue: [ ^ self unoccupiedPositionTopRight ]. + self class position = #bottomRight + ifTrue: [ ^ self unoccupiedPositionBottomRight ]. + self class position = #topLeft + ifTrue: [ ^ self unoccupiedPositionTopLeft ]. + ^ 0@0 + ! Item was added: + ----- Method: GrowlMorph>>unoccupiedPositionBottomLeft (in category 'position') ----- + unoccupiedPositionBottomLeft + + | startPos area rect morphs | + + startPos := 10 negated @ (self height + 10). + area := World clearArea. + rect := (area bottomLeft - startPos) extent: self extent. + + morphs := self activeGrowlMorphs. + [self is: rect saneWithRespectTo: morphs] whileFalse: [ + rect := rect translateBy: 0@(-10). + rect top < 0 ifTrue: [^ area bottomLeft - startPos] + ]. + ^ rect origin! Item was added: + ----- Method: GrowlMorph>>unoccupiedPositionBottomRight (in category 'position') ----- + unoccupiedPositionBottomRight + + | startPos area rect morphs | + + startPos := (self width + 10 ) @ (self height + 10). + area := World clearArea. + rect := (area bottomRight - startPos) extent: self extent. + + morphs := self activeGrowlMorphs. + [self is: rect saneWithRespectTo: morphs] whileFalse: [ + rect := rect translateBy: 0@(-10). + rect top < 0 ifTrue: [^ area bottomRight - startPos ] + ]. + ^ rect origin! Item was added: + ----- Method: GrowlMorph>>unoccupiedPositionTopLeft (in category 'position') ----- + unoccupiedPositionTopLeft + + | startPos area rect morphs | + + startPos := 10@10. + area := World clearArea. + rect := area topLeft + (startPos) extent: self extent. + + morphs := self activeGrowlMorphs. + [self is: rect saneWithRespectTo: morphs] whileFalse: [ + rect := rect translateBy: 0@10. + rect bottom > area height ifTrue: [^ area topLeft + startPos ] + ]. + ^ rect origin! Item was added: + ----- Method: GrowlMorph>>unoccupiedPositionTopRight (in category 'position') ----- + unoccupiedPositionTopRight + + | startPos area rect morphs | + + startPos := (self width + 10 @ 10 negated). + area := World clearArea. + rect := (area topRight - startPos) extent: self extent. + + morphs := self activeGrowlMorphs. + [self is: rect saneWithRespectTo: morphs] whileFalse: [ + rect := rect translateBy: 0@10. + rect bottom > area height ifTrue: [^ (area topRight - startPos) ] + ]. + + ^ rect origin! Item was added: + ----- Method: GrowlMorph>>vanishDelay (in category 'accessing') ----- + vanishDelay + + ^ vanishDelay! Item was added: + ----- Method: GrowlMorph>>vanishDelay: (in category 'accessing') ----- + vanishDelay: aDuration + + vanishDelay := aDuration. + self resetVanishTimer! Item was added: + ----- Method: GrowlMorph>>wantsSteps (in category 'stepping') ----- + wantsSteps + ^ true! From lewis at mail.msen.com Wed May 4 16:40:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 4 17:24:42 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <0cbb01d1a608$40f0b100$c2d21300$@usmedrec.com> References: <0cbb01d1a608$40f0b100$c2d21300$@usmedrec.com> Message-ID: <27292.136.1.1.113.1462380007.squirrel@webmail.msen.com> This looks like a good opportunity for public humiliation ;-) I expect an eight element array of ScaledDecimal, each formatted with two trailing zeros after the decimal point. The first value would be 25 * 16 + 15, and the last value would be 32 * 16 + 15. So I would expect the array to contain these: 415.00 431.00 447.00 463.00 479.00 495.00 511.00 527.00 Dave > hmmm > > It's an array. It looks like encoded numbers base 25 through 32 of hex FF > but not sure about the s2. Because I'm not sure the numbers will evaluate > it could just error. But let's say I'm wrong and this is something that > actually does work and I haven't seen it before, base 25-32 FF s2 > something, > this will return an array of numbers. > > Not executing it was difficult :). Looking forward to the answer. > > All the best, > Ron Teitelbaum > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of Tobias Pape >> Sent: Wednesday, May 04, 2016 7:33 AM >> To: The general-purpose Squeak developers list >> Subject: [squeak-dev] Code Jeopardy >> >> Hi all, >> >> without executing, what does the following expression result in? >> >> #( >> 25rFFs2 >> 26rFFs2 >> 27rFFs2 >> 28rFFs2 >> 29rFFs2 >> 30rFFs2 >> 31rFFs2 >> 32rFFs2 >> ) >> >> Best regards >> -Tobias > > > From nicolas.cellier.aka.nice at gmail.com Wed May 4 17:07:19 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Wed May 4 17:59:28 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <27292.136.1.1.113.1462380007.squirrel@webmail.msen.com> References: <0cbb01d1a608$40f0b100$c2d21300$@usmedrec.com> <27292.136.1.1.113.1462380007.squirrel@webmail.msen.com> Message-ID: David you rock... But search for these in squeak-dev archives (feb 2010): 16rff is looking for a fix :) Multilingual-ar.87 http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144125.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144143.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144145.html Or a lot earlier... http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html 2016-05-04 18:40 GMT+02:00 David T. Lewis : > This looks like a good opportunity for public humiliation ;-) > > I expect an eight element array of ScaledDecimal, each formatted with two > trailing zeros after the decimal point. The first value would be 25 * 16 + > 15, and the last value would be 32 * 16 + 15. So I would expect the array > to contain these: > > 415.00 > 431.00 > 447.00 > 463.00 > 479.00 > 495.00 > 511.00 > 527.00 > > Dave > > > > hmmm > > > > It's an array. It looks like encoded numbers base 25 through 32 of hex > FF > > but not sure about the s2. Because I'm not sure the numbers will > evaluate > > it could just error. But let's say I'm wrong and this is something that > > actually does work and I haven't seen it before, base 25-32 FF s2 > > something, > > this will return an array of numbers. > > > > Not executing it was difficult :). Looking forward to the answer. > > > > All the best, > > Ron Teitelbaum > > > >> -----Original Message----- > >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- > >> bounces@lists.squeakfoundation.org] On Behalf Of Tobias Pape > >> Sent: Wednesday, May 04, 2016 7:33 AM > >> To: The general-purpose Squeak developers list > >> Subject: [squeak-dev] Code Jeopardy > >> > >> Hi all, > >> > >> without executing, what does the following expression result in? > >> > >> #( > >> 25rFFs2 > >> 26rFFs2 > >> 27rFFs2 > >> 28rFFs2 > >> 29rFFs2 > >> 30rFFs2 > >> 31rFFs2 > >> 32rFFs2 > >> ) > >> > >> Best regards > >> -Tobias > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/ff7d5db5/attachment-0001.htm From Marcel.Taeumel at hpi.de Wed May 4 16:36:00 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 4 18:32:13 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.842.mcz In-Reply-To: References: Message-ID: <1462379760523-4893613.post@n4.nabble.com> Hi Nicolas, I think I just copied the code over from PluggableSliderMorph. May be a left-over from eToys. There are no senders of #borderStylerToUse either. I think we can remove that method that calls #theme. Best, Marcel -- View this message in context: http://forum.world.st/Re-The-Trunk-Morphic-mt-842-mcz-tp4893602p4893613.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ron at usmedrec.com Wed May 4 17:55:42 2016 From: ron at usmedrec.com (Ron Teitelbaum) Date: Wed May 4 19:10:28 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: <0cbb01d1a608$40f0b100$c2d21300$@usmedrec.com> <27292.136.1.1.113.1462380007.squirrel@webmail.msen.com> Message-ID: <0dd401d1a62e$2da96e40$88fc4ac0$@usmedrec.com> Hi David, Grr I should have guessed the scaled decimal! I saw the following emails about the issues you are pointing out. Thanks! Ron From: Nicolas Cellier David you rock... But search for these in squeak-dev archives (feb 2010): 16rff is looking for a fix :) Multilingual-ar.87 http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144125.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144143.html http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-February/144145.html Or a lot earlier... http://lists.squeakfoundation.org/pipermail/squeak-dev/2000-March/013368.html 2016-05-04 18:40 GMT+02:00 David T. Lewis : This looks like a good opportunity for public humiliation ;-) I expect an eight element array of ScaledDecimal, each formatted with two trailing zeros after the decimal point. The first value would be 25 * 16 + 15, and the last value would be 32 * 16 + 15. So I would expect the array to contain these: 415.00 431.00 447.00 463.00 479.00 495.00 511.00 527.00 Dave > hmmm > > It's an array. It looks like encoded numbers base 25 through 32 of hex FF > but not sure about the s2. Because I'm not sure the numbers will evaluate > it could just error. But let's say I'm wrong and this is something that > actually does work and I haven't seen it before, base 25-32 FF s2 > something, > this will return an array of numbers. > > Not executing it was difficult :). Looking forward to the answer. > > All the best, > Ron Teitelbaum > >> -----Original Message----- >> From: squeak-dev-bounces@lists.squeakfoundation.org [mailto:squeak-dev- >> bounces@lists.squeakfoundation.org] On Behalf Of Tobias Pape >> Sent: Wednesday, May 04, 2016 7:33 AM >> To: The general-purpose Squeak developers list >> Subject: [squeak-dev] Code Jeopardy >> >> Hi all, >> >> without executing, what does the following expression result in? >> >> #( >> 25rFFs2 >> 26rFFs2 >> 27rFFs2 >> 28rFFs2 >> 29rFFs2 >> 30rFFs2 >> 31rFFs2 >> 32rFFs2 >> ) >> >> Best regards >> -Tobias > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/a771bbf3/attachment.htm From eliot.miranda at gmail.com Wed May 4 21:02:43 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed May 4 22:38:42 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: On Wed, May 4, 2016 at 5:37 AM, Bert Freudenberg wrote: > > > On 04.05.2016, at 13:32, Tobias Pape wrote: > > > > Hi all, > > > > without executing, what does the following expression result in? > > > > #( > > 25rFFs2 > > 26rFFs2 > > 27rFFs2 > > 28rFFs2 > > 29rFFs2 > > 30rFFs2 > > 31rFFs2 > > 32rFFs2 > > ) > > > > Best regards > > -Tobias > > > Interesting. > > 16rFFe4 used to be 16711680, now it?s 65508. > > VisualWorks suffers exactly the same issue: #(390 #s2 405 #s2 420 #s2 435 #s2 379264 419342 462150 507778) The only thing we can do is issue a warning, because otherwise we ban legal programs. But we also need to disambiguate. Should s or e in the penultimate positions force interpretation as scaled decimal or exponent, and hence force someone using a base >= 15 to use upper case? Seems the only practical choice to me. So we need tests and to modify printing. At least we still print in upper case. And BTW, I for one would hate having to enter hex constanrts in upper case. Makes my VMMaker life much more difficult; all the disassemblers and debuggers I use print hex in lower case. > Try these: > > #( > 10r1e4 > 11r1e4 > 12r1e4 > 13r1e4 > 14r1e4 > 15r1e4 > 16r1e4 > 17r1e4 > 18r1e4 > ) > VW refuses to parse these (non-decimal integers cannot have exponents, and if one adds a decimal point, non-radix 10 numbers cannot contain a decimal point. > Maybe we need to raise an error for certain combinations? Better than a > surprise. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160504/7547e0b9/attachment.htm From commits at source.squeak.org Wed May 4 21:07:43 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 22:38:44 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1133.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1133.mcz ==================== Summary ==================== Name: Morphic-nice.1133 Author: nice Time: 3 May 2016, 11:50:28.750899 pm UUID: 7ee79d7c-f8fb-49ec-8e3b-06d13bc034ee Ancestors: Morphic-nice.1132 Avoid dependency of Graphics on Morphic just because some Form examples use Morphic. Couldn't these examples find their place in some kind of Help? =============== Diff against Morphic-nice.1132 =============== Item was added: + ----- Method: Form class>>exampleColorSees (in category '*Morphic-examples') ----- + exampleColorSees + "Form exampleColorSees" + "First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. + Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this + Third shows the hit area - where red touches blue - superimposed on the original scene. + Fourth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + + |formA formB maskA offset tally map intersection left top dCanvas sensitiveColor soughtColor index| + formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + ActiveWorld restoreMorphicDisplay; doOneCycle. + + sensitiveColor := Color red. + soughtColor := Color blue. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". + formB := Form extent: 100@50 depth: 32. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: sensitiveColor. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 1. + + map := Bitmap new: (1 bitShift: (formA depth min: 15)). + map at: (index := sensitiveColor indexInMap: map) put: 1. + + maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. + + "intersect world pixels of the color we're looking for with sensitive pixels mask" + map at: index put: 0. "clear map and reuse it" + map at: (soughtColor indexInMap: map) put: 1. + + maskA + copyBits: intersection + from: formB at: 0@0 clippingBox: formB boundingBox + rule: Form and + fillColor: nil + map: map. + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((sensitiveColor pixelValueForDepth: formA depth) ) to: ((soughtColor pixelValueForDepth: formB depth) ) test: (Form compareMatchColor bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + + ! Item was added: + ----- Method: Form class>>exampleTouchTest (in category '*Morphic-examples') ----- + exampleTouchTest + "Form exampleTouchTest" + "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a + non-transparent pixel of the background upon which it is displayed. + First column shows a form with a red block in the midst of transparent area sneaking up on a form with a transparent LHS and blue RHS. The green frame shows the intersection area. + Second column shows in grey the part of the red that is within the intersection. + Third column shows in black the blue that is within the intersection. + Fourth column shows just the A touching B area. + Fifth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + |formA formB maskA maskB offset tally map intersection left top dCanvas| + formA := formB := maskA := maskB := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + + ActiveWorld restoreMorphicDisplay; doOneCycle. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := Form extent: 100@50 depth: 32. + formB := Form extent: 100@50 depth: 16. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color yellow. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color red. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: Color blue. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 2. + formA displayOn: maskA at: offset - intersection origin rule: Form paint. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskB := Form extent: intersection extent depth: 2. + formB displayOn: maskB at: intersection origin negated rule: Form paint. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + map := Bitmap new: 4 withAll: 1. + map at: 1 put: 0. "transparent" + + maskA copyBits: maskA boundingBox from: maskA at: 0@0 colorMap: map. + "maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150." + + maskB copyBits: maskB boundingBox from: maskB at: 0@0 colorMap: map. + "maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150." + + maskB displayOn: maskA at: 0@0 rule: Form and. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA boundingBox area -( maskA tallyPixelValues at: 1)) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((Color transparent pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((Color transparent pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorANotColorB bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + + + ! Item was added: + ----- Method: Form class>>exampleTouchingColor (in category '*Morphic-examples') ----- + exampleTouchingColor + "Form exampleTouchingColor" + "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a + particular color pixel of the background upon which it is displayed. + First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. + Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this + Third shows the hit area (black) superimposed on the original scene + Fourth column is the tally of hits via the old algorithm + Last column shows the tally of hits via the new prim" + |formA formB maskA offset tally map intersection left top dCanvas ignoreColor soughtColor| + formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" + ActiveWorld restoreMorphicDisplay; doOneCycle. + + ignoreColor := Color transparent. + soughtColor := Color blue. + + top := 50. + dCanvas := FormCanvas on: Display. + -50 to: 80 by: 10 do:[:p| + offset:= p@0. "vary this to check different states" + left := 10. + + formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". + formB := Form extent: 100@50 depth: 32. + + "make a red square in the middle of the form" + (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color red. + (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. + (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. + "formA displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + "make a blue block on the right half of the form" + (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. + (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. + "formB displayOn: Display at: left@top rule: Form paint. + dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. + left := left + 150." + + intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 150. + + maskA := Form extent: intersection extent depth: 1. + + map := Bitmap new: (1 bitShift: (formA depth min: 15)). + map atAllPut: 1. + map at: ( ignoreColor indexInMap: map) put: 0. + + maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. + + "intersect world pixels of the color we're looking for with sensitive pixels mask" + map atAllPut: 0. "clear map and reuse it" + map at: (soughtColor indexInMap: map) put: 1. + + maskA + copyBits: intersection + from: formB at: 0@0 clippingBox: formB boundingBox + rule: Form and + fillColor: nil + map: map. + + formB displayOn: Display at: left@top rule: Form paint. + formA displayOn: Display at: (left@top) + offset rule: Form paint. + maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. + dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. + left := left + 170. + + (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). + left := left + 70. + + "now try using the new primitive" + tally := (BitBlt + destForm: formB + sourceForm: formA + fillColor: nil + combinationRule: 3 "really ought to work with nil but prim code checks" + destOrigin: intersection origin + sourceOrigin: (offset negated max: 0@0) + extent: intersection extent + clipRect: intersection) + primCompareColor: ((ignoreColor pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((soughtColor pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorAMatchColorB bitOr: Form compareTallyFlag). + tally asString asDisplayText displayOn: Display at: left@(top +20). + top:= top + 60] + ! From commits at source.squeak.org Wed May 4 21:13:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 22:40:44 2016 Subject: [squeak-dev] The Trunk: Graphics-nice.331.mcz Message-ID: Nicolas Cellier uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-nice.331.mcz ==================== Summary ==================== Name: Graphics-nice.331 Author: nice Time: 4 May 2016, 11:11:51.598676 pm UUID: a7db03ab-33da-44a8-a167-3a6aaccc7865 Ancestors: Graphics-nice.330, Graphics-mt.330 Merge =============== Diff against Graphics-nice.330 =============== Item was added: + ----- Method: DisplayText>>composeForm (in category 'private') ----- + composeForm + + form := Project current composeDisplayTextIntoForm: self.! From commits at source.squeak.org Wed May 4 21:23:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 22:40:45 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1135.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1135.mcz ==================== Summary ==================== Name: Morphic-nice.1135 Author: nice Time: 4 May 2016, 11:19:13.406192 pm UUID: 2efd252e-effa-4796-82fb-aa2db0644bba Ancestors: Morphic-nice.1133, Morphic-mt.1133 Merge =============== Diff against Morphic-nice.1133 =============== Item was removed: - ----- Method: DisplayText>>composeForm (in category '*Morphic-Text') ----- - composeForm - "For the TT strings in MVC widgets in a Morphic world such as a progress bar, the form is created by Morphic machinery." - | canvas tmpText | - Smalltalk isMorphic - ifTrue: - [tmpText := TextMorph new contentsAsIs: text deepCopy. - foreColor ifNotNil: [tmpText text addAttribute: (TextColor color: foreColor)]. - backColor ifNotNil: [tmpText backgroundColor: backColor]. - tmpText setTextStyle: textStyle. - canvas := FormCanvas on: (Form extent: tmpText extent depth: 32). - tmpText drawOn: canvas. - form := canvas form. - ] - ifFalse: [form := self asParagraph asForm]! Item was added: + ----- Method: MorphicProject>>composeDisplayTextIntoForm: (in category 'utilities') ----- + composeDisplayTextIntoForm: displayText + + | tmpText canvas | + tmpText := TextMorph new contentsAsIs: displayText text deepCopy. + displayText foregroundColor ifNotNil: [:color | + tmpText text addAttribute: (TextColor color: color)]. + displayText backgroundColor ifNotNil: [:color | + tmpText backgroundColor: color]. + tmpText setTextStyle: displayText textStyle. + canvas := FormCanvas on: (Form extent: tmpText extent depth: 32). + tmpText drawOn: canvas. + ^ canvas form! From commits at source.squeak.org Wed May 4 21:08:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 22:40:47 2016 Subject: [squeak-dev] The Trunk: Graphics-nice.330.mcz Message-ID: Nicolas Cellier uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-nice.330.mcz ==================== Summary ==================== Name: Graphics-nice.330 Author: nice Time: 3 May 2016, 11:43:21.9999 pm UUID: 123836bb-88cf-4378-8cd9-9f8e044d7e62 Ancestors: Graphics-mt.329 Avoid dependency on Morphic just because some examples use Morphic. =============== Diff against Graphics-mt.329 =============== Item was removed: - ----- Method: Form class>>exampleColorSees (in category 'examples') ----- - exampleColorSees - "Form exampleColorSees" - "First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. - Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this - Third shows the hit area - where red touches blue - superimposed on the original scene. - Fourth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - - |formA formB maskA offset tally map intersection left top dCanvas sensitiveColor soughtColor index| - formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - ActiveWorld restoreMorphicDisplay; doOneCycle. - - sensitiveColor := Color red. - soughtColor := Color blue. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". - formB := Form extent: 100@50 depth: 32. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: sensitiveColor. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 1. - - map := Bitmap new: (1 bitShift: (formA depth min: 15)). - map at: (index := sensitiveColor indexInMap: map) put: 1. - - maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. - - "intersect world pixels of the color we're looking for with sensitive pixels mask" - map at: index put: 0. "clear map and reuse it" - map at: (soughtColor indexInMap: map) put: 1. - - maskA - copyBits: intersection - from: formB at: 0@0 clippingBox: formB boundingBox - rule: Form and - fillColor: nil - map: map. - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((sensitiveColor pixelValueForDepth: formA depth) ) to: ((soughtColor pixelValueForDepth: formB depth) ) test: (Form compareMatchColor bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - - ! Item was removed: - ----- Method: Form class>>exampleTouchTest (in category 'examples') ----- - exampleTouchTest - "Form exampleTouchTest" - "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a - non-transparent pixel of the background upon which it is displayed. - First column shows a form with a red block in the midst of transparent area sneaking up on a form with a transparent LHS and blue RHS. The green frame shows the intersection area. - Second column shows in grey the part of the red that is within the intersection. - Third column shows in black the blue that is within the intersection. - Fourth column shows just the A touching B area. - Fifth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - |formA formB maskA maskB offset tally map intersection left top dCanvas| - formA := formB := maskA := maskB := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - - ActiveWorld restoreMorphicDisplay; doOneCycle. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := Form extent: 100@50 depth: 32. - formB := Form extent: 100@50 depth: 16. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color yellow. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color red. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: Color blue. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 2. - formA displayOn: maskA at: offset - intersection origin rule: Form paint. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskB := Form extent: intersection extent depth: 2. - formB displayOn: maskB at: intersection origin negated rule: Form paint. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - map := Bitmap new: 4 withAll: 1. - map at: 1 put: 0. "transparent" - - maskA copyBits: maskA boundingBox from: maskA at: 0@0 colorMap: map. - "maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150." - - maskB copyBits: maskB boundingBox from: maskB at: 0@0 colorMap: map. - "maskB displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150." - - maskB displayOn: maskA at: 0@0 rule: Form and. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA boundingBox area -( maskA tallyPixelValues at: 1)) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((Color transparent pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((Color transparent pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorANotColorB bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - - - ! Item was removed: - ----- Method: Form class>>exampleTouchingColor (in category 'examples') ----- - exampleTouchingColor - "Form exampleTouchingColor" - "Demonstrate the algorithm used in Scratch code to determine if a sprite's non-transparent pixels touch a - particular color pixel of the background upon which it is displayed. - First column as above shows the sneaky red/yellow pirate sneaking up on the blue/peach galleon. - Second column shows the 1bpp made from the red/yellow/transparent - white -> ignore this, black -> test this - Third shows the hit area (black) superimposed on the original scene - Fourth column is the tally of hits via the old algorithm - Last column shows the tally of hits via the new prim" - |formA formB maskA offset tally map intersection left top dCanvas ignoreColor soughtColor| - formA := formB := maskA := offset := tally := map := intersection := nil. "just to shut up the compiler when testing" - ActiveWorld restoreMorphicDisplay; doOneCycle. - - ignoreColor := Color transparent. - soughtColor := Color blue. - - top := 50. - dCanvas := FormCanvas on: Display. - -50 to: 80 by: 10 do:[:p| - offset:= p@0. "vary this to check different states" - left := 10. - - formA := (Form extent: 100@50 depth: 32) asFormOfDepth: 16 "so we can try original forms of other depths". - formB := Form extent: 100@50 depth: 32. - - "make a red square in the middle of the form" - (FormCanvas on: formA) fillRectangle: (25@25 extent: 50@5) fillStyle: Color red. - (FormCanvas on: formA) fillRectangle: (25@30 extent: 50@5) fillStyle: Color transparent. - (FormCanvas on: formA) fillRectangle: (25@35 extent: 50@50) fillStyle: Color yellow. - "formA displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - "make a blue block on the right half of the form" - (FormCanvas on: formB) fillRectangle: (50@0 extent: 50@100) fillStyle: soughtColor. - (FormCanvas on: formB) fillRectangle: (60@0 extent: 10@100) fillStyle: Color palePeach. - "formB displayOn: Display at: left@top rule: Form paint. - dCanvas frameRectangle: (left@top extent: formA extent) width:2 color: Color green. - left := left + 150." - - intersection := (formA boundingBox translateBy: offset) intersect: (formB boundingBox). - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 150. - - maskA := Form extent: intersection extent depth: 1. - - map := Bitmap new: (1 bitShift: (formA depth min: 15)). - map atAllPut: 1. - map at: ( ignoreColor indexInMap: map) put: 0. - - maskA copyBits: (intersection translateBy: offset negated) from: formA at: 0@0 colorMap: map. - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. left := left + 150. - - "intersect world pixels of the color we're looking for with sensitive pixels mask" - map atAllPut: 0. "clear map and reuse it" - map at: (soughtColor indexInMap: map) put: 1. - - maskA - copyBits: intersection - from: formB at: 0@0 clippingBox: formB boundingBox - rule: Form and - fillColor: nil - map: map. - - formB displayOn: Display at: left@top rule: Form paint. - formA displayOn: Display at: (left@top) + offset rule: Form paint. - maskA displayOn: Display at: (left@top) + intersection origin rule: Form paint. - dCanvas frameRectangle: (intersection translateBy: left@top) width:2 color: Color green. - left := left + 170. - - (maskA tallyPixelValues at: 2) asString asDisplayText displayOn: Display at: left@(top +20). - left := left + 70. - - "now try using the new primitive" - tally := (BitBlt - destForm: formB - sourceForm: formA - fillColor: nil - combinationRule: 3 "really ought to work with nil but prim code checks" - destOrigin: intersection origin - sourceOrigin: (offset negated max: 0@0) - extent: intersection extent - clipRect: intersection) - primCompareColor: ((ignoreColor pixelValueForDepth: formA depth) bitAnd: 16rFFFFFF) to: ((soughtColor pixelValueForDepth: formB depth) bitAnd: 16rFFFFFF) test: (Form compareNotColorAMatchColorB bitOr: Form compareTallyFlag). - tally asString asDisplayText displayOn: Display at: left@(top +20). - top:= top + 60] - ! From commits at source.squeak.org Wed May 4 21:45:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:07:23 2016 Subject: [squeak-dev] The Trunk: Tools-nice.697.mcz Message-ID: Nicolas Cellier uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-nice.697.mcz ==================== Summary ==================== Name: Tools-nice.697 Author: nice Time: 4 May 2016, 11:43:43.009175 pm UUID: 1d1b24ec-1ccd-4a62-af56-90db017c5eda Ancestors: Tools-mt.630, Tools-mt.696 Move #representsSameBrowseeAs: and #postAcceptBrowseFor: out of Morphic =============== Diff against Tools-mt.696 =============== Item was added: + ----- Method: HierarchyBrowser>>postAcceptBrowseFor: (in category 'morphic ui') ----- + postAcceptBrowseFor: aHierarchyBrowser + (aHierarchyBrowser selectedClass ~= self selectedClass or: [ aHierarchyBrowser selectedMessageName notNil ]) ifTrue: [ self selectMessageCategoryNamed: nil ]. + aHierarchyBrowser instanceMessagesIndicated + ifTrue: [ self indicateInstanceMessages ] + ifFalse: [ self indicateClassMessages ]. + self + selectClass: aHierarchyBrowser selectedClass ; + selectedMessageName: aHierarchyBrowser selectedMessageName ; + showHomeCategory! Item was added: + ----- Method: HierarchyBrowser>>representsSameBrowseeAs: (in category 'morphic ui') ----- + representsSameBrowseeAs: anotherModel + ^ self hasUnacceptedEdits not + and: [ classDisplayList size = anotherModel classList size + and: [ classDisplayList includesAllOf: anotherModel classList ] ]! Item was added: + ----- Method: Inspector>>representsSameBrowseeAs: (in category 'morphic ui') ----- + representsSameBrowseeAs: anotherInspector + ^ self object == anotherInspector object! Item was added: + ----- Method: MessageSet>>representsSameBrowseeAs: (in category 'morphic ui') ----- + representsSameBrowseeAs: anotherModel + ^ self hasUnacceptedEdits not + and: [ messageList = anotherModel messageList ]! Item was changed: + ----- Method: MessageSet>>request:initialAnswer: (in category 'user interface') ----- - ----- Method: MessageSet>>request:initialAnswer: (in category 'as yet unclassified') ----- request: prompt initialAnswer: initialAnswer ^ UIManager default request: prompt initialAnswer: initialAnswer! From commits at source.squeak.org Wed May 4 21:48:33 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:07:56 2016 Subject: [squeak-dev] The Trunk: HelpSystem-Core-nice.86.mcz Message-ID: Nicolas Cellier uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-nice.86.mcz ==================== Summary ==================== Name: HelpSystem-Core-nice.86 Author: nice Time: 4 May 2016, 11:48:13.917235 pm UUID: 1f4b56c6-5b30-4c68-b0cd-792223bd2057 Ancestors: HelpSystem-Core-mt.85 Move #representsSameBrowseeAs: out of Morphic =============== Diff against HelpSystem-Core-mt.85 =============== Item was added: + ----- Method: HelpBrowser>>representsSameBrowseeAs: (in category 'ui') ----- + representsSameBrowseeAs: anotherModel + ^ self hasUnacceptedEdits not and: + [ (toplevelTopics collect: + [ : e | e title ]) = + (anotherModel toplevelTopics collect: + [ : e | e title ]) ]! From commits at source.squeak.org Wed May 4 21:51:40 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:08:59 2016 Subject: [squeak-dev] The Trunk: Kernel-nice.1018.mcz Message-ID: Nicolas Cellier uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-nice.1018.mcz ==================== Summary ==================== Name: Kernel-nice.1018 Author: nice Time: 4 May 2016, 11:50:22.289732 pm UUID: 9c352422-6711-4a46-a864-86b07e0db599 Ancestors: Kernel-nice.1017 Move #representsSameBrowseeAs: and #postAcceptBrowseFor: out of Morphic =============== Diff against Kernel-nice.1017 =============== Item was changed: ----- Method: EventSensor class>>initialize (in category 'class initialization') ----- initialize + Smalltalk addToStartUpList: self before: ProcessorScheduler. - Smalltalk addToStartUpList: self after: Cursor. Smalltalk addToShutDownList: self. self installKeyDecodeTable. self installMouseDecodeTable. self install. ! Item was changed: ----- Method: Fraction>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" | d n | + radix isInteger ifFalse: [^super floorLog: 10]. - radix isInteger ifFalse: [^super floorLog: radix]. n := numerator floorLog: radix. d := denominator floorLog: radix. ^(numerator * (radix raisedTo: d)) < (denominator * (radix raisedTo: n)) ifTrue: [n - d - 1] ifFalse: [n - d]! Item was changed: ----- Method: Integer>>floorLog: (in category 'mathematical functions') ----- floorLog: radix "Unlike super, this version is exact when radix is integer" + radix isInteger ifFalse: [^super floorLog: 10]. - radix isInteger ifFalse: [^super floorLog: radix]. self <= 0 ifTrue: [^DomainError signal: 'floorLog: is only defined for x > 0.0']. ^(self numberOfDigitsInBase: radix) - 1! Item was added: + ----- Method: Model>>aboutToStyle: (in category 'morphic ui') ----- + aboutToStyle: aStyler + "Default implementation for text styling. No changes in styler configuration but we are OK to style our contents." + + ^ true! Item was added: + ----- Method: Model>>postAcceptBrowseFor: (in category 'morphic ui') ----- + postAcceptBrowseFor: anotherModel + "If I am taking over browsing for anotherModel, sucblasses may override to, for example, position me to the object to be focused on."! Item was added: + ----- Method: Model>>representsSameBrowseeAs: (in category 'morphic ui') ----- + representsSameBrowseeAs: anotherModel + "Answer true if my browser can browse what anotherModel wants to browse." + ^ false! From commits at source.squeak.org Wed May 4 22:00:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:08:59 2016 Subject: [squeak-dev] The Trunk: Morphic-nice.1136.mcz Message-ID: Nicolas Cellier uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-nice.1136.mcz ==================== Summary ==================== Name: Morphic-nice.1136 Author: nice Time: 4 May 2016, 11:56:22.843845 pm UUID: 15444d47-2ddb-4185-b3a8-e6c9e2e841c4 Ancestors: Morphic-nice.1135 Move #representsSameBrowseeAs: and #postAcceptBrowseFor: out of Morphic The reason is to make other packages unloadable. Indeed, if those messages are implemented in classes of other packages, it then make Morphic depends on these packages, and thus make these packages unloadable (until Morphic is unloaded). =============== Diff against Morphic-nice.1135 =============== Item was removed: - ----- Method: HelpBrowser>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherModel - ^ self hasUnacceptedEdits not and: - [ (toplevelTopics collect: - [ : e | e title ]) = - (anotherModel toplevelTopics collect: - [ : e | e title ]) ]! Item was removed: - ----- Method: HierarchyBrowser>>postAcceptBrowseFor: (in category '*morphic') ----- - postAcceptBrowseFor: aHierarchyBrowser - (aHierarchyBrowser selectedClass ~= self selectedClass or: [ aHierarchyBrowser selectedMessageName notNil ]) ifTrue: [ self selectMessageCategoryNamed: nil ]. - aHierarchyBrowser instanceMessagesIndicated - ifTrue: [ self indicateInstanceMessages ] - ifFalse: [ self indicateClassMessages ]. - self - selectClass: aHierarchyBrowser selectedClass ; - selectedMessageName: aHierarchyBrowser selectedMessageName ; - showHomeCategory! Item was removed: - ----- Method: HierarchyBrowser>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherModel - ^ self hasUnacceptedEdits not - and: [ classDisplayList size = anotherModel classList size - and: [ classDisplayList includesAllOf: anotherModel classList ] ]! Item was removed: - ----- Method: Inspector>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherInspector - ^ self object == anotherInspector object! Item was removed: - ----- Method: MessageSet>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherModel - ^ self hasUnacceptedEdits not - and: [ messageList = anotherModel messageList ]! Item was removed: - ----- Method: Model>>aboutToStyle: (in category '*morphic') ----- - aboutToStyle: aStyler - "Default implementation for text styling. No changes in styler configuration but we are OK to style our contents." - - ^ true! Item was removed: - ----- Method: Model>>postAcceptBrowseFor: (in category '*morphic') ----- - postAcceptBrowseFor: anotherModel - "If I am taking over browsing for anotherModel, sucblasses may override to, for example, position me to the object to be focused on."! Item was removed: - ----- Method: Model>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherModel - "Answer true if my browser can browse what anotherModel wants to browse." - ^ false! From commits at source.squeak.org Wed May 4 22:10:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:09:01 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-nice.25.mcz Message-ID: Nicolas Cellier uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-nice.25.mcz ==================== Summary ==================== Name: 51Deprecated-nice.25 Author: nice Time: 5 May 2016, 12:10:16.185159 am UUID: 9be9d957-c07f-4465-8433-e527f464f910 Ancestors: 51Deprecated-mt.24 Deprecate HtmlFileStream since its superclass is deprecated. Thus also deprecate StandardFileStream>>asHtml which has no sender in trunk. =============== Diff against 51Deprecated-mt.24 =============== Item was added: + CrLfFileStream subclass: #HtmlFileStream + instanceVariableNames: 'prevPreamble' + classVariableNames: 'TabThing' + poolDictionaries: '' + category: '51Deprecated-Files-Kernel'! + + !HtmlFileStream commentStamp: 'mk 8/30/2005 15:10' prior: 0! + The Class apes StandardFileStream, but converts the text to HTML before putting it out (primarily intended for printOut). It can be invoked with + + ((FileStream fileNamed: 'changes.html') asHtml) fileOutChanges + + Use usual FileStream methods to put out text converted to + HTML fairly approximating that text (for best looks, use + method:, methodHeader:, methodBody:, for code); + + verbatim: puts text out without conversion; + + command: put out HTML items, such as
, supplying the brackets. + + header: and trailer: put out an HTML wrapper (preamble and closing text) + + nextPut does the actual conversion, nextPutAll: defers characters to nextPut. + + The code is fairly dumb at present, doing a wooden straightforward conversion of the text without attempting to capture the style or fonts in which the original text was rendered. Tabs are handled awkwardly, using  , so that probably only leading strings are working right. Style sheets now permit us to do a much neater looking job if there is interest in improving the looks of things. + + Example: + Perform + HtmlFileStream example1 + and then navigate your browser to file 'example1.html'! Item was added: + ----- Method: HtmlFileStream class>>example1 (in category 'examples') ----- + example1 + "This example shows how HtmlFileStream class can be used for generating HTML file." + + | htmlFileStream | + htmlFileStream := HtmlFileStream newFrom: (FileStream fileNamed: 'example1.html'). + htmlFileStream + header; + command: 'H1'; + nextPutAll: 'Hello, world!!'; + command: '/H1'; + trailer; + close.! Item was added: + ----- Method: HtmlFileStream class>>initialize (in category 'class initialization') ----- + initialize "HtmlFileStream initialize" + TabThing := '   ' + + "I took Ted's suggestion to use  , which works far better for the HTML. Style sheets provide an alternative, possibly better, solution since they permit finer-grain control of the HTML formatting, and thus would permit capturing the style in which text was originally rendered. Internal tabbings would still get lost. 1/1/99 acg."! Item was added: + ----- Method: HtmlFileStream class>>newFrom: (in category 'instance creation') ----- + newFrom: aFileStream + "Answer an HtmlFileStream that is 'like' aFileStream. As a side-effect, the surviving fileStream answered by this method replaces aFileStream on the finalization registry. 1/6/99 acg" + + |inst| + inst := super newFrom: aFileStream. + StandardFileStream unregister: aFileStream. + HtmlFileStream register: inst. + inst detectLineEndConvention. + ^inst + ! Item was added: + ----- Method: HtmlFileStream>>command: (in category 'HTML') ----- + command: aString + "Append HTML commands directly without translation. Caller should not include < or >. Note that font change info comes through here!! 4/5/96 tk" + + (aString includes: $<) ifTrue: [self error: 'Do not put < or > in arg']. + "We do the wrapping with <> here!! Don't put it in aString." + ^ self verbatim: '<', aString, '>'! Item was added: + ----- Method: HtmlFileStream>>copyMethodChunkFrom: (in category 'fileIn/Out') ----- + copyMethodChunkFrom: aStream + "Overridden to bolden the first line (presumably a method header)" + | terminator code firstLine | + terminator := $!!. + aStream skipSeparators. + code := aStream upTo: terminator. + firstLine := code copyUpTo: Character cr. + firstLine size = code size + ifTrue: [self nextPutAll: code] + ifFalse: [self command: 'b'; nextPutAll: firstLine; command: '/b'. + self nextPutAll: (code copyFrom: firstLine size + 1 to: code size)]. + self nextPut: terminator. + [aStream peekFor: terminator] whileTrue: "case of imbedded (doubled) terminators" + [self nextPut: terminator; + nextPutAll: (aStream upTo: terminator); + nextPut: terminator]! Item was added: + ----- Method: HtmlFileStream>>header (in category 'read, write, position') ----- + header + "append the HTML header. Be sure to call trailer after you put out the data. + 4/4/96 tk" + | cr | + cr := String with: Character cr. + self command: 'HTML'; verbatim: cr. + self command: 'HEAD'; verbatim: cr. + self command: 'TITLE'. + self nextPutAll: '"', self name, '"'. + self command: '/TITLE'; verbatim: cr. + self command: '/HEAD'; verbatim: cr. + self command: 'BODY'; verbatim: cr. + ! Item was added: + ----- Method: HtmlFileStream>>nextChunk (in category 'fileIn/Out') ----- + nextChunk + "Answer the contents of the receiver, up to the next terminator character (!!). Imbedded terminators are doubled. Undo and strip out all Html stuff in the stream and convert the characters back. 4/12/96 tk" + | out char did rest | + self skipSeparators. "Absorb <...><...> also" + out := WriteStream on: (String new: 500). + [self atEnd] whileFalse: [ + self peek = $< ifTrue: [self unCommand]. "Absorb <...><...>" + (char := self next) = $& + ifTrue: [ + rest := self upTo: $;. + did := out position. + rest = 'lt' ifTrue: [out nextPut: $<]. + rest = 'gt' ifTrue: [out nextPut: $>]. + rest = 'amp' ifTrue: [out nextPut: $&]. + did = out position ifTrue: [ + self error: 'new HTML char encoding'. + "Please add it to this code"]] + ifFalse: [char = $!! "terminator" + ifTrue: [ + self peek = $!! ifFalse: [^ out contents]. + out nextPut: self next] "pass on one $!!" + ifFalse: [char asciiValue = 9 + ifTrue: [self next; next; next; next "TabThing"]. + out nextPut: char]] + ]. + ^ out contents! Item was added: + ----- Method: HtmlFileStream>>nextPut: (in category 'read, write, position') ----- + nextPut: char + "Put a character on the file, but translate it first. 4/6/96 tk 1/1/98 acg" + char = $< ifTrue: [^ super nextPutAll: '<']. + char = $> ifTrue: [^ super nextPutAll: '>']. + char = $& ifTrue: [^ super nextPutAll: '&']. + char asciiValue = 13 "return" + ifTrue: [self command: 'br']. + char = $ "tab" + ifTrue: [self verbatim: TabThing. ^super nextPut: char]. + ^ super nextPut: char! Item was added: + ----- Method: HtmlFileStream>>nextPutAll: (in category 'read, write, position') ----- + nextPutAll: aString + "Write the whole string, translating as we go. 4/6/96 tk" + "Slow, but faster than using aString asHtml?" + + ^aString do: [:each | self nextPut: each].! Item was added: + ----- Method: HtmlFileStream>>skipSeparators (in category 'fileIn/Out') ----- + skipSeparators + "Bsides the normal spacers, also skip any <...>, html commands. + 4/12/96 tk" + | did | + [did := self position. + super skipSeparators. + self unCommand. "Absorb <...><...>" + did = self position] whileFalse. "until no change" + ! Item was added: + ----- Method: HtmlFileStream>>trailer (in category 'read, write, position') ----- + trailer + "append the HTML trailer. Call this just before file close. + 4/4/96 tk" + | cr | + cr := String with: Character cr. + self command: '/BODY'; verbatim: cr. + self command: '/HTML'; verbatim: cr. + ! Item was added: + ----- Method: HtmlFileStream>>verbatim: (in category 'read, write, position') ----- + verbatim: aString + "Put out the string without HTML conversion. 1/1/99 acg" + + super nextPutAll: aString + + "'super verbatim:' in the 2.3beta draft didn't perform as expected -- the code was printed with conversion. In a sense, that wouldn't make sense either -- we don't want strictly verbatim printing, just printing without the HTML conversion (that is, skipping around just the nextPut: and nextPutAll: for just this Class). If there were intermediate conversions (say, CRLF!!), we would want those to happen as advertised -- perhaps we should use a differently named selector, perhaps something like nextPutWithoutHTMLConversion:, so that verbatim isn't overridden?"! Item was added: + ----- Method: StandardFileStream>>asHtml (in category '*51Deprecated-Files-Kernel') ----- + asHtml + "Convert me in to an HtmlFileStream. 4/11/96 tk" + + ^ self as: HtmlFileStream + ! From commits at source.squeak.org Wed May 4 22:12:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:09:38 2016 Subject: [squeak-dev] The Trunk: Files-nice.153.mcz Message-ID: Nicolas Cellier uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-nice.153.mcz ==================== Summary ==================== Name: Files-nice.153 Author: nice Time: 5 May 2016, 12:12:26.738818 am UUID: 29dccfc0-111c-46a9-bba5-5fd368cb6f0b Ancestors: Files-eem.152 Deprecate HtmlFileStream since its superclass is deprecated. Thus also deprecate StandardFileStream>>asHtml which has no sender in trunk. =============== Diff against Files-eem.152 =============== Item was removed: - CrLfFileStream subclass: #HtmlFileStream - instanceVariableNames: 'prevPreamble' - classVariableNames: 'TabThing' - poolDictionaries: '' - category: 'Files-Kernel'! - - !HtmlFileStream commentStamp: 'mk 8/30/2005 15:10' prior: 0! - The Class apes StandardFileStream, but converts the text to HTML before putting it out (primarily intended for printOut). It can be invoked with - - ((FileStream fileNamed: 'changes.html') asHtml) fileOutChanges - - Use usual FileStream methods to put out text converted to - HTML fairly approximating that text (for best looks, use - method:, methodHeader:, methodBody:, for code); - - verbatim: puts text out without conversion; - - command: put out HTML items, such as
, supplying the brackets. - - header: and trailer: put out an HTML wrapper (preamble and closing text) - - nextPut does the actual conversion, nextPutAll: defers characters to nextPut. - - The code is fairly dumb at present, doing a wooden straightforward conversion of the text without attempting to capture the style or fonts in which the original text was rendered. Tabs are handled awkwardly, using  , so that probably only leading strings are working right. Style sheets now permit us to do a much neater looking job if there is interest in improving the looks of things. - - Example: - Perform - HtmlFileStream example1 - and then navigate your browser to file 'example1.html'! Item was removed: - ----- Method: HtmlFileStream class>>example1 (in category 'examples') ----- - example1 - "This example shows how HtmlFileStream class can be used for generating HTML file." - - | htmlFileStream | - htmlFileStream := HtmlFileStream newFrom: (FileStream fileNamed: 'example1.html'). - htmlFileStream - header; - command: 'H1'; - nextPutAll: 'Hello, world!!'; - command: '/H1'; - trailer; - close.! Item was removed: - ----- Method: HtmlFileStream class>>initialize (in category 'class initialization') ----- - initialize "HtmlFileStream initialize" - TabThing := '   ' - - "I took Ted's suggestion to use  , which works far better for the HTML. Style sheets provide an alternative, possibly better, solution since they permit finer-grain control of the HTML formatting, and thus would permit capturing the style in which text was originally rendered. Internal tabbings would still get lost. 1/1/99 acg."! Item was removed: - ----- Method: HtmlFileStream class>>newFrom: (in category 'instance creation') ----- - newFrom: aFileStream - "Answer an HtmlFileStream that is 'like' aFileStream. As a side-effect, the surviving fileStream answered by this method replaces aFileStream on the finalization registry. 1/6/99 acg" - - |inst| - inst := super newFrom: aFileStream. - StandardFileStream unregister: aFileStream. - HtmlFileStream register: inst. - inst detectLineEndConvention. - ^inst - ! Item was removed: - ----- Method: HtmlFileStream>>command: (in category 'HTML') ----- - command: aString - "Append HTML commands directly without translation. Caller should not include < or >. Note that font change info comes through here!! 4/5/96 tk" - - (aString includes: $<) ifTrue: [self error: 'Do not put < or > in arg']. - "We do the wrapping with <> here!! Don't put it in aString." - ^ self verbatim: '<', aString, '>'! Item was removed: - ----- Method: HtmlFileStream>>copyMethodChunkFrom: (in category 'fileIn/Out') ----- - copyMethodChunkFrom: aStream - "Overridden to bolden the first line (presumably a method header)" - | terminator code firstLine | - terminator := $!!. - aStream skipSeparators. - code := aStream upTo: terminator. - firstLine := code copyUpTo: Character cr. - firstLine size = code size - ifTrue: [self nextPutAll: code] - ifFalse: [self command: 'b'; nextPutAll: firstLine; command: '/b'. - self nextPutAll: (code copyFrom: firstLine size + 1 to: code size)]. - self nextPut: terminator. - [aStream peekFor: terminator] whileTrue: "case of imbedded (doubled) terminators" - [self nextPut: terminator; - nextPutAll: (aStream upTo: terminator); - nextPut: terminator]! Item was removed: - ----- Method: HtmlFileStream>>header (in category 'read, write, position') ----- - header - "append the HTML header. Be sure to call trailer after you put out the data. - 4/4/96 tk" - | cr | - cr := String with: Character cr. - self command: 'HTML'; verbatim: cr. - self command: 'HEAD'; verbatim: cr. - self command: 'TITLE'. - self nextPutAll: '"', self name, '"'. - self command: '/TITLE'; verbatim: cr. - self command: '/HEAD'; verbatim: cr. - self command: 'BODY'; verbatim: cr. - ! Item was removed: - ----- Method: HtmlFileStream>>nextChunk (in category 'fileIn/Out') ----- - nextChunk - "Answer the contents of the receiver, up to the next terminator character (!!). Imbedded terminators are doubled. Undo and strip out all Html stuff in the stream and convert the characters back. 4/12/96 tk" - | out char did rest | - self skipSeparators. "Absorb <...><...> also" - out := WriteStream on: (String new: 500). - [self atEnd] whileFalse: [ - self peek = $< ifTrue: [self unCommand]. "Absorb <...><...>" - (char := self next) = $& - ifTrue: [ - rest := self upTo: $;. - did := out position. - rest = 'lt' ifTrue: [out nextPut: $<]. - rest = 'gt' ifTrue: [out nextPut: $>]. - rest = 'amp' ifTrue: [out nextPut: $&]. - did = out position ifTrue: [ - self error: 'new HTML char encoding'. - "Please add it to this code"]] - ifFalse: [char = $!! "terminator" - ifTrue: [ - self peek = $!! ifFalse: [^ out contents]. - out nextPut: self next] "pass on one $!!" - ifFalse: [char asciiValue = 9 - ifTrue: [self next; next; next; next "TabThing"]. - out nextPut: char]] - ]. - ^ out contents! Item was removed: - ----- Method: HtmlFileStream>>nextPut: (in category 'read, write, position') ----- - nextPut: char - "Put a character on the file, but translate it first. 4/6/96 tk 1/1/98 acg" - char = $< ifTrue: [^ super nextPutAll: '<']. - char = $> ifTrue: [^ super nextPutAll: '>']. - char = $& ifTrue: [^ super nextPutAll: '&']. - char asciiValue = 13 "return" - ifTrue: [self command: 'br']. - char = $ "tab" - ifTrue: [self verbatim: TabThing. ^super nextPut: char]. - ^ super nextPut: char! Item was removed: - ----- Method: HtmlFileStream>>nextPutAll: (in category 'read, write, position') ----- - nextPutAll: aString - "Write the whole string, translating as we go. 4/6/96 tk" - "Slow, but faster than using aString asHtml?" - - ^aString do: [:each | self nextPut: each].! Item was removed: - ----- Method: HtmlFileStream>>skipSeparators (in category 'fileIn/Out') ----- - skipSeparators - "Bsides the normal spacers, also skip any <...>, html commands. - 4/12/96 tk" - | did | - [did := self position. - super skipSeparators. - self unCommand. "Absorb <...><...>" - did = self position] whileFalse. "until no change" - ! Item was removed: - ----- Method: HtmlFileStream>>trailer (in category 'read, write, position') ----- - trailer - "append the HTML trailer. Call this just before file close. - 4/4/96 tk" - | cr | - cr := String with: Character cr. - self command: '/BODY'; verbatim: cr. - self command: '/HTML'; verbatim: cr. - ! Item was removed: - ----- Method: HtmlFileStream>>verbatim: (in category 'read, write, position') ----- - verbatim: aString - "Put out the string without HTML conversion. 1/1/99 acg" - - super nextPutAll: aString - - "'super verbatim:' in the 2.3beta draft didn't perform as expected -- the code was printed with conversion. In a sense, that wouldn't make sense either -- we don't want strictly verbatim printing, just printing without the HTML conversion (that is, skipping around just the nextPut: and nextPutAll: for just this Class). If there were intermediate conversions (say, CRLF!!), we would want those to happen as advertised -- perhaps we should use a differently named selector, perhaps something like nextPutWithoutHTMLConversion:, so that verbatim isn't overridden?"! Item was removed: - ----- Method: StandardFileStream>>asHtml (in category 'properties-setting') ----- - asHtml - "Convert me in to an HtmlFileStream. 4/11/96 tk" - - ^ self as: HtmlFileStream - ! From commits at source.squeak.org Wed May 4 22:35:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 4 23:37:01 2016 Subject: [squeak-dev] The Trunk: ToolsTests-nice.76.mcz Message-ID: Nicolas Cellier uploaded a new version of ToolsTests to project The Trunk: http://source.squeak.org/trunk/ToolsTests-nice.76.mcz ==================== Summary ==================== Name: ToolsTests-nice.76 Author: nice Time: 5 May 2016, 12:35:07.890932 am UUID: 227e6db8-e334-479c-84ff-b81537ef45f2 Ancestors: ToolsTests-ul.75 Fix the DependencyBrowserTest that were broken by the move of DateAndTime from Kernel to Chronology-Core. =============== Diff against ToolsTests-ul.75 =============== Item was changed: ----- Method: DependencyBrowserTest>>testSelectedMessageClassSideShowsSource (in category 'testing - message list') ----- testSelectedMessageClassSideShowsSource "Warning!! When Collections' dependencies change, this test may start to fail!!" + browser packageListIndex: (browser packageList indexOf: #'Chronology-Core'). - browser packageListIndex: (browser packageList indexOf: #Kernel). browser packageDepsIndex: (browser packageDeps indexOf: #Collections). browser classDepsIndex: (browser classDeps indexOf: #'Array'). browser classListIndex: (browser classList indexOf: #'DateAndTime class'). browser messageListIndex: 1. self assert: browser selectedMessageName == #fromSeconds:. self assert: browser contents = (DateAndTime class sourceCodeAt: #fromSeconds:) ! Item was changed: ----- Method: DependencyBrowserTest>>testSelectedMessageNameClassSide (in category 'testing - message list') ----- testSelectedMessageNameClassSide "Warning!! When Collections' dependencies change, this test may start to fail!!" self assert: browser selectedMessageName isNil. + browser packageListIndex: (browser packageList indexOf: #'Chronology-Core'). - browser packageListIndex: (browser packageList indexOf: #Kernel). self assert: browser selectedMessageName isNil. browser packageDepsIndex: (browser packageDeps indexOf: #Collections). self assert: browser selectedMessageName isNil. browser classDepsIndex: (browser classDeps indexOf: #Array). self assert: browser selectedMessageName isNil. browser classListIndex: (browser classList indexOf: #'DateAndTime class'). self assert: browser selectedMessageName isNil. browser messageListIndex: 1. self assert: browser selectedMessageName == #fromSeconds:. ! From lewis at mail.msen.com Wed May 4 23:29:05 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 5 01:27:02 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: Message-ID: <20160504232905.GA47880@shell.msen.com> On Wed, May 04, 2016 at 02:02:43PM -0700, Eliot Miranda wrote: > On Wed, May 4, 2016 at 5:37 AM, Bert Freudenberg > wrote: > > > > > > On 04.05.2016, at 13:32, Tobias Pape wrote: > > > > > > Hi all, > > > > > > without executing, what does the following expression result in? > > > > > > #( > > > 25rFFs2 > > > 26rFFs2 > > > 27rFFs2 > > > 28rFFs2 > > > 29rFFs2 > > > 30rFFs2 > > > 31rFFs2 > > > 32rFFs2 > > > ) > > > > > > Best regards > > > -Tobias > > > > > > Interesting. > > > > 16rFFe4 used to be 16711680, now it???s 65508. > > > > > > > VisualWorks suffers exactly the same issue: > > #(390 #s2 405 #s2 420 #s2 435 #s2 379264 419342 462150 507778) > > The only thing we can do is issue a warning, because otherwise we ban legal > programs. But we also need to disambiguate. Should s or e in the > penultimate positions force interpretation as scaled decimal or exponent, > and hence force someone using a base >= 15 to use upper case? Seems the > only practical choice to me. So we need tests and to modify printing. At > least we still print in upper case. Given that most of us are not using base 32 arithmetic on a regular basis, issuing a warning seems like a reasonable thing to do. In practice, the problem would only arise when parsing numbers. Given a suitable warning, the source of that data could presumably be edited in some way to avoid the ambiguity. A warning might be annoying, but it would be better than permitting numeric data to be interpreted in unexpected ways. Dave > > And BTW, I for one would hate having to enter hex constanrts in upper > case. Makes my VMMaker life much more difficult; all the disassemblers and > debuggers I use print hex in lower case. > > > > > > > Try these: > > > > #( > > 10r1e4 > > 11r1e4 > > 12r1e4 > > 13r1e4 > > 14r1e4 > > 15r1e4 > > 16r1e4 > > 17r1e4 > > 18r1e4 > > ) > > > > VW refuses to parse these (non-decimal integers cannot have exponents, and > if one adds a decimal point, non-radix 10 numbers cannot contain a decimal > point. > > > > Maybe we need to raise an error for certain combinations? Better than a > > surprise. > From lewis at mail.msen.com Thu May 5 12:33:38 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 5 13:02:43 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <20160504232905.GA47880@shell.msen.com> References: <20160504232905.GA47880@shell.msen.com> Message-ID: <20160505123338.GA79611@shell.msen.com> On Wed, May 04, 2016 at 07:29:05PM -0400, David T. Lewis wrote: > On Wed, May 04, 2016 at 02:02:43PM -0700, Eliot Miranda wrote: > > On Wed, May 4, 2016 at 5:37 AM, Bert Freudenberg > > wrote: > > > > > > > > > On 04.05.2016, at 13:32, Tobias Pape wrote: > > > > > > > > Hi all, > > > > > > > > without executing, what does the following expression result in? > > > > > > > > #( > > > > 25rFFs2 > > > > 26rFFs2 > > > > 27rFFs2 > > > > 28rFFs2 > > > > 29rFFs2 > > > > 30rFFs2 > > > > 31rFFs2 > > > > 32rFFs2 > > > > ) > > > > > > > > Best regards > > > > -Tobias > > > > > > > > > Interesting. > > > > > > 16rFFe4 used to be 16711680, now it???s 65508. > > > > > > > > > > > > VisualWorks suffers exactly the same issue: > > > > #(390 #s2 405 #s2 420 #s2 435 #s2 379264 419342 462150 507778) > > > > The only thing we can do is issue a warning, because otherwise we ban legal > > programs. But we also need to disambiguate. Should s or e in the > > penultimate positions force interpretation as scaled decimal or exponent, > > and hence force someone using a base >= 15 to use upper case? Seems the > > only practical choice to me. So we need tests and to modify printing. At > > least we still print in upper case. > > Given that most of us are not using base 32 arithmetic on a regular basis, > issuing a warning seems like a reasonable thing to do. In practice, the > problem would only arise when parsing numbers. Given a suitable warning, > the source of that data could presumably be edited in some way to avoid > the ambiguity. > > A warning might be annoying, but it would be better than permitting numeric > data to be interpreted in unexpected ways. > After taking a closer look at how the parsing needs to work, I see that fixing this (by issuing a warning) may be easier said than done. Maybe that's why no one has fixed it yet :-( Dave From Yoshiki.Ohshima at acm.org Thu May 5 15:49:06 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 16:21:48 2016 Subject: [squeak-dev] International text input on X11 Message-ID: Hello, As some people aware, we have a problem with Japanese text input into Squeak on X11, especially with NuScratch. I've been punting to work on this but now Manabu Sugiura volunteered and I decided to just do what it takes to help him. I wrote some code to support Japanese text input works on X11 when OLPC XO time, but things diverged since then. My understanding is that porting the code from that branch into the later branch(es), most notably the VM that NuScratch uses; But I am pretty sure there are more differences I am not aware of. Please let us know if there are some foreseeable issues. And please consider incorporating patches Manabu (and I) will produce when it is ready. Thanks! -- -- Yoshiki From eliot.miranda at gmail.com Thu May 5 16:51:58 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 18:05:41 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: Message-ID: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> Hi Yoshiki, > On May 5, 2016, at 8:49 AM, Yoshiki Ohshima wrote: > > Hello, > > As some people aware, we have a problem with Japanese text input into > Squeak on X11, especially with NuScratch. > > I've been punting to work on this but now Manabu Sugiura volunteered > and I decided to just do what it takes to help him. > > I wrote some code to support Japanese text input works on X11 when > OLPC XO time, but things diverged since then. My understanding is > that porting the code from that branch into the later branch(es), most > notably the VM that NuScratch uses; But I am pretty sure there are > more differences I am not aware of. Are you targeting the interpreter trunk or the cig JIT branch? > Please let us know if there are > some foreseeable issues. And please consider incorporating patches > Manabu (and I) will produce when it is ready. We are about to move the Cig branch from svn on squeakvm.org to git on github. But I'm very happy to integrate patches into the svn tree before we've finished the move. Let me know if I can help in any way. Thanks for this! > Thanks! > > -- > -- Yoshiki _,,,^..^,,,_ (phone) From Yoshiki.Ohshima at acm.org Thu May 5 17:36:16 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 18:41:18 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> Message-ID: On Thu, May 5, 2016 at 9:51 AM, Eliot Miranda wrote: > Hi Yoshiki, > >> On May 5, 2016, at 8:49 AM, Yoshiki Ohshima wrote: >> >> Hello, >> >> As some people aware, we have a problem with Japanese text input into >> Squeak on X11, especially with NuScratch. >> >> I've been punting to work on this but now Manabu Sugiura volunteered >> and I decided to just do what it takes to help him. >> >> I wrote some code to support Japanese text input works on X11 when >> OLPC XO time, but things diverged since then. My understanding is >> that porting the code from that branch into the later branch(es), most >> notably the VM that NuScratch uses; But I am pretty sure there are >> more differences I am not aware of. > > Are you targeting the interpreter trunk or the cig JIT branch? It actually is not clear yet which branches are the right one for current Scratch on raspi and also future proof. Perhaps doing for multiple branches is necessary? (What are the relationship of those?) >> Please let us know if there are >> some foreseeable issues. And please consider incorporating patches >> Manabu (and I) will produce when it is ready. > > We are about to move the Cig branch from svn on squeakvm.org to git on github. But I'm very happy to integrate patches into the svn tree before we've finished the move. Let me know if I can help in any way. Thanks for this! Thank you! -- -- Yoshiki From tim at rowledge.org Thu May 5 18:11:49 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 5 19:00:30 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> Message-ID: <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> > On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: > > It actually is not clear yet which branches are the right one for > current Scratch on raspi and also future proof. Perhaps doing for > multiple branches is necessary? (What are the relationship of those?) Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: FR: Flip Record From eliot.miranda at gmail.com Thu May 5 19:31:12 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 20:27:34 2016 Subject: [squeak-dev] Mac OS Cocoa MIDI Plugin Message-ID: Hi All, recently the Cog VM on Mac OS X moved to Cocoa, the Objective-C API for the platform, leaving behind the old Carbon C API. There is some backward compatibility support but it is gradually being deprecated by Apple. One victim is the MIDIPlugin which was written against a ComponentManager API that, while Apple docs say is only deprecated, has actually disappeared. Consequently the MIDIPlugin support (see http://www.squeakvm.org/svn/squeak/branches/Cog/platforms/iOS/plugins/MIDIPlugin) needs completely rewriting to use Cocoa APIs. I've recently changed the build so that the MIDIPlgin is built externally, which will make it easier to work on; one doesn't need to build the entire VM, only the plugin. I'm looking for volunteers who a) love music/know MIDI b) are happy programming at the Objective-C level using command-line builds and perhaps Xcode, but more immediately lldb for debugging. If interested, reply to vm-dev and we can continue discussions there; there are folks that can help with Mac OS support, but no one I know of that has time to write this rather important plugin for multi-media. It would be a great shame to lose MIDI on Mac. ______,,,^..^,,,______ AdvThanksance, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160505/87699ff4/attachment.htm From lewis at mail.msen.com Thu May 5 19:55:26 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 5 20:27:38 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> Message-ID: <14246.136.1.1.113.1462478126.squirrel@webmail.msen.com> > >> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima >> wrote: >> >> It actually is not clear yet which branches are the right one for >> current Scratch on raspi and also future proof. Perhaps doing for >> multiple branches is necessary? (What are the relationship of those?) > > Oh, it???s absolutely clear for the Pi; Cog/Spur. The ancient original MIT > image and an elderly interpreter are kept around for emergency use but > will not be updated. > We might need to harvest some older patches out of trunk and get them applied in our oscog branch. Whatever it is that needs to be done, we'll all be happy to help :-) Dave From Yoshiki.Ohshima at acm.org Thu May 5 20:02:58 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 20:27:40 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> Message-ID: On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: > >> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >> >> It actually is not clear yet which branches are the right one for >> current Scratch on raspi and also future proof. Perhaps doing for >> multiple branches is necessary? (What are the relationship of those?) > > Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. Okay! By any chance, can you tell me how you test things? for Raspberry Pi? -- -- Yoshiki From tim at rowledge.org Thu May 5 20:43:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 5 21:25:49 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> Message-ID: <3D07D927-BA4C-4672-A941-299693B34431@rowledge.org> > On 05-05-2016, at 1:02 PM, Yoshiki Ohshima wrote: > > On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >> >>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>> >>> It actually is not clear yet which branches are the right one for >>> current Scratch on raspi and also future proof. Perhaps doing for >>> multiple branches is necessary? (What are the relationship of those?) >> >> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. > > Okay! > > By any chance, can you tell me how you test things? for Raspberry Pi? For Japanese input? I don?t, because I can?t and wouldn?t have the faintest idea if it were correct anyway. I leave it to Kazuhiro Abee to let me know when he notices something wrong. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim A clear conscience is usually the sign of a bad memory. From eliot.miranda at gmail.com Thu May 5 21:06:04 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 21:33:43 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> Message-ID: <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> Hi Yoshiki, > On May 5, 2016, at 1:02 PM, Yoshiki Ohshima wrote: > >> On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >> >>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>> >>> It actually is not clear yet which branches are the right one for >>> current Scratch on raspi and also future proof. Perhaps doing for >>> multiple branches is necessary? (What are the relationship of those?) >> >> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. > > Okay! > > By any chance, can you tell me how you test things? for Raspberry Pi? A Pi is cheap enough that one can simply buy one. The new 64-bit one runs 32-bit binaries and is significantly faster than a pi2. As far as testing, one can either connect a display via hdmi and a mouse & keyboard via usb, or use VNC. There's a guide to setup of raspbian and of the VNC server on raspberrypi.org. HTH > -- > -- Yoshiki _,,,^..^,,,_ (phone) From Yoshiki.Ohshima at acm.org Thu May 5 21:10:58 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 21:33:44 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <3D07D927-BA4C-4672-A941-299693B34431@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <3D07D927-BA4C-4672-A941-299693B34431@rowledge.org> Message-ID: On Thu, May 5, 2016 at 1:43 PM, tim Rowledge wrote: > >> On 05-05-2016, at 1:02 PM, Yoshiki Ohshima wrote: >> >> On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >>> >>>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>>> >>>> It actually is not clear yet which branches are the right one for >>>> current Scratch on raspi and also future proof. Perhaps doing for >>>> multiple branches is necessary? (What are the relationship of those?) >>> >>> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. >> >> Okay! >> >> By any chance, can you tell me how you test things? for Raspberry Pi? > > For Japanese input? I don?t, because I can?t and wouldn?t have the faintest idea if it were correct anyway. I leave it to Kazuhiro Abee to let me know when he notices something wrong. Ah, no. I meant to ask how you test your things. Is there a dev image of some sort you are using (presumably .changes is there), and compiling VM and transferring it to a Pi, etc. (I have done my own little share of compiling and testing things on Pi, which in the end involved compling C with some asm code on Pi on an SSH terminal and run it. But I am just curious how you've been doing it.) -- -- Yoshiki From Yoshiki.Ohshima at acm.org Thu May 5 21:34:07 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 22:18:13 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> Message-ID: On Thu, May 5, 2016 at 2:06 PM, Eliot Miranda wrote: > Hi Yoshiki, > >> On May 5, 2016, at 1:02 PM, Yoshiki Ohshima wrote: >> >>> On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >>> >>>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>>> >>>> It actually is not clear yet which branches are the right one for >>>> current Scratch on raspi and also future proof. Perhaps doing for >>>> multiple branches is necessary? (What are the relationship of those?) >>> >>> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. >> >> Okay! >> >> By any chance, can you tell me how you test things? for Raspberry Pi? > > A Pi is cheap enough that one can simply buy one. The new 64-bit one runs 32-bit binaries and is significantly faster than a pi2. As far as testing, one can either connect a display via hdmi and a mouse & keyboard via usb, or use VNC. There's a guide to setup of raspbian and of the VNC server on raspberrypi.org. Sorry for posing a vague question... I do have a couple of Pis (Pi and Pi2, but not Pi3), and have done some graphics stuff in C over SSH. So I invoke my program from a shell running emacs on an SSH session and things appear on a display connected to a Pi. But I have not tried VNC there. I haven't done any real Squeak stuff on Pi and for Pi; if running Squeak on Pi and interacting with it over VNC is reasonably fast, I'd go with that path. But this one involves some C programs and if people does some cross compiling more on a host computer, that is also an interesting option. -- -- Yoshiki From eliot.miranda at gmail.com Thu May 5 21:55:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 22:27:26 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: <20160428215555.27308.qmail@box4.squeak.org> References: <20160428215555.27308.qmail@box4.squeak.org> Message-ID: <78AEEE10-C84B-4A2E-AC57-01DF7101F87E@gmail.com> Hi All, what's happened to the Daily Commit Log? No messages that I can see since April 28th :-( > >> On Thu, Apr 28, 2016 at 2:55 PM, wrote: >> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160505/e985da3c/attachment.htm From eliot.miranda at gmail.com Thu May 5 21:58:47 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 22:27:28 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <3D07D927-BA4C-4672-A941-299693B34431@rowledge.org> Message-ID: <31CEF4B6-9A2A-4847-9C1A-8027D4B2C42F@gmail.com> Hi Yoshiki, _,,,^..^,,,_ (phone) > On May 5, 2016, at 2:10 PM, Yoshiki Ohshima wrote: > >> On Thu, May 5, 2016 at 1:43 PM, tim Rowledge wrote: >> >>> On 05-05-2016, at 1:02 PM, Yoshiki Ohshima wrote: >>> >>> On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >>>> >>>>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>>>> >>>>> It actually is not clear yet which branches are the right one for >>>>> current Scratch on raspi and also future proof. Perhaps doing for >>>>> multiple branches is necessary? (What are the relationship of those?) >>>> >>>> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. >>> >>> Okay! >>> >>> By any chance, can you tell me how you test things? for Raspberry Pi? >> >> For Japanese input? I don?t, because I can?t and wouldn?t have the faintest idea if it were correct anyway. I leave it to Kazuhiro Abee to let me know when he notices something wrong. > > Ah, no. I meant to ask how you test your things. Is there a dev > image of some sort you are using (presumably .changes is there), and > compiling VM and transferring it to a Pi, etc. > > (I have done my own little share of compiling and testing things on > Pi, which in the end involved compling C with some asm code on Pi on > an SSH terminal and run it. But I am just curious how you've been > doing it.) You'll find an updated squeak 5.0 trunk image on squeak.org/downloads, up-to-date VMs at http://www.mirandabanda.org/files/Cog/VM/ and instructions on building your own VM at http://www.mirandabanda.org/cogblog/compiling-the-vm/ > > > -- > -- Yoshiki > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160505/6c5ddb51/attachment.htm From eliot.miranda at gmail.com Thu May 5 22:00:49 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu May 5 22:57:48 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> Message-ID: <3AE6586C-8495-49B6-8481-6139CFDC4D8A@gmail.com> Hi Yoshiki, > On May 5, 2016, at 2:34 PM, Yoshiki Ohshima wrote: > >> On Thu, May 5, 2016 at 2:06 PM, Eliot Miranda wrote: >> Hi Yoshiki, >> >>>> On May 5, 2016, at 1:02 PM, Yoshiki Ohshima wrote: >>>> >>>>> On Thu, May 5, 2016 at 11:11 AM, tim Rowledge wrote: >>>>> >>>>> On 05-05-2016, at 10:36 AM, Yoshiki Ohshima wrote: >>>>> >>>>> It actually is not clear yet which branches are the right one for >>>>> current Scratch on raspi and also future proof. Perhaps doing for >>>>> multiple branches is necessary? (What are the relationship of those?) >>>> >>>> Oh, it?s absolutely clear for the Pi; Cog/Spur. The ancient original MIT image and an elderly interpreter are kept around for emergency use but will not be updated. >>> >>> Okay! >>> >>> By any chance, can you tell me how you test things? for Raspberry Pi? >> >> A Pi is cheap enough that one can simply buy one. The new 64-bit one runs 32-bit binaries and is significantly faster than a pi2. As far as testing, one can either connect a display via hdmi and a mouse & keyboard via usb, or use VNC. There's a guide to setup of raspbian and of the VNC server on raspberrypi.org. > > Sorry for posing a vague question... I do have a couple of Pis (Pi > and Pi2, but not Pi3), and have done some graphics stuff in C over > SSH. So I invoke my program from a shell running emacs on an SSH > session and things appear on a display connected to a Pi. But I have > not tried VNC there. I haven't done any real Squeak stuff on Pi and > for Pi; if running Squeak on Pi and interacting with it over VNC is > reasonably fast, I'd go with that path. But this one involves some C > programs and if people does some cross compiling more on a host > computer, that is also an interesting option. VNC feels pretty fast. IIRC there was some issue about running X11 apps directly. I'm not sure I could find a package. Anyway, Tim and u have been using VNC and it feels fine. > > > -- > -- Yoshiki > From tim at rowledge.org Thu May 5 22:33:22 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 5 23:42:36 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> Message-ID: <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> > On 05-05-2016, at 2:34 PM, Yoshiki Ohshima wrote: > > Sorry for posing a vague question... I do have a couple of Pis (Pi > and Pi2, but not Pi3), and have done some graphics stuff in C over > SSH. So I invoke my program from a shell running emacs on an SSH > session and things appear on a display connected to a Pi. But I have > not tried VNC there. I haven't done any real Squeak stuff on Pi and > for Pi; if running Squeak on Pi and interacting with it over VNC is > reasonably fast, I'd go with that path. But this one involves some C > programs and if people does some cross compiling more on a host > computer, that is also an interesting option. Ah, I see. When the first Pi came out and I started on improving Scratch, things were sufficiently slow in Scratch that I did much of my work on my iMac and just test-ran the system on the Pi. Compiling the VM etc has always been on the Pi, since a) it?s fast enough to be no problem even on a Pi B b) I?m not about to start messing around setting up a cross-compiling system. Gcc is enough of a nuisance as it is without that extra layer of madness. The first improvements to Scratch were to make its image run on a more recent VM, which didn?t take a lot and on the circa 2012 interpreter it was ok to do some Squeak work on the Pi. Morphic was still a bit painful in a development image. That combination sufficed to get Scratch running around 4-8X faster as measured by an assortment of example projects; it wasn?t difficult to find and fix a rather large collection of poor code. After that I moved all the source to a modern image (4.4? 4.5?) and rewrote almost everything to use layout properly, events, etc etc. That meant we could jump to a stack vm as well - and then the Pi 2 arrived. A Pi 2 running Squeak 4.5 on a stack vm is a decent development machine and by that stage I was doing all my work on the Pi. Then Eliot & I got the Cog vm working as well, and Squeak 5/Cog/spur on a Pi 2 is pretty damn fast. I got my first Pi 3 last august, just as we got Cog going, which is why the PICs had to be rewritten - it turned out the the first version had a curious bug that didn?t cause a fatal error on a ?real? ARM v7 but does on an ARM v8 running v7 emulation. A production Pi 3 with cog/spur/5 benchmarks at around 100 dorado, 10% or so of my i7 3GHz iMac (using the shootout bmarks) and 280m bc/sec & 12m sends/s. Running my latest Scratch version you can run power hungry projects like PacMan around twice as fast as the original Scratch on my 2011 era macbook, which I suspect is around twice as fast as one fro m?07 when Scratch was initially released. So, don?t waste time on cross-compiling or treating a Pi as some sort of arduino/toy; it?s a real computer. I see that kind of assumption everywhere; people asking what IDE to use to make programs for a Pi and how to download it and make it run. Argh! It?s a quad-core 1.2GHz unix supercomputer! I recommend installing sudo apt-get install netatalk libnss-mdns xrdp i2c-tools then for dev work sudo apt-get install libX11-dev uuid-dev libcairo2-dev libpango1.0-dev autoconf libasound2-dev libssl-dev then save some space sudo apt-get remove wolfram-engine set up nfs On Pi- `sudo aptitude install nfs-common portmap` (in jessie, no need to install) On the current version of Raspbian, rpcbind (part of the portmap package) does not start by default. . To enable it manually, so we can mount our directory immediately: sudo service rpcbind start sudo update-rc.d rpcbind enable mkdir /home/pi/DizietFS <- obviously change to suit sudo mount -t nfs 192.168.1.65:/Users/tim /home/pi/DizietFS <- obviously, your ip & path Now, to make it permanent, you need to edit /etc/fstab to make the directory mount at boot. I added a line to the end of /etc/fstab: `192.168.1.65:/Users/tim /home/pi/DizietFS nfs rsize=8192,wsize=8192,timeo=14,intr,noauto,x-systemd.automount 0 0` On iMac- in a terminal `sudo nano /etc/exports` (which won?t normally exist until you save it) and add the line `/Users/tim -mapall=tim -alldirs -network 192.168.1.0 -mask 255.255.255.0` `sudo nfsd restart` should restart the daemon. After all that, reboot the Pi and DizietFS ought to be visible and accessible. On windows - no idea. Don?t do windows. Make the LXDE GUI less irritating edit .xsessionrc (creating if required) add xsetroot -cursor_name left_ptr& chmod a+x .xsessionrc reboot to get proper cursor in X instead of a big ugly X Use an rdp client on your mac/windows machine - I use the msoft one on my iMac and it?s fine. If you expect to use xrdp most of the time, use raspi-config to set the Pi to boot to command line rather than desktop. Pi 3 has wifi & bt built in. Sound output is via a typically lousy ( and lossy) headphone socket or the hdmi, or add a nice HAT. Sound input is only via usb sound dongle or HAT. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Never do card tricks for the group you play poker with. From tim at rowledge.org Thu May 5 22:42:57 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 5 23:42:37 2016 Subject: Why everyone should develop on a Pi at least sometimes (was: Re: [squeak-dev] International text input on X11) In-Reply-To: <3AE6586C-8495-49B6-8481-6139CFDC4D8A@gmail.com> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <3AE6586C-8495-49B6-8481-6139CFDC4D8A@gmail.com> Message-ID: <8FCDFE9B-FF60-4A20-B2F2-3538DCE18792@rowledge.org> A classic problem we have is that people devise UI stuff and other widgetry on a fast computer. Because, of course they do, why not? The issue is then using that stuff on more mundane machines - or even embedded devices. Whereupon we discover to our horror that not having a 750THz intel 256bit gigacore with 42Pb of RAM means that our nice clever button takes 45 years to handle a mouse click. So to combat this, it really would be smart for everyone doing development to at least occasionally run on a less frenetic machine such as a Pi. A Pi (especially a 3) is fast enough to be pretty nice for running current Squeak, even with Shout operational. But it is slow enough to show up places where your algorithm really isn?t doing a good job, or where your UI doohickey is really spending a terrible number of cycles to animate that cute little effect. For extra effect, run on a non-cog vm too. That might be too much masochism for everyday development but it will *really* show you were performance is being wasted. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: CPM: Change Programmer's Mind From Yoshiki.Ohshima at acm.org Thu May 5 23:01:29 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 5 23:54:31 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> Message-ID: Great. Thanks. I'll give it a try... I might not do NFS but seems good. So the VM would be the one I would produce by checking out the svn repository on squeakvm.org, go to the branches/Cog directory and compile? Is there a dev image you use? On Thu, May 5, 2016 at 3:33 PM, tim Rowledge wrote: > >> On 05-05-2016, at 2:34 PM, Yoshiki Ohshima wrote: >> >> Sorry for posing a vague question... I do have a couple of Pis (Pi >> and Pi2, but not Pi3), and have done some graphics stuff in C over >> SSH. So I invoke my program from a shell running emacs on an SSH >> session and things appear on a display connected to a Pi. But I have >> not tried VNC there. I haven't done any real Squeak stuff on Pi and >> for Pi; if running Squeak on Pi and interacting with it over VNC is >> reasonably fast, I'd go with that path. But this one involves some C >> programs and if people does some cross compiling more on a host >> computer, that is also an interesting option. > > Ah, I see. > > When the first Pi came out and I started on improving Scratch, things were sufficiently slow in Scratch that I did much of my work on my iMac and just test-ran the system on the Pi. Compiling the VM etc has always been on the Pi, since > a) it?s fast enough to be no problem even on a Pi B > b) I?m not about to start messing around setting up a cross-compiling system. Gcc is enough of a nuisance as it is without that extra layer of madness. > > The first improvements to Scratch were to make its image run on a more recent VM, which didn?t take a lot and on the circa 2012 interpreter it was ok to do some Squeak work on the Pi. Morphic was still a bit painful in a development image. That combination sufficed to get Scratch running around 4-8X faster as measured by an assortment of example projects; it wasn?t difficult to find and fix a rather large collection of poor code. > > After that I moved all the source to a modern image (4.4? 4.5?) and rewrote almost everything to use layout properly, events, etc etc. That meant we could jump to a stack vm as well - and then the Pi 2 arrived. A Pi 2 running Squeak 4.5 on a stack vm is a decent development machine and by that stage I was doing all my work on the Pi. Then Eliot & I got the Cog vm working as well, and Squeak 5/Cog/spur on a Pi 2 is pretty damn fast. > > I got my first Pi 3 last august, just as we got Cog going, which is why the PICs had to be rewritten - it turned out the the first version had a curious bug that didn?t cause a fatal error on a ?real? ARM v7 but does on an ARM v8 running v7 emulation. A production Pi 3 with cog/spur/5 benchmarks at around 100 dorado, 10% or so of my i7 3GHz iMac (using the shootout bmarks) and 280m bc/sec & 12m sends/s. Running my latest Scratch version you can run power hungry projects like PacMan around twice as fast as the original Scratch on my 2011 era macbook, which I suspect is around twice as fast as one fro m?07 when Scratch was initially released. > > So, don?t waste time on cross-compiling or treating a Pi as some sort of arduino/toy; it?s a real computer. I see that kind of assumption everywhere; people asking what IDE to use to make programs for a Pi and how to download it and make it run. Argh! It?s a quad-core 1.2GHz unix supercomputer! > > I recommend installing > sudo apt-get install netatalk libnss-mdns xrdp i2c-tools > then for dev work > sudo apt-get install libX11-dev uuid-dev libcairo2-dev libpango1.0-dev autoconf libasound2-dev libssl-dev > then save some space > sudo apt-get remove wolfram-engine > > set up nfs > On Pi- > `sudo aptitude install nfs-common portmap` (in jessie, no need to install) > On the current version of Raspbian, rpcbind (part of the portmap package) does not start by default. . To enable it manually, so we can mount our directory immediately: > sudo service rpcbind start > sudo update-rc.d rpcbind enable > mkdir /home/pi/DizietFS <- obviously change to suit > sudo mount -t nfs 192.168.1.65:/Users/tim /home/pi/DizietFS <- obviously, your ip & path > > > Now, to make it permanent, you need to edit /etc/fstab to make the directory mount at boot. I added a line to the end of /etc/fstab: > > `192.168.1.65:/Users/tim /home/pi/DizietFS nfs rsize=8192,wsize=8192,timeo=14,intr,noauto,x-systemd.automount 0 0` > > On iMac- > in a terminal > `sudo nano /etc/exports` (which won?t normally exist until you save it) > and add the line > `/Users/tim -mapall=tim -alldirs -network 192.168.1.0 -mask 255.255.255.0` > `sudo nfsd restart` > should restart the daemon. > > After all that, reboot the Pi and DizietFS ought to be visible and accessible. > > On windows - > no idea. Don?t do windows. > > Make the LXDE GUI less irritating > > edit .xsessionrc (creating if required) > add > xsetroot -cursor_name left_ptr& > > chmod a+x .xsessionrc > reboot to get proper cursor in X instead of a big ugly X > > Use an rdp client on your mac/windows machine - I use the msoft one on my iMac and it?s fine. If you expect to use xrdp most of the time, use raspi-config to set the Pi to boot to command line rather than desktop. > > Pi 3 has wifi & bt built in. Sound output is via a typically lousy ( and lossy) headphone socket or the hdmi, or add a nice HAT. Sound input is only via usb sound dongle or HAT. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Never do card tricks for the group you play poker with. > > > -- -- Yoshiki From lewis at mail.msen.com Thu May 5 23:34:41 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 6 00:10:42 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> Message-ID: <20160505233441.GA7203@shell.msen.com> On Thu, May 05, 2016 at 04:01:29PM -0700, Yoshiki Ohshima wrote: > Great. Thanks. > > I'll give it a try... I might not do NFS but seems good. So the VM > would be the one I would produce by checking out the svn repository on > squeakvm.org, go to the branches/Cog directory and compile? Is there > a dev image you use? > To check out the entire repository for Cog/Spur: $ svn co http://squeakvm.org/svn/squeak/branches/Cog There is an ./images directory that contains development images, and a README to explain. There are also ./build.* directories for building various configurations. Dave From johnmci at smalltalkconsulting.com Fri May 6 00:36:33 2016 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Fri May 6 00:54:09 2016 Subject: [squeak-dev] Running headless on a Mac In-Reply-To: References: <89BB0552-672C-401B-9864-4A96CCD8EDEA@gmail.com> <41B24826-B16A-4B4A-9CE6-5C5F7C23BE1C@pieber.com> <6C01AC18-C02A-458C-9AA6-2FB7BDA9139D@pieber.com> Message-ID: This is being fixed this week. On Tue, May 3, 2016 at 1:49 PM, Tobias Pape wrote: > > On 27.04.2016, at 21:32, Fabio Niephaus wrote: > > > What window is still showing up? > > Are you sure your absolute path to your .st is correct? > > Note that the Cocoa-Based Mac VMs do not yet interpret -headless correctly. > > Best regards > -Tobias > > -- =========================================================================== John M. McIntosh. Corporate Smalltalk Consulting Ltd https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160505/a5d9645c/attachment-0001.htm From tim at rowledge.org Fri May 6 00:49:19 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri May 6 01:34:33 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> Message-ID: > On 05-05-2016, at 4:01 PM, Yoshiki Ohshima wrote: > > Great. Thanks. > > I'll give it a try... I might not do NFS but seems good. So the VM > would be the one I would produce by checking out the svn repository on > squeakvm.org, go to the branches/Cog directory and compile? Is there > a dev image you use? Just grab the Squeak 5.0 all-in-one bundle. It has a cog/spur vm ready to go on the Pi. And the image, of course. Just update it as usual. If you want the latest vm, then yes, you can build it in the normal manner as described in the Eliot?s readme. I?d guess that one could get from opening a fresh Pi box to running Sq5 on a new built vm in less than an hour, including all the apt-get and compile time etc. I did most of it a few weeks ago without problem just before a demo. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim To define recursion, we must first define recursion. From lewis at mail.msen.com Fri May 6 02:53:50 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 6 03:38:55 2016 Subject: [squeak-dev] Trunk is failing the Andreas tests for low space interrupt handling Message-ID: <20160506025350.GA42393@shell.msen.com> The classic tests for things that should be interruptable are: "[true] whileTrue" "[[true] whileTrue] forkAt: Processor userSchedulingPriority + 1" "Smalltalk createStackOverflow" "[Smalltalk createStackOverflow] forkAt: Processor userSchedulingPriority + 1" Trunk is failing the last two tests that check for stack overflow handling (wait for out of memory -> VM crash). Note: To reproduce, run with fixed stack size, otherwise you will just get virtual memory page thrashing. On Linux: $ squeak -memory 40M myTrunkImage.image I think that this is an image side problem (not Spur/Cog VM) because I get similar failures with a trunk level image running on interpreter VM (image from http://build.squeak.org/job/FollowTrunkOnOldV3Image/). It is not necessarily a new problem, because I have not tried this in quite a while, and the computer that I am using today is much faster than the one I would have used on previous tests. So it is possible that this is existing behavior that gets worse as the hardware has gotten faster, or maybe there is something that has regressed in the image. Either way, low space interrupts are not working as expected in trunk. Results might vary on different operating systems and computer hardware. Are others seeing the same thing? How does it look on a Raspberry Pi for example? Dave From lecteur at zogotounga.net Fri May 6 08:21:36 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Fri May 6 09:23:44 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <20160505123338.GA79611@shell.msen.com> References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> Message-ID: <572C5410.2060500@zogotounga.net> > After taking a closer look at how the parsing needs to work, I see that > fixing this (by issuing a warning) may be easier said than done. Maybe that's > why no one has fixed it yet :-( But is it really a problem ? It arises only because one abuses syntatic sugar and can be fixed by writing { 25rFFs2. 26rFFs2. 27rFFs2. 28rFFs2. 29rFFs2. 30rFFs2. 31rFFs2. 32rFFs2 } instead. Stef From Marcel.Taeumel at hpi.de Fri May 6 09:28:08 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 6 11:10:00 2016 Subject: [squeak-dev] Re: The Inbox: Morphic-nice.1134.mcz In-Reply-To: References: Message-ID: <1462526888469-4893769.post@n4.nabble.com> Hi Nicolas, what about putting that into MorphicExtras instead of Morphic? Do you have plans to update UIManager and Object >> #inform:? Then we could leave it in Morphic, add a preference and choose between the traditional modal dialog and the growl-style one. :-) I would like that. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Morphic-nice-1134-mcz-tp4893606p4893769.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Fri May 6 12:24:15 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri May 6 13:15:45 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <572C5410.2060500@zogotounga.net> References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> <572C5410.2060500@zogotounga.net> Message-ID: <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> On 06.05.2016, at 10:21, St?phane Rollandin wrote: > >> After taking a closer look at how the parsing needs to work, I see that >> fixing this (by issuing a warning) may be easier said than done. Maybe that's >> why no one has fixed it yet :-( > > But is it really a problem ? It arises only because one abuses syntatic sugar and can be fixed by writing > > { > 25rFFs2. > 26rFFs2. > 27rFFs2. > 28rFFs2. > 29rFFs2. > 30rFFs2. > 31rFFs2. > 32rFFs2 > } > > instead. > > Stef Writing it that way does not make any difference. Some of these are parsed as ScaledDecimal, some as Integer. That is surprising, unexpected, and potentially leads to bugs. Dan designed the number parsing to be context-independent. Uppercase letters were digits in bases > 10, certain lowercase letters have special meaning (r, e, d, q, s). This leads to a rather simple syntax. When we made the change to allow lower-case letters for digits, number parsing became ambiguous. That?s why the result of the expression above is surprising, because the parsing rules are no longer simple and universal, but depend on the radix. The only compelling reason for introducing the change was to allow lower-case hex numbers (as Eliot pointed out). How about we special-case radix 16, to be the only one that allows lowercase digits for plain integers? In general we would only allow uppercase digits, and the lowercase special modifiers. But if the radix was 16, the rest of the number would be parsed as an case-independent hex integer without modifiers. Another idea would be to allow 0x as a modifier (similar to 16r) to indicate a hex integer with both upper and lower-case digits. I actually like the latter, the only problem would be that code using lower-case hex numbers would have to be rewritten. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/793fdb11/smime.bin From bert at freudenbergs.de Fri May 6 13:10:35 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Fri May 6 13:40:08 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: <78AEEE10-C84B-4A2E-AC57-01DF7101F87E@gmail.com> References: <20160428215555.27308.qmail@box4.squeak.org> <78AEEE10-C84B-4A2E-AC57-01DF7101F87E@gmail.com> Message-ID: <896E46FB-A7D2-42E1-B69C-A474BC3B721D@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/4fe1efde/smime.bin From cunningham.cb at gmail.com Fri May 6 14:51:03 2016 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri May 6 15:08:55 2016 Subject: [squeak-dev] Daily Commit Log In-Reply-To: <896E46FB-A7D2-42E1-B69C-A474BC3B721D@freudenbergs.de> References: <20160428215555.27308.qmail@box4.squeak.org> <78AEEE10-C84B-4A2E-AC57-01DF7101F87E@gmail.com> <896E46FB-A7D2-42E1-B69C-A474BC3B721D@freudenbergs.de> Message-ID: or maybe the spammed repeating of a change over and over finally made the message too long so that the email was rejected? http://lists.squeakfoundation.org/pipermail/packages/2016-April/025293.html ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-April/025294.html ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-April/025295.html ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-April/025296.html ============================================= On Fri, May 6, 2016 at 6:10 AM, Bert Freudenberg wrote: > cc?ing box admins. > > Maybe the cron job was canceled? Email config changed? > > - Bert - > > > On 05.05.2016, at 23:55, Eliot Miranda wrote: > > Hi All, > > what's happened to the Daily Commit Log? No messages that I can see > since April 28th :-( > > > On Thu, Apr 28, 2016 at 2:55 PM, wrote: > > Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 >> hours: > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/7ff67102/attachment.htm From eliot.miranda at gmail.com Fri May 6 15:01:02 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri May 6 15:41:59 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> <572C5410.2060500@zogotounga.net> <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> Message-ID: Hi Bert, Hi All, > On May 6, 2016, at 5:24 AM, Bert Freudenberg wrote: > >> On 06.05.2016, at 10:21, St?phane Rollandin wrote: >> >>> After taking a closer look at how the parsing needs to work, I see that >>> fixing this (by issuing a warning) may be easier said than done. Maybe that's >>> why no one has fixed it yet :-( >> >> But is it really a problem ? It arises only because one abuses syntatic sugar and can be fixed by writing >> >> { >> 25rFFs2. >> 26rFFs2. >> 27rFFs2. >> 28rFFs2. >> 29rFFs2. >> 30rFFs2. >> 31rFFs2. >> 32rFFs2 >> } >> >> instead. >> >> Stef > > Writing it that way does not make any difference. Some of these are parsed as ScaledDecimal, some as Integer. That is surprising, unexpected, and potentially leads to bugs. > > Dan designed the number parsing to be context-independent. Uppercase letters were digits in bases > 10, certain lowercase letters have special meaning (r, e, d, q, s). This leads to a rather simple syntax. > > When we made the change to allow lower-case letters for digits, number parsing became ambiguous. That?s why the result of the expression above is surprising, because the parsing rules are no longer simple and universal, but depend on the radix. > > The only compelling reason for introducing the change was to allow lower-case hex numbers (as Eliot pointed out). > > How about we special-case radix 16, to be the only one that allows lowercase digits for plain integers? In general we would only allow uppercase digits, and the lowercase special modifiers. But if the radix was 16, the rest of the number would be parsed as an case-independent hex integer without modifiers. +1 > > Another idea would be to allow 0x as a modifier (similar to 16r) to indicate a hex integer with both upper and lower-case digits. Please no. It's convenient but a horrible wart on the side in an elegant syntax. > > I actually like the latter, the only problem would be that code using lower-case hex numbers would have to be rewritten. How about trying to add code to the compiler's error handling to auto convert 0x form C hex into Smalltalk syntax? 0x0 gets parsed as 0 x 0, which is a syntax error, so once spotted, adding a bulk edit that does look for 0x[0-9A-Fa-f]+ shouldn't be too hard. > > - Bert - > > > > From asqueaker at gmail.com Fri May 6 15:50:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri May 6 17:06:18 2016 Subject: [squeak-dev] Re: The Inbox: Morphic-nice.1134.mcz In-Reply-To: <1462526888469-4893769.post@n4.nabble.com> References: <1462526888469-4893769.post@n4.nabble.com> Message-ID: I think something like this should not be determined by a preference, but by individual use-case. Like, updating a Squeak5.0 image to latest trunk, it will take a while, so when I come back and I see a desktop I won't remember what I was doing or whether it finished... By contrast, some other things which would otherwise be pesky alerts are not there at all because, as modal, too pesky. So, a global preference would force user to choose a system that was too pesky or potentially not informative when we wanted it to be... On Fri, May 6, 2016 at 4:28 AM, marcel.taeumel wrote: > Hi Nicolas, > > what about putting that into MorphicExtras instead of Morphic? Do you have > plans to update UIManager and Object >> #inform:? Then we could leave it in > Morphic, add a preference and choose between the traditional modal dialog > and the growl-style one. :-) I would like that. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Inbox-Morphic-nice-1134-mcz-tp4893606p4893769.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From nicolas.cellier.aka.nice at gmail.com Fri May 6 17:35:21 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri May 6 18:37:01 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> <572C5410.2060500@zogotounga.net> <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> Message-ID: 2016-05-06 17:01 GMT+02:00 Eliot Miranda : > Hi Bert, Hi All, > > > On May 6, 2016, at 5:24 AM, Bert Freudenberg > wrote: > > > >> On 06.05.2016, at 10:21, St?phane Rollandin > wrote: > >> > >>> After taking a closer look at how the parsing needs to work, I see that > >>> fixing this (by issuing a warning) may be easier said than done. Maybe > that's > >>> why no one has fixed it yet :-( > >> > >> But is it really a problem ? It arises only because one abuses syntatic > sugar and can be fixed by writing > >> > >> { > >> 25rFFs2. > >> 26rFFs2. > >> 27rFFs2. > >> 28rFFs2. > >> 29rFFs2. > >> 30rFFs2. > >> 31rFFs2. > >> 32rFFs2 > >> } > >> > >> instead. > >> > >> Stef > > > > Writing it that way does not make any difference. Some of these are > parsed as ScaledDecimal, some as Integer. That is surprising, unexpected, > and potentially leads to bugs. > > > > Dan designed the number parsing to be context-independent. Uppercase > letters were digits in bases > 10, certain lowercase letters have special > meaning (r, e, d, q, s). This leads to a rather simple syntax. > > > > When we made the change to allow lower-case letters for digits, number > parsing became ambiguous. That?s why the result of the expression above is > surprising, because the parsing rules are no longer simple and universal, > but depend on the radix. > > > > The only compelling reason for introducing the change was to allow > lower-case hex numbers (as Eliot pointed out). > > > > How about we special-case radix 16, to be the only one that allows > lowercase digits for plain integers? In general we would only allow > uppercase digits, and the lowercase special modifiers. But if the radix was > 16, the rest of the number would be parsed as an case-independent hex > integer without modifiers. > > +1 > > > > > Another idea would be to allow 0x as a modifier (similar to 16r) to > indicate a hex integer with both upper and lower-case digits. > > Please no. It's convenient but a horrible wart on the side in an elegant > syntax. > > > > I actually like the latter, the only problem would be that code using > lower-case hex numbers would have to be rewritten. > > How about trying to add code to the compiler's error handling to auto > convert 0x form C hex into Smalltalk syntax? 0x0 gets parsed as 0 x 0, > which is a syntax error, so once spotted, adding a bulk edit that does look > for 0x[0-9A-Fa-f]+ shouldn't be too hard. > > I'm not at all convinced by a warning, nor fond of 0x which is terribly limited (we could allow 0x in specialized parser, maybe ExtendedParser but may be not in Smalltalk parser). What would be much nicer is the possibility to clearly separate the exponent or scale specification. For example something like 32rFF_s2 or 16r1.0_e1. Underscore would sound a good candidate, unless we keep it for thousand separator 1_400_000? # is another candidate, 16r1.0#e1 But it means changing Smalltalk syntax... > > > > - Bert - > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/75b67e5e/attachment.htm From juanlists at jvuletich.org Fri May 6 22:20:33 2016 From: juanlists at jvuletich.org (juanlists@jvuletich.org) Date: Fri May 6 22:42:51 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> <572C5410.2060500@zogotounga.net> <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> Message-ID: <20160506172033.Horde.qB_hQCcN0gDqh4FCdJub28g@www.jvuletich.org> To disambiguate, we need two different syntaxes: One for uppercase digits with $e, $s etc suffixes, and one for caseless digits and no suffixes. One of them might be the one we have now. We might keep it for case insensitive integers: 16rFFe2 = 16rFFE2 = 16rffe2 = 65506. The other one could be use $q instead of $r: '16qFFe2' could mean '16rFF00'or 65280. Or alternatively, acknowledge that the prefix '16r' is arbitrarily in decimal. This is something I never liked. A better way to say radix sixteen could be to express it in a single digit. So a decimal number could be 'Ar256', and 'GrFFE2' would be 65506 while 'GrFFe2' could be 65280. I prefer the latter, although it might need more explaining. Regards, Juan Vuletich Quoting Nicolas Cellier : > 2016-05-06 17:01 GMT+02:00 Eliot Miranda : > >> Hi Bert, Hi All, >> >> > On May 6, 2016, at 5:24 AM, Bert Freudenberg >> wrote: >> > >> >> On 06.05.2016, at 10:21, St?phane Rollandin >> wrote: >> >> >> >>> After taking a closer look at how the parsing needs to work, I see that >> >>> fixing this (by issuing a warning) may be easier said than done. Maybe >> that's >> >>> why no one has fixed it yet :-( >> >> >> >> But is it really a problem ? It arises only because one abuses syntatic >> sugar and can be fixed by writing >> >> >> >> { >> >> 25rFFs2. >> >> 26rFFs2. >> >> 27rFFs2. >> >> 28rFFs2. >> >> 29rFFs2. >> >> 30rFFs2. >> >> 31rFFs2. >> >> 32rFFs2 >> >> } >> >> >> >> instead. >> >> >> >> Stef >> > >> > Writing it that way does not make any difference. Some of these are >> parsed as ScaledDecimal, some as Integer. That is surprising, unexpected, >> and potentially leads to bugs. >> > >> > Dan designed the number parsing to be context-independent. Uppercase >> letters were digits in bases > 10, certain lowercase letters have special >> meaning (r, e, d, q, s). This leads to a rather simple syntax. >> > >> > When we made the change to allow lower-case letters for digits, number >> parsing became ambiguous. That?s why the result of the expression above is >> surprising, because the parsing rules are no longer simple and universal, >> but depend on the radix. >> > >> > The only compelling reason for introducing the change was to allow >> lower-case hex numbers (as Eliot pointed out). >> > >> > How about we special-case radix 16, to be the only one that allows >> lowercase digits for plain integers? In general we would only allow >> uppercase digits, and the lowercase special modifiers. But if the radix was >> 16, the rest of the number would be parsed as an case-independent hex >> integer without modifiers. >> >> +1 >> >> > >> > Another idea would be to allow 0x as a modifier (similar to 16r) to >> indicate a hex integer with both upper and lower-case digits. >> >> Please no. It's convenient but a horrible wart on the side in an elegant >> syntax. >> > >> > I actually like the latter, the only problem would be that code using >> lower-case hex numbers would have to be rewritten. >> >> How about trying to add code to the compiler's error handling to auto >> convert 0x form C hex into Smalltalk syntax? 0x0 gets parsed as 0 x 0, >> which is a syntax error, so once spotted, adding a bulk edit that does look >> for 0x[0-9A-Fa-f]+ shouldn't be too hard. >> >> > I'm not at all convinced by a warning, nor fond of 0x which is terribly > limited > (we could allow 0x in specialized parser, maybe ExtendedParser but may be > not in Smalltalk parser). > > What would be much nicer is the possibility to clearly separate the > exponent or scale specification. > For example something like 32rFF_s2 or 16r1.0_e1. > Underscore would sound a good candidate, unless we keep it for thousand > separator 1_400_000? > # is another candidate, 16r1.0#e1 > > But it means changing Smalltalk syntax... > > > >> > >> > - Bert - >> > >> > >> > >> > >> >> From Yoshiki.Ohshima at acm.org Fri May 6 22:53:30 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat May 7 00:03:16 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160505233441.GA7203@shell.msen.com> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: On Thu, May 5, 2016 at 4:34 PM, David T. Lewis wrote: > There is an ./images directory that contains development images, and > a README to explain. There are also ./build.* directories for building > various configurations. Thanks! First, I can run Squeak-5.0-All-in-One.zip. on Pi. I managed to compile squeak.cog.spur VM on ARM (raspberry pi). However, when I tried to open the image in the All in One, it creates a window but inside of it is just blank and does not do any interaction. I downloaded http://www.mirandabanda.org/files/Cog/VM/VM.r3692/cogspurlinuxhtARM-16.18.3692.tgz and tried it, but it has the same problem. I looked into the chain of shell scripts and tried a command line like: env LD_LIBRARY_PATH=/home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692:/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib /home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692/squeak ~/Squeak5.0-15113.image but no avail. Does anybody know why the all in one vm and image works but the VM I downloaded from Eliot's site (nor the one I compiled)? -- -- Yoshiki From eliot.miranda at gmail.com Fri May 6 23:21:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 7 00:03:16 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: Hi Yoshiki, it's probably just the absence of a sources file. I don't include it in the VMs on my site to save space. Simply link the sources into the lib dir in the directory tree, or include the sources in the directory containing the image. On Fri, May 6, 2016 at 3:53 PM, Yoshiki Ohshima wrote: > On Thu, May 5, 2016 at 4:34 PM, David T. Lewis > wrote: > > There is an ./images directory that contains development images, and > > a README to explain. There are also ./build.* directories for building > > various configurations. > > Thanks! > > First, I can run Squeak-5.0-All-in-One.zip. on Pi. > > I managed to compile squeak.cog.spur VM on ARM (raspberry pi). > However, when I tried to open the image in the All in One, it creates > a window but inside of it is just blank and does not do any > interaction. I downloaded > > http://www.mirandabanda.org/files/Cog/VM/VM.r3692/cogspurlinuxhtARM-16.18.3692.tgz > and tried it, but it has the same problem. > > I looked into the chain of shell scripts and tried a command line like: > > env > LD_LIBRARY_PATH=/home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692:/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib > /home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692/squeak > ~/Squeak5.0-15113.image > > but no avail. > > Does anybody know why the all in one vm and image works but the VM I > downloaded from Eliot's site (nor the one I compiled)? > > -- > -- Yoshiki > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/f427c058/attachment.htm From eliot.miranda at gmail.com Fri May 6 23:27:13 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 7 00:03:17 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: On Fri, May 6, 2016 at 4:21 PM, Eliot Miranda wrote: > Hi Yoshiki, > > it's probably just the absence of a sources file. I don't include it > in the VMs on my site to save space. Simply link the sources into the lib > dir in the directory tree, or include the sources in the directory > containing the image. > Oops, it needs to go I'm the same directory as the VM, so e.g. add cogspurlinux/lib/squeak/4.5-3692/ ]SqueakV50.sources > On Fri, May 6, 2016 at 3:53 PM, Yoshiki Ohshima > wrote: > >> On Thu, May 5, 2016 at 4:34 PM, David T. Lewis >> wrote: >> > There is an ./images directory that contains development images, and >> > a README to explain. There are also ./build.* directories for building >> > various configurations. >> >> Thanks! >> >> First, I can run Squeak-5.0-All-in-One.zip. on Pi. >> >> I managed to compile squeak.cog.spur VM on ARM (raspberry pi). >> However, when I tried to open the image in the All in One, it creates >> a window but inside of it is just blank and does not do any >> interaction. I downloaded >> >> http://www.mirandabanda.org/files/Cog/VM/VM.r3692/cogspurlinuxhtARM-16.18.3692.tgz >> and tried it, but it has the same problem. >> >> I looked into the chain of shell scripts and tried a command line like: >> >> env >> LD_LIBRARY_PATH=/home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692:/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib >> /home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692/squeak >> ~/Squeak5.0-15113.image >> >> but no avail. >> >> Does anybody know why the all in one vm and image works but the VM I >> downloaded from Eliot's site (nor the one I compiled)? >> >> -- >> -- Yoshiki >> >> > > > -- > _,,,^..^,,,_ > best, Eliot > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160506/54015410/attachment.htm From tim at rowledge.org Sat May 7 00:58:02 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat May 7 01:26:05 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: > On 06-05-2016, at 4:27 PM, Eliot Miranda wrote: > > it's probably just the absence of a sources file. I don't include it in the VMs on my site to save space. Simply link the sources into the lib dir in the directory tree, or include the sources in the directory containing the image. > > Oops, it needs to go I'm the same directory as the VM, so e.g. add > cogspurlinux/lib/squeak/4.5-3692/ ]SqueakV50.sources > Not on any of my Pi?s it doesn?t; I normally run with the sources in the same directory as the image while developing - and of course , a deployed Scratch image doesn?t need them at all. I?m fairly sure the sources ought to be able to live in the local dir, the image dir, the vm dir and obviously somewhere there will be a place to specify any other location you like. Another possibility is Yoshiki has an old version of Raspbian; old kernel from early last year (?) wouldn?t let us futz wit the timer thread priority without pain. It?s been a while since that was fixed but if you have an old Raspbian? except that ought to prevent the all-in-one system running. But this is unix, which is carefully designed to drive one to the edge of madness, so maybe you just had the wrong kind of egg for your breakfast last time there was a blue moon. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Asking whether machines can think is like asking whether submarines can swim. From Yoshiki.Ohshima at acm.org Sat May 7 01:03:49 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat May 7 01:46:15 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: oh, ok. I'll give it a try. On Fri, May 6, 2016 at 4:27 PM, Eliot Miranda wrote: > > > On Fri, May 6, 2016 at 4:21 PM, Eliot Miranda > wrote: >> >> Hi Yoshiki, >> >> it's probably just the absence of a sources file. I don't include it >> in the VMs on my site to save space. Simply link the sources into the lib >> dir in the directory tree, or include the sources in the directory >> containing the image. > > > Oops, it needs to go I'm the same directory as the VM, so e.g. add > cogspurlinux/lib/squeak/4.5-3692/ ]SqueakV50.sources > >> >> On Fri, May 6, 2016 at 3:53 PM, Yoshiki Ohshima >> wrote: >>> >>> On Thu, May 5, 2016 at 4:34 PM, David T. Lewis >>> wrote: >>> > There is an ./images directory that contains development images, and >>> > a README to explain. There are also ./build.* directories for building >>> > various configurations. >>> >>> Thanks! >>> >>> First, I can run Squeak-5.0-All-in-One.zip. on Pi. >>> >>> I managed to compile squeak.cog.spur VM on ARM (raspberry pi). >>> However, when I tried to open the image in the All in One, it creates >>> a window but inside of it is just blank and does not do any >>> interaction. I downloaded >>> >>> http://www.mirandabanda.org/files/Cog/VM/VM.r3692/cogspurlinuxhtARM-16.18.3692.tgz >>> and tried it, but it has the same problem. >>> >>> I looked into the chain of shell scripts and tried a command line like: >>> >>> env >>> LD_LIBRARY_PATH=/home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692:/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib >>> /home/pi/tmp/cogspurlinuxhtARM/lib/squeak/5.0-3692/squeak >>> ~/Squeak5.0-15113.image >>> >>> but no avail. >>> >>> Does anybody know why the all in one vm and image works but the VM I >>> downloaded from Eliot's site (nor the one I compiled)? >>> >>> -- >>> -- Yoshiki >>> >> >> >> >> -- >> _,,,^..^,,,_ >> best, Eliot > > > > > -- > _,,,^..^,,,_ > best, Eliot > > > -- -- Yoshiki From Yoshiki.Ohshima at acm.org Sat May 7 01:23:09 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat May 7 01:46:16 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: On Fri, May 6, 2016 at 5:58 PM, tim Rowledge wrote: > > Another possibility is Yoshiki has an old version of Raspbian; old kernel from early last year (?) wouldn?t let us futz wit the timer thread priority without pain. It?s been a while since that was fixed but if you have an old Raspbian? except that ought to prevent the all-in-one system running. But this is unix, which is carefully designed to drive one to the edge of madness, so maybe you just had the wrong kind of egg for your breakfast last time there was a blue moon. That sounds plausible. I did "apt-get update" to get some packages loadable but did not go on to update the entire system. I'll try that. -- -- Yoshiki From Marcel.Taeumel at hpi.de Sat May 7 06:14:33 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 7 08:24:00 2016 Subject: [squeak-dev] Re: The Inbox: Morphic-nice.1134.mcz In-Reply-To: References: <1462526888469-4893769.post@n4.nabble.com> Message-ID: <1462601673246-4893833.post@n4.nabble.com> Hi Chris, you mean that the current Object >> #inform: is more like a modal information by intention and we need another Object >> #notify: (for example) to give a hint to the user in a non-modal way? Yeah, sounds good. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Morphic-nice-1134-mcz-tp4893606p4893833.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat May 7 07:49:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:17 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.332.mcz ==================== Summary ==================== Name: Graphics-mt.332 Author: mt Time: 7 May 2016, 9:48:30.374081 am UUID: 7fc10c6a-d146-584d-8e94-7153042d37d9 Ancestors: Graphics-nice.331 Cherry-pick and adapt eToys' way to set the screen size programmatically via HostWindowPlugin. =============== Diff against Graphics-nice.331 =============== Item was changed: Form subclass: #DisplayScreen instanceVariableNames: 'clippingBox extraRegions' + classVariableNames: 'DeferringUpdates DisplayChangeSignature DisplayIsFullScreen ScreenSave' - classVariableNames: 'DeferringUpdates DisplayChangeSignature ScreenSave' poolDictionaries: '' category: 'Graphics-Display Objects'! !DisplayScreen commentStamp: '' prior: 0! There is only one instance of me, Display. It is a global and is used to handle general user requests to deal with the whole display screen. Although I offer no protocol, my name provides a way to distinguish this special instance from all other Forms. This is useful, for example, in dealing with saving and restoring the system. To change the depth of your Display... Display newDepth: 16. Display newDepth: 8. Display newDepth: 1. Valid display depths are 1, 2, 4, 8, 16 and 32. It is suggested that you run with your monitors setting the same, for better speed and color fidelity. Note that this can add up to 4Mb for the Display form. Finally, note that newDepth: ends by executing a 'ControlManager restore' which currently terminates the active process, so nothing that follows in the doit will get executed. Depths 1, 2, 4 and 8 bits go through a color map to put color on the screen, but 16 and 32-bit color use the pixel values directly for RGB color (5 and 8 bits per, respectivlely). The color choice an be observed by executing Color fromUser in whatever depth you are using. ! Item was removed: - ----- Method: DisplayScreen class>>depth:width:height:fullscreen: (in category 'display box access') ----- - depth: depthInteger width: widthInteger height: heightInteger fullscreen: aBoolean - "Force Squeak's window (if there's one) into a new size and depth." - "DisplayScreen depth: 8 width: 1024 height: 768 fullscreen: false" - - - self primitiveFailed! Item was added: + ----- Method: DisplayScreen class>>displayIsFullScreen (in category 'screen modes') ----- + displayIsFullScreen + + ^ DisplayIsFullScreen ifNil: [DisplayIsFullScreen := false]! Item was added: + ----- Method: DisplayScreen class>>fullScreenOff (in category 'screen modes') ----- + fullScreenOff + + Display fullScreenMode: (DisplayIsFullScreen := false). + self checkForNewScreenSize. + ! Item was added: + ----- Method: DisplayScreen class>>fullScreenOn (in category 'screen modes') ----- + fullScreenOn + + Display fullScreenMode: (DisplayIsFullScreen := true). + self checkForNewScreenSize.! Item was added: + ----- Method: DisplayScreen class>>hostWindowExtent: (in category 'host window access') ----- + hostWindowExtent: aPoint + + ^ self + primitiveWindow: self hostWindowIndex + width: aPoint x + height: aPoint y! Item was added: + ----- Method: DisplayScreen class>>hostWindowIndex (in category 'host window access') ----- + hostWindowIndex + + ^ 1! Item was added: + ----- Method: DisplayScreen class>>hostWindowTitle: (in category 'host window access') ----- + hostWindowTitle: aString + + ^ self + primitiveWindow: self hostWindowIndex + title: aString squeakToUtf8! Item was added: + ----- Method: DisplayScreen class>>primitiveWindow:title: (in category 'host window access') ----- + primitiveWindow: id title: titleString + + + ^self primitiveFailed! Item was added: + ----- Method: DisplayScreen class>>primitiveWindow:width:height: (in category 'host window access') ----- + primitiveWindow: id width: width height: height + + + ^self primitiveFailed! Item was added: + ----- Method: DisplayScreen class>>setNewScreenSize: (in category 'display box access') ----- + setNewScreenSize: aPoint + "Ensure that the Display is set to the given extent. Due to the behavior of host-window plugin, this may need two attempts because the plugin tends to account for host window shadows and title bars." + + self hostWindowExtent: aPoint. + self checkForNewScreenSize. + + Display extent < aPoint ifTrue: [ + self hostWindowExtent: 2*aPoint - Display extent. + self checkForNewScreenSize].! Item was added: + ----- Method: DisplayScreen class>>toggleFullScreen (in category 'screen modes') ----- + toggleFullScreen + "Toggle between full screen and windowed mode." + + self displayIsFullScreen + ifTrue: [self fullScreenOff] + ifFalse: [self fullScreenOn].! From commits at source.squeak.org Sat May 7 07:51:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:20 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.26.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.26.mcz ==================== Summary ==================== Name: 51Deprecated-mt.26 Author: mt Time: 7 May 2016, 9:50:53.654081 am UUID: 2a3586f2-c54d-2547-82b4-3a00f1516f3a Ancestors: 51Deprecated-nice.25 DisplayScreen now has means to set screen size and fullScreen just like Bert did in eToys. =============== Diff against 51Deprecated-nice.25 =============== Item was added: + ----- Method: DisplayScreen class>>depth:width:height:fullscreen: (in category '*51Deprecated') ----- + depth: depthInteger width: widthInteger height: heightInteger fullscreen: aBoolean + "Force Squeak's window (if there's one) into a new size and depth." + "DisplayScreen depth: 8 width: 1024 height: 768 fullscreen: false" + + + self primitiveFailed! Item was added: + ----- Method: Project>>fullScreenOff (in category '*51Deprecated') ----- + fullScreenOff + + self deprecated. + ^ DisplayScreen fullScreenOff! Item was added: + ----- Method: Project>>fullScreenOn (in category '*51Deprecated') ----- + fullScreenOn + + self deprecated. + ^ DisplayScreen fullScreenOn! Item was added: + ----- Method: Project>>lastScreenModeSelected (in category '*51Deprecated') ----- + lastScreenModeSelected + + self deprecated. + ^ DisplayScreen displayIsFullScreen! From nicolas.cellier.aka.nice at gmail.com Sat May 7 07:51:45 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sat May 7 08:37:23 2016 Subject: [squeak-dev] Re: The Inbox: Morphic-nice.1134.mcz In-Reply-To: <1462601673246-4893833.post@n4.nabble.com> References: <1462526888469-4893769.post@n4.nabble.com> <1462601673246-4893833.post@n4.nabble.com> Message-ID: 2016-05-07 8:14 GMT+02:00 marcel.taeumel : > Hi Chris, > > you mean that the current Object >> #inform: is more like a modal > information by intention and we need another Object >> #notify: (for > example) to give a hint to the user in a non-modal way? Yeah, sounds good. > > Best, > Marcel > > > I like it. And yes, the idea was to eventually use this type of notification in our tools. So rather Morphic than MorphicExtras. Though the choice is rather binary... As I understand it, MorphicExtras can be unloaded without completely breaking the image... > > -- > View this message in context: > http://forum.world.st/The-Inbox-Morphic-nice-1134-mcz-tp4893606p4893833.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160507/ab82943c/attachment.htm From commits at source.squeak.org Sat May 7 07:54:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:25 2016 Subject: [squeak-dev] The Trunk: System-mt.823.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.823.mcz ==================== Summary ==================== Name: System-mt.823 Author: mt Time: 7 May 2016, 9:53:04.347081 am UUID: 76931a10-14a6-4b46-adbf-4105f82b7fc7 Ancestors: System-mt.822 Update fullscreen on/off calls to use DisplayScreen. =============== Diff against System-mt.822 =============== Item was changed: ----- Method: HTTPClient class>>shouldUsePluginAPI (in category 'testing') ----- shouldUsePluginAPI "HTTPClient shouldUsePluginAPI" self isRunningInBrowser ifFalse: [^false]. self browserSupportsAPI ifFalse: [^false]. "The Mac plugin calls do not work in full screen mode" ^((Smalltalk platformName = 'Mac OS') + and: [DisplayScreen displayIsFullScreen]) not! - and: [Project current lastScreenModeSelected]) not! Item was changed: Model subclass: #Project instanceVariableNames: 'world uiManager changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject guards projectParameters version urlList environment lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager' + classVariableNames: 'AllProjects CurrentProject GoalFreePercent GoalNotMoreThan' - classVariableNames: 'AllProjects CurrentProject GoalFreePercent GoalNotMoreThan LastScreenModeSelected' poolDictionaries: '' category: 'System-Support'! !Project commentStamp: 'cbr 7/27/2010 21:36' prior: 0! A Project stores the state of a complete Squeak desktop, including the windows, and the currently active changeSet. A project knows who its parent project is. When you change projects, whether by entering or exiting, the screen state of the project being exited is saved in that project. A project is retained by its view in the parent world. It is effectively named by the name of its changeSet, which can be changed either by renaming in a changeSorter, or by editing the label of its view from the parent project. As the site of major context switch, Projects are the locus of swapping between the old MVC and the new Morphic worlds. The distinction is based on whether the variable 'world' contains a WorldMorph or a ControlManager. Saving and Loading Projects may be stored on the disk in external format. (Project named: 'xxx') exportSegment, or choose 'store project on file...'. Projects may be loaded from a server and stored back. Storing on a server never overwrites; it always makes a new version. A project remembers the url of where it lives in urlList. The list is length one, for now. The url may point to a local disk instead of a server. All projects that the user looks at are cached in the Squeaklet folder. Sorted by server. The cache holds the most recent version only. When a project is loaded into Squeak, its objects are converted to the current version. There are three levels of conversion. First, each object is converted from raw bits to an object in its old format. Then it is sent some or all of these messages: comeFullyUpOnReload: smartRefStream Used to re-discover an object that already exists in this image, such as a resource, global variable, Character, or Symbol. (sent to objects in outPointers) convertToCurrentVersion: varDict refStream: smartRefStrm fill in fields that have been added to a class since the object was stored. Used to set the extra inst var to a default value. Or, return a new object of a different class. (sent to objects that changed instance variables) fixUponLoad: aProject refStream: smartRefStrm change the object due to conventions that have changed on the project level. (sent to all objects in the incoming project) Here is the calling sequence for storing out a Project: Project saveAs Project storeOnServer Project storeOnServerWithProgressInfo Project storeOnServerInnards Project exportSegmentFileName:directory: Project exportSegmentWithChangeSet:fileName:directory: ImageSegment writeForExportWithSources:inDirectory:changeSet: ! Item was removed: - ----- Method: Project>>fullScreenOff (in category 'menu messages') ----- - fullScreenOff - - Display fullScreenMode: (LastScreenModeSelected := false). - DisplayScreen checkForNewScreenSize. - self restoreDisplay. - ! Item was removed: - ----- Method: Project>>fullScreenOn (in category 'menu messages') ----- - fullScreenOn - - Display fullScreenMode: (LastScreenModeSelected := true). - DisplayScreen checkForNewScreenSize. - self restoreDisplay.! Item was removed: - ----- Method: Project>>lastScreenModeSelected (in category 'accessing') ----- - lastScreenModeSelected - - ^LastScreenModeSelected ifNil: [LastScreenModeSelected := false]! From commits at source.squeak.org Sat May 7 07:57:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:29 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1137.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1137.mcz ==================== Summary ==================== Name: Morphic-mt.1137 Author: mt Time: 7 May 2016, 9:55:09.078081 am UUID: 5afd4416-2bc4-ce4a-8873-cc3c6b092dea Ancestors: Morphic-nice.1136 Update fullscreen on/off calls to use DisplayScreen. =============== Diff against Morphic-nice.1136 =============== Item was changed: ----- Method: TheWorldMenu>>appearanceMenu (in category 'construction') ----- appearanceMenu "Build the appearance menu for the world." ^self fillIn: (self menu: 'appearance...') from: { {'preferences...' . { self . #openPreferencesBrowser} . 'Opens a "Preferences Browser" which allows you to alter many settings' } . {'choose theme...' . { Preferences . #offerThemesMenu} . 'Presents you with a menu of themes; each item''s balloon-help will tell you about the theme. If you choose a theme, many different preferences that come along with that theme are set at the same time; you can subsequently change any settings by using a Preferences Panel'} . nil . {'system fonts...' . { self . #standardFontDo} . 'Choose the standard fonts to use for code, lists, menus, window titles, etc.'}. {'text highlight color...' . { Preferences . #chooseTextHighlightColor} . 'Choose which color should be used for text highlighting in Morphic.'}. {'insertion point color...' . { Preferences . #chooseInsertionPointColor} . 'Choose which color to use for the text insertion point in Morphic.'}. {'keyboard focus color' . { Preferences . #chooseKeyboardFocusColor} . 'Choose which color to use for highlighting which pane has the keyboard focus'}. nil. {#menuColorString . { self . #toggleMenuColorPolicy} . 'Governs whether menu colors should be derived from the desktop color.'}. {#roundedCornersString . { self . #toggleRoundedCorners} . 'Governs whether morphic windows and menus should have rounded corners.'}. nil. + {'full screen on' . { DisplayScreen . #fullScreenOn} . 'puts you in full-screen mode, if not already there.'}. + {'full screen off' . { DisplayScreen . #fullScreenOff} . 'if in full-screen mode, takes you out of it.'}. - {'full screen on' . { Project current . #fullScreenOn} . 'puts you in full-screen mode, if not already there.'}. - {'full screen off' . { Project current . #fullScreenOff} . 'if in full-screen mode, takes you out of it.'}. nil. {'set display depth...' . {self. #setDisplayDepth} . 'choose how many bits per pixel.'}. {'set desktop color...' . {self. #changeBackgroundColor} . 'choose a uniform color to use as desktop background.'}. {'set gradient color...' . {self. #setGradientColor} . 'choose second color to use as gradient for desktop background.'}. {'use texture background' . { #myWorld . #setStandardTexture} . 'apply a graph-paper-like texture background to the desktop.'}. nil. {'clear turtle trails from desktop' . { #myWorld . #clearTurtleTrails} . 'remove any pigment laid down on the desktop by objects moving with their pens down.'}. {'pen-trail arrowhead size...' . { Preferences. #setArrowheads} . 'choose the shape to be used in arrowheads on pen trails.'}. }! From commits at source.squeak.org Sat May 7 07:57:48 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:31 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.173.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.173.mcz ==================== Summary ==================== Name: MorphicExtras-mt.173 Author: mt Time: 7 May 2016, 9:56:36.895081 am UUID: d2624879-5ddf-cf49-ae01-1803a570628b Ancestors: MorphicExtras-tfel.172 Update fullscreen on/off calls to use DisplayScreen. =============== Diff against MorphicExtras-tfel.172 =============== Item was changed: ----- Method: ProjectNavigationMorph>>checkForRebuild (in category 'as yet unclassified') ----- checkForRebuild | lastScreenMode flapsSuppressed | + lastScreenMode := DisplayScreen displayIsFullScreen. - lastScreenMode := Project current lastScreenModeSelected. flapsSuppressed := Project current flapsSuppressed. ((self valueOfProperty: #currentNavigatorVersion) = self currentNavigatorVersion and: [lastScreenMode = self inFullScreenMode and: [flapsSuppressed = self inFlapsSuppressedMode and: [(self valueOfProperty: #includeSoundControlInNavigator) = Preferences includeSoundControlInNavigator]]]) ifFalse: [ self setProperty: #includeSoundControlInNavigator toValue: Preferences includeSoundControlInNavigator. self setProperty: #flapsSuppressedMode toValue: flapsSuppressed. self setProperty: #showingFullScreenMode toValue: lastScreenMode. self setProperty: #currentNavigatorVersion toValue: self currentNavigatorVersion. self removeAllMorphs. self addButtons. ]. ! Item was changed: ----- Method: ProjectNavigationMorph>>fullScreenOff (in category 'the actions') ----- fullScreenOff self setProperty: #showingFullScreenMode toValue: false. + DisplayScreen fullScreenOff. - Project current fullScreenOff. self removeProperty: #currentNavigatorVersion. mouseInside := false. ! Item was changed: ----- Method: ProjectNavigationMorph>>fullScreenOn (in category 'the actions') ----- fullScreenOn self setProperty: #showingFullScreenMode toValue: true. + DisplayScreen fullScreenOn. - Project current fullScreenOn. self removeProperty: #currentNavigatorVersion. mouseInside := false. ! From commits at source.squeak.org Sat May 7 07:59:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 08:37:33 2016 Subject: [squeak-dev] The Trunk: ST80-mt.209.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.209.mcz ==================== Summary ==================== Name: ST80-mt.209 Author: mt Time: 7 May 2016, 9:59:23.658081 am UUID: b0c4428b-d86f-5144-acb2-af1de3d9715b Ancestors: ST80-mt.208 Update fullscreen on/off calls to use DisplayScreen. =============== Diff against ST80-mt.208 =============== Item was changed: ----- Method: ScreenController>>fullScreenOff (in category 'menu messages') ----- fullScreenOff + DisplayScreen fullScreenOff.! - Project current fullScreenOff! Item was changed: ----- Method: ScreenController>>fullScreenOn (in category 'menu messages') ----- fullScreenOn + DisplayScreen fullScreenOn.! - Project current fullScreenOn! From commits at source.squeak.org Sat May 7 08:26:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat May 7 09:28:55 2016 Subject: [squeak-dev] The Trunk: Collections-mt.691.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.691.mcz ==================== Summary ==================== Name: Collections-mt.691 Author: mt Time: 7 May 2016, 10:24:05.360568 am UUID: 81841163-90dd-154a-9adb-f8471b7d09af Ancestors: Collections-ul.690 Adds comment to TextReadWriter to explain the idea behind it. =============== Diff against Collections-ul.690 =============== Item was changed: Object subclass: #TextReadWriter instanceVariableNames: 'stream' classVariableNames: '' poolDictionaries: '' category: 'Collections-Text'! + + !TextReadWriter commentStamp: 'mt 5/7/2016 10:22' prior: 0! + Subclasses of me provide means to create instances of Text from various document formats such as HTML (Hyper Text Markup Language), DOCX (Microsoft Word Document), ODF (Open Document Format), and RTF (Rich Text Format). They should also be able to write such formats.! From lecteur at zogotounga.net Sat May 7 08:50:42 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Sat May 7 09:28:56 2016 Subject: [squeak-dev] Code Jeopardy In-Reply-To: <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> References: <20160504232905.GA47880@shell.msen.com> <20160505123338.GA79611@shell.msen.com> <572C5410.2060500@zogotounga.net> <305E9E22-24A2-4A42-82BF-28D810595E34@freudenbergs.de> Message-ID: <572DAC62.60402@zogotounga.net> >> { >> 25rFFs2. >> 26rFFs2. >> 27rFFs2. >> 28rFFs2. >> 29rFFs2. >> 30rFFs2. >> 31rFFs2. >> 32rFFs2 >> } >> >> instead. >> >> Stef > > Writing it that way does not make any difference. That is a problem, then :) Stef From Marcel.Taeumel at hpi.de Sat May 7 08:15:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 7 09:28:59 2016 Subject: [squeak-dev] Re: The Inbox: Morphic-nice.1134.mcz In-Reply-To: References: <1462526888469-4893769.post@n4.nabble.com> <1462601673246-4893833.post@n4.nabble.com> Message-ID: <1462608952080-4893844.post@n4.nabble.com> Hi Nicolas, yes, MorphicExtras should not be required to keep Morphic and all development tools functional. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Morphic-nice-1134-mcz-tp4893606p4893844.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From reliablerobots at gmail.com Sat May 7 12:53:56 2016 From: reliablerobots at gmail.com (ReliableRobots.com) Date: Sat May 7 13:49:20 2016 Subject: [squeak-dev] Cross post to enlighten the eite Message-ID: On 5/6/16, Kirk Fraser wrote: > Byte magazine which published the balloon concept for Smalltalk rising > above the ivory tower of a lighthouse guiding the way in a sea of computer > languages is out of business. I think it is time for the Squeak balloon to > be grounded to connect with the reality of why computer languages exist - > to make things easy for application developers. So I propose all Squeak > developers stop "improving" Squeak for one year and spend the time writing > useful applications in Squeak. That could lead to a basket of new ideas > for next year. Maybe make this a regularly scheduled event - a half year > for applications and a half year for Squeak? > > The reason motivating this suggestion is on the advice of a Squeak-Dev > member, I downloaded the latest all in one and to my chagrin, I found an > improvement that made Squeak as worthless as a balloon full of machine gun > holes. The Workspace window gets halos with a right mouse click on a > standard 2 button laptop mouse. So I'll return to an older Squeak for now. > Hi, In which version of Squeak does this happen? 4.6 or 5.0? --Hannes Not just any 5.0 but 15113, the most recent download available on 5/5/16. In college I read teachers discovered innovation for the sake of innovation was worthless. It is time Squeak-Dev learned that and only make useful improvements. I can't remember the Halo ever once being useful. Take a class in SolidWorks and do that in Squeak instead of Morphic an other not useful improvements. A fast VM is useful, but sometimes working applications are more useful than a library of stubs. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160507/5636805f/attachment.htm From hannes.hirzel at gmail.com Sat May 7 14:24:19 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Sat May 7 15:14:54 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: Message-ID: - Choose menu 'Tools' -> 'Preferences', - search for 'swap' - Change settings of preference 'swapMouseButton' (exchanges mouse button 2 and 3). On 5/7/16, ReliableRobots.com wrote: > On 5/6/16, Kirk Fraser wrote: >> Byte magazine which published the balloon concept for Smalltalk rising >> above the ivory tower of a lighthouse guiding the way in a sea of >> computer >> languages is out of business. I think it is time for the Squeak balloon >> to >> be grounded to connect with the reality of why computer languages exist - >> to make things easy for application developers. So I propose all Squeak >> developers stop "improving" Squeak for one year and spend the time >> writing >> useful applications in Squeak. That could lead to a basket of new ideas >> for next year. Maybe make this a regularly scheduled event - a half year >> for applications and a half year for Squeak? >> >> The reason motivating this suggestion is on the advice of a Squeak-Dev >> member, I downloaded the latest all in one and to my chagrin, I found an >> improvement that made Squeak as worthless as a balloon full of machine >> gun >> holes. The Workspace window gets halos with a right mouse click on a >> standard 2 button laptop mouse. So I'll return to an older Squeak for > now. >> > > Hi, > > In which version of Squeak does this happen? 4.6 or 5.0? > > --Hannes > > Not just any 5.0 but 15113, the most recent download available on 5/5/16. > > In college I read teachers discovered innovation for the sake of innovation > was worthless. It is time Squeak-Dev learned that and only make useful > improvements. I can't remember the Halo ever once being useful. Take a > class in SolidWorks and do that in Squeak instead of Morphic an other not > useful improvements. A fast VM is useful, but sometimes working > applications are more useful than a library of stubs. > From eliot.miranda at gmail.com Sat May 7 15:12:56 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 7 15:38:09 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: Message-ID: <5F0EC474-5C31-48FC-9CD8-C547E2DCC1D5@gmail.com> Cross post from where? Also, I guess that the subject meant to say "elite". Is that pejorative? If so, what are your negative feelings about "the squeak elite"? This community should be inclusive and welcoming; we're too small to prosper otherwise. So if people are feeling excluded, or marginalized, we should discuss why and see if we can do something about it. _,,,^..^,,,_ (phone) > On May 7, 2016, at 5:53 AM, ReliableRobots.com wrote: > > On 5/6/16, Kirk Fraser wrote: > > Byte magazine which published the balloon concept for Smalltalk rising > > above the ivory tower of a lighthouse guiding the way in a sea of computer > > languages is out of business. I think it is time for the Squeak balloon to > > be grounded to connect with the reality of why computer languages exist - > > to make things easy for application developers. So I propose all Squeak > > developers stop "improving" Squeak for one year and spend the time writing > > useful applications in Squeak. That could lead to a basket of new ideas > > for next year. Maybe make this a regularly scheduled event - a half year > > for applications and a half year for Squeak? > > > > The reason motivating this suggestion is on the advice of a Squeak-Dev > > member, I downloaded the latest all in one and to my chagrin, I found an > > improvement that made Squeak as worthless as a balloon full of machine gun > > holes. The Workspace window gets halos with a right mouse click on a > > standard 2 button laptop mouse. So I'll return to an older Squeak for now. > > > > Hi, > > In which version of Squeak does this happen? 4.6 or 5.0? > > --Hannes > > Not just any 5.0 but 15113, the most recent download available on 5/5/16. > > In college I read teachers discovered innovation for the sake of innovation was worthless. It is time Squeak-Dev learned that and only make useful improvements. I can't remember the Halo ever once being useful. Take a class in SolidWorks and do that in Squeak instead of Morphic an other not useful improvements. A fast VM is useful, but sometimes working applications are more useful than a library of stubs. > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160507/def92bc5/attachment.htm From asqueaker at gmail.com Sat May 7 15:50:18 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat May 7 16:26:36 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.26.mcz In-Reply-To: <572da494.866c8c0a.71c1a.ffff8c26SMTPIN_ADDED_MISSING@mx.google.com> References: <572da494.866c8c0a.71c1a.ffff8c26SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I havne't tried it yet, but GREAT! When doing releases, it was nearly impossible to size it to exactly 800x600... On Sat, May 7, 2016 at 2:50 AM, wrote: > Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: > http://source.squeak.org/trunk/51Deprecated-mt.26.mcz > > ==================== Summary ==================== > > Name: 51Deprecated-mt.26 > Author: mt > Time: 7 May 2016, 9:50:53.654081 am > UUID: 2a3586f2-c54d-2547-82b4-3a00f1516f3a > Ancestors: 51Deprecated-nice.25 > > DisplayScreen now has means to set screen size and fullScreen just like Bert did in eToys. > > =============== Diff against 51Deprecated-nice.25 =============== > > Item was added: > + ----- Method: DisplayScreen class>>depth:width:height:fullscreen: (in category '*51Deprecated') ----- > + depth: depthInteger width: widthInteger height: heightInteger fullscreen: aBoolean > + "Force Squeak's window (if there's one) into a new size and depth." > + "DisplayScreen depth: 8 width: 1024 height: 768 fullscreen: false" > + > + > + self primitiveFailed! > > Item was added: > + ----- Method: Project>>fullScreenOff (in category '*51Deprecated') ----- > + fullScreenOff > + > + self deprecated. > + ^ DisplayScreen fullScreenOff! > > Item was added: > + ----- Method: Project>>fullScreenOn (in category '*51Deprecated') ----- > + fullScreenOn > + > + self deprecated. > + ^ DisplayScreen fullScreenOn! > > Item was added: > + ----- Method: Project>>lastScreenModeSelected (in category '*51Deprecated') ----- > + lastScreenModeSelected > + > + self deprecated. > + ^ DisplayScreen displayIsFullScreen! > > From asqueaker at gmail.com Sat May 7 15:56:48 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat May 7 16:41:30 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: <5F0EC474-5C31-48FC-9CD8-C547E2DCC1D5@gmail.com> References: <5F0EC474-5C31-48FC-9CD8-C547E2DCC1D5@gmail.com> Message-ID: To all new users, I recommend taking an hour to go through all the preferences in the Preferences browser, read the descriptions and experiment with them and and determine which setting is to your liking. That hour will pay you back 100-fold per year because work will be enhanced by a system that responds better to how you work. On Sat, May 7, 2016 at 10:12 AM, Eliot Miranda wrote: > Cross post from where? > > Also, I guess that the subject meant to say "elite". Is that pejorative? > If so, what are your negative feelings about "the squeak elite"? This > community should be inclusive and welcoming; we're too small to prosper > otherwise. So if people are feeling excluded, or marginalized, we should > discuss why and see if we can do something about it. > > _,,,^..^,,,_ (phone) > > On May 7, 2016, at 5:53 AM, ReliableRobots.com > wrote: > > On 5/6/16, Kirk Fraser wrote: >> Byte magazine which published the balloon concept for Smalltalk rising >> above the ivory tower of a lighthouse guiding the way in a sea of computer >> languages is out of business. I think it is time for the Squeak balloon to >> be grounded to connect with the reality of why computer languages exist - >> to make things easy for application developers. So I propose all Squeak >> developers stop "improving" Squeak for one year and spend the time writing >> useful applications in Squeak. That could lead to a basket of new ideas >> for next year. Maybe make this a regularly scheduled event - a half year >> for applications and a half year for Squeak? >> >> The reason motivating this suggestion is on the advice of a Squeak-Dev >> member, I downloaded the latest all in one and to my chagrin, I found an >> improvement that made Squeak as worthless as a balloon full of machine gun >> holes. The Workspace window gets halos with a right mouse click on a >> standard 2 button laptop mouse. So I'll return to an older Squeak for >> now. >> > > Hi, > > In which version of Squeak does this happen? 4.6 or 5.0? > > --Hannes > > Not just any 5.0 but 15113, the most recent download available on 5/5/16. > > In college I read teachers discovered innovation for the sake of innovation > was worthless. It is time Squeak-Dev learned that and only make useful > improvements. I can't remember the Halo ever once being useful. Take a > class in SolidWorks and do that in Squeak instead of Morphic an other not > useful improvements. A fast VM is useful, but sometimes working applications > are more useful than a library of stubs. > > > > > From lewis at mail.msen.com Sat May 7 16:50:15 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 7 18:16:42 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: <5F0EC474-5C31-48FC-9CD8-C547E2DCC1D5@gmail.com> References: <5F0EC474-5C31-48FC-9CD8-C547E2DCC1D5@gmail.com> Message-ID: <20160507165015.GA59318@shell.msen.com> On Sat, May 07, 2016 at 08:12:56AM -0700, Eliot Miranda wrote: > Cross post from where? > > Also, I guess that the subject meant to say "elite". Is that pejorative? If so, what are your negative feelings about "the squeak elite"? This community should be inclusive and welcoming; we're too small to prosper otherwise. So if people are feeling excluded, or marginalized, we should discuss why and see if we can do something about it. > It is from beginners@lists.squeakfoundation.org. This is a low volume list that is well worth joining. Dave From tim at rowledge.org Sat May 7 21:07:32 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat May 7 21:30:35 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: Message-ID: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> Leaving aside the pontificatory apoctypha for a moment - > Not just any 5.0 but 15113, the most recent download available on 5/5/16. Funny. My download of the same package shows that it starts up with the expected behaviour of the right button raising a menu and the middle button opening the halo. This is as expected and as has been the case for a long time. It happens to be the *wrong* way in my opinion since quite obviously a middle button (and all mice should have three, clearly) ought to open the contextual menus. However, the preference is trivial to find and many unfortunates are inured to wrong way through a sad life of deprivation and privation whilst using inferior systems. Halos have been part of Morphic since before the dinosaurs roamed the earth. They are not an 'improvement that made Squeak as worthless as a balloon full of machine gun holes. ' that has suddenly been foisted upon you by those of us in the elite {strokes white Persian cat while glaring at you from the Volcano Lair(?) on my secret estate on a Pacific Island} as a way of ruining your morning. For the right button to open a halo would require a) the preference being set that way in the release; which it is clearly not. b) the preference having been set by the user, either deliberately or accidentally c) the preference having been set previously, saved and then loaded by the user d) the device?s mouse driver being swapped e) use of a vm flag such as ?-swapbtn? on unix and probably others on Mac/Windows. > > In college I read teachers discovered innovation for the sake of innovation was worthless. It is time Squeak-Dev learned that and only make useful improvements. I?m glad I didn?t go to a college like that. > I can't remember the Halo ever once being useful. Take a class in SolidWorks and do that in Squeak instead of Morphic an other not useful improvements. The only useful part of the Solidworks UI I ever found was the exit. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Canis meus id comedit = My dog ate it. From reliablerobots at gmail.com Sun May 8 04:42:13 2016 From: reliablerobots at gmail.com (ReliableRobots.com) Date: Sun May 8 05:24:10 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> References: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> Message-ID: Tim, I think you may have something set up on your test system like you have on RPi's for Scratch, so a different VM than the one in the latest download is running your image perhaps? I don't know the path that normally gets followed but when I copy squeak.exe from the LinuxAndWindows directory to the Resources directory and run it there, the halo result of a right click on an open window happens. Sorry to pop your balloon. Kirk On Sat, May 7, 2016 at 2:07 PM, tim Rowledge wrote: > Leaving aside the pontificatory apoctypha for a moment - > > > > Not just any 5.0 but 15113, the most recent download available on 5/5/16. > > Funny. My download of the same package shows that it starts up with the > expected behaviour of the right button raising a menu and the middle button > opening the halo. This is as expected and as has been the case for a long > time. It happens to be the *wrong* way in my opinion since quite obviously > a middle button (and all mice should have three, clearly) ought to open > the contextual menus. However, the preference is trivial to find and many > unfortunates are inured to wrong way through a sad life of deprivation and > privation whilst using inferior systems. > > Halos have been part of Morphic since before the dinosaurs roamed the > earth. They are not an 'improvement that made Squeak as worthless as a > balloon full of machine gun holes. ' that has suddenly been foisted upon > you by those of us in the elite {strokes white Persian cat while glaring at > you from the Volcano Lair(?) on my secret estate on a Pacific Island} as a > way of ruining your morning. > > For the right button to open a halo would require > a) the preference being set that way in the release; which it is clearly > not. > b) the preference having been set by the user, either deliberately or > accidentally > c) the preference having been set previously, saved and then loaded by the > user > d) the device?s mouse driver being swapped > e) use of a vm flag such as ?-swapbtn? on unix and probably others on > Mac/Windows. > > > > > In college I read teachers discovered innovation for the sake of > innovation was worthless. It is time Squeak-Dev learned that and only make > useful improvements. > > I?m glad I didn?t go to a college like that. > > > I can't remember the Halo ever once being useful. Take a class in > SolidWorks and do that in Squeak instead of Morphic an other not useful > improvements. > > The only useful part of the Solidworks UI I ever found was the exit. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Canis meus id comedit = My dog ate it. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160507/edb3b336/attachment-0001.htm From leves at caesar.elte.hu Sun May 8 09:21:37 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun May 8 09:59:25 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> Message-ID: On Sat, 7 May 2016, ReliableRobots.com wrote: > Tim, > I think you may have something set up on your test system like you have on RPi's for Scratch, so a different VM than the one in the latest download is running your image perhaps?? I don't know the path that > normally gets followed but when I copy squeak.exe from the LinuxAndWindows directory to the Resources directory and run it there, the halo result of a right click on an open window happens. If you copy Squeak.exe, then you should copy the Squeak.ini file as well, because that contains the 3ButtonMouse setting. Without that, the VM will think that you're using a 2 button mouse. Levente > > Sorry to pop your balloon. ? > > Kirk > > > > On Sat, May 7, 2016 at 2:07 PM, tim Rowledge wrote: > Leaving aside the pontificatory apoctypha for a moment - > > > > Not just any 5.0 but 15113, the most recent download available on 5/5/16. > > Funny. My download of the same package shows that it starts up with the expected behaviour of the right button raising a menu and the middle button opening the halo. This is as expected and as has > been the case for a long time. It happens to be the *wrong* way in my opinion since quite obviously a middle button? (and all mice should have three, clearly) ought to open the contextual menus. > However, the preference is trivial to find and many unfortunates are inured to wrong way through a sad life of deprivation and privation whilst using inferior systems. > > Halos have been part of Morphic since before the dinosaurs roamed the earth. They are not an 'improvement that made Squeak as worthless as a balloon full of machine gun holes. ' that has suddenly > been foisted upon you by those of us in the elite {strokes white Persian cat while glaring at you from the Volcano Lair(?) on my secret estate on a Pacific Island} as a way of ruining your > morning. > > For the right button to open a halo would require > a) the preference being set that way in the release; which it is clearly not. > b) the preference having been set by the user, either deliberately or accidentally > c) the preference having been set previously, saved and then loaded by the user > d) the device?s mouse driver being swapped > e) use of a vm flag such as ?-swapbtn? on unix and probably others on Mac/Windows. > > > > > In college I read teachers discovered innovation for the sake of innovation was worthless.? It is time Squeak-Dev learned that and only make useful improvements. > > I?m glad I didn?t go to a college like that. > > >? I can't remember the Halo ever once being useful.? Take a class in SolidWorks and do that in Squeak instead of Morphic an other not useful improvements. > > The only useful part of the Solidworks UI I ever found was the exit. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Canis meus id comedit = My dog ate it. > > > > > > From leves at caesar.elte.hu Sun May 8 09:25:21 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun May 8 09:59:27 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: References: Message-ID: On Sat, 7 May 2016, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Graphics to project The Trunk: > http://source.squeak.org/trunk/Graphics-mt.332.mcz > > ==================== Summary ==================== > > Name: Graphics-mt.332 > Author: mt > Time: 7 May 2016, 9:48:30.374081 am > UUID: 7fc10c6a-d146-584d-8e94-7153042d37d9 > Ancestors: Graphics-nice.331 > > Cherry-pick and adapt eToys' way to set the screen size programmatically via HostWindowPlugin. As I mentioned in an earlier discussion, HostWindowProxy doesn't work on Linux. At least not with Cog VMs. Levente From reliablerobots at gmail.com Sun May 8 12:32:34 2016 From: reliablerobots at gmail.com (ReliableRobots.com) Date: Sun May 8 12:32:36 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> Message-ID: Is there a squeak.ini setting to make it work on an old Win98? I have to use a Win98 computer for an old CNC machine. On Sun, May 8, 2016 at 2:21 AM, Levente Uzonyi wrote: > On Sat, 7 May 2016, ReliableRobots.com wrote: > > Tim, >> I think you may have something set up on your test system like you have >> on RPi's for Scratch, so a different VM than the one in the latest download >> is running your image perhaps? I don't know the path that >> normally gets followed but when I copy squeak.exe from the >> LinuxAndWindows directory to the Resources directory and run it there, the >> halo result of a right click on an open window happens. >> > > If you copy Squeak.exe, then you should copy the Squeak.ini file as well, > because that contains the 3ButtonMouse setting. Without that, the VM will > think that you're using a 2 button mouse. > > Levente > > > >> Sorry to pop your balloon. >> >> Kirk >> >> >> >> On Sat, May 7, 2016 at 2:07 PM, tim Rowledge wrote: >> Leaving aside the pontificatory apoctypha for a moment - >> >> >> > Not just any 5.0 but 15113, the most recent download available on >> 5/5/16. >> >> Funny. My download of the same package shows that it starts up with >> the expected behaviour of the right button raising a menu and the middle >> button opening the halo. This is as expected and as has >> been the case for a long time. It happens to be the *wrong* way in >> my opinion since quite obviously a middle button (and all mice should have >> three, clearly) ought to open the contextual menus. >> However, the preference is trivial to find and many unfortunates >> are inured to wrong way through a sad life of deprivation and privation >> whilst using inferior systems. >> >> Halos have been part of Morphic since before the dinosaurs roamed >> the earth. They are not an 'improvement that made Squeak as worthless as a >> balloon full of machine gun holes. ' that has suddenly >> been foisted upon you by those of us in the elite {strokes white >> Persian cat while glaring at you from the Volcano Lair(?) on my secret >> estate on a Pacific Island} as a way of ruining your >> morning. >> >> For the right button to open a halo would require >> a) the preference being set that way in the release; which it is >> clearly not. >> b) the preference having been set by the user, either deliberately >> or accidentally >> c) the preference having been set previously, saved and then loaded >> by the user >> d) the device?s mouse driver being swapped >> e) use of a vm flag such as ?-swapbtn? on unix and probably others >> on Mac/Windows. >> >> > >> > In college I read teachers discovered innovation for the sake of >> innovation was worthless. It is time Squeak-Dev learned that and only make >> useful improvements. >> >> I?m glad I didn?t go to a college like that. >> >> > I can't remember the Halo ever once being useful. Take a class >> in SolidWorks and do that in Squeak instead of Morphic an other not useful >> improvements. >> >> The only useful part of the Solidworks UI I ever found was the exit. >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful Latin Phrases:- Canis meus id comedit = My dog ate it. >> >> >> >> >> >> > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160508/588e98a8/attachment.html From btc at openinworld.com Sun May 8 13:48:59 2016 From: btc at openinworld.com (Ben Coman) Date: Sun May 8 13:49:22 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: Message-ID: On Sat, May 7, 2016 at 8:53 PM, ReliableRobots.com wrote: > I can't remember the Halo ever once being useful. > When I was new Squeak, Halos were critical to my learning how things worked under the covers. Typically it went something like this... 1. "Hmmm.... how do I make my own program do X? " 2. "Oh, there's a menu item that does something similar". 3. On that menu item using Halos > Debug > Inspect, dig in to find which code block is executed. Insert a "self halt" there. 4. Make use of the menu item, then in the debugger that appears, trace through to learn how it works. cheers -ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160508/06d71382/attachment.htm From eliot.miranda at gmail.com Sun May 8 13:58:09 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 8 13:58:14 2016 Subject: [squeak-dev] Fwd: [Vm-dev] Once upon time representsSameBrowseeAs: was moved out of Morphic References: Message-ID: (forgive the delay, better this is seen twice than not at all) Begin forwarded message: > From: Nicolas Cellier > Date: May 4, 2016 at 1:23:53 PM PDT > To: Squeak Virtual Machine Development Discussion > Subject: [Vm-dev] Once upon time representsSameBrowseeAs: was moved out of Morphic > Reply-To: Squeak Virtual Machine Development Discussion > > Hi, > If you take a look at Morphic-ar.375, you'll see this: > > "Move a few methods between various packages to make unload easier." > > This commit moved representsSameBrowseeAs: out of Morphic for Lexicon and PreferenceBrowser. > > Of course, this message is used exclusively by Morphic so far, but if we classify it in Morphic package, then we can't easily remove Lexicon or PreferencesBrowser. > > Indeed, since Morphic would extend Lexicon, it would depend on Lexicon, and we could not unload Lexicon without first unloading Morphic... > > Recently, the same message crept in Morphic again, breaking one of the PackageDependencyTest. > IMO, this is a bad thing. > > If we do not remove the message representsSameBrowseeAs: when we remove Morphic, then it's not a drama. > And representsSameBrowseeAs: does not depend on Morphic. > It's a general query that could be used by another framework. > > OK to move it back to respective packages? (Tools & co). > > Nicolas -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160508/6d7354b3/attachment.htm From tim at rowledge.org Sun May 8 15:45:59 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun May 8 15:46:05 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: References: Message-ID: > On 08-05-2016, at 2:25 AM, Levente Uzonyi wrote: > > On Sat, 7 May 2016, commits@source.squeak.org wrote: > >> Marcel Taeumel uploaded a new version of Graphics to project The Trunk: >> http://source.squeak.org/trunk/Graphics-mt.332.mcz >> >> ==================== Summary ==================== >> >> Name: Graphics-mt.332 >> Author: mt >> Time: 7 May 2016, 9:48:30.374081 am >> UUID: 7fc10c6a-d146-584d-8e94-7153042d37d9 >> Ancestors: Graphics-nice.331 >> >> Cherry-pick and adapt eToys' way to set the screen size programmatically via HostWindowPlugin. > > As I mentioned in an earlier discussion, HostWindowProxy doesn't work on Linux. At least not with Cog VMs. It does on my linux vms, with Cog, for Pi. Which ought to mean for any *nix. It?s how I set the window size for a Scratch release. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Disclaimer: Any errors in spelling, tact, or fact are transmission errors. From lewis at mail.msen.com Sun May 8 16:40:59 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 8 16:41:01 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: References: Message-ID: <20160508164059.GA14673@shell.msen.com> On Sun, May 08, 2016 at 08:45:59AM -0700, tim Rowledge wrote: > > > On 08-05-2016, at 2:25 AM, Levente Uzonyi wrote: > > > > On Sat, 7 May 2016, commits@source.squeak.org wrote: > > > >> Marcel Taeumel uploaded a new version of Graphics to project The Trunk: > >> http://source.squeak.org/trunk/Graphics-mt.332.mcz > >> > >> ==================== Summary ==================== > >> > >> Name: Graphics-mt.332 > >> Author: mt > >> Time: 7 May 2016, 9:48:30.374081 am > >> UUID: 7fc10c6a-d146-584d-8e94-7153042d37d9 > >> Ancestors: Graphics-nice.331 > >> > >> Cherry-pick and adapt eToys' way to set the screen size programmatically via HostWindowPlugin. > > > > As I mentioned in an earlier discussion, HostWindowProxy doesn't work on Linux. At least not with Cog VMs. > > It does on my linux vms, with Cog, for Pi. Which ought to mean for any *nix. It???s how I set the window size for a Scratch release. > > tim I think this is Mantis 7833: You can not switch back from fullscreen on a linux 64-bit system http://bugs.squeak.org/view.php?id=7833 The fix was applied last November (SVN trunk and oscog) and is present in current interpreter and Cog/Spur VMs. Older VMs, possibly including the All-in-one, would have the bug. Dave From Marcel.Taeumel at hpi.de Sun May 8 16:42:49 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 8 17:17:46 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz In-Reply-To: <20160508164059.GA14673@shell.msen.com> References: <20160508164059.GA14673@shell.msen.com> Message-ID: <1462725769327-4893946.post@n4.nabble.com> Hi, there. Is it expected behavior that the HostWindowPlugin also considers window border, shadows, title bar etc. when being resized? From the Squeak perspective, the "Display extent" is expected to be exactly x@y. That's why I added #setNewScreenSize:. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Graphics-mt-332-mcz-tp4893836p4893946.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun May 8 16:56:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 8 17:31:48 2016 Subject: [squeak-dev] Re: Fwd: [Vm-dev] Once upon time representsSameBrowseeAs: was moved out of Morphic In-Reply-To: References: Message-ID: <1462726612096-4893949.post@n4.nabble.com> Hi Eliot, this is similar to Shout's #aboutToStyle:, which also cannot be an extension because of the unwanted dependencies. In general, #representsSameBrowseeAs: is kind of a model comparison that could also come handy in non-morphic scenarios. It's not like #= or #== but a third, tool-specific kind. I have a similar pattern in Vivide: https://github.com/hpi-swa/vivide/search?utf8=%E2%9C%93&q=isObject%3A&type=Code I use that ViArtifactContainer >> #isObject:, for example, to make instances of CompiledMethod and MethodReference equal on a code editing (= tool) level: https://github.com/hpi-swa/vivide/blob/019606e18670e389a845e46cb384436940cc58bf/repository/Vivide.package/ViMethodEditor.class/instance/isObject..st Best, Marcel -- View this message in context: http://forum.world.st/Fwd-Vm-dev-Once-upon-time-representsSameBrowseeAs-was-moved-out-of-Morphic-tp4893915p4893949.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Sun May 8 19:58:44 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Sun May 8 19:58:48 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: References: Message-ID: On Sun, 8 May 2016, tim Rowledge wrote: > >> On 08-05-2016, at 2:25 AM, Levente Uzonyi wrote: >> >> On Sat, 7 May 2016, commits@source.squeak.org wrote: >> >>> Marcel Taeumel uploaded a new version of Graphics to project The Trunk: >>> http://source.squeak.org/trunk/Graphics-mt.332.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Graphics-mt.332 >>> Author: mt >>> Time: 7 May 2016, 9:48:30.374081 am >>> UUID: 7fc10c6a-d146-584d-8e94-7153042d37d9 >>> Ancestors: Graphics-nice.331 >>> >>> Cherry-pick and adapt eToys' way to set the screen size programmatically via HostWindowPlugin. >> >> As I mentioned in an earlier discussion, HostWindowProxy doesn't work on Linux. At least not with Cog VMs. > > It does on my linux vms, with Cog, for Pi. Which ought to mean for any *nix. It?s how I set the window size for a Scratch release. [ DisplayScreen hostWindowExtent: 800 @ 600 ] on: Error do: [ :error | error messageText ] ==> "primitiveWindow:width:height: failed" ((1001 to: 1009) collect: [ :each | Smalltalk getSystemAttribute: each ]) joinSeparatedBy: String cr "==> "unix linux-gnu x86_64 Croquet Closure Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.1834] X11 Unix built on Apr 22 2016 22:27:34 Compiler: 4.4.7 20120313 (Red Hat 4.4.7-4) CoInterpreter VMMaker.oscog-eem.1834 uuid: 858a9c54-959b-4d7e-b9b3-5f083d37f488 Apr 22 2016 StackToRegisterMappingCogit VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a Apr 22 2016 VM: r3684 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2016-04-22 21:32:43 -0700 Plugins: r3639 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins" Levente > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Disclaimer: Any errors in spelling, tact, or fact are transmission errors. > > > > From eliot.miranda at gmail.com Sun May 8 21:18:15 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 8 21:18:34 2016 Subject: [squeak-dev] Re: Fwd: [Vm-dev] Once upon time representsSameBrowseeAs: was moved out of Morphic In-Reply-To: <1462726612096-4893949.post@n4.nabble.com> References: <1462726612096-4893949.post@n4.nabble.com> Message-ID: <8ACADDBD-8DD6-4390-8CC9-0EEB5E7ECC88@gmail.com> Hi Marcel, the message is from Nicolas, not me :) _,,,^..^,,,_ (phone) > On May 8, 2016, at 9:56 AM, marcel.taeumel wrote: > > Hi Eliot, > > this is similar to Shout's #aboutToStyle:, which also cannot be an extension > because of the unwanted dependencies. > > In general, #representsSameBrowseeAs: is kind of a model comparison that > could also come handy in non-morphic scenarios. It's not like #= or #== but > a third, tool-specific kind. I have a similar pattern in Vivide: > https://github.com/hpi-swa/vivide/search?utf8=%E2%9C%93&q=isObject%3A&type=Code > > I use that ViArtifactContainer >> #isObject:, for example, to make instances > of CompiledMethod and MethodReference equal on a code editing (= tool) > level: > https://github.com/hpi-swa/vivide/blob/019606e18670e389a845e46cb384436940cc58bf/repository/Vivide.package/ViMethodEditor.class/instance/isObject..st > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Fwd-Vm-dev-Once-upon-time-representsSameBrowseeAs-was-moved-out-of-Morphic-tp4893915p4893949.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From tim at rowledge.org Mon May 9 00:59:27 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 00:59:27 2016 Subject: [squeak-dev] Cross post to enlighten the eite In-Reply-To: References: <1C3D061E-AB7F-44DE-92C3-DF8D43166F64@rowledge.org> Message-ID: > On 07-05-2016, at 9:42 PM, ReliableRobots.com wrote: > > Tim, > > I think you may have something set up on your test system like you have on RPi's for Scratch, so a different VM than the one in the latest download is running your image perhaps? I tested a fresh download on my iMac. On my Pi?s the vm startup script does not have any button swap command; indeed it is the same script as on anyone else?s Pi. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Settled some during shipping and handling. From Marcel.Taeumel at hpi.de Mon May 9 07:05:19 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 07:40:21 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz In-Reply-To: References: Message-ID: <1462777519961-4893981.post@n4.nabble.com> Hi Levente, there are no-display checks for the calls: #define noDisplay ( (!dpy && !(dpy= ioGetDisplayModule())) || (dpy->version < 0x10002) ) in platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPLugin.c Maybe the OpenGL version in your system is an issue? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Graphics-mt-332-mcz-tp4893836p4893981.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon May 9 07:49:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 07:49:54 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1138.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1138.mcz ==================== Summary ==================== Name: Morphic-mt.1138 Author: mt Time: 9 May 2016, 9:49:11.264377 am UUID: 057144ea-d4af-bd47-aa80-968af1300aea Ancestors: Morphic-mt.1137 Move #representsSameBrowseeAs: from Morphic extension to tool package to simplify load/unload of Morphic. Although the Tools package is somewhat coupled with Morphic, it is more consistent with all the other implementations of #representsSameBrowseeAs:. =============== Diff against Morphic-mt.1137 =============== Item was removed: - ----- Method: ObjectExplorer>>representsSameBrowseeAs: (in category '*morphic') ----- - representsSameBrowseeAs: anotherObjectExplorer - ^ self rootObject == anotherObjectExplorer rootObject! From commits at source.squeak.org Mon May 9 07:50:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 07:51:48 2016 Subject: [squeak-dev] The Trunk: Tools-mt.698.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.698.mcz ==================== Summary ==================== Name: Tools-mt.698 Author: mt Time: 9 May 2016, 9:50:04.716377 am UUID: 4c9af351-718a-5e42-aa14-3e6456646de3 Ancestors: Tools-nice.697 Move #representsSameBrowseeAs: from Morphic extension to tool package to simplify load/unload of Morphic. Although the Tools package is somewhat coupled with Morphic, it is more consistent with all the other implementations of #representsSameBrowseeAs:. =============== Diff against Tools-nice.697 =============== Item was added: + ----- Method: ObjectExplorer>>representsSameBrowseeAs: (in category 'user interface') ----- + representsSameBrowseeAs: anotherObjectExplorer + ^ self rootObject == anotherObjectExplorer rootObject! From Marcel.Taeumel at hpi.de Mon May 9 07:19:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 07:54:25 2016 Subject: [squeak-dev] SUnitGUI TestRunner ... Model? Message-ID: <1462778365014-4893990.post@n4.nabble.com> Hi, there! Thanks to our browser icons, I just noticed that TestRunner does not inherit from Model: Is there a reason for that or is it a mere slip? Best, Marcel -- View this message in context: http://forum.world.st/SUnitGUI-TestRunner-Model-tp4893990.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon May 9 07:22:37 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 07:57:39 2016 Subject: [squeak-dev] Remove all empty message/class categories after code update Message-ID: <1462778557558-4893991.post@n4.nabble.com> Hi, there! What do you think about removing all empty system categories (resp. class categories) and message categories after loading code? Only for Squeak update? Also for any Monticello merge/load? Would anybody miss those empty categories? Best, Marcel -- View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon May 9 08:12:22 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 08:13:11 2016 Subject: [squeak-dev] The Trunk: System-mt.824.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.824.mcz ==================== Summary ==================== Name: System-mt.824 Author: mt Time: 9 May 2016, 10:11:56.105377 am UUID: 633ca5f8-2835-dc46-b7ec-6b7f4efcbfca Ancestors: System-mt.823 Support for unloading Morphic. =============== Diff against System-mt.823 =============== Item was added: + ----- Method: Project>>isMorphic (in category 'testing') ----- + isMorphic + + self flag: #moveEventually. "mt: Once we manage to remove all calls to this from outside the Morphic package, we can add this as an extension of Morphic to Project." + ^ false! From commits at source.squeak.org Mon May 9 08:13:39 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 08:14:43 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1139.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1139.mcz ==================== Summary ==================== Name: Morphic-mt.1139 Author: mt Time: 9 May 2016, 10:13:00.512377 am UUID: bc66106b-ac8f-4043-ae82-1f1604c19c40 Ancestors: Morphic-mt.1138 Support for unloading Morphic. =============== Diff against Morphic-mt.1138 =============== Item was removed: - ----- Method: Project>>isMorphic (in category '*Morphic-testing') ----- - isMorphic - - ^ false! From herbertkoenig at gmx.net Mon May 9 08:28:17 2016 From: herbertkoenig at gmx.net (=?ISO-8859-1?Q?Herbert_K=F6nig?=) Date: Mon May 9 08:28:52 2016 Subject: =?US-ASCII?Q?AW:_[squeak-dev]_Remove_all_empty_mess?= =?US-ASCII?Q?age/class_categories_after_code=0D_=09update?= Message-ID: Hi,? Sometimes I use empty categories as markers. In general I would not delete what someone may have carefully set up.? IIRC we had a similar discussion re category sort order. ? Cheers,? Herbert
-------- Urspr?ngliche Nachricht --------
Von: "marcel.taeumel"
Datum:09.05.2016 09:22 (GMT+01:00)
An: squeak-dev@lists.squeakfoundation.org
Betreff: [squeak-dev] Remove all empty message/class categories after code update
Hi, there! What do you think about removing all empty system categories (resp. class categories) and message categories after loading code? Only for Squeak update? Also for any Monticello merge/load? Would anybody miss those empty categories? Best, Marcel -- View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/0ca01eb1/attachment.htm From commits at source.squeak.org Mon May 9 08:30:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 08:30:13 2016 Subject: [squeak-dev] The Trunk: EToys-mt.135.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.135.mcz ==================== Summary ==================== Name: EToys-mt.135 Author: mt Time: 9 May 2016, 10:29:55.747377 am UUID: 2f85239d-d85b-144e-a9f8-7b9f650c4306 Ancestors: EToys-mt.134 Adds etoys-specific code that was still in the base system. =============== Diff against EToys-mt.134 =============== Item was added: + ----- Method: MorphicProject>>currentStack: (in category '*Etoys-stack') ----- + currentStack: aStack + "Set the current stack as indicated; if the parameter supplied is nil, delete any prior memory of the CurrentStack" + + aStack + ifNil: + [self removeParameter: #CurrentStack] + ifNotNil: + [self projectParameterAt: #CurrentStack put: aStack]! From commits at source.squeak.org Mon May 9 08:31:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 08:31:46 2016 Subject: [squeak-dev] The Trunk: System-mt.825.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.825.mcz ==================== Summary ==================== Name: System-mt.825 Author: mt Time: 9 May 2016, 10:31:15.970377 am UUID: dfbd9b4f-f443-7f4e-8ab1-3ae64be157e0 Ancestors: System-mt.824 Moves etoys-specific code that was still in the base system. =============== Diff against System-mt.824 =============== Item was removed: - ----- Method: Project>>currentStack: (in category 'accessing') ----- - currentStack: aStack - "Set the current stack as indicated; if the parameter supplied is nil, delete any prior memory of the CurrentStack" - - aStack - ifNil: - [self removeParameter: #CurrentStack] - ifNotNil: - [self projectParameterAt: #CurrentStack put: aStack]! From commits at source.squeak.org Mon May 9 08:36:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 08:36:56 2016 Subject: [squeak-dev] The Trunk: Tools-mt.699.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.699.mcz ==================== Summary ==================== Name: Tools-mt.699 Author: mt Time: 9 May 2016, 10:36:32.952377 am UUID: 02e95a99-17e0-9e42-8091-237d1f56e447 Ancestors: Tools-mt.698 Return the result of debug-it requests for further processing. =============== Diff against Tools-mt.698 =============== Item was changed: ----- Method: StandardToolSet class>>debugMethod:forReceiver:inContext: (in category 'debugging') ----- debugMethod: aCompiledMethod forReceiver: anObject inContext: aContext + ^ Project current debugMethod: aCompiledMethod forReceiver: anObject inContext: aContext! - Project current debugMethod: aCompiledMethod forReceiver: anObject inContext: aContext. - ! From leves at caesar.elte.hu Mon May 9 10:16:53 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon May 9 10:16:59 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz In-Reply-To: <1462777519961-4893981.post@n4.nabble.com> References: <1462777519961-4893981.post@n4.nabble.com> Message-ID: The thing is that there's no HostWindowPlugin at all in http://www.mirandabanda.org/files/Cog/VM/latest/cogspur64linuxht-16.18.3692.tgz . And no, OpenGL works just fine from the same image/vm. Levente On Mon, 9 May 2016, marcel.taeumel wrote: > Hi Levente, > > there are no-display checks for the calls: > > #define noDisplay ( (!dpy && !(dpy= ioGetDisplayModule())) || (dpy->version > < 0x10002) ) > > in platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPLugin.c > > Maybe the OpenGL version in your system is an issue? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Graphics-mt-332-mcz-tp4893836p4893981.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From leves at caesar.elte.hu Mon May 9 10:20:16 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon May 9 10:20:22 2016 Subject: [squeak-dev] Remove all empty message/class categories after code update In-Reply-To: <1462778557558-4893991.post@n4.nabble.com> References: <1462778557558-4893991.post@n4.nabble.com> Message-ID: On Mon, 9 May 2016, marcel.taeumel wrote: > Hi, there! > > What do you think about removing all empty system categories (resp. class > categories) and message categories after loading code? > > Only for Squeak update? > Also for any Monticello merge/load? I think such removal is part of the release process. Levente > > Would anybody miss those empty categories? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From karlramberg at gmail.com Mon May 9 11:01:38 2016 From: karlramberg at gmail.com (karl ramberg) Date: Mon May 9 11:01:41 2016 Subject: [squeak-dev] Remove all empty message/class categories after code update In-Reply-To: References: <1462778557558-4893991.post@n4.nabble.com> Message-ID: There are some empty categories as Preferences "see class side" etc. :-( I'm not sure how many categories are like that. Best, Karl On Mon, May 9, 2016 at 12:20 PM, Levente Uzonyi wrote: > On Mon, 9 May 2016, marcel.taeumel wrote: > > Hi, there! >> >> What do you think about removing all empty system categories (resp. class >> categories) and message categories after loading code? >> >> Only for Squeak update? >> Also for any Monticello merge/load? >> > > I think such removal is part of the release process. > > Levente > > > >> Would anybody miss those empty categories? >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/6e82f0f3/attachment.htm From commits at source.squeak.org Mon May 9 11:15:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:15:11 2016 Subject: [squeak-dev] The Trunk: System-mt.826.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.826.mcz ==================== Summary ==================== Name: System-mt.826 Author: mt Time: 9 May 2016, 1:14:47.861723 pm UUID: ec4d495c-324c-214f-9944-0e2be7e78ec6 Ancestors: System-mt.825 Return the result of a debug-it for further processing. =============== Diff against System-mt.825 =============== Item was changed: ----- Method: Project>>debugMethod:forReceiver:inContext: (in category 'debugging') ----- debugMethod: aCompiledMethod forReceiver: anObject inContext: aContextOrNil "Just execute the method and return the result. We cannot know how interactive debugging works for arbitrary projects." + ^ aCompiledMethod - aCompiledMethod valueWithReceiver: anObject arguments: (aContextOrNil ifNil: [#()] + ifNotNil: [{aContextOrNil}])! - ifNotNil: [{aContextOrNil}]).! From commits at source.squeak.org Mon May 9 11:38:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:38:55 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1140.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1140.mcz ==================== Summary ==================== Name: Morphic-mt.1140 Author: mt Time: 9 May 2016, 1:37:31.427729 pm UUID: fecf2a29-d4e3-c547-b948-21eca8fe7c5a Ancestors: Morphic-mt.1139 Look up a morph's active hand also via the world it is in. Use this when activating a system window or deleting a morph. -- This makes much Morphic code work from within MVC or testing environments. =============== Diff against Morphic-mt.1139 =============== Item was changed: ----- Method: Morph>>activeHand (in category 'structure') ----- activeHand + + ^ ActiveHand ifNil: [ + self isInWorld + ifTrue: [self world activeHand] + ifFalse: [nil]]! - ^ActiveHand! Item was changed: ----- Method: Morph>>delete (in category 'submorphs-add/remove') ----- delete "Remove the receiver as a submorph of its owner and make its new owner be nil." | aWorld | self removeHalo. + + self isInWorld ifTrue: [ + self disableSubmorphFocusForHand: self activeHand. + self activeHand + releaseKeyboardFocus: self; + releaseMouseFocus: self]. + + "Preserve world reference for player notificaiton. See below." aWorld := self world ifNil: [World]. + + owner ifNotNil:[ + self privateDelete. + self player ifNotNil: [:player | - "Terminate genie recognition focus" - "I encountered a case where the hand was nil, so I put in a little - protection - raa " - " This happens when we are in an MVC project and open - a morphic window. - BG " - aWorld ifNotNil: - [self disableSubmorphFocusForHand: self activeHand. - self activeHand releaseKeyboardFocus: self; - releaseMouseFocus: self.]. - owner ifNotNil:[ self privateDelete. - self player ifNotNil: [ :player | - "Player must be notified" player noteDeletionOf: self fromWorld: aWorld]].! Item was changed: ----- Method: SystemWindow>>activate (in category 'top window') ----- activate "Bring the receiver to the top. If I am modal, bring along my owning window as well." | modalOwner | self modalChild ifNotNil: [ : modalChild | modalChild owner ifNotNil: [ modalChild activate. ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. (isCollapsed not and: [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. self activateWindow. + PasteUpMorph globalCommandKeysEnabled ifTrue: [self activeHand addKeyboardListener: self]. - PasteUpMorph globalCommandKeysEnabled ifTrue: [ActiveHand addKeyboardListener: self]. modalOwner := self modalOwner. (modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]! From commits at source.squeak.org Mon May 9 11:40:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:41:00 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1141.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1141.mcz ==================== Summary ==================== Name: Morphic-mt.1141 Author: mt Time: 9 May 2016, 1:39:25.028729 pm UUID: 7e799326-c73d-1d40-9a26-8ff96fc2d428 Ancestors: Morphic-mt.1140 Forgot one update due to latest full-screen changes. =============== Diff against Morphic-mt.1140 =============== Item was changed: ----- Method: TheWorldMainDockingBar>>toggleFullScreenOn: (in category 'right side') ----- toggleFullScreenOn: aDockingBar | toggleMorph box | toggleMorph := (SketchMorph withForm: MenuIcons smallFullscreenOffIcon). box := Morph new color: Color transparent; vResizing: #spaceFill; width: toggleMorph width; balloonText: 'toggle full screen mode' translated; addMorph: toggleMorph. toggleMorph setToAdhereToEdge: #rightCenter. box on: #mouseDown send: #value to: + [ DisplayScreen toggleFullScreen. - [ Project current toggleFullScreen. toggleMorph form: MenuIcons smallFullscreenOffIcon ] ; on: #mouseEnter send: #value to: [toggleMorph form: MenuIcons smallFullscreenOnIcon]; on: #mouseLeave send: #value to: [toggleMorph form: MenuIcons smallFullscreenOffIcon]. aDockingBar addMorphBack: box! From commits at source.squeak.org Mon May 9 11:41:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:41:32 2016 Subject: [squeak-dev] The Trunk: System-mt.827.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.827.mcz ==================== Summary ==================== Name: System-mt.827 Author: mt Time: 9 May 2016, 1:41:03.140729 pm UUID: e7d678e1-e245-0a49-b449-faca6c947a76 Ancestors: System-mt.826 REFACTORING THE PROJECTS MECHANISM - Reduce and clean-up the footprint of new project kinds: saveState/loadState, finalEnterActions:/finalExitActions:, startResourceLoading/abortResourceLoading, aboutToLeaveWorld/aboutToEnterWorld (object events), scheduleProcessForEnter/terminateProcessForLeave - Reduce full display restoring to #invalidate and #restore, which gives projects the chance to 1) clear their drawing caches and 2) redraw all their graphical objects. - Clean-up project add/remove wrt. sub-projects and the whole project hierarchy. See #isTopProject, #beTopProject, #addProject:, #liftSubProjects, #removeProjectsFromSystem - Provide a second way -- in addition to the Emergency Evaluator -- for recovering from recursive errors by trying a parent project of a different kind first. See #handlePrimitiveError:. This allows for more convenient recovery of such errors. - For shrinking images, make MVCProject class >> #unloadMVC work again. This also applies to MorphicProject class >> #unloadMorphic in the near future. =============== Diff against System-mt.826 =============== Item was changed: ----- Method: Object>>primitiveError: (in category '*System-Recovery-error handling') ----- primitiveError: aString + Project handlePrimitiveError: aString.! - "This method is called when the error handling results in a recursion in - calling on error: or halt or halt:." - | hasTranscripter transcripter | - hasTranscripter := (Smalltalk classNamed: #Transcripter) - ifNotNil: [ :t | transcripter := t. true] - ifNil: [false]. - (String - streamContents: - [:s | - | context | - s nextPutAll: '***System error handling failed***'. - s cr; nextPutAll: aString. - context := thisContext sender sender. - 20 timesRepeat: [context == nil ifFalse: [s cr; print: (context := context sender)]]. - s cr; nextPutAll: '-------------------------------'. - hasTranscripter - ifTrue: [ - s cr; nextPutAll: 'Type CR to enter an emergency evaluator.'. - s cr; nextPutAll: 'Type any other character to restart.'] - ifFalse: [ - s cr; nextPutAll: 'Type any character to restart.']]) - displayAt: 0 @ 0. - [Sensor keyboardPressed] whileFalse. - Sensor keyboard = Character cr ifTrue: [ - hasTranscripter ifTrue: [transcripter emergencyEvaluator]]. - Project current resetDisplay! Item was changed: Model subclass: #Project + instanceVariableNames: 'world uiManager changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject projectParameters version urlList environment lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager' - instanceVariableNames: 'world uiManager changeSet transcript parentProject previousProject displayDepth viewSize thumbnail nextProject guards projectParameters version urlList environment lastDirectory lastSavedAtSeconds projectPreferenceFlagDictionary resourceManager' classVariableNames: 'AllProjects CurrentProject GoalFreePercent GoalNotMoreThan' poolDictionaries: '' category: 'System-Support'! !Project commentStamp: 'cbr 7/27/2010 21:36' prior: 0! A Project stores the state of a complete Squeak desktop, including the windows, and the currently active changeSet. A project knows who its parent project is. When you change projects, whether by entering or exiting, the screen state of the project being exited is saved in that project. A project is retained by its view in the parent world. It is effectively named by the name of its changeSet, which can be changed either by renaming in a changeSorter, or by editing the label of its view from the parent project. As the site of major context switch, Projects are the locus of swapping between the old MVC and the new Morphic worlds. The distinction is based on whether the variable 'world' contains a WorldMorph or a ControlManager. Saving and Loading Projects may be stored on the disk in external format. (Project named: 'xxx') exportSegment, or choose 'store project on file...'. Projects may be loaded from a server and stored back. Storing on a server never overwrites; it always makes a new version. A project remembers the url of where it lives in urlList. The list is length one, for now. The url may point to a local disk instead of a server. All projects that the user looks at are cached in the Squeaklet folder. Sorted by server. The cache holds the most recent version only. When a project is loaded into Squeak, its objects are converted to the current version. There are three levels of conversion. First, each object is converted from raw bits to an object in its old format. Then it is sent some or all of these messages: comeFullyUpOnReload: smartRefStream Used to re-discover an object that already exists in this image, such as a resource, global variable, Character, or Symbol. (sent to objects in outPointers) convertToCurrentVersion: varDict refStream: smartRefStrm fill in fields that have been added to a class since the object was stored. Used to set the extra inst var to a default value. Or, return a new object of a different class. (sent to objects that changed instance variables) fixUponLoad: aProject refStream: smartRefStrm change the object due to conventions that have changed on the project level. (sent to all objects in the incoming project) Here is the calling sequence for storing out a Project: Project saveAs Project storeOnServer Project storeOnServerWithProgressInfo Project storeOnServerInnards Project exportSegmentFileName:directory: Project exportSegmentWithChangeSet:fileName:directory: ImageSegment writeForExportWithSources:inDirectory:changeSet: ! Item was changed: ----- Method: Project class>>deletingProject: (in category 'utilities') ----- deletingProject: outgoingProject + "Delete the outgoing project and all its sub-projects. Start with the sub-projects." + + "Delete all sub-projects." + outgoingProject subProjects do: [:p | self deletingProject: p]. + "Forget that it ever existed. We have to do that now to avoid other code iterating over the partially removed project." + self forget: outgoingProject. + + "Give all registered projects the chance to release their references." + self allProjects do: [:p | p deletingProject: outgoingProject]. + + "Really clean-up everything related to the outgoing project." + self releaseProjectReferences: outgoingProject.! - | pvmClass pvControllerClass | - pvmClass := Smalltalk at: #ProjectViewMorph ifAbsent: [nil]. - pvControllerClass := Smalltalk at: #ProjectController ifAbsent: [nil]. - ImageSegment allSubInstancesDo: [:seg | - seg ifOutPointer: outgoingProject thenAllObjectsDo: [:obj | - (obj isKindOf: pvmClass) ifTrue: [obj deletingProject: outgoingProject. obj abandon]. - (obj isKindOf: Project) ifTrue: [obj deletingProject: outgoingProject]]]. - self allProjects do: [:p | p deletingProject: outgoingProject]. "ones that are in" - pvmClass ifNotNil: [ - pvmClass allSubInstancesDo: [:p | - p deletingProject: outgoingProject. - p project == outgoingProject ifTrue: [p abandon]]]. - pvControllerClass ifNotNil: [ - pvControllerClass allInstancesDo: [ :pvc | - ((pvc model parent isNil or: [pvc model parent == Project current]) and: [pvc model == outgoingProject]) - ifTrue: [ pvc closeAndUnscheduleNoTerminate ]]]. - AllProjects := self allProjects copyWithout: outgoingProject.! Item was added: + ----- Method: Project class>>flattenProjectHierarchy (in category 'utilities') ----- + flattenProjectHierarchy + "Clean-up project hierarchy. Make all projects be sub-projects of the top project." + + self allSubInstancesDo: [:ea | ea setParent: self topProject].! Item was changed: ----- Method: Project class>>forget: (in category 'utilities') ----- forget: aProject + AllProjects := self allProjects copyWithout: aProject.! - AllProjects := self allProjects reject: [ :x | x == aProject]. - ! Item was added: + ----- Method: Project class>>handlePrimitiveError: (in category 'error recovery') ----- + handlePrimitiveError: errorMessage + "This method is called when the error handling results in a recursion in + calling on error: or halt or halt:.." + + self tryOtherProjectForRecovery: errorMessage. + self tryEmergencyEvaluatorForRecovery: errorMessage. + + Project current restoreDisplay.! Item was added: + ----- Method: Project class>>initialize (in category 'class initialization') ----- + initialize + + Smalltalk addToStartUpList: self. + Smalltalk addToShutDownList: self.! Item was added: + ----- Method: Project class>>releaseProjectReferences: (in category 'utilities') ----- + releaseProjectReferences: outgoingProject + "Give all kinds of projects the chance to do generic clean-up to their best knowledge. Consider image segments first." + + Smalltalk garbageCollect. + + ImageSegment allSubInstancesDo: [:seg | + seg ifOutPointer: outgoingProject thenAllObjectsDo: [:obj | + (obj isKindOf: Project) ifTrue: [obj deletingProject: outgoingProject]]]. + + self allSubclassesDo: [:projectClass | + (projectClass selectors includes: #releaseProjectReferences:) + ifTrue: [projectClass releaseProjectReferences: outgoingProject]].! Item was added: + ----- Method: Project class>>removeProjectsFromSystem (in category 'shrinking') ----- + removeProjectsFromSystem + "Remove all projects of this kind from the system, reorganizing the project hierarchy as needed. + This method was originally implemented as SmalltalkImage>>zapMVCProjects in earlier + versions of Squeak." + + "MVCProject removeProjectsFromSystem" + "MorphicProject removeProjectsFromSystem" + + | projectsToRemove projectsToReorganize | + + (Project current isKindOf: self) ifTrue: [ + "We have to enter another project to unload this project kind." + (Project subclasses detect: [:ea | (ea includesBehavior: self) not] ifNone: []) + ifNil: [^ Error signal: 'You have to enter another kind of project.'] + ifNotNil: [:projectClass | + ^ projectClass new + addDeferredUIMessage: [self removeProjectsFromSystem]; + enter]]. + + (Project topProject isKindOf: self) ifTrue: [ + "We have to become the top project now." + Project current beTopProject]. + + Smalltalk garbageCollect. "So allInstances is precise" + projectsToRemove := OrderedCollection new. + projectsToReorganize := OrderedCollection new. + + Project allSubInstancesDo: [:proj | + (proj isKindOf: self) + ifTrue: [projectsToRemove add: proj] + ifFalse: [(proj parent isKindOf: self) + ifTrue: [projectsToReorganize add: proj]]]. + + projectsToReorganize do: [:proj | + "Remove views and refs." + proj parent deletingProject: proj. + "Add as sub-project to top project to avoid cycles and confusion. Ignore the current project." + Project topProject addProject: proj]. + + projectsToRemove do: [:proj | proj delete].! Item was added: + ----- Method: Project class>>returnToParentProject (in category 'utilities') ----- + returnToParentProject + + Project current isTopProject + ifFalse: [Project current parent enter].! Item was added: + ----- Method: Project class>>shutDown: (in category 'snapshots') ----- + shutDown: quitting + + quitting ifTrue: [ + Project current world triggerEvent: #aboutToLeaveWorld].! Item was removed: - ----- Method: Project class>>spawnNewProcess (in category 'deprecated') ----- - spawnNewProcess - "Meaningful only for a Morphic project, but retained here to protect for possible - references from e.g. image segments" - - self current spawnNewProcess! Item was removed: - ----- Method: Project class>>spawnNewProcessAndTerminateOld: (in category 'deprecated') ----- - spawnNewProcessAndTerminateOld: terminate - "Meaningful only for a Morphic project, but retained here to protect for possible - references from e.g. image segments" - - ^ self current spawnNewProcessAndTerminateOld: terminate - ! Item was removed: - ----- Method: Project class>>spawnNewProcessIfThisIsUI: (in category 'deprecated') ----- - spawnNewProcessIfThisIsUI: suspendedProcess - "Meaningful only for a Morphic project, but retained here to protect for possible - references from e.g. image segments" - - self current spawnNewProcessIfThisIsUI: suspendedProcess - - ! Item was added: + ----- Method: Project class>>startUp: (in category 'snapshots') ----- + startUp: startAfresh + + Project current restoreDisplay. + + startAfresh ifTrue: [ + Project current world triggerEvent: #aboutToEnterWorld].! Item was added: + ----- Method: Project class>>tryEmergencyEvaluatorForRecovery: (in category 'error recovery') ----- + tryEmergencyEvaluatorForRecovery: errorMessage + + | hasTranscripter transcripter | + hasTranscripter := (Smalltalk classNamed: #Transcripter) + ifNotNil: [ :t | transcripter := t. true] + ifNil: [false]. + (String + streamContents: + [:s | + | context | + s nextPutAll: '***System error handling failed***'. + s cr; nextPutAll: errorMessage. + context := thisContext sender sender. + 20 timesRepeat: [context == nil ifFalse: [s cr; print: (context := context sender)]]. + s cr; nextPutAll: '-------------------------------'. + hasTranscripter + ifTrue: [ + s cr; nextPutAll: 'Type CR to enter an emergency evaluator.'. + s cr; nextPutAll: 'Type any other character to restart.'] + ifFalse: [ + s cr; nextPutAll: 'Type any character to restart.']]) + displayAt: 0 @ 0. + + [Sensor keyboardPressed] whileFalse. + + Sensor keyboard = Character cr ifTrue: [ + hasTranscripter ifTrue: [transcripter emergencyEvaluator]].! Item was added: + ----- Method: Project class>>tryOtherProjectForRecovery: (in category 'error recovery') ----- + tryOtherProjectForRecovery: errorMessage + "Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class." + + | safeProject nextProject | + nextProject := Project current. + safeProject := nil. + [safeProject notNil or: [nextProject isTopProject]] whileFalse: [ + nextProject := nextProject parent. + nextProject class == Project current class + ifFalse: [safeProject := nextProject]]. + safeProject ifNotNil: [:p | + p enterForEmergencyRecovery. + "Active process will usually suspend after this."].! Item was changed: + ----- Method: Project class>>uiProcess (in category 'constants') ----- - ----- Method: Project class>>uiProcess (in category 'instance creation') ----- uiProcess ^ self current uiProcess! Item was removed: - ----- Method: Project>>addGuard: (in category 'accessing') ----- - addGuard: anObject - "Add the given object to the list of objects receiving #okayToEnterProject on Project entry" - guards ifNil:[guards := WeakArray with: anObject] - ifNotNil:[guards := guards copyWith: anObject].! Item was added: + ----- Method: Project>>addProject: (in category 'sub-projects & hierarchy') ----- + addProject: aProject + "Add the given project as sub-project." + + aProject setParent: self.! Item was changed: + ----- Method: Project>>addSubProjectNamesTo:indentation: (in category 'printing') ----- - ----- Method: Project>>addSubProjectNamesTo:indentation: (in category 'accessing') ----- addSubProjectNamesTo: aStream indentation: anIndentation "Add the names of the receiver and all its subprojects, and all *their* subprojects recursively, to aStream, indenting by the specified number of tab stops " self isTopProject ifFalse: "circumvent an annoying cr at the top " [aStream cr]. aStream tab: anIndentation; nextPutAll: self name. self subProjects do: [:p | p addSubProjectNamesTo: aStream indentation: anIndentation + 1]! Item was added: + ----- Method: Project>>beTopProject (in category 'sub-projects & hierarchy') ----- + beTopProject + + self isTopProject ifTrue: [^ self]. + + self parent deletingProject: self. "Just remove views and refs to me." + self addProject: self class topProject. + self setParent: self.! Item was changed: + ----- Method: Project>>children (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>children (in category 'accessing') ----- children "Answer a list of all the subprojects of the receiver" | children | children := OrderedCollection new. Project allProjects do: [ :p | (self == p parent and: [self ~~ p]) ifTrue: [ children add: p ]]. ^ children " Project topProject children "! Item was removed: - ----- Method: Project>>defaultBackgroundColor (in category 'initialization') ----- - defaultBackgroundColor - ^ self subclassResponsibility! Item was added: + ----- Method: Project>>delete (in category 'release') ----- + delete + + self isCurrentProject + ifTrue: [^ Error signal: 'Cannot delete the current project.']. + + self removeChangeSetIfPossible. + + ProjectHistory forget: self. + Project deletingProject: self.! Item was changed: ----- Method: Project>>deletingProject: (in category 'release') ----- + deletingProject: outgoingProject - deletingProject: aProject "Clear my previousProject link if it points at the given Project, which is being deleted." + parentProject == outgoingProject + ifTrue: [parentProject := parentProject parent]. + + previousProject == outgoingProject + ifTrue: [previousProject := previousProject previousProject]. + previousProject == outgoingProject - self flag: #bob. "zapping projects" - - parentProject == aProject ifTrue: [ - parentProject := parentProject parent - ]. - previousProject == aProject ifTrue: [previousProject := nil]. + + nextProject == outgoingProject + ifTrue: [nextProject := nextProject nextProject]. + nextProject == outgoingProject + ifTrue: [nextProject := nil].! - nextProject == aProject - ifTrue: [nextProject := nil] - ! Item was added: + ----- Method: Project>>displayDepthChanged (in category 'displaying') ----- + displayDepthChanged + "The depth of the display has changed." + ! Item was changed: ----- Method: Project>>displaySizeChanged (in category 'displaying') ----- displaySizeChanged + "Inform the current project that its display size has changed. Usually, projects invalidate all their drawing caches and restore their graphical contents." + + self invalidate; restore.! - "Inform the current project that its display size has changed" - ! Item was changed: + ----- Method: Project>>enter (in category 'enter') ----- - ----- Method: Project>>enter (in category 'menu messages') ----- enter "Enter the new project" self enter: (CurrentProject parent == self) revert: false saveForRevert: false.! Item was changed: + ----- Method: Project>>enter: (in category 'enter') ----- - ----- Method: Project>>enter: (in category 'menu messages') ----- enter: returningFlag self enter: returningFlag revert: false saveForRevert: false! Item was changed: ----- Method: Project>>enter:revert:saveForRevert: (in category 'enter') ----- enter: returningFlag revert: revertFlag saveForRevert: saveForRevert "Install my ChangeSet, Transcript, and scheduled views as current globals. If returningFlag is true, we will return to the project from whence the current project was entered; don't change its previousProject link in this case. If saveForRevert is true, save the ImageSegment of the project being left. If revertFlag is true, make stubs for the world of the project being left. If revertWithoutAsking is true in the project being left, then always revert." + | leavingProject forceRevert response seg | - | showZoom recorderOrNil old forceRevert response seg | + self isIncompletelyLoaded + ifTrue: [^ self loadFromServer: true]. + self isCurrentProject + ifTrue: [^ self]. + - self isIncompletelyLoaded ifTrue: - [^self loadFromServer: true "try to get a fresh copy"]. - self isCurrentProject ifTrue: [^ self]. - "Check the guards" - guards ifNotNil: - [guards := guards reject: [:obj | obj isNil]. - guards do: [:obj | obj okayToEnterProject ifFalse: [^ self]]]. - CurrentProject world triggerEvent: #aboutToLeaveWorld. forceRevert := false. CurrentProject rawParameters ifNil: [revertFlag ifTrue: [^ self inform: 'nothing to revert to' translated]] ifNotNil: [saveForRevert ifFalse: [ forceRevert := CurrentProject projectParameters at: #revertWithoutAsking ifAbsent: [false]]]. forceRevert not & revertFlag ifTrue: [ response := (UIManager default chooseFrom: { 'Revert to saved version' translated. 'Cancel' translated. } title: 'Are you sure you want to destroy this Project\ and revert to an older version?\\(From the parent project, click on this project''s thumbnail.)' translated withCRs) = 1. response ifFalse: [^ self]]. revertFlag | forceRevert ifTrue: [seg := CurrentProject projectParameters at: #revertToMe ifAbsent: [ ^ self inform: 'nothing to revert to' translated]] ifFalse: [ CurrentProject makeThumbnail. returningFlag == #specialReturn ifTrue: [ProjectHistory forget: CurrentProject. "this guy is irrelevant" Project forget: CurrentProject] ifFalse: [ProjectHistory remember: CurrentProject]]. (revertFlag | saveForRevert | forceRevert) ifFalse: [(Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [self storeToMakeRoom]]. + "Update display depth for leaving and entring project." - CurrentProject abortResourceLoading. - CurrentProject triggerClosingScripts. - CurrentProject saveProjectPreferences. - - "Update the display depth and make a thumbnail of the current project" CurrentProject displayDepth: Display depth. - old := CurrentProject. "for later" - - "Show the project transition. - Note: The project zoom is run in the context of the old project, - so that eventual errors can be handled accordingly" displayDepth == nil ifTrue: [displayDepth := Display depth]. self installNewDisplay: Display extent depth: displayDepth. - (showZoom := self showZoom) ifTrue: [ - self displayZoom: CurrentProject parent ~~ self]. - CurrentProject pauseSoundPlayers. - returningFlag == #specialReturn ifTrue: [ + CurrentProject removeChangeSetIfPossible. "keep this stuff from accumulating" - old removeChangeSetIfPossible. "keep this stuff from accumulating" nextProject := nil ] ifFalse: [ returningFlag ifTrue: [nextProject := CurrentProject] ifFalse: [previousProject := CurrentProject]. ]. + CurrentProject world triggerEvent: #aboutToLeaveWorld. + CurrentProject abortResourceLoading. + CurrentProject finalExitActions: self. - recorderOrNil := old pauseEventRecorder. - CurrentProject saveState. - CurrentProject finalExitActions. + "********** SWITCHING CURRENT PROJECT **********" + leavingProject := CurrentProject. - "Now I am the current project." CurrentProject := self. + ProjectHistory remember: self. + "********** SWITCHING CURRENT PROJECT **********" - self installProjectPreferences. - ChangeSet newChanges: changeSet. - TranscriptStream newTranscript: transcript. - Sensor flushKeyboard. - ProjectHistory remember: CurrentProject. - self setWorldForEnterFrom: old recorder: recorderOrNil. + self loadState. + self finalEnterActions: leavingProject. + self addDeferredUIMessage: [self startResourceLoading]. + self world triggerEvent: #aboutToEnterWorld. + + "Save project for revert." saveForRevert ifTrue: [ Smalltalk garbageCollect. "let go of pointers" + leavingProject storeSegment. + "result :=" leavingProject world isInMemory - old storeSegment. - "result :=" old world isInMemory ifTrue: ['Can''t seem to write the project.'] + ifFalse: [leavingProject projectParameters at: #revertToMe put: + leavingProject world xxxSegment clone]. - ifFalse: [old projectParameters at: #revertToMe put: - old world xxxSegment clone]. 'Project written.']. "original is for coming back in and continuing." - revertFlag | forceRevert ifTrue: [ seg clone revert]. "non-cloned one is for reverting again later" self removeParameter: #exportState. + + "Now that everything is set up, we can show zoom animation." + self showZoom + ifTrue: [self displayZoom: leavingProject parent ~~ self "Entering?"] + ifFalse: [self restore]. + + "Update processes at last." + self scheduleProcessForEnter. + leavingProject terminateProcessForLeave. - - "Complete the enter: by launching a new process" - self finalEnterActions. - self scheduleProcessForEnter: showZoom. - old terminateProcessForLeave. ! Item was added: + ----- Method: Project>>enterForEmergencyRecovery (in category 'enter - recovery') ----- + enterForEmergencyRecovery + "Stripped down verion of #enter:revert:saveForRevert:. More error handling. Less features." + + | leavingProject process | + self isCurrentProject ifTrue: [^ self]. + + ProjectHistory remember: CurrentProject. + nextProject := CurrentProject. + + [ CurrentProject world triggerEvent: #aboutToLeaveWorld. + CurrentProject abortResourceLoading. + CurrentProject finalExitActions: self. + CurrentProject saveState ] on: Error do: [:ex | "Ignore." ]. + + "********** SWITCHING CURRENT PROJECT **********" + leavingProject := CurrentProject. + CurrentProject := self. + ProjectHistory remember: self. + "********** SWITCHING CURRENT PROJECT **********" + + self loadState. + self finalEnterActions: leavingProject. + self addDeferredUIMessage: [self startResourceLoading]. + self world triggerEvent: #aboutToEnterWorld. + + "Now that everything is set up, we can show zoom animation. + Do we really need this in case of an emergency?" + self showZoom + ifTrue: [self displayZoom: leavingProject parent ~~ self "Entering?"] + ifFalse: [self restore]. + + "Update processes at last." + self scheduleProcessForEnter. + + "Do not terminate but suspend the projects ui process to support debugging." + process := leavingProject uiProcess. + self addDeferredUIMessage: [process debugWithTitle: 'FATAL PROJECT ERROR!!']. + leavingProject suspendProcessForDebug.! Item was removed: - ----- Method: Project>>finalEnterActions (in category 'enter') ----- - finalEnterActions - ! Item was added: + ----- Method: Project>>finalEnterActions: (in category 'enter') ----- + finalEnterActions: leavingProject + + ! Item was removed: - ----- Method: Project>>finalExitActions (in category 'enter') ----- - finalExitActions - ! Item was added: + ----- Method: Project>>finalExitActions: (in category 'enter') ----- + finalExitActions: enteringProject + + SoundService stop.! Item was added: + ----- Method: Project>>forget (in category 'release') ----- + forget + + self isCurrentProject + ifTrue: [^ Error signal: 'Cannot forget the current project.']. + + self class forget: self.! Item was changed: + ----- Method: Project>>handleFatalDrawingError: (in category 'displaying') ----- - ----- Method: Project>>handleFatalDrawingError: (in category 'utilities') ----- handleFatalDrawingError: errMsg "Handle a fatal drawing error." + Display deferUpdates: false. "Just in case" + self primitiveError: errMsg. + + "Hm... we should jump into a 'safe' worldState here, but how do we find it?!!"! - self error: errMsg "overridden in MorphicProject" - ! Item was changed: ----- Method: Project>>imageFormOfSize:depth: (in category 'displaying') ----- imageFormOfSize: extentPoint depth: d | newDisplay | newDisplay := DisplayScreen extent: extentPoint depth: d. + Display replacedBy: newDisplay do:[self invalidate; restore]. - Display replacedBy: newDisplay do:[self restore]. ^newDisplay! Item was changed: + ----- Method: Project>>interruptName: (in category 'debugging') ----- - ----- Method: Project>>interruptName: (in category 'scheduling') ----- interruptName: labelString "Create a Notifier on the active scheduling process with the given label." ^ self subclassResponsibility ! Item was changed: + ----- Method: Project>>interruptName:preemptedProcess: (in category 'debugging') ----- - ----- Method: Project>>interruptName:preemptedProcess: (in category 'scheduling') ----- interruptName: labelString preemptedProcess: theInterruptedProcess "Create a Notifier on the active scheduling process with the given label." ^ self subclassResponsibility ! Item was changed: + ----- Method: Project>>isCurrentProject (in category 'testing') ----- - ----- Method: Project>>isCurrentProject (in category 'accessing') ----- isCurrentProject ^self == CurrentProject! Item was changed: + ----- Method: Project>>isIncompletelyLoaded (in category 'testing') ----- - ----- Method: Project>>isIncompletelyLoaded (in category 'enter') ----- isIncompletelyLoaded "Answer true if project is incomplete and should be loaded from server " ^ false! Item was changed: + ----- Method: Project>>isTopProject (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>isTopProject (in category 'accessing') ----- isTopProject "Return true only if this is the top project (its own parent). Also include the test here for malformed project hierarchy." parentProject == self ifTrue: [^ true]. parentProject == nil ifTrue: [self error: 'No project should have a nil parent']. ^ false! Item was added: + ----- Method: Project>>liftSubProjects (in category 'sub-projects & hierarchy') ----- + liftSubProjects + "Lift my sub-projects to my parent project." + + self parent ifNil: [^ Error signal: 'Cannot lift sub-project because I have to parent.']. + + self subProjects do: [:ea | self parent addProject: ea].! Item was added: + ----- Method: Project>>loadState (in category 'enter') ----- + loadState + + self installProjectPreferences. + ChangeSet newChanges: changeSet. + thumbnail ifNotNil: [:form | form unhibernate]. + TranscriptStream newTranscript: transcript. + ! Item was changed: ----- Method: Project>>okToChange (in category 'release') ----- okToChange "Answer whether the window in which the project is housed can be dismissed -- which is destructive. We never clobber a project without confirmation" + | answer | + (self confirm: ('Do you really want to delete the project\{1}\and all its content?' withCRs translated format:{self name})) + ifFalse: [^ false]. - | ok is list | - self subProjects size >0 ifTrue: - [self inform: - ('The project {1} - contains sub-projects. You must remove these - explicitly before removing their parent.' translated format:{self name}). - ^ false]. - ok := world isNil or: [world isMorph not and: [world scheduledControllers size <= 1]]. - ok ifFalse: [self isMorphic ifTrue: - [self parent == CurrentProject - ifFalse: [^ true]]]. "view from elsewhere. just delete it." - ok := self confirm: - ('Really delete the project - {1} - and all its windows?' translated format:{self name}). - - ok ifFalse: [^ false]. + self subProjects ifNotEmpty: [:sp | + answer := Project current uiManager + chooseFrom: #( + "1" 'Lift all sub-projects' + "2" 'Discard all sub-projects (NO UNDO!!)' + "3 or 0" 'Cancel') + lines: #(2) + title: ('The project {1}\contains {2} sub-project(s).' withCRs translated format:{self name. sp size}). + + (answer = 0 or: [answer = 3]) ifTrue: [^ false]. + answer = 1 ifTrue: [self liftSubProjects. ^ true]. + answer = 2 ifTrue: [^ sp allSatisfy: [:ea | ea okToChange]]]. + + ^ true! - world isMorph ifTrue: - [Smalltalk at: #WonderlandCameraMorph ifPresent:[:aClass | - world submorphs do: "special release for wonderlands" - [:m | (m isKindOf: aClass) - and: [m getWonderland release]]]. - "Remove Player classes and metaclasses owned by project" - is := ImageSegment new arrayOfRoots: (Array with: self). - (list := is rootsIncludingPlayers) ifNotNil: - [list do: [:playerCls | - (playerCls respondsTo: #isMeta) ifTrue: - [playerCls isMeta ifFalse: - [playerCls removeFromSystemUnlogged]]]]]. - - self removeChangeSetIfPossible. - "do this last since it will render project inaccessible to #allProjects and their ilk" - ProjectHistory forget: self. - Project deletingProject: self. - ^ true - ! Item was changed: + ----- Method: Project>>parent (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>parent (in category 'accessing') ----- parent ^ parentProject! Item was removed: - ----- Method: Project>>pauseEventRecorder (in category 'enter') ----- - pauseEventRecorder - "Suspend any event recorder, and return it if found" - - ^ nil! Item was removed: - ----- Method: Project>>pauseSoundPlayers (in category 'enter') ----- - pauseSoundPlayers - "Pause sound players, subject to preference settings" - - self subclassResponsibility! Item was changed: ----- Method: Project>>release (in category 'release') ----- release + self delete. + + world == nil ifFalse: [ + world release. - self flag: #bob. "this can be trouble if Projects are reused before garbage collection" - world == nil ifFalse: - [world release. world := nil]. + ^ super release! Item was changed: ----- Method: Project>>removeAllOtherProjects (in category 'shrinking') ----- removeAllOtherProjects "Remove all other projects from the system, and set the current project as the root project. This method was originally implemented as SmalltalkImage>>zapAllOtherProjects in earlier versions of Squeak." "Project current removeAllOtherProjects" + + Project current == self ifFalse: [ + ^ self + addDeferredUIMessage: [self removeAllOtherProjects]; + enter]. + self beTopProject. + + Project rebuildAllProjects. "Does a GC" + Project allProjects do: [:p | p == Project current ifFalse: [p delete]]. + - Project allSubInstancesDo: [:p | p setParent: nil]. - Project current setParent: Project current. - ScheduledControllers == Project current world ifFalse: [ScheduledControllers := nil]. TheWorldMenu allInstancesDo: [:m | 1 to: m class instSize do: [:i | m instVarAt: i put: nil]]. ChangeSet classPool at: #AllChangeSets put: nil. - Project classPool at: #AllProjects put: nil. ProjectHistory currentHistory initialize. CommandHistory resetAllHistory. ChangeSet initialize. + + self assert: Project current == self.! - Project rebuildAllProjects. "Does a GC" - Project allSubInstancesDo: [:p | - p == Project current ifFalse: [Project deletingProject: p]]. - ^Project current. - ! Item was removed: - ----- Method: Project>>resetDisplay (in category 'displaying') ----- - resetDisplay - "Bring the display to a usable state after handling primitiveError." - - self subclassResponsibility! Item was changed: ----- Method: Project>>restore (in category 'displaying') ----- restore + "Redraw the entire project." + + self subclassResponsibility.! - "Redraw the entire Project" - ^self subclassResponsibility! Item was changed: ----- Method: Project>>restoreDisplay (in category 'displaying') ----- restoreDisplay + "Force re-initialization of the display. Uses display-changed notification to re-draw everything." - "Clear the screen to gray and then redisplay all the scheduled views." + Display restore.! - self subclassResponsibility! Item was changed: ----- Method: Project>>saveState (in category 'enter') ----- saveState "Save the current state in me prior to leaving this project" + self saveProjectPreferences. changeSet := ChangeSet current. + thumbnail ifNotNil: [:form | form hibernate]. - thumbnail ifNotNil: [thumbnail hibernate]. transcript := Transcript.! Item was added: + ----- Method: Project>>scheduleProcessForEnter (in category 'enter') ----- + scheduleProcessForEnter + "Complete the enter: by launching a new process" + + self subclassResponsibility! Item was removed: - ----- Method: Project>>scheduleProcessForEnter: (in category 'enter') ----- - scheduleProcessForEnter: showZoom - "Complete the enter: by launching a new process" - - self subclassResponsibility! Item was changed: + ----- Method: Project>>setParent: (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>setParent: (in category 'accessing') ----- setParent: newParent parentProject := newParent. nextProject := previousProject := nil.! Item was removed: - ----- Method: Project>>setWorldForEmergencyRecovery (in category 'enter') ----- - setWorldForEmergencyRecovery - "Prepare world for enter with an absolute minimum of mechanism. - An unrecoverable error has been detected in an isolated project." - - self subclassResponsibility - ! Item was removed: - ----- Method: Project>>setWorldForEnterFrom:recorder: (in category 'enter') ----- - setWorldForEnterFrom: old recorder: recorderOrNil - "Prepare world for enter." - - self subclassResponsibility - ! Item was changed: + ----- Method: Project>>subProjects (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>subProjects (in category 'release') ----- subProjects + "Answer a list of all the subprojects of the receiver. By default, use the list of all projects and traverse the parent." - "Answer a list of all the subprojects of the receiver. By default, there are no sub-projects." + ^ Project allProjects select: [:p | p parent == self and: [p isTopProject not]]! - ^ #()! Item was added: + ----- Method: Project>>suspendProcessForDebug (in category 'enter - recovery') ----- + suspendProcessForDebug + "If this project fails, let another project debug this project's main loop/process. Default behavior is terminating the process. Hence, no debugging." + + self terminateProcessForLeave.! Item was removed: - ----- Method: Project>>triggerClosingScripts (in category 'enter') ----- - triggerClosingScripts - "If any scripts must be run on closing, run them now" - ! Item was added: + ----- Method: Project>>windowIsClosing (in category 'release') ----- + windowIsClosing + + self prepareForDelete.! Item was changed: + ----- Method: Project>>withChildrenDo: (in category 'sub-projects & hierarchy') ----- - ----- Method: Project>>withChildrenDo: (in category 'accessing') ----- withChildrenDo: aBlock "Evaluate the block first with the receiver as argument, then, recursively and depth first, with each of the receiver's children as argument" aBlock value: self. self children do: [:p | p withChildrenDo: aBlock ]! Item was changed: ----- Method: WrappedBreakpoint>>run:with:in: (in category 'evaluation') ----- run: aSelector with: anArray in: aReceiver | process | process := Process forContext: (MethodContext sender: thisContext sender receiver: aReceiver method: method arguments: anArray) priority: Processor activeProcess priority. ToolSet debug: process context: process suspendedContext label: 'Breakpoint in ' , method methodClass name , '>>#' , method selector contents: nil fullView: true. + Project current spawnNewProcessIfThisIsUI: Processor activeProcess. - Project spawnNewProcessIfThisIsUI: Processor activeProcess. thisContext swapSender: nil. Processor activeProcess terminate.! From commits at source.squeak.org Mon May 9 11:43:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:44:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1142.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1142.mcz ==================== Summary ==================== Name: Morphic-mt.1142 Author: mt Time: 9 May 2016, 1:42:29.674729 pm UUID: 25a7ae8a-a714-2f47-9f51-683b0d4f13c4 Ancestors: Morphic-mt.1141 Update according to the projects refactoring in System-mt.827 =============== Diff against Morphic-mt.1141 =============== Item was added: + ----- Method: MorphicProject class>>releaseProjectReferences: (in category 'utilities') ----- + releaseProjectReferences: outgoingProject + "Iterate over all project-view morphs, wherever they may be located. Also consider image segments." + + ImageSegment allSubInstancesDo: [:seg | + seg ifOutPointer: outgoingProject thenAllObjectsDo: [:obj | + (obj isKindOf: ProjectViewMorph) ifTrue: [ + obj owner isSystemWindow + ifTrue: [obj owner model: nil; delete]. + obj abandon]]]. + + ProjectViewMorph allSubInstancesDo: [:p | + p owner isSystemWindow ifTrue: [p owner model: nil; delete]. + p project == outgoingProject ifTrue: [p abandon]].! Item was added: + ----- Method: MorphicProject class>>unloadMorphic (in category 'shrinking') ----- + unloadMorphic + "MorphicProject unloadMorphic" + + Project current isMorphic ifTrue: [ + ^ Error signal: 'You can only unload Morphic from within another kind of project.']. + + MorphicProject removeProjectsFromSystem. + + #(ActiveHand ActiveWorld ActiveEvent World) do: [:ea | + Smalltalk globals removeKey: ea]. + + { 'ToolBuilder-Morphic' . 'MorphicTests' . 'MorphicExtras' . 'Morphic' } + do: [ :package | (MCPackage named: package) unload ]. + + ! Item was added: + ----- Method: MorphicProject>>addProject: (in category 'subprojects') ----- + addProject: project + + | view | + super addProject: project. + + view := Preferences projectViewsInWindows + ifTrue: [ProjectViewMorph newProjectViewInAWindowFor: project] + ifFalse: [ProjectViewMorph on: project]. + + "Do not use #openInWorld: because SystemWindow does things with real-estate manager, which depends on too much global state." + self world + addMorph: view; + startSteppingSubmorphsOf: view.! Item was removed: - ----- Method: MorphicProject>>defaultBackgroundColor (in category 'initialize') ----- - defaultBackgroundColor - ^ Preferences uniformWindowColor! Item was added: + ----- Method: MorphicProject>>deletingProject: (in category 'release') ----- + deletingProject: outgoingProject + + (self world submorphs + select: [:m | m isSystemWindow and: [m model == outgoingProject]] + thenCollect: [:window | window paneMorphs first]) + do: [:projectViewMorph | + projectViewMorph owner "window" model: nil; delete. + projectViewMorph abandon]. + + super deletingProject: outgoingProject.! Item was removed: - ----- Method: MorphicProject>>displaySizeChanged (in category 'display') ----- - displaySizeChanged - "Inform the current project that its display size has changed" - world restoreMorphicDisplay. - world repositionFlapsAfterScreenSizeChange.! Item was removed: - ----- Method: MorphicProject>>finalEnterActions (in category 'enter') ----- - finalEnterActions - "Perform the final actions necessary as the receiver project is entered" - - | navigator armsLengthCmd navType thingsToUnhibernate | - - self initializeMenus. - self projectParameters - at: #projectsToBeDeleted - ifPresent: [ :projectsToBeDeleted | - self removeParameter: #projectsToBeDeleted. - projectsToBeDeleted do: [ :each | - Project deletingProject: each. - each removeChangeSetIfPossible]]. - - Locale switchAndInstallFontToID: self localeID. - - thingsToUnhibernate := world valueOfProperty: #thingsToUnhibernate ifAbsent: [#()]. - thingsToUnhibernate do: [:each | each unhibernate]. - world removeProperty: #thingsToUnhibernate. - - navType := ProjectNavigationMorph preferredNavigator. - armsLengthCmd := self parameterAt: #armsLengthCmd ifAbsent: [nil]. - navigator := world findA: navType. - (Preferences classicNavigatorEnabled and: [Preferences showProjectNavigator and: [navigator isNil]]) ifTrue: - [(navigator := navType new) - bottomLeft: world bottomLeft; - openInWorld: world]. - navigator notNil & armsLengthCmd notNil ifTrue: - [navigator color: Color lightBlue]. - armsLengthCmd notNil ifTrue: - [Preferences showFlapsWhenPublishing - ifFalse: - [self flapsSuppressed: true. - navigator ifNotNil: [navigator visible: false]]. - armsLengthCmd openInWorld: world]. - world reformulateUpdatingMenus. - world presenter positionStandardPlayer. - self assureMainDockingBarPresenceMatchesPreference. - - WorldState addDeferredUIMessage: [self startResourceLoading].! Item was added: + ----- Method: MorphicProject>>finalEnterActions: (in category 'enter') ----- + finalEnterActions: leavingProject + "Perform the final actions necessary as the receiver project is entered" + + | navigator armsLengthCmd navType thingsToUnhibernate | + World := world. "Signifies Morphic" + world install. + world transferRemoteServerFrom: leavingProject world. + "(revertFlag | saveForRevert | forceRevert) ifFalse: [ + (Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [ + self storeSomeSegment]]." + + "Transfer event recorder to me." + leavingProject isMorphic ifTrue: [ + leavingProject world pauseEventRecorder ifNotNil: [:rec | + rec resumeIn: world]]. + + world triggerOpeningScripts. + + + self initializeMenus. + self projectParameters + at: #projectsToBeDeleted + ifPresent: [ :projectsToBeDeleted | + self removeParameter: #projectsToBeDeleted. + projectsToBeDeleted do: [:each | each delete]]. + + Locale switchAndInstallFontToID: self localeID. + + thingsToUnhibernate := world valueOfProperty: #thingsToUnhibernate ifAbsent: [#()]. + thingsToUnhibernate do: [:each | each unhibernate]. + world removeProperty: #thingsToUnhibernate. + + navType := ProjectNavigationMorph preferredNavigator. + armsLengthCmd := self parameterAt: #armsLengthCmd ifAbsent: [nil]. + navigator := world findA: navType. + (Preferences classicNavigatorEnabled and: [Preferences showProjectNavigator and: [navigator isNil]]) ifTrue: + [(navigator := navType new) + bottomLeft: world bottomLeft; + openInWorld: world]. + navigator notNil & armsLengthCmd notNil ifTrue: + [navigator color: Color lightBlue]. + armsLengthCmd notNil ifTrue: + [Preferences showFlapsWhenPublishing + ifFalse: + [self flapsSuppressed: true. + navigator ifNotNil: [navigator visible: false]]. + armsLengthCmd openInWorld: world]. + world reformulateUpdatingMenus. + world presenter positionStandardPlayer. + self assureMainDockingBarPresenceMatchesPreference. + + world repairEmbeddedWorlds.! Item was removed: - ----- Method: MorphicProject>>finalExitActions (in category 'enter') ----- - finalExitActions - - world sleep. - - (world findA: ProjectNavigationMorph) - ifNotNil: [:navigator | navigator retractIfAppropriate]. - - World := nil. - - ActiveWorld := ActiveHand := ActiveEvent := nil. - Sensor flushAllButDandDEvents. "Will be reinstalled by World>>install"! Item was added: + ----- Method: MorphicProject>>finalExitActions: (in category 'enter') ----- + finalExitActions: enteringProject + + world triggerClosingScripts. + + "Pause sound players, subject to preference settings" + (world hasProperty: #letTheMusicPlay) + ifTrue: [world removeProperty: #letTheMusicPlay] + ifFalse: [SoundService stop]. + + world sleep. + + (world findA: ProjectNavigationMorph) + ifNotNil: [:navigator | navigator retractIfAppropriate]. + + "Clean-up global state." + World := nil. + ActiveWorld := ActiveHand := ActiveEvent := nil. + Sensor flushAllButDandDEvents. ! Item was removed: - ----- Method: MorphicProject>>handleFatalDrawingError: (in category 'utilities') ----- - handleFatalDrawingError: errMsg - "Handle a fatal drawing error." - - Display deferUpdates: false. "Just in case" - self primitiveError: errMsg - - "Hm... we should jump into a 'safe' worldState here, but how do we find it?!!"! Item was changed: ----- Method: MorphicProject>>invalidate (in category 'display') ----- invalidate "Invalidate the entire project so that a redraw will be forced later." + world restoreMorphicDisplay.! - world fullRepaintNeeded.! Item was added: + ----- Method: MorphicProject>>okToChange (in category 'release') ----- + okToChange + "If the view is from somewhere else than the current project, just delete it." + + ^ self parent ~~ Project current + or: [super okToChange]! Item was removed: - ----- Method: MorphicProject>>pauseEventRecorder (in category 'enter') ----- - pauseEventRecorder - "Suspend any event recorder, and return it if found" - - ^ world pauseEventRecorder! Item was removed: - ----- Method: MorphicProject>>pauseSoundPlayers (in category 'enter') ----- - pauseSoundPlayers - "Pause sound players, subject to preference settings" - - (world hasProperty: #letTheMusicPlay) - ifTrue: [world removeProperty: #letTheMusicPlay] - ifFalse: [Smalltalk at: #ScorePlayer ifPresent: - [:playerClass | playerClass allSubInstancesDo: - [:player | player pause]]] - ! Item was removed: - ----- Method: MorphicProject>>resetDisplay (in category 'display') ----- - resetDisplay - "Bring the display to a usable state after handling primitiveError." - - world install "init hands and redisplay"! Item was changed: ----- Method: MorphicProject>>restore (in category 'display') ----- restore + "Display world safely. Catch all errors to avoid image freeze. We assume that the world will avoid drawing erroneous morphs twice" + + | finished | + finished := false. + + [finished] whileFalse: [ + [world displayWorldSafely. finished := true] + on: Error do: [:err | world fullRepaintNeeded]]. - world fullDrawOn: Display getCanvas. ! Item was removed: - ----- Method: MorphicProject>>restoreDisplay (in category 'display') ----- - restoreDisplay - "Clear the screen to gray and then redisplay all the scheduled views." - - ^ world restoreMorphicDisplay - ! Item was added: + ----- Method: MorphicProject>>resumeEventRecorder: (in category 'enter') ----- + resumeEventRecorder: recorder + + recorder ifNotNil: [:rec | rec resumeIn: world].! Item was added: + ----- Method: MorphicProject>>scheduleProcessForEnter (in category 'enter') ----- + scheduleProcessForEnter + "Complete the enter: by launching a new process" + + self spawnNewProcess.! Item was removed: - ----- Method: MorphicProject>>scheduleProcessForEnter: (in category 'enter') ----- - scheduleProcessForEnter: showZoom - "Complete the enter: by launching a new process" - - world repairEmbeddedWorlds. - world triggerEvent: #aboutToEnterWorld. - self spawnNewProcess.! Item was removed: - ----- Method: MorphicProject>>setWorldForEmergencyRecovery (in category 'enter') ----- - setWorldForEmergencyRecovery - "Prepare world for enter with an absolute minimum of mechanism. - An unrecoverable error has been detected in an isolated project." - - World := world. - world install. - world triggerOpeningScripts - ! Item was removed: - ----- Method: MorphicProject>>setWorldForEnterFrom:recorder: (in category 'enter') ----- - setWorldForEnterFrom: old recorder: recorderOrNil - "Prepare world for enter." - - World := world. "Signifies Morphic" - world install. - world transferRemoteServerFrom: old world. - "(revertFlag | saveForRevert | forceRevert) ifFalse: [ - (Preferences valueOfFlag: #projectsSentToDisk) ifTrue: [ - self storeSomeSegment]]." - recorderOrNil ifNotNil: [recorderOrNil resumeIn: world]. - world triggerOpeningScripts - ! Item was changed: + ----- Method: MorphicProject>>subProjects (in category 'subprojects') ----- - ----- Method: MorphicProject>>subProjects (in category 'utilities') ----- subProjects "Answer a list of all the subprojects of the receiver. " + + self flag: #fix. "mt: Collect other projects that have this as parent. See Project >> #allProjects" ^world submorphs select: [:m | (m isSystemWindow) and: [m model isKindOf: Project]] thenCollect: [:m | m model].! Item was added: + ----- Method: MorphicProject>>suspendProcessForDebug (in category 'enter') ----- + suspendProcessForDebug + + | p | + self assert: Processor activeProcess == uiProcess. + + p := uiProcess. + uiProcess := nil. + p suspend.! Item was removed: - ----- Method: MorphicProject>>triggerClosingScripts (in category 'enter') ----- - triggerClosingScripts - "If any scripts must be run on closing, run them now" - - CurrentProject world triggerClosingScripts - ! Item was changed: ----- Method: MorphicProject>>viewLocFor: (in category 'display') ----- viewLocFor: exitedProject "Look for a view of the exitedProject, and return its center" world submorphsDo: [:v | (v isSystemWindow and: [v model == exitedProject]) ifTrue: [^ v center]]. + ^ super viewLocFor: exitedProject! - ^ Sensor cursorPoint "default result"! Item was removed: - ----- Method: PasteUpMorph class>>shutDown (in category 'system startup') ----- - shutDown - - World ifNotNil:[ - World triggerEvent: #aboutToLeaveWorld. - ].! Item was removed: - ----- Method: PasteUpMorph class>>startUp (in category 'system startup') ----- - startUp - - World ifNotNil:[ - World restoreMorphicDisplay. - World triggerEvent: #aboutToEnterWorld. - ].! Item was changed: ----- Method: PasteUpMorph>>activeHand (in category 'structure') ----- activeHand + ^ worldState + ifNotNil: [:ws | ws activeHand ifNil: [ws hands first]] + ifNil: [super activeHand]! - ^ worldState ifNotNil: [worldState activeHand] ifNil: [super activeHand]! Item was changed: ----- Method: PasteUpMorph>>install (in category 'world state') ----- install owner := nil. "since we may have been inside another world previously" ActiveWorld := self. ActiveHand := self hands first. "default" ActiveEvent := nil. submorphs do: [:ss | ss owner isNil ifTrue: [ss privateOwner: self]]. "Transcript that was in outPointers and then got deleted." self viewBox: Display boundingBox. Sensor flushAllButDandDEvents. worldState handsDo: [:h | h initForEvents]. self installFlaps. self borderWidth: 0. "default" (Preferences showSecurityStatus and: [SecurityManager default isInRestrictedMode]) ifTrue: [self borderWidth: 2; borderColor: Color red]. self presenter allExtantPlayers do: [:player | player prepareToBeRunning]. + SystemWindow noteTopWindowIn: self.! - SystemWindow noteTopWindowIn: self. - self displayWorldSafely! Item was removed: - ----- Method: PasteUpMorph>>restoreDisplay (in category 'world state') ----- - restoreDisplay - - World restoreMorphicDisplay. "I don't actually expect this to be called"! Item was changed: ----- Method: PasteUpMorph>>restoreMorphicDisplay (in category 'world state') ----- restoreMorphicDisplay - DisplayScreen startUp. - ThumbnailMorph recursionReset. self extent: Display extent; viewBox: Display boundingBox; handsDo: [:h | h visible: true; showTemporaryCursor: nil]; restoreFlapsDisplay; restoreMainDockingBarDisplay; fullRepaintNeeded. WorldState addDeferredUIMessage: [Cursor normal show]. ! Item was changed: ----- Method: Project class>>allMorphicProjects (in category '*Morphic-Support') ----- allMorphicProjects + ^ self allProjects select: [:p | p isMorphic]! - ^ self allProjects select: [:p | p world isMorph]! Item was removed: - ----- Method: ProjectViewMorph>>deletingProject: (in category 'events') ----- - deletingProject: aProject - "My project is being deleted. Delete me as well." - - self flag: #bob. "zapping projects" - - - project == aProject ifTrue: [ - self owner isSystemWindow ifTrue: [self owner model: nil; delete]. - self delete].! Item was changed: ----- Method: ProjectViewMorph>>ensureImageReady (in category 'drawing') ----- ensureImageReady self isTheRealProjectPresent ifFalse: [^self]. project thumbnail ifNil: [ image fill: image boundingBox rule: Form over + fillColor: project color. - fillColor: project defaultBackgroundColor. ^self ]. project thumbnail ~~ lastProjectThumbnail ifTrue: ["scale thumbnail to fit my bounds" lastProjectThumbnail := project thumbnail. self updateImageFrom: lastProjectThumbnail. project thumbnail ifNotNil: [project thumbnail hibernate]. image borderWidth: 1 ]. ! Item was changed: ----- Method: ProjectViewMorph>>expungeProject (in category 'as yet unclassified') ----- expungeProject + (self confirm: ('Do you really want to delete {1} and all its content?' translated format: {project name})) ifFalse: [^ self]. owner isSystemWindow ifTrue: [owner model: nil; delete]. + + project delete.! - ProjectHistory forget: project. - Project deletingProject: project! Item was changed: ----- Method: TheWorldMainDockingBar>>extrasMenuOn: (in category 'submenu - extras') ----- extrasMenuOn: aDockingBar aDockingBar addItem: [ :it| it contents: 'Extras' translated; addSubMenu: [:menu| menu addItem:[:item| item contents: 'Recover Changes' translated; help: 'Recover changes after a crash' translated; icon: MenuIcons smallDocumentClockIcon; target: ChangeList; selector: #browseRecentLog]. menu addLine. menu addItem:[:item| item contents: 'Window Colors' translated; help: 'Changes the window color scheme' translated; addSubMenu:[:submenu| self windowColorsOn: submenu]]. menu addItem:[:item| item contents: 'Set Author Initials' translated; help: 'Sets the author initials' translated; icon: MenuIcons smallUserQuestionIcon; target: Utilities; selector: #setAuthorInitials]. menu addItem:[:item| item contents: 'Restore Display (r)' translated; help: 'Redraws the entire display' translated; + target: Project current; + selector: #restoreDisplay]. - target: World; - selector: #restoreMorphicDisplay]. menu addItem:[:item| item contents: 'Rebuild Menus' translated; help: 'Rebuilds the menu bar' translated; target: TheWorldMainDockingBar; selector: #updateInstances]. menu addLine. menu addItem:[:item| item contents: 'Start Profiler' translated; help: 'Starts the profiler' translated; icon: MenuIcons smallTimerIcon; target: self; selector: #startMessageTally]. menu addItem:[:item| item contents: 'Collect Garbage' translated; help: 'Run the garbage collector and report space usage' translated; target: Utilities; selector: #garbageCollectAndReport]. menu addItem:[:item| item contents: 'Purge Undo Records' translated; help: 'Save space by removing all the undo information remembered in all projects' translated; target: CommandHistory; selector: #resetAllHistory]. menu addItem:[:item| item contents: 'VM statistics' translated; help: 'Virtual Machine information' translated; target: self; selector: #vmStatistics]. menu addLine. menu addItem:[:item| item contents: 'Graphical Imports' translated; help: 'View the global repository called ImageImports; you can easily import external graphics into ImageImports via the FileList' translated; target: (Imports default); selector: #viewImages]. menu addItem:[:item| item contents: 'Standard Graphics Library' translated; help: 'Lets you view and change the system''s standard library of graphics' translated; target: ScriptingSystem; selector: #inspectFormDictionary]. menu addItem:[:item| item contents: 'Annotation Setup' translated; help: 'Click here to get a little window that will allow you to specify which types of annotations, in which order, you wish to see in the annotation panes of browsers and other tools' translated; target: Preferences; selector: #editAnnotations]. menu addItem:[:item| item contents: 'Browse My Changes' translated; help: 'Browse all of my changes since the last time #condenseSources was run.' translated; target: SystemNavigation new; selector: #browseMyChanges]. ] ]! Item was changed: ----- Method: TheWorldMenu>>addRestoreDisplay: (in category 'construction') ----- addRestoreDisplay: menu self fillIn: menu from: { + {'restore display (r)'. { Project current. #restoreDisplay }. 'repaint the screen -- useful for removing unwanted display artifacts, lingering cursors, etc.' }. - {'restore display (r)'. { World. #restoreMorphicDisplay }. 'repaint the screen -- useful for removing unwanted display artifacts, lingering cursors, etc.' }. nil }! From commits at source.squeak.org Mon May 9 11:44:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:45:25 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.333.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.333.mcz ==================== Summary ==================== Name: Graphics-mt.333 Author: mt Time: 9 May 2016, 1:43:37.904729 pm UUID: befff4cc-9751-c34a-9458-cd9dba089632 Ancestors: Graphics-mt.332 Update according to the projects refactoring in System-mt.827 =============== Diff against Graphics-mt.332 =============== Item was changed: ----- Method: DisplayScreen class>>checkForNewScreenSize (in category 'display box access') ----- checkForNewScreenSize "Check whether the screen size has changed and if so take appropriate actions" + Display extent = DisplayScreen actualScreenSize + ifFalse: [Display restore].! - Display extent = DisplayScreen actualScreenSize ifTrue: [^ self]. - DisplayScreen startUp. - Project current ifNotNil:[:p| p displaySizeChanged].! Item was changed: ----- Method: DisplayScreen>>newDepth: (in category 'other') ----- newDepth: pixelSize " Display newDepth: 8. Display newDepth: 1. " + | area need | + (self supportsDisplayDepth: pixelSize) ifFalse:[^self inform:'Display depth ', pixelSize printString, ' is not supported on this system']. + + pixelSize = self depth ifTrue: [^ self "no change"]. + pixelSize abs < self depth ifFalse: + ["Make sure there is enough space" + area := self boundingBox area. "pixels" + + need := (area * (pixelSize abs - self depth) // 8) "new bytes needed" + + Smalltalk lowSpaceThreshold. + (Smalltalk garbageCollectMost <= need + and: [Smalltalk garbageCollect <= need]) + ifTrue: [self error: 'Insufficient free space']]. + + Display setExtent: Display extent depth: pixelSize. + Display beDisplay. + + Project current ifNotNil: [:p | + p + displayDepthChanged; + displaySizeChanged].! - self newDepthNoRestore: pixelSize. - self restore.! Item was removed: - ----- Method: DisplayScreen>>newDepthNoRestore: (in category 'private') ----- - newDepthNoRestore: pixelSize - UIManager default newDisplayDepthNoRestore: pixelSize.! Item was changed: ----- Method: DisplayScreen>>restore (in category 'other') ----- restore + + DisplayScreen startUp. + Project current ifNotNil: [:p| p displaySizeChanged].! - UIManager default restoreDisplay.! Item was changed: ----- Method: DisplayScreen>>restoreAfter: (in category 'other') ----- restoreAfter: aBlock + "Evaluate the block, wait for a mouse click, and then restore the screen." + + aBlock ensure: [ + Sensor waitButton. + self restore].! - UIManager default restoreDisplayAfter: aBlock.! From commits at source.squeak.org Mon May 9 11:44:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:45:26 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.97.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.97.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.97 Author: mt Time: 9 May 2016, 1:44:47.509729 pm UUID: af128e12-ce1c-014d-8c68-396f14b9554f Ancestors: ToolBuilder-Kernel-mt.96 Update according to the projects refactoring in System-mt.827 =============== Diff against ToolBuilder-Kernel-mt.96 =============== Item was removed: - ----- Method: UIManager>>newDisplayDepthNoRestore: (in category 'display') ----- - newDisplayDepthNoRestore: pixelSize - self subclassResponsibility.! Item was removed: - ----- Method: UIManager>>restoreDisplay (in category 'display') ----- - restoreDisplay - self subclassResponsibility.! Item was removed: - ----- Method: UIManager>>restoreDisplayAfter: (in category 'display') ----- - restoreDisplayAfter: aBlock - self subclassResponsibility.! From commits at source.squeak.org Mon May 9 11:45:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:46:22 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.163.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.163.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.163 Author: mt Time: 9 May 2016, 1:45:36.600729 pm UUID: 8cf8dd29-1096-304a-8aef-99c2e8f44e67 Ancestors: ToolBuilder-Morphic-mt.162 Update according to the projects refactoring in System-mt.827 =============== Diff against ToolBuilder-Morphic-mt.162 =============== Item was removed: - ----- Method: MorphicUIManager>>newDisplayDepthNoRestore: (in category 'display') ----- - newDisplayDepthNoRestore: pixelSize - "Change depths. Check if there is enough space!! , di" - | area need | - pixelSize = Display depth ifTrue: [^ self "no change"]. - pixelSize abs < Display depth ifFalse: - ["Make sure there is enough space" - area := Display boundingBox area. "pixels" - - need := (area * (pixelSize abs - Display depth) // 8) "new bytes needed" - + Smalltalk lowSpaceThreshold. - (Smalltalk garbageCollectMost <= need - and: [Smalltalk garbageCollect <= need]) - ifTrue: [self error: 'Insufficient free space']]. - Display setExtent: Display extent depth: pixelSize. - - DisplayScreen startUp! Item was removed: - ----- Method: MorphicUIManager>>restoreDisplay (in category 'display') ----- - restoreDisplay - "Restore the bits on Display" - Project current ifNotNil:[:p| p invalidate; restore].! Item was removed: - ----- Method: MorphicUIManager>>restoreDisplayAfter: (in category 'display') ----- - restoreDisplayAfter: aBlock - "Evaluate the block, wait for a mouse click, and then restore the screen." - - aBlock value. - Sensor waitButton. - self restoreDisplay! From commits at source.squeak.org Mon May 9 11:47:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:47:31 2016 Subject: [squeak-dev] The Trunk: ST80-mt.210.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.210.mcz ==================== Summary ==================== Name: ST80-mt.210 Author: mt Time: 9 May 2016, 1:46:37.619729 pm UUID: 13ac8010-c5b9-3749-8ab7-6de20cc50a59 Ancestors: ST80-mt.209 Update according to the projects refactoring in System-mt.827 =============== Diff against ST80-mt.209 =============== Item was changed: ----- Method: ControlManager class>>shutDown (in category 'snapshots') ----- shutDown "Saves space in snapshots" Project current isMVC + ifTrue: [Project current invalidate].! - ifTrue: [ScheduledControllers unCacheWindows].! Item was changed: ----- Method: ControlManager class>>startUp (in category 'snapshots') ----- startUp Project current isMVC + ifTrue: [Project current restore].! - ifTrue: [ScheduledControllers restore].! Item was added: + ----- Method: ControlManager>>displayWorld (in category 'displaying') ----- + displayWorld + + screenController view window: Display boundingBox; displayDeEmphasized. + self scheduledWindowControllers reverseDo: + [:aController | aController view displayDeEmphasized]. + ! Item was changed: ----- Method: ControlManager>>restore (in category 'displaying') ----- restore "Clear the screen to gray and then redisplay all the scheduled views. Try to be a bit intelligent about the view that wants control and not display it twice if possible." + self unCacheWindows. "assure refresh" - scheduledControllers first view uncacheBits. "assure refresh" self unschedule: screenController; scheduleOnBottom: screenController. + self displayWorld.! - screenController view window: Display boundingBox; displayDeEmphasized. - self scheduledWindowControllers reverseDo: - [:aController | aController view displayDeEmphasized]. - ! Item was added: + ----- Method: MVCProject class>>releaseProjectReferences: (in category 'utilities') ----- + releaseProjectReferences: outgoingProject + + ProjectController allInstancesDo: [:pvc | + [pvc model == outgoingProject ifTrue: [pvc closeAndUnscheduleNoTerminate]] + on: Error do: [:ex | + "Unschedule the bad controller from all managers." + ControlManager allInstancesDo: [:m | m unschedule: pvc]]].! Item was removed: - ----- Method: MVCProject class>>removeProjectsFromSystem (in category 'shrinking') ----- - removeProjectsFromSystem - "Remove all MVC projects from the system, reorganizing the project hierarchy as needed. - This method was originally implemented as SmalltalkImage>>zapMVCProjects in earlier - versions of Squeak." - - "MVCProject removeProjectsFromSystem" - - Smalltalk garbageCollect. "So allInstances is precise" - Project - allSubInstancesDo: [:proj | | window | proj isTopProject - ifTrue: [(proj isKindOf: self) - ifTrue: ["Root project is MVC -- we must become the root" - Project current setParent: Project current.]] - ifFalse: [(proj parent isKindOf: self) - ifTrue: [(proj isKindOf: self) - ifFalse: ["Remove Morphic projects from MVC views " - "... and add them back here." - window := (SystemWindow labelled: proj name) - model: proj. - window - addMorph: (ProjectViewMorph on: proj) - frame: (0 @ 0 corner: 1.0 @ 1.0). - window openInWorld. - proj setParent: Project current]]. - (proj isKindOf: self) - ifTrue: ["Remove MVC projects from Morphic views" - Project deletingProject: proj]]]! Item was changed: ----- Method: MVCProject class>>unloadMVC (in category 'shrinking') ----- unloadMVC "Completely remove MVC from the system. All MVC projects will be destroyed. To reinstall MVC, load all of the ST80 and MVCToolbuilder packages." "MVCProject unloadMVC" + Project current isMVC ifTrue: [ + ^ Error signal: 'You can only unload MVC from within another kind of project.']. + + MVCProject removeProjectsFromSystem. + + Smalltalk globals removeKey: #ScheduledControllers. - self removeProjectsFromSystem. - ScheduledControllers := nil. { 'ToolBuilder-MVC' . 'ST80Tests' . 'ST80Tools' . 'ST80' } do: [ :package | (MCPackage named: package) unload ]. ! Item was added: + ----- Method: MVCProject>>addProject: (in category 'as yet unclassified') ----- + addProject: project + + | view | + super addProject: project. + + view := ProjectView new + model: project; + minimumSize: 50@30; + borderWidth: 2; + resizeInitially; + yourself. + view controller status: #open.! Item was removed: - ----- Method: MVCProject>>defaultBackgroundColor (in category 'initialize') ----- - defaultBackgroundColor - ^ Color white! Item was added: + ----- Method: MVCProject>>deletingProject: (in category 'release') ----- + deletingProject: outgoingProject + + "Clean-up my project views." + (self world controllersSatisfying: [:m | m model = outgoingProject]) + do: [:projectController | + self world unschedule: projectController. + projectController view + model: nil; + release]. + + super deletingProject: outgoingProject.! Item was removed: - ----- Method: MVCProject>>displaySizeChanged (in category 'display') ----- - displaySizeChanged - "Inform the current project that its display size has changed" - world "ScheduledControllers" restore; searchForActiveController! Item was added: + ----- Method: MVCProject>>finalEnterActions: (in category 'enter') ----- + finalEnterActions: leavingProject + + ScheduledControllers := world.! Item was removed: - ----- Method: MVCProject>>finalExitActions (in category 'enter') ----- - finalExitActions - - self world unCacheWindows. - Sensor flushAllButDandDEvents. "Will be reinstalled by World>>install" - - ScheduledControllers := nil.! Item was added: + ----- Method: MVCProject>>finalExitActions: (in category 'enter') ----- + finalExitActions: enteringProject + + super finalExitActions: enteringProject. + + self world unCacheWindows. + Sensor flushAllButDandDEvents. + + ScheduledControllers := nil.! Item was changed: ----- Method: MVCProject>>invalidate (in category 'display') ----- invalidate "Invalidate the entire project so that a redraw will be forced later." + + world + unCacheWindows; + unschedule: world screenController; + scheduleOnBottom: world screenController.! - world "ScheduledControllers" unCacheWindows! Item was added: + ----- Method: MVCProject>>okToChange (in category 'release') ----- + okToChange + "If there is no open window, we are fine to close." + + ^ (self parent ~~ Project current + or: [self world scheduledControllers size <= 1]) + or: [super okToChange]! Item was removed: - ----- Method: MVCProject>>pauseSoundPlayers (in category 'enter') ----- - pauseSoundPlayers - "Pause sound players, subject to preference settings" - - Smalltalk at: #ScorePlayer ifPresent:[:playerClass| - playerClass allSubInstancesDo: [:player | player pause]]! Item was removed: - ----- Method: MVCProject>>resetDisplay (in category 'display') ----- - resetDisplay - "Bring the display to a usable state after handling primitiveError." - - world searchForActiveController! Item was changed: ----- Method: MVCProject>>restore (in category 'display') ----- restore + "Redraw the entire Project. Ignore errors to keep system responsive." + + [world displayWorld] on: Error do: [:ex | "Ignore."].! - "Redraw the entire Project" - world "ScheduledControllers" restore.! Item was removed: - ----- Method: MVCProject>>restoreDisplay (in category 'display') ----- - restoreDisplay - "Clear the screen to gray and then redisplay all the scheduled views." - - Display extent = DisplayScreen actualScreenSize - ifFalse: - [DisplayScreen startUp. - world unCacheWindows]. - world restore! Item was added: + ----- Method: MVCProject>>scheduleProcessForEnter (in category 'enter') ----- + scheduleProcessForEnter + "Complete the enter: by launching a new process. Note that we have to use a helper process because MVC will terminate the current process immediately when searching for an active controller. There might, however, be other code to be executed when returning from this call." + + [world searchForActiveController] newProcess + priority: Processor userSchedulingPriority; + resume.! Item was removed: - ----- Method: MVCProject>>scheduleProcessForEnter: (in category 'enter') ----- - scheduleProcessForEnter: showZoom - "Complete the enter: by launching a new process" - - | newProcess | - SystemWindow clearTopWindow. "break external ref to this project" - newProcess := [ - world resetActiveController. "in case of walkback in #restore" - showZoom ifFalse: [world restore]. - world searchForActiveController - ] newProcess priority: Processor userSchedulingPriority. - newProcess resume. "lose the current process and its referenced morphs" - ! Item was changed: ----- Method: MVCProject>>setAsBackground: (in category 'utilities') ----- setAsBackground: aForm + "Set aForm as a background image." - "Set aForm as a background image." world screenController model form: aForm. + Display restore.! - Display restoreAfter: []! Item was removed: - ----- Method: MVCProject>>setWorldForEmergencyRecovery (in category 'enter') ----- - setWorldForEmergencyRecovery - "Prepare world for enter with an absolute minimum of mechanism. - An unrecoverable error has been detected in an isolated project." - - World := nil. - Smalltalk at: #ScheduledControllers put: world. - ScheduledControllers restore - ! Item was removed: - ----- Method: MVCProject>>setWorldForEnterFrom:recorder: (in category 'enter') ----- - setWorldForEnterFrom: old recorder: recorderOrNil - "Prepare world for enter." - - Smalltalk at: #ScheduledControllers put: world.! Item was changed: ----- Method: MVCProject>>subProjects (in category 'utilities') ----- subProjects "Answer a list of all the subprojects of the receiver. " + + ^ (self world controllersSatisfying: [:m | m model isKindOf: Project]) + collect: [:controller | controller model]! - ^(world controllersSatisfying: [:m | m model isKindOf: Project]) - collect: [:c | c model]! Item was changed: ----- Method: MVCProject>>viewLocFor: (in category 'display') ----- viewLocFor: exitedProject "Look for a view of the exitedProject, and return its center" + ^ (world controllerWhoseModelSatisfies: [:p | p == exitedProject]) + ifNil: [super viewLocFor: exitedProject] + ifNotNil: [:ctlr | ^ctlr view windowBox center]! - (world controllerWhoseModelSatisfies: [:p | p == exitedProject]) - ifNotNil: [:ctlr | ^ctlr view windowBox center]. - ^Sensor cursorPoint "default result"! Item was changed: ----- Method: ModalController>>closeAndUnscheduleNoTerminate (in category 'as yet unclassified') ----- closeAndUnscheduleNoTerminate "Erase the receiver's view and remove it from the collection of scheduled views, but do not terminate the current process." + ScheduledControllers unschedule: self. view erase. + view release.! - view release. - ScheduledControllers unschedule: self.! Item was added: + ----- Method: Project class>>allMVCProjects (in category '*ST80-Support') ----- + allMVCProjects + + ^ self allProjects select: [:p | p isMVC]! Item was changed: + ----- Method: Project>>isMVC (in category '*ST80-Testing') ----- - ----- Method: Project>>isMVC (in category '*ST80-testing') ----- isMVC ^ false! Item was changed: ----- Method: ScreenController>>closeUnchangedWindows (in category 'menu messages') ----- closeUnchangedWindows "Close any window that doesn't have unaccepted input." | clean | (SelectionMenu confirm: 'Do you really want to close all windows except those with unaccepted edits?') ifFalse: [^ self]. clean := ScheduledControllers scheduledControllers select: [:c | c model canDiscardEdits and: [(c isKindOf: ScreenController) not]]. clean do: [:c | c closeAndUnscheduleNoTerminate]. + + Project current restoreDisplay. - self restoreDisplay. ! Item was changed: ----- Method: ScreenController>>restoreDisplay (in category 'menu messages') ----- restoreDisplay "Clear the screen to gray and then redisplay all the scheduled views." + Project current restoreDisplay.! - Project current restoreDisplay - ! Item was changed: ----- Method: StandardSystemController>>closeAndUnschedule (in category 'scheduling') ----- closeAndUnschedule "Erase the receiver's view and remove it from the collection of scheduled views." status := #closed. + ScheduledControllers unschedule: self. view erase. view release. + ScheduledControllers searchForActiveController.! - ScheduledControllers unschedule: self; searchForActiveController - ! Item was changed: ----- Method: StandardSystemController>>closeAndUnscheduleNoErase (in category 'scheduling') ----- closeAndUnscheduleNoErase "Remove the scheduled view from the collection of scheduled views. Set its status to closed but do not erase." status := #closed. + ScheduledControllers unschedule: self. + view release.! - view release. - ScheduledControllers unschedule: self! Item was changed: ----- Method: StandardSystemController>>closeAndUnscheduleNoTerminate (in category 'scheduling') ----- closeAndUnscheduleNoTerminate "Erase the receiver's view and remove it from the collection of scheduled views, but do not terminate the current process." status := #closed. + ScheduledControllers unschedule: self. view erase. view release. - ScheduledControllers unschedule: self. ! Item was changed: ----- Method: StandardSystemController>>controlTerminate (in category 'basic control sequence') ----- controlTerminate status == #closed + ifTrue: [ - ifTrue: - [view ~~ nil ifTrue: [view release]. ScheduledControllers unschedule: self. + view ~~ nil ifTrue: [view release]. ^self]. view deEmphasize; cacheBits. view isCollapsed ifFalse: [model modelSleep].! Item was changed: ----- Method: StandardSystemView>>release (in category 'initialize-release') ----- release + model windowIsClosing; release. - model windowIsClosing. self isCollapsed ifTrue: [savedSubViews do: [:v | v release]]. super release. ! From commits at source.squeak.org Mon May 9 11:47:53 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:48:34 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-mt.46.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-mt.46.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-mt.46 Author: mt Time: 9 May 2016, 1:47:41.745729 pm UUID: 2a10f65b-2be6-df4a-a334-843a48e32628 Ancestors: ToolBuilder-MVC-mt.45 Update according to the projects refactoring in System-mt.827 =============== Diff against ToolBuilder-MVC-mt.45 =============== Item was removed: - ----- Method: MVCUIManager>>newDisplayDepthNoRestore: (in category 'display') ----- - newDisplayDepthNoRestore: pixelSize - "Change depths. Check if there is enough space!! , di" - | area need | - pixelSize = Display depth ifTrue: [^ self "no change"]. - pixelSize abs < Display depth ifFalse: - ["Make sure there is enough space" - area := Display boundingBox area. "pixels" - ScheduledControllers scheduledWindowControllers do: - [:aController | area := area + aController view windowBox area]. - need := (area * (pixelSize abs - Display depth) // 8) "new bytes needed" - + Smalltalk lowSpaceThreshold. - (Smalltalk garbageCollectMost <= need - and: [Smalltalk garbageCollect <= need]) - ifTrue: [self error: 'Insufficient free space']]. - Display setExtent: Display extent depth: pixelSize. - ScheduledControllers updateGray. - DisplayScreen startUp! Item was removed: - ----- Method: MVCUIManager>>restoreDisplay (in category 'display') ----- - restoreDisplay - "Restore the bits on Display" - Project current ifNotNil:[:p| p invalidate; restore].! Item was removed: - ----- Method: MVCUIManager>>restoreDisplayAfter: (in category 'display') ----- - restoreDisplayAfter: aBlock - "Evaluate the block, wait for a mouse click, and then restore the screen." - - aBlock value. - Sensor waitButton. - self restoreDisplay! From commits at source.squeak.org Mon May 9 11:48:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:50:23 2016 Subject: [squeak-dev] The Trunk: CommandLine-mt.6.mcz Message-ID: Marcel Taeumel uploaded a new version of CommandLine to project The Trunk: http://source.squeak.org/trunk/CommandLine-mt.6.mcz ==================== Summary ==================== Name: CommandLine-mt.6 Author: mt Time: 9 May 2016, 1:48:28.770729 pm UUID: d49df7d5-6cc8-6a41-87da-2d7e4efe1a23 Ancestors: CommandLine-mt.5 Update according to the projects refactoring in System-mt.827 =============== Diff against CommandLine-mt.5 =============== Item was removed: - ----- Method: DummyUIManager>>newDisplayDepthNoRestore: (in category 'display') ----- - newDisplayDepthNoRestore: pixelSize - "Change depths. Check if there is enough space!! , di" - | area need | - pixelSize = Display depth ifTrue: [^ self "no change"]. - pixelSize abs < Display depth ifFalse: - ["Make sure there is enough space" - area := Display boundingBox area. "pixels" - - need := (area * (pixelSize abs - Display depth) // 8) "new bytes needed" - + Smalltalk lowSpaceThreshold. - (Smalltalk garbageCollectMost <= need - and: [Smalltalk garbageCollect <= need]) - ifTrue: [self error: 'Insufficient free space']]. - Display setExtent: Display extent depth: pixelSize. - - DisplayScreen startUp! Item was removed: - ----- Method: DummyUIManager>>restoreDisplay (in category 'display') ----- - restoreDisplay! Item was removed: - ----- Method: DummyUIManager>>restoreDisplayAfter: (in category 'display') ----- - restoreDisplayAfter: aBlock - aBlock value. - Sensor waitButton.! From commits at source.squeak.org Mon May 9 11:49:35 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 11:50:24 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.27.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.27.mcz ==================== Summary ==================== Name: 51Deprecated-mt.27 Author: mt Time: 9 May 2016, 1:49:24.070729 pm UUID: 5e20e975-6555-044d-9ce9-595e86558e8a Ancestors: 51Deprecated-mt.26 Update according to the projects refactoring in System-mt.827 =============== Diff against 51Deprecated-mt.26 =============== Item was added: + ----- Method: DisplayScreen>>newDepthNoRestore: (in category '*51Deprecated') ----- + newDepthNoRestore: pixelSize + + self deprecated. + self newDepth: pixelSize.! Item was changed: ----- Method: DummyUIManager>>checkForNewDisplaySize (in category '*51Deprecated') ----- checkForNewDisplaySize + self deprecated: 'Use DisplayScreen class >> #checkForNewScreenSize. Note that is actually no task for the UI manager. It belongs to the projects main loop.'. - self deprecated: 'Use Display >> #checkForNewScreenSize. Note that is actually no task for the UI manager. It belongs to the projects main loop.'. Display extent = DisplayScreen actualScreenSize ifTrue: [^ self]. DisplayScreen startUp.! Item was added: + ----- Method: DummyUIManager>>restoreDisplay (in category '*51Deprecated') ----- + restoreDisplay! Item was added: + ----- Method: MVCProject>>pauseSoundPlayers (in category '*51Deprecated') ----- + pauseSoundPlayers + "Pause sound players, subject to preference settings" + + Smalltalk at: #ScorePlayer ifPresent:[:playerClass| + playerClass allSubInstancesDo: [:player | player pause]]! Item was added: + ----- Method: MorphicProject>>pauseEventRecorder (in category '*51Deprecated') ----- + pauseEventRecorder + "Suspend any event recorder, and return it if found" + + self deprecated: 'mt: See implementors of #finalEnterActions:.'. + ^ world pauseEventRecorder + ! Item was added: + ----- Method: MorphicProject>>pauseSoundPlayers (in category '*51Deprecated') ----- + pauseSoundPlayers + "Pause sound players, subject to preference settings" + + self deprecated: 'mt: See implementors of #finalExitActions:.'. + + (world hasProperty: #letTheMusicPlay) + ifTrue: [world removeProperty: #letTheMusicPlay] + ifFalse: [Smalltalk + at: #ScorePlayer + ifPresent: [:playerClass | playerClass + allSubInstancesDo: [:player | player pause]]] + ! Item was added: + ----- Method: MorphicProject>>triggerClosingScripts (in category '*51Deprecated') ----- + triggerClosingScripts + "If any scripts must be run on closing, run them now" + + self deprecated: 'mt: You can do this in #finalExitActions:.'. + self world triggerClosingScripts. + ! Item was changed: ----- Method: PasteUpMorph>>handleFatalDrawingError: (in category '*51Deprecated-Morphic') ----- handleFatalDrawingError: errMsg "Handle a fatal drawing error." + + self deprecated. + Project current handleFatalDrawingError: errMsg.! - self flag: #toRemove. "Implementation moved to Project, but are there external packages with senders?" - Project current handleFatalDrawingError: errMsg - ! Item was changed: ----- Method: PasteUpMorph>>privateOuterDisplayWorld (in category '*51Deprecated-Morphic') ----- privateOuterDisplayWorld + self deprecated. worldState displayWorld: self submorphs: submorphs ! Item was added: + ----- Method: PasteUpMorph>>restoreDisplay (in category '*51Deprecated-Morphic') ----- + restoreDisplay + + self deprecated. + Project current restoreDisplay.! Item was added: + ----- Method: Project class>>spawnNewProcess (in category '*51Deprecated') ----- + spawnNewProcess + "Meaningful only for a Morphic project, but retained here to protect for possible + references from e.g. image segments" + + self current spawnNewProcess! Item was added: + ----- Method: Project class>>spawnNewProcessAndTerminateOld: (in category '*51Deprecated') ----- + spawnNewProcessAndTerminateOld: terminate + "Meaningful only for a Morphic project, but retained here to protect for possible + references from e.g. image segments" + + ^ self current spawnNewProcessAndTerminateOld: terminate + ! Item was added: + ----- Method: Project class>>spawnNewProcessIfThisIsUI: (in category '*51Deprecated') ----- + spawnNewProcessIfThisIsUI: suspendedProcess + "Meaningful only for a Morphic project, but retained here to protect for possible + references from e.g. image segments" + + self current spawnNewProcessIfThisIsUI: suspendedProcess + + ! Item was added: + ----- Method: Project>>finalEnterActions (in category '*51Deprecated') ----- + finalEnterActions + + self deprecated: 'mt: Use #finalEnterActions: getting the leaving project as argument.'. + self finalEnterActions: nil.! Item was added: + ----- Method: Project>>finalExitActions (in category '*51Deprecated') ----- + finalExitActions + + self deprecated: 'mt: Use #finalExitActions: getting the entering project as argument.'. + self finalExitActions: nil.! Item was added: + ----- Method: Project>>pauseEventRecorder (in category '*51Deprecated') ----- + pauseEventRecorder + "Suspend any event recorder, and return it if found" + + self deprecated: 'mt: See implementors of #finalEnterActions:.'. + ^ nil! Item was added: + ----- Method: Project>>pauseSoundPlayers (in category '*51Deprecated') ----- + pauseSoundPlayers + "Pause sound players, subject to preference settings" + + self deprecated: 'mt: See implementors of #finalExitActions:.'.! Item was added: + ----- Method: Project>>resetDisplay (in category '*51Deprecated') ----- + resetDisplay + "Bring the display to a usable state after handling primitiveError." + + self deprecated. + self restoreDisplay.! Item was added: + ----- Method: Project>>triggerClosingScripts (in category '*51Deprecated') ----- + triggerClosingScripts + "If any scripts must be run on closing, run them now" + + self deprecated: 'mt: You can do this in #finalExitActions:.'.! Item was added: + ----- Method: UIManager>>newDisplayDepthNoRestore: (in category '*51Deprecated') ----- + newDisplayDepthNoRestore: pixelSize + + self deprecated. + Display newDepth: pixelSize.! Item was added: + ----- Method: UIManager>>restoreDisplay (in category '*51Deprecated') ----- + restoreDisplay + + Display restore.! Item was added: + ----- Method: UIManager>>restoreDisplayAfter: (in category '*51Deprecated') ----- + restoreDisplayAfter: aBlock + + self deprecated. + Display restoreAfter: aBlock.! From lewis at mail.msen.com Mon May 9 12:20:52 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 9 12:20:55 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <201605091141.u49BfXb9010546@shell.msen.com> References: <201605091141.u49BfXb9010546@shell.msen.com> Message-ID: <20160509122052.GB13611@shell.msen.com> Marcel, This is a great batch of improvements, and I think it will make the projects mechanism much easier to work with in the future. Thanks! Dave On Mon, May 09, 2016 at 11:41:08AM +0000, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.827.mcz > > ==================== Summary ==================== > > Name: System-mt.827 > Author: mt > Time: 9 May 2016, 1:41:03.140729 pm > UUID: e7d678e1-e245-0a49-b449-faca6c947a76 > Ancestors: System-mt.826 > > REFACTORING THE PROJECTS MECHANISM > - Reduce and clean-up the footprint of new project kinds: saveState/loadState, finalEnterActions:/finalExitActions:, startResourceLoading/abortResourceLoading, aboutToLeaveWorld/aboutToEnterWorld (object events), scheduleProcessForEnter/terminateProcessForLeave > - Reduce full display restoring to #invalidate and #restore, which gives projects the chance to 1) clear their drawing caches and 2) redraw all their graphical objects. > - Clean-up project add/remove wrt. sub-projects and the whole project hierarchy. See #isTopProject, #beTopProject, #addProject:, #liftSubProjects, #removeProjectsFromSystem > - Provide a second way -- in addition to the Emergency Evaluator -- for recovering from recursive errors by trying a parent project of a different kind first. See #handlePrimitiveError:. This allows for more convenient recovery of such errors. > - For shrinking images, make MVCProject class >> #unloadMVC work again. This also applies to MorphicProject class >> #unloadMorphic in the near future. > > =============== Diff against System-mt.826 =============== > From gettimothy at zoho.com Mon May 9 12:32:21 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 9 12:32:28 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <20160509122052.GB13611@shell.msen.com> References: <201605091141.u49BfXb9010546@shell.msen.com> <20160509122052.GB13611@shell.msen.com> Message-ID: <1549581071d.b774dffa64027.2838516024783553733@zoho.com> Have you tried it on the latest 64 bit Trunk? I tried it on my 64 bit boot and got some errors. If you don't have a 64 bit cogspur running, I will get back to you with the errors later today. ---- On Mon, 09 May 2016 08:20:52 -0400 David T. Lewis <lewis@mail.msen.com> wrote ---- Marcel, This is a great batch of improvements, and I think it will make the projects mechanism much easier to work with in the future. Thanks! Dave On Mon, May 09, 2016 at 11:41:08AM +0000, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.827.mcz > > ==================== Summary ==================== > > Name: System-mt.827 > Author: mt > Time: 9 May 2016, 1:41:03.140729 pm > UUID: e7d678e1-e245-0a49-b449-faca6c947a76 > Ancestors: System-mt.826 > > REFACTORING THE PROJECTS MECHANISM > - Reduce and clean-up the footprint of new project kinds: saveState/loadState, finalEnterActions:/finalExitActions:, startResourceLoading/abortResourceLoading, aboutToLeaveWorld/aboutToEnterWorld (object events), scheduleProcessForEnter/terminateProcessForLeave > - Reduce full display restoring to #invalidate and #restore, which gives projects the chance to 1) clear their drawing caches and 2) redraw all their graphical objects. > - Clean-up project add/remove wrt. sub-projects and the whole project hierarchy. See #isTopProject, #beTopProject, #addProject:, #liftSubProjects, #removeProjectsFromSystem > - Provide a second way -- in addition to the Emergency Evaluator -- for recovering from recursive errors by trying a parent project of a different kind first. See #handlePrimitiveError:. This allows for more convenient recovery of such errors. > - For shrinking images, make MVCProject class >> #unloadMVC work again. This also applies to MorphicProject class >> #unloadMorphic in the near future. > > =============== Diff against System-mt.826 =============== > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/843c2899/attachment.htm From commits at source.squeak.org Mon May 9 12:33:05 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 12:33:07 2016 Subject: [squeak-dev] The Trunk: System-mt.828.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.828.mcz ==================== Summary ==================== Name: System-mt.828 Author: mt Time: 9 May 2016, 2:32:42.424999 pm UUID: 88be4fe7-a85d-da42-aa7b-3df3da6bcb48 Ancestors: System-mt.827 Fixes sub-project lifting, which is an option when deleting projects that have sub-projects. =============== Diff against System-mt.827 =============== Item was changed: ----- Method: Project>>setParent: (in category 'sub-projects & hierarchy') ----- setParent: newParent + "Notify the current parent to discard views and other references. Avoids deleting that project later if the former parent is deleted. You can only have one parent anyway.." + self parent ~= newParent ifTrue: [self parent deletingProject: self]. + parentProject := newParent. nextProject := previousProject := nil.! From commits at source.squeak.org Mon May 9 14:38:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 14:38:29 2016 Subject: [squeak-dev] The Trunk: ST80-mt.211.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.211.mcz ==================== Summary ==================== Name: ST80-mt.211 Author: mt Time: 9 May 2016, 4:38:16.550999 pm UUID: 34bab149-f6f2-194f-b1ba-5695b06e143b Ancestors: ST80-mt.210 Fixes font rendering in pop-up menus. Also removes the hack that forced black text on white background. Now, the example at the end of the method works again. Note that the crappy font rendering was due to an issue with bitmapped fonts at the moment. We cannot check whether a StrikeFont has nice AA in its glyphs. =============== Diff against ST80-mt.210 =============== Item was changed: ----- Method: Paragraph>>asForm (in category 'converting') ----- asForm "Answer a Form made up of the bits that represent the receiver's displayable text." + + | theForm | + theForm := (Form extent: compositionRectangle extent depth: Display depth) - | theForm oldBackColor oldForeColor | - textStyle isTTCStyle ifTrue: [ - theForm := (Form extent: compositionRectangle extent depth: 32) offset: offset. + - ] ifFalse: [ - theForm := (ColorForm extent: compositionRectangle extent) - offset: offset; - colors: (Array - with: (backColor == nil ifTrue: [Color transparent] ifFalse: [backColor]) - with: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])). - ]. - oldBackColor := backColor. - oldForeColor := foreColor. - backColor := Color white. - foreColor := Color black. self displayOn: theForm at: 0@0 clippingBox: theForm boundingBox rule: Form over fillColor: nil. + - backColor := oldBackColor. - foreColor := oldForeColor. ^ theForm "Example: | p | p := 'Abc' asParagraph. p foregroundColor: Color red backgroundColor: Color black. p asForm displayOn: Display at: 30@30 rule: Form over" ! From Marcel.Taeumel at hpi.de Mon May 9 14:05:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 14:40:41 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <1549581071d.b774dffa64027.2838516024783553733@zoho.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> Message-ID: <1462802739174-4894068.post@n4.nabble.com> Hi, those changes should not affect 64-bits at all. I don't have a 64-bits image at hand. Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894068.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Mon May 9 14:55:57 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 9 14:56:00 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <1549581071d.b774dffa64027.2838516024783553733@zoho.com> References: <201605091141.u49BfXb9010546@shell.msen.com> <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> Message-ID: <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> I updated my working trunk image, which is 32 bit Spur with lots of other stuff loaded. I had no problems, but it's possible we might need to do something with update maps, so please do report back if you see errors. I would not expect any issues related to 64 bit image, but you never know. Dave > Have you tried it on the latest 64 bit Trunk? > > I tried it on my 64 bit boot and got some errors. If you don't have a 64 > bit cogspur running, I will get back to you with the errors later today. > > > > > ---- On Mon, 09 May 2016 08:20:52 -0400 David T. Lewis > <lewis@mail.msen.com> wrote ---- > > Marcel, > > This is a great batch of improvements, and I think it will make the > projects > mechanism much easier to work with in the future. > > Thanks! > Dave > > > On Mon, May 09, 2016 at 11:41:08AM +0000, commits@source.squeak.org wrote: > > Marcel Taeumel uploaded a new version of System to project The Trunk: > > http://source.squeak.org/trunk/System-mt.827.mcz > > > > ==================== Summary ==================== > > > > Name: System-mt.827 > > Author: mt > > Time: 9 May 2016, 1:41:03.140729 pm > > UUID: e7d678e1-e245-0a49-b449-faca6c947a76 > > Ancestors: System-mt.826 > > > > REFACTORING THE PROJECTS MECHANISM > > - Reduce and clean-up the footprint of new project kinds: > saveState/loadState, finalEnterActions:/finalExitActions:, > startResourceLoading/abortResourceLoading, > aboutToLeaveWorld/aboutToEnterWorld (object events), > scheduleProcessForEnter/terminateProcessForLeave > > - Reduce full display restoring to #invalidate and #restore, which > gives projects the chance to 1) clear their drawing caches and 2) redraw > all their graphical objects. > > - Clean-up project add/remove wrt. sub-projects and the whole project > hierarchy. See #isTopProject, #beTopProject, #addProject:, > #liftSubProjects, #removeProjectsFromSystem > > - Provide a second way -- in addition to the Emergency Evaluator -- > for recovering from recursive errors by trying a parent project of a > different kind first. See #handlePrimitiveError:. This allows for more > convenient recovery of such errors. > > - For shrinking images, make MVCProject class >> #unloadMVC > work again. This also applies to MorphicProject class >> > #unloadMorphic in the near future. > > > > =============== Diff against System-mt.826 =============== > > > > > > > > > > From commits at source.squeak.org Mon May 9 15:07:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 15:08:12 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.334.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.334.mcz ==================== Summary ==================== Name: Graphics-mt.334 Author: mt Time: 9 May 2016, 5:07:05.805554 pm UUID: c4344c59-fdf3-5546-a693-8c04fb5fcbb2 Ancestors: Graphics-mt.333 Access color depth information not only in TTCFonts but in all kinds of AbstractFont. =============== Diff against Graphics-mt.333 =============== Item was added: + ----- Method: AbstractFont>>depth (in category 'accessing') ----- + depth + "Returns the glyphs' color depth." + + self subclassResponsibility.! Item was added: + ----- Method: FixedFaceFont>>depth (in category 'accessing') ----- + depth + + ^ self baseFont depth! Item was added: + ----- Method: StrikeFont>>depth (in category 'accessing') ----- + depth + + ^ self glyphs depth! Item was added: + ----- Method: TextStyle>>maxDepth (in category 'accessing') ----- + maxDepth + + ^ (self fonts collect: [:font | font depth]) max! From commits at source.squeak.org Mon May 9 15:09:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 15:10:03 2016 Subject: [squeak-dev] The Trunk: ST80-mt.212.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.212.mcz ==================== Summary ==================== Name: ST80-mt.212 Author: mt Time: 9 May 2016, 5:09:09.023554 pm UUID: ffa77d99-631e-bc4b-a739-fd4326b8140e Ancestors: ST80-mt.211 For the sake of documentation, recover the resource-optimized version of rendering paragraphs into forms. =============== Diff against ST80-mt.211 =============== Item was changed: ----- Method: Paragraph>>asForm (in category 'converting') ----- asForm "Answer a Form made up of the bits that represent the receiver's displayable text." | theForm | + theForm := textStyle maxDepth = 1 + ifTrue: [ + (ColorForm extent: compositionRectangle extent) + offset: offset; + colors: { + backColor ifNil: [Color transparent]. + foreColor ifNil: [Color black]}] + ifFalse: [ + (Form extent: compositionRectangle extent depth: Display depth) + offset: offset]. - theForm := (Form extent: compositionRectangle extent depth: Display depth) - offset: offset. self displayOn: theForm at: 0@0 clippingBox: theForm boundingBox rule: Form over fillColor: nil. ^ theForm "Example: | p | p := 'Abc' asParagraph. p foregroundColor: Color red backgroundColor: Color black. p asForm displayOn: Display at: 30@30 rule: Form over" ! From gettimothy at zoho.com Mon May 9 15:30:39 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 9 15:30:44 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> References: <201605091141.u49BfXb9010546@shell.msen.com> <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> Message-ID: <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> Download image and changes. http://www.mirandabanda.org/files/Cog/SpurImages/ trunk50-64-15711.image Built my 64 bit VM locally (Thanks Eliot!) Cog/build.linux64x64/squeak.cog.spur/build ~usr/bin/cogspur64linuxht/squeak -version 5.0-3692 Sat May 7 17:32:00 EDT 2016 gcc 4.8.2 [Production Spur 64-bit VM] CoInterpreter VMMaker.oscog-eem.1855 uuid: d8e4a3c2-a3bf-4adc-b224-8012903a1ef4 May 7 2016 StackToRegisterMappingCogit VMMaker.oscog-nice.1853 uuid: 3ff63b2d-9dc9-4d6a-b3ff-fb6d37f1085e May 7 2016 VM: r3692 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2016-05-02 01:12:46 -0400 Plugins: r3688 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins Linux muriel 3.10.17 #2 SMP Wed Oct 23 16:34:38 CDT 2013 x86_64 AMD Phenom(tm) II X4 965 Processor AuthenticAMD GNU/Linux plugin path: /home/wm/usr/bin/cogspur64linuxht/lib/squeak/5.0-3692 [default: /home/wm/usr/bin/cogspur64linuxht/lib/squeak/5.0-3692/] Launch squeak.... Create project, enter it, exit it. Tools->File List->projects-refactoring-may.cs 'From Squeak5.1 of 30 April 2016 [latest update: #15862] on 1 May 2016 at 6:49:39 pm'! INSTALL button clicked. Mouse click->World menu->Save Debugger launches with title bar: MessageNotUnderstood: MorphicProject>>isMVC I don't know how to print the stack trace for you, but the method that threw DNU is CrontrolManager class >>shutDown shutDown Project current isMVC ifTrue: [Project current invalidate] Exit the debugger. Attempt to enter the project I created successfully fails and launches a debugger: MessageNotUnderstood: SoundService clas >>stop Let me know if I can be of help. cheers. ---- On Mon, 09 May 2016 10:55:57 -0400 David T. Lewis <lewis@mail.msen.com> wrote ---- I updated my working trunk image, which is 32 bit Spur with lots of other stuff loaded. I had no problems, but it's possible we might need to do something with update maps, so please do report back if you see errors. I would not expect any issues related to 64 bit image, but you never know. Dave > Have you tried it on the latest 64 bit Trunk? > > I tried it on my 64 bit boot and got some errors. If you don't have a 64 > bit cogspur running, I will get back to you with the errors later today. > > > > > ---- On Mon, 09 May 2016 08:20:52 -0400 David T. Lewis > &lt;lewis@mail.msen.com&gt; wrote ---- > > Marcel, > > This is a great batch of improvements, and I think it will make the > projects > mechanism much easier to work with in the future. > > Thanks! > Dave > > > On Mon, May 09, 2016 at 11:41:08AM +0000, commits@source.squeak.org wrote: > &gt; Marcel Taeumel uploaded a new version of System to project The Trunk: > &gt; http://source.squeak.org/trunk/System-mt.827.mcz > &gt; > &gt; ==================== Summary ==================== > &gt; > &gt; Name: System-mt.827 > &gt; Author: mt > &gt; Time: 9 May 2016, 1:41:03.140729 pm > &gt; UUID: e7d678e1-e245-0a49-b449-faca6c947a76 > &gt; Ancestors: System-mt.826 > &gt; > &gt; REFACTORING THE PROJECTS MECHANISM > &gt; - Reduce and clean-up the footprint of new project kinds: > saveState/loadState, finalEnterActions:/finalExitActions:, > startResourceLoading/abortResourceLoading, > aboutToLeaveWorld/aboutToEnterWorld (object events), > scheduleProcessForEnter/terminateProcessForLeave > &gt; - Reduce full display restoring to #invalidate and #restore, which > gives projects the chance to 1) clear their drawing caches and 2) redraw > all their graphical objects. > &gt; - Clean-up project add/remove wrt. sub-projects and the whole project > hierarchy. See #isTopProject, #beTopProject, #addProject:, > #liftSubProjects, #removeProjectsFromSystem > &gt; - Provide a second way -- in addition to the Emergency Evaluator -- > for recovering from recursive errors by trying a parent project of a > different kind first. See #handlePrimitiveError:. This allows for more > convenient recovery of such errors. > &gt; - For shrinking images, make MVCProject class &gt;&gt; #unloadMVC > work again. This also applies to MorphicProject class &gt;&gt; > #unloadMorphic in the near future. > &gt; > &gt; =============== Diff against System-mt.826 =============== > &gt; > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/0b7f1809/attachment.htm From asqueaker at gmail.com Mon May 9 15:30:11 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 9 15:30:55 2016 Subject: [squeak-dev] Remove all empty message/class categories after code update In-Reply-To: <1462778557558-4893991.post@n4.nabble.com> References: <1462778557558-4893991.post@n4.nabble.com> Message-ID: Maybe make it part of a #shrink / #cleanUp process... On Mon, May 9, 2016 at 2:22 AM, marcel.taeumel wrote: > Hi, there! > > What do you think about removing all empty system categories (resp. class > categories) and message categories after loading code? > > Only for Squeak update? > Also for any Monticello merge/load? > > Would anybody miss those empty categories? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Marcel.Taeumel at hpi.de Mon May 9 15:16:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 15:51:42 2016 Subject: [squeak-dev] Re: Remove all empty message/class categories after code update In-Reply-To: References: <1462778557558-4893991.post@n4.nabble.com> Message-ID: <1462806999113-4894078.post@n4.nabble.com> Hi, there. Such a shrinking would then happen in the ReleaseBuilder? Do we do that for a release or should we? Best, Marcel -- View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991p4894078.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Mon May 9 15:32:12 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 16:07:15 2016 Subject: Project Refactorings (was: [squeak-dev] The Trunk: System-mt.827.mcz) In-Reply-To: <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> Message-ID: <1462807932106-4894080.post@n4.nabble.com> Hi, Timothy. Your image is too old. Trunk update number is #15923 at the moment. Do not load the change set I gave you several days ago but update from the update stream. What happens then? Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894080.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Mon May 9 16:11:44 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 9 16:12:27 2016 Subject: [squeak-dev] The Trunk: System-mt.826.mcz In-Reply-To: <57307142.01d6370a.d25c8.ffffe718SMTPIN_ADDED_MISSING@mx.google.com> References: <57307142.01d6370a.d25c8.ffffe718SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Marcel, is this philosophically consistent with the change you made to "inspect it" a while back? You had changed "inspect it" to answer the PluggableSystemWindow instead of the object being inspected. Your argument, IIRC, was that there is "no other way" to get the window. The only persons who ever want the PluggableWindow are IDE developers, who could just change #inspect themself, privately, or just add a new method and use that.. #inspect has been a USER method in Smalltalk-80 since its inception 30 years ago. Unfortnately, it now only caters to its 2 or 3 internal IDE developers (e.g., you and me), instead of hundreds of users who might use #inspect as an inline debugging tool. So, my question is, is this the same philosophy with "debug it?" Or is this more like the original #inspect which provided better access to the underlying domain object being debugged? On Mon, May 9, 2016 at 6:14 AM, wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.826.mcz > > ==================== Summary ==================== > > Name: System-mt.826 > Author: mt > Time: 9 May 2016, 1:14:47.861723 pm > UUID: ec4d495c-324c-214f-9944-0e2be7e78ec6 > Ancestors: System-mt.825 > > Return the result of a debug-it for further processing. > > =============== Diff against System-mt.825 =============== > > Item was changed: > ----- Method: Project>>debugMethod:forReceiver:inContext: (in category 'debugging') ----- > debugMethod: aCompiledMethod forReceiver: anObject inContext: aContextOrNil > "Just execute the method and return the result. We cannot know how interactive debugging works for arbitrary projects." > > + ^ aCompiledMethod > - aCompiledMethod > valueWithReceiver: anObject > arguments: (aContextOrNil > ifNil: [#()] > + ifNotNil: [{aContextOrNil}])! > - ifNotNil: [{aContextOrNil}]).! > > From gettimothy at zoho.com Mon May 9 16:16:53 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 9 16:17:00 2016 Subject: =?UTF-8?Q?Re:_Re:_Project_Refactorings_(was:_[sque?= =?UTF-8?Q?ak-dev]_The_Trunk:=C2=A0=C2=A0=C2=A0=C2=A0System-mt.827.mcz)?= In-Reply-To: <1462807932106-4894080.post@n4.nabble.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> <1462807932106-4894080.post@n4.nabble.com> Message-ID: <154964e9573.edf48a2769697.8893964124797569679@zoho.com> Hi Marcel Where do you get the latest 64 Spur trunk #15923 image? I have been using Eliots Cog Blog here->http://www.mirandabanda.org/files/Cog/SpurImages/ thx ---- On Mon, 09 May 2016 11:32:12 -0400 marcel.taeumel<Marcel.Taeumel@hpi.de> wrote ---- Hi, Timothy. Your image is too old. Trunk update number is #15923 at the moment. Do not load the change set I gave you several days ago but update from the update stream. What happens then? Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894080.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/5d9f54b7/attachment.htm From asqueaker at gmail.com Mon May 9 16:19:09 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 9 16:19:51 2016 Subject: [squeak-dev] Re: Remove all empty message/class categories after code update In-Reply-To: <1462806999113-4894078.post@n4.nabble.com> References: <1462778557558-4893991.post@n4.nabble.com> <1462806999113-4894078.post@n4.nabble.com> Message-ID: Yes. IIRC, there is a boolean argument allowing two levels of shrinkage, for release, we pass false to allow the more-conservative form of shrinkage. We could put this clean up on that or as part of the more-aggressive shrink... On Mon, May 9, 2016 at 10:16 AM, marcel.taeumel wrote: > Hi, there. > > Such a shrinking would then happen in the ReleaseBuilder? Do we do that for > a release or should we? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991p4894078.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Marcel.Taeumel at hpi.de Mon May 9 15:46:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 16:21:29 2016 Subject: =?UTF-8?Q?Re:_Re:_Project_Refactorings_(was:_[sque?= =?UTF-8?Q?ak-dev]_The_Trunk:=C2=A0=C2=A0=C2=A0=C2=A0System-mt.827.mcz)?= In-Reply-To: <154964e9573.edf48a2769697.8893964124797569679@zoho.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> <1462807932106-4894080.post@n4.nabble.com> <154964e9573.edf48a2769697.8893964124797569679@zoho.com> Message-ID: <1462808785222-4894084.post@n4.nabble.com> Hi Timothy, Dave mentioned that there may be a separate update map for 64-bit images? Even if there is, the update button should load the latest code. Did you try updating your downloaded image? Via "Squeak" -> "Update" or by do-it "MCMcmUpdater updateFromServer". Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894084.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Mon May 9 16:23:30 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon May 9 16:23:48 2016 Subject: [squeak-dev] Re: Remove all empty message/class categories after code update In-Reply-To: <1462806999113-4894078.post@n4.nabble.com> References: <1462778557558-4893991.post@n4.nabble.com> <1462806999113-4894078.post@n4.nabble.com> Message-ID: SystemOrganizer class >> #cleanUp: and ClassOrganizer class >> #cleanUp: will do that when the argument is true, which is done in RealseBuilder class >> #prepareNewBuild:. Levente On Mon, 9 May 2016, marcel.taeumel wrote: > Hi, there. > > Such a shrinking would then happen in the ReleaseBuilder? Do we do that for > a release or should we? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Remove-all-empty-message-class-categories-after-code-update-tp4893991p4894078.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From leves at caesar.elte.hu Mon May 9 16:26:11 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon May 9 16:26:17 2016 Subject: =?ISO-8859-15?Q?Re=3A_Re=3A_Project_Refactorings_=28was=3A_=5Bsqueak-dev=5D_The_Trunk=3A=A0=A0=A0=A0System-mt=2E827=2Emcz=29?= In-Reply-To: <1462808785222-4894084.post@n4.nabble.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> <1462807932106-4894080.post@n4.nabble.com> <154964e9573.edf48a2769697.8893964124797569679@zoho.com> <1462808785222-4894084.post@n4.nabble.com> Message-ID: On Mon, 9 May 2016, marcel.taeumel wrote: > Hi Timothy, > > Dave mentioned that there may be a separate update map for 64-bit images? > Even if there is, the update button should load the latest code. No, it's the same. Levente > > Did you try updating your downloaded image? Via "Squeak" -> "Update" or by > do-it "MCMcmUpdater updateFromServer". > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894084.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From gettimothy at zoho.com Mon May 9 16:32:21 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 9 16:32:27 2016 Subject: =?UTF-8?Q?Re:_Re:_Project_Refactorings_(was:_[sque?= =?UTF-8?Q?ak-dev]_The_Trunk:=C2=A0=C2=A0=C2=A0=C2=A0System-mt.827.mcz)?= In-Reply-To: <1462807932106-4894080.post@n4.nabble.com> References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> <1462807932106-4894080.post@n4.nabble.com> Message-ID: <154965cbe7d.b4f3dafd69885.2295664208044313343@zoho.com> Hi Marcel. Thanks. I ran Squeak->Update Squeak. I have not loaded the changeset you provided. I assume it is included in the update. Save image works fine. The Project >> is MVC method exists. Thanks for your help. ---- On Mon, 09 May 2016 11:32:12 -0400 marcel.taeumel<Marcel.Taeumel@hpi.de> wrote ---- Hi, Timothy. Your image is too old. Trunk update number is #15923 at the moment. Do not load the change set I gave you several days ago but update from the update stream. What happens then? Best, Marcel -- View this message in context: http://forum.world.st/Project-Refactorings-was-squeak-dev-The-Trunk-System-mt-827-mcz-tp4894057p4894080.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/7e5a6102/attachment.htm From Marcel.Taeumel at hpi.de Mon May 9 15:59:40 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 9 16:34:43 2016 Subject: [squeak-dev] Re: The Trunk: System-mt.826.mcz In-Reply-To: References: Message-ID: <1462809580638-4894088.post@n4.nabble.com> Hi Chris, this does not compare with Object >> inspect. I called it "debug it" because it is the thing you that happens when you click "debug it" somewhere. We could, however, implement String >> #debugIt and return the debuggers system window. But even then, process scheduling will usually not allow you to process the result. This somewhat compares with all the things in ToolSet and StandardToolSet. As you can see, they all return the result of the delegated call. For example, StandardToolSet >> #browse:selector:. With the return here, new kinds of projects can use some basic means of debugging an expression, which is merely an evaluation of it. Therefore the return. --- Anyway, you can always call #model on the result of, for example, "Morph new inspect" to get the model. :-) Speaking of return values, I find it not good that Browser >> #openBrowserView:label: does not return the "browser view", which would be a morph in Morphic, but the model. This makes it very difficult to find the thing that was created as the view. --- Of course, all these things affect only IDE developers. Users usually do-it things. Then, the return value does not matter at all. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-System-mt-826-mcz-tp4894030p4894088.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Mon May 9 17:35:05 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 9 17:35:08 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: The VM still does not display anything in the white window after I did apt-get dist-upgrade, and copy the .sources file to the same directly. (But I did not have an egg this morning). I'll try some display options. But also, it appears that the source code for the Cog seems to have the part I wrote for the composition input. The goal may be nearer than I originally thought. On Fri, May 6, 2016 at 6:23 PM, Yoshiki Ohshima wrote: > On Fri, May 6, 2016 at 5:58 PM, tim Rowledge wrote: >> >> Another possibility is Yoshiki has an old version of Raspbian; old kernel from early last year (?) wouldn?t let us futz wit the timer thread priority without pain. It?s been a while since that was fixed but if you have an old Raspbian? except that ought to prevent the all-in-one system running. But this is unix, which is carefully designed to drive one to the edge of madness, so maybe you just had the wrong kind of egg for your breakfast last time there was a blue moon. > > That sounds plausible. I did "apt-get update" to get some packages > loadable but did not go on to update the entire system. I'll try that. > > > > -- > -- Yoshiki -- -- Yoshiki From tim at rowledge.org Mon May 9 17:43:48 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 17:43:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> > On 09-05-2016, at 10:35 AM, Yoshiki Ohshima wrote: > > The VM still does not display anything in the white window after I did > apt-get dist-upgrade, and copy the .sources file to the same directly. > (But I did not have an egg this morning). I'll try some display > options. But also, it appears that the source code for the Cog seems > to have the part I wrote for the composition input. The goal may be > nearer than I originally thought. That?s really disturbing. I mean, no egg for breakfast? No, seriously, there?s no way you ought to be getting strange display problems. So far I?ve never had them on dozens of Pi?s over dozens of release mixes of Raspbian and VM and image. And even many actual displays both real and virtual. My suggestion for any serious Raspbian update is do fresh load fro mPi central. I?ve read many people?s problem with inconsistent results of dist-upgrade and update and mixed up apt-gets and so on. Quicker to download/burn/reboot. Aaand?. of course; built the new vm with hostwindowplugin included to respond to Levente and what do I get? blank white screen. Sigh. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim USER ERROR: replace user and press any key to continue. From tim at rowledge.org Mon May 9 17:44:22 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 17:44:26 2016 Subject: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz In-Reply-To: References: <1462777519961-4893981.post@n4.nabble.com> Message-ID: <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> > On 09-05-2016, at 3:16 AM, Levente Uzonyi wrote: > > The thing is that there's no HostWindowPlugin at all in http://www.mirandabanda.org/files/Cog/VM/latest/cogspur64linuxht-16.18.3692.tgz . Dang, he?s right. There is no building of HostWindowPlugin in the linux build trees I?ve checked. Which must mean I?ve only ever set the size of the Scratch window on my iMac, which is seriously weirding me. I would *swear* (loudly) that we?ve been building with it included. Oh well, let?s try it out and see. {later} damnitstupidmake {later} damnintstupidirritatingmake {time passes?}at last it?s in the buildlist {late}ooh it appears to build? {later} it produces the blank white screen Yoshiki mentioned. Bugger. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother!" said Pooh, as Piglet pressed on the Microwave... From Yoshiki.Ohshima at acm.org Mon May 9 17:47:28 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 9 17:47:31 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> Message-ID: On Mon, May 9, 2016 at 10:43 AM, tim Rowledge wrote: > >> On 09-05-2016, at 10:35 AM, Yoshiki Ohshima wrote: >> >> The VM still does not display anything in the white window after I did >> apt-get dist-upgrade, and copy the .sources file to the same directly. >> (But I did not have an egg this morning). I'll try some display >> options. But also, it appears that the source code for the Cog seems >> to have the part I wrote for the composition input. The goal may be >> nearer than I originally thought. > > Aaand?. of course; built the new vm with hostwindowplugin included to respond to Levente and what do I get? blank white screen. Sigh. Oh, so you do get blank white screen? So, I guess I'd checkout an older revision of the svn repo just for now. What would a good revision to go back to? -- -- Yoshiki From lewis at mail.msen.com Mon May 9 17:51:32 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 9 17:51:35 2016 Subject: Project Refactorings (was: [squeak-dev] The =?iso-8859-1?Q?Trunk:=A0=A0=A0=A0System-mt.827.mcz?=) In-Reply-To: References: <20160509122052.GB13611@shell.msen.com> <1549581071d.b774dffa64027.2838516024783553733@zoho.com> <56614.136.1.1.103.1462805757.squirrel@webmail.msen.com> <1549624424b.b68d1acf69155.4113087321264154537@zoho.com> <1462807932106-4894080.post@n4.nabble.com> <154964e9573.edf48a2769697.8893964124797569679@zoho.com> <1462808785222-4894084.post@n4.nabble.com> Message-ID: <22160.136.1.1.107.1462816292.squirrel@webmail.msen.com> > On Mon, 9 May 2016, marcel.taeumel wrote: > >> Hi Timothy, >> >> Dave mentioned that there may be a separate update map for 64-bit >> images? >> Even if there is, the update button should load the latest code. > > No, it's the same. > > Levente > Yes, they are definitely the same. I only meant to say that if someone /does/ find a problem doing a trunk update for some reason, then we would probably want to check the update maps. But I did not see any problems myself, and I see no reason for concern. Dave From tim at rowledge.org Mon May 9 17:52:35 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 17:52:39 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> Message-ID: <65C820B7-6552-4046-B753-B1173CFAB3B3@rowledge.org> > On 09-05-2016, at 10:44 AM, tim Rowledge wrote: > > {later} it produces the blank white screen Yoshiki mentioned. Bugger. Rebuild to leave out hostwindowplugin just in case? Nope; no difference. So, somewhere between 3633 & 3692 we?ve borked the unix related display stuff. Happy Happy! tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Clearly misunderstood From tim at rowledge.org Mon May 9 17:54:15 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 17:54:19 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> Message-ID: <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> > On 09-05-2016, at 10:47 AM, Yoshiki Ohshima wrote: > Oh, so you do get blank white screen? So, I guess I'd checkout an > older revision of the svn repo just for now. What would a good > revision to go back to? The last one I have built for Pi and running ok is 3663 and it just went bad in 3692. So I guess we start binary dividing... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "How many Motie Mediators does it take to chage a lightbulb?? "Are you insane? Only Crazy Eddie would want to change *anything*!" From tim at rowledge.org Mon May 9 18:05:52 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:05:56 2016 Subject: Borked unix displaying in vm3692 (wasRe: [squeak-dev] International text input on X11) In-Reply-To: <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: An svn diff -r 3663:3692 in platforms/unix shows only some (to me) innocuous changes in vm/aio.c More unixy expertise required to say if that has anything to do with it. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BA: Branch Approximate From lewis at mail.msen.com Mon May 9 18:07:46 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 9 18:07:48 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.332.mcz In-Reply-To: <65C820B7-6552-4046-B753-B1173CFAB3B3@rowledge.org> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <65C820B7-6552-4046-B753-B1173CFAB3B3@rowledge.org> Message-ID: <38576.136.1.1.165.1462817266.squirrel@webmail.msen.com> > >> On 09-05-2016, at 10:44 AM, tim Rowledge wrote: >> >> {later} it produces the blank white screen Yoshiki mentioned. Bugger. > > Rebuild to leave out hostwindowplugin just in case??? > > Nope; no difference. So, somewhere between 3633 & 3692 we???ve borked the > unix related display stuff. Happy Happy! > Tim, I was looking at this last night (trying to see how much difference we have in sqUnixX11.c in the branches, yikes), and I noticed that platforms/unix/sqHostWindowPlugin.c in oscog is missing the type declaration fixes for things declared int that should be sqInt. Copy the one from SVN trunk for a quick fix, sorry I can't look at it myself right now. This would affect 64 bit only, so probably not part of the problem, but just so you know. Dave From tim at rowledge.org Mon May 9 18:16:04 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:16:09 2016 Subject: Borked unix displaying in vm3692 (wasRe: [squeak-dev] International text input on X11) In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: <4E9B990D-C1F4-400B-8316-4C95BCA5A8E3@rowledge.org> > On 09-05-2016, at 11:05 AM, tim Rowledge wrote: > > An svn diff -r 3663:3692 in platforms/unix shows only some (to me) innocuous changes in vm/aio.c > > More unixy expertise required to say if that has anything to do with it. Building with the older version makes no difference for me. Let?s try an older tree. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim 42.7 percent of all statistics are made up on the spot. From tim at rowledge.org Mon May 9 18:24:37 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:24:41 2016 Subject: Borked unix displaying in vm3692 (wasRe: [squeak-dev] International text input on X11) In-Reply-To: <4E9B990D-C1F4-400B-8316-4C95BCA5A8E3@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> <4E9B990D-C1F4-400B-8316-4C95BCA5A8E3@rowledge.org> Message-ID: <3F947131-D5BD-4171-B840-43225135D0E8@rowledge.org> > On 09-05-2016, at 11:16 AM, tim Rowledge wrote: > > >> On 09-05-2016, at 11:05 AM, tim Rowledge wrote: >> >> An svn diff -r 3663:3692 in platforms/unix shows only some (to me) innocuous changes in vm/aio.c >> >> More unixy expertise required to say if that has anything to do with it. > > Building with the older version makes no difference for me. Let?s try an older tree. 3680 fails, let?s try 3670 tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Death to all fanatics! From Yoshiki.Ohshima at acm.org Mon May 9 18:37:39 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 9 18:37:42 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: I confirm that r3663 does work on my Pi2 for Squeak5.0-15113.image. I'll try to make some progress from there for now. On Mon, May 9, 2016 at 10:54 AM, tim Rowledge wrote: > >> On 09-05-2016, at 10:47 AM, Yoshiki Ohshima wrote: >> Oh, so you do get blank white screen? So, I guess I'd checkout an >> older revision of the svn repo just for now. What would a good >> revision to go back to? > > The last one I have built for Pi and running ok is 3663 and it just went bad in 3692. So I guess we start binary dividing... > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > "How many Motie Mediators does it take to chage a lightbulb?? > "Are you insane? Only Crazy Eddie would want to change *anything*!" > > > > -- -- Yoshiki From tim at rowledge.org Mon May 9 18:40:34 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:40:39 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: > On 09-05-2016, at 11:37 AM, Yoshiki Ohshima wrote: > > I confirm that r3663 does work on my Pi2 for Squeak5.0-15113.image. > I'll try to make some progress from there for now. 3680 fails, 3670 work; 3675 fail; 3673 won?t build tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim When all else fails, let a = 7. If that doesn't help, then read the manual. From tim at rowledge.org Mon May 9 18:52:08 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:52:13 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: > On 09-05-2016, at 11:40 AM, tim Rowledge wrote: > > >> On 09-05-2016, at 11:37 AM, Yoshiki Ohshima wrote: >> >> I confirm that r3663 does work on my Pi2 for Squeak5.0-15113.image. >> I'll try to make some progress from there for now. > > 3680 fails, 3670 work; 3675 fail; 3673 won?t build 3672 fails. At this rate my Pi will wear out its SD card by the end of the day? 3671 works. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim A conclusion is the place where you got tired of thinking. From tim at rowledge.org Mon May 9 18:53:09 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 18:53:13 2016 Subject: Borked unix displaying in vm3692 (wasRe: [squeak-dev] International text input on X11) In-Reply-To: <3F947131-D5BD-4171-B840-43225135D0E8@rowledge.org> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> <4E9B990D-C1F4-400B-8316-4C95BCA5A8E3@rowledge.org> <3F947131-D5BD-4171-B840-43225135D0E8@rowledge.org> Message-ID: <76F77F08-FC9D-48E7-B662-D574C0745477@rowledge.org> > On 09-05-2016, at 11:24 AM, tim Rowledge wrote: > > >> On 09-05-2016, at 11:16 AM, tim Rowledge wrote: >> >> >>> On 09-05-2016, at 11:05 AM, tim Rowledge wrote: >>> >>> An svn diff -r 3663:3692 in platforms/unix shows only some (to me) innocuous changes in vm/aio.c >>> >>> More unixy expertise required to say if that has anything to do with it. >> >> Building with the older version makes no difference for me. Let?s try an older tree. > > 3680 fails, let?s try 3670 Per the X11 input thread for those not paying attention to everything, 3671 is the last one I can get a display displaying on a Pi. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Klingon Code Warrior:- 6) "Our competitors are without honor!" From commits at source.squeak.org Mon May 9 21:58:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 9 21:58:20 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160509215819.8296.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068065.html Name: Morphic-mt.1138 Ancestors: Morphic-mt.1137 Move #representsSameBrowseeAs: from Morphic extension to tool package to simplify load/unload of Morphic. Although the Tools package is somewhat coupled with Morphic, it is more consistent with all the other implementations of #representsSameBrowseeAs:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068066.html Name: Tools-mt.698 Ancestors: Tools-nice.697 Move #representsSameBrowseeAs: from Morphic extension to tool package to simplify load/unload of Morphic. Although the Tools package is somewhat coupled with Morphic, it is more consistent with all the other implementations of #representsSameBrowseeAs:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068067.html Name: System-mt.824 Ancestors: System-mt.823 Support for unloading Morphic. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068068.html Name: Morphic-mt.1139 Ancestors: Morphic-mt.1138 Support for unloading Morphic. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068069.html Name: EToys-mt.135 Ancestors: EToys-mt.134 Adds etoys-specific code that was still in the base system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068070.html Name: System-mt.825 Ancestors: System-mt.824 Moves etoys-specific code that was still in the base system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068071.html Name: Tools-mt.699 Ancestors: Tools-mt.698 Return the result of debug-it requests for further processing. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068072.html Name: System-mt.826 Ancestors: System-mt.825 Return the result of a debug-it for further processing. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068073.html Name: Morphic-mt.1140 Ancestors: Morphic-mt.1139 Look up a morph's active hand also via the world it is in. Use this when activating a system window or deleting a morph. -- This makes much Morphic code work from within MVC or testing environments. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068074.html Name: Morphic-mt.1141 Ancestors: Morphic-mt.1140 Forgot one update due to latest full-screen changes. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068075.html Name: System-mt.827 Ancestors: System-mt.826 REFACTORING THE PROJECTS MECHANISM - Reduce and clean-up the footprint of new project kinds: saveState/loadState, finalEnterActions:/finalExitActions:, startResourceLoading/abortResourceLoading, aboutToLeaveWorld/aboutToEnterWorld (object events), scheduleProcessForEnter/terminateProcessForLeave - Reduce full display restoring to #invalidate and #restore, which gives projects the chance to 1) clear their drawing caches and 2) redraw all their graphical objects. - Clean-up project add/remove wrt. sub-projects and the whole project hierarchy. See #isTopProject, #beTopProject, #addProject:, #liftSubProjects, #removeProjectsFromSystem - Provide a second way -- in addition to the Emergency Evaluator -- for recovering from recursive errors by trying a parent project of a different kind first. See #handlePrimitiveError:. This allows for more convenient recovery of such errors. - For shrinking images, make MVCProject class >> #unloadMVC work again. This also applies to MorphicProject class >> #unloadMorphic in the near future. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068076.html Name: Morphic-mt.1142 Ancestors: Morphic-mt.1141 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068077.html Name: Graphics-mt.333 Ancestors: Graphics-mt.332 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068078.html Name: ToolBuilder-Kernel-mt.97 Ancestors: ToolBuilder-Kernel-mt.96 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068079.html Name: ToolBuilder-Morphic-mt.163 Ancestors: ToolBuilder-Morphic-mt.162 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068080.html Name: ST80-mt.210 Ancestors: ST80-mt.209 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068081.html Name: ToolBuilder-MVC-mt.46 Ancestors: ToolBuilder-MVC-mt.45 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068082.html Name: CommandLine-mt.6 Ancestors: CommandLine-mt.5 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068083.html Name: 51Deprecated-mt.27 Ancestors: 51Deprecated-mt.26 Update according to the projects refactoring in System-mt.827 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068084.html Name: System-mt.828 Ancestors: System-mt.827 Fixes sub-project lifting, which is an option when deleting projects that have sub-projects. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068085.html Name: ST80-mt.211 Ancestors: ST80-mt.210 Fixes font rendering in pop-up menus. Also removes the hack that forced black text on white background. Now, the example at the end of the method works again. Note that the crappy font rendering was due to an issue with bitmapped fonts at the moment. We cannot check whether a StrikeFont has nice AA in its glyphs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068086.html Name: Graphics-mt.334 Ancestors: Graphics-mt.333 Access color depth information not only in TTCFonts but in all kinds of AbstractFont. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068087.html Name: ST80-mt.212 Ancestors: ST80-mt.211 For the sake of documentation, recover the resource-optimized version of rendering paragraphs into forms. ============================================= From eliot.miranda at gmail.com Mon May 9 22:26:34 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon May 9 22:26:37 2016 Subject: [squeak-dev] tab width Message-ID: Hi All, how do people think about the minimum tab with being a pixel? I think this is wrong and should be a space. Further, if you agree, how do you feel about changing the text renderer so that the minimum tab with /is/ a space? In the Smalltalk-80- text renderer there was a single pixel space; it may still be there. But having a tab that can be almost invisible I find problematic. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160509/d75a067d/attachment.htm From tim at rowledge.org Mon May 9 23:30:48 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 9 23:30:51 2016 Subject: [squeak-dev] tab width In-Reply-To: References: Message-ID: <44358AC2-25A5-4543-8DD8-735D3D7A297B@rowledge.org> > On 09-05-2016, at 3:26 PM, Eliot Miranda wrote: > how do people think about the minimum tab with being a pixel? I think this is wrong and should be a space. Depends on what you see a tab as meaning I guess. If, for example, a tab is a character of indeterminate width used to space the following character to a certain y position according to a table, a rule or signs from the stars, then inevitably (ooh, an accidental pun!) there will be case where it gets rendered as a 1 pixel wide lump. I suppose under certain rules it could strictly be 0 pixels? With fixed width chars it seems ?natural? that a tab should be at least a space wide but a proportional spaced font? Dunno. Maybe the real problem is our habit of using tabs to align code? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: NBRM: Unconditional No BRanch Multiple From Yoshiki.Ohshima at acm.org Tue May 10 00:23:35 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 10 00:23:37 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima wrote: > The VM still does not display anything in the white window after I did > apt-get dist-upgrade, and copy the .sources file to the same directly. > (But I did not have an egg this morning). I'll try some display > options. But also, it appears that the source code for the Cog seems > to have the part I wrote for the composition input. The goal may be > nearer than I originally thought. It may not as closer than I thought, however. The world evolved to use ibus; we'd need to add some more stuff, such as DBus... I'll report more tomorrow. -- -- Yoshiki From stephan at stack.nl Tue May 10 04:34:08 2016 From: stephan at stack.nl (Stephan Eggermont) Date: Tue May 10 04:34:18 2016 Subject: [squeak-dev] Re: International text input on X11 In-Reply-To: References: <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: On 09-05-16 20:52, tim Rowledge wrote: > At this rate my Pi will wear out its SD card by the end of the day? Does a Pi3 have enough memory to build on a ram disk? Stephan From smalltalker2 at mac.com Tue May 10 04:43:59 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Tue May 10 04:44:04 2016 Subject: [squeak-dev] Re: International text input on X11 In-Reply-To: References: <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <141E451F-AE03-403E-89CE-94B5BA2F2C6C@rowledge.org> <1A303744-F05E-427C-96FE-D4743CDD76DE@rowledge.org> Message-ID: The pi3 has 1 gb of memory, it'd have to be a small disk. Never tried it. > On May 9, 2016, at 21:34, Stephan Eggermont wrote: > >> On 09-05-16 20:52, tim Rowledge wrote: >> At this rate my Pi will wear out its SD card by the end of the day? > Does a Pi3 have enough memory to build on a ram disk? > > Stephan > > > From Marcel.Taeumel at hpi.de Tue May 10 07:01:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 10 07:36:33 2016 Subject: [squeak-dev] Re: tab width In-Reply-To: <44358AC2-25A5-4543-8DD8-735D3D7A297B@rowledge.org> References: <44358AC2-25A5-4543-8DD8-735D3D7A297B@rowledge.org> Message-ID: <1462863685314-4894164.post@n4.nabble.com> Hi, there. Tab widths are specified in terms of a TextStyle, which is basically a set of fonts plus extras. So, at the moment there seem to be no direct means to fetch tab widths with respect to a character width of a specific font. For details, see CharacterScanner >> #plainTab. Still, tabs are characters that should have some font information associated with them.... hmmm... There is a pool dictionary "TextConstants", which includes "DefaultTab", "DefaultTabsArray", and "DefaultMarginTabsArray". Changing DefaultTab should recompute both arrays/caches. In my image, DefaultTab is 24 pixels. In my experience, some tools offer an configuration to say how much spaces a tab character should span. So, for a proportional font, users could easily account for very small spaces by just raising that factor. Hence, I see no need for specifying tabs pixel-wise. We should rather switch to "the width of the space character in the current font times X" where X remains configurable throughout the system. One might think of overriding such global property with a parameter in CharacterScanner. Use such global state just for initialization purposes, not throughout the computation. Best, Marcel -- View this message in context: http://forum.world.st/tab-width-tp4894141p4894164.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 10 10:47:57 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 10 11:23:06 2016 Subject: [squeak-dev] SmartRefStream has no usable Stream interface. Why? Message-ID: <1462877277522-4894185.post@n4.nabble.com> Hi, there! If you want to serialize an object with the SmartRefStream to support addition and removal instance variables in classes, you can do this: obj := Morph new. stream := SmartRefStream on: #[] writeStream. stream nextPutObjOnly: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream) next. Or your can do this, which produces the traditional "file-in format" with a text header used, for example, when filing out a morph: obj := Morph new. stream := SmartRefStream on: (RWBinaryOrTextStream on: ''). stream nextPut: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream asBinaryOrTextStream) nextAndClose. This is awkward. It took me some time to figure out that I just cannot use the regular stream interface, which I can do with ReferenceStream. And SmartRefStream is just a subclass of it. *sigh* So, I want to use #nextPut: and #next: just as usual: obj := Morph new. stream := SmartRefStream on: #[] writeStream. stream nextPut: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream) next. Also, WriteStream DNU #ascii. *sigh* Best, Marcel -- View this message in context: http://forum.world.st/SmartRefStream-has-no-usable-Stream-interface-Why-tp4894185.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From edgardec2005 at gmail.com Tue May 10 11:54:43 2016 From: edgardec2005 at gmail.com (Edgar De Cleene) Date: Tue May 10 11:54:49 2016 Subject: [squeak-dev] SmartRefStream has no usable Stream interface. Why? In-Reply-To: <1462877277522-4894185.post@n4.nabble.com> References: <1462877277522-4894185.post@n4.nabble.com> Message-ID: Some of us are using .obj for long time for limited exchange of simple objects between Cuis,Squeak and Pharo Object methodsFor: 'objects from disk' stamp: 'edc 6/20/2008 11:41'! saveOnFileNamed: aString? "Ask the user for a filename and save myself on a SmartReferenceStream file. Writes out the version and class structure. The file is fileIn-able. UniClasses will be filed out. This save objects as .obj" | aFileName fileStream | aString isEmpty ifTrue: [^ self error: 'name is missing']. aFileName := aString , '.obj'. fileStream := ReferenceStream fileNamed: aFileName . fileStream nextPut: self. fileStream close. ! ! !Object class methodsFor: 'objects from disk' stamp: 'edc 3/5/2008 12:12'! readAndInspect: inputStream | o rr | rr _ ReferenceStream on: inputStream. o _ rr next. rr close. o inspect! ! !Object class methodsFor: '*services-extras' stamp: 'edc 2/14/2008 08:24'! fileReaderServicesForFile: fullName suffix: suffix | services | services _ OrderedCollection new. (fullName asLowercase endsWith: '.obj') ifTrue: [ services add: self serviceLoadObject ]. ^services! ! !Object class methodsFor: '*services-extras' stamp: 'edc 7/27/2008 08:11'! readCompressedObject: aFileStream? self readAndInspect: (MultiByteBinaryOrTextStream with: (GZipReadStream on: aFileStream) upToEnd) reset! ! !Object class methodsFor: '*services-extras' stamp: 'edc 7/27/2008 07:40'! serviceCompressedObject "Answer a service for opening a saved Object" ^ (SimpleServiceEntry provider: Object label: 'gz saved Object' selector: #readCompressedObject: description: 'open a gz Object' buttonLabel: 'object') argumentGetter: [:fileList |? fileList readOnlyStream]! ! !Object class methodsFor: '*services-extras' stamp: 'edc 2/14/2008 08:26'! serviceLoadObject "Answer a service for opening a saved Object" ^ (SimpleServiceEntry? provider: self? label: 'saved Object' selector: #readAndInspect: description: 'open a Object' buttonLabel: 'object') argumentGetter: [:fileList | fileList readOnlyStream]! ! --? Edgar De Cleene Sent with Airmail On May 10, 2016 at 08:23:08, marcel.taeumel (marcel.taeumel@hpi.de) wrote: Hi, there! If you want to serialize an object with the SmartRefStream to support addition and removal instance variables in classes, you can do this: obj := Morph new. stream := SmartRefStream on: #[] writeStream. stream nextPutObjOnly: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream) next. Or your can do this, which produces the traditional "file-in format" with a text header used, for example, when filing out a morph: obj := Morph new. stream := SmartRefStream on: (RWBinaryOrTextStream on: ''). stream nextPut: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream asBinaryOrTextStream) nextAndClose. This is awkward. It took me some time to figure out that I just cannot use the regular stream interface, which I can do with ReferenceStream. And SmartRefStream is just a subclass of it. *sigh* So, I want to use #nextPut: and #next: just as usual: obj := Morph new. stream := SmartRefStream on: #[] writeStream. stream nextPut: obj. stream close. blob := stream contents. objCopy := (SmartRefStream on: blob readStream) next. Also, WriteStream DNU #ascii. *sigh* Best, Marcel -- View this message in context: http://forum.world.st/SmartRefStream-has-no-usable-Stream-interface-Why-tp4894185.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160510/952c5fef/attachment.htm From eliot.miranda at gmail.com Tue May 10 14:34:46 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue May 10 14:34:52 2016 Subject: [squeak-dev] Re: tab width In-Reply-To: <1462863685314-4894164.post@n4.nabble.com> References: <44358AC2-25A5-4543-8DD8-735D3D7A297B@rowledge.org> <1462863685314-4894164.post@n4.nabble.com> Message-ID: <7BA964D8-314B-4004-849D-5BDD914190FA@gmail.com> Hi Marcel, > On May 10, 2016, at 12:01 AM, marcel.taeumel wrote: > > Hi, there. > > Tab widths are specified in terms of a TextStyle, which is basically a set > of fonts plus extras. So, at the moment there seem to be no direct means to > fetch tab widths with respect to a character width of a specific font. For > details, see CharacterScanner >> #plainTab. > > Still, tabs are characters that should have some font information associated > with them.... hmmm... > > There is a pool dictionary "TextConstants", which includes "DefaultTab", > "DefaultTabsArray", and "DefaultMarginTabsArray". Changing DefaultTab should > recompute both arrays/caches. In my image, DefaultTab is 24 pixels. > > In my experience, some tools offer an configuration to say how much spaces a > tab character should span. So, for a proportional font, users could easily > account for very small spaces by just raising that factor. > > Hence, I see no need for specifying tabs pixel-wise. We should rather switch > to "the width of the space character in the current font times X" where X > remains configurable throughout the system. One might think of overriding > such global property with a parameter in CharacterScanner. Use such global > state just for initialization purposes, not throughout the computation. With fixed width fonts defining a tab as a variable width character from 1 to N, such that the width of the line is a multiple of N makes sense. In a proportional don't if does not. In a proportional font it makes sense to visualize the line as divided into columns, each a tab width apart, and that a tab moved us to the next column. This gives us the problem of a one pixel wide tab. If you use a good document editor such as Mac OS X's Pages you'll see that it uses a column model for tabs, and allows the setting of columns so that tabs change the width of a line to an arbitrary position. We also have this with a tabs array; tabs do not have to have a consistent width. But in addition, a document editor such as Pages ensures that a tab has a minimum width, that if a space, so that if the width of a line before a tab is less than the width of a space, then the effect of a tab is to extend the width not to the next tab, but to the next tab plus one, which has the visual effect of ensuring a tab has at least the width of a space. This is a much more useful and visually pleasing definition of a tab, that a tab is a character that is as least as width as a space but no wider than from the width of a space up to the next tab column at or after the width of a space. So the difference is not in whether we have a tabs array or not. It is in how we compute the width of a tab. > Best, > Marcel _,,,^..^,,,_ (phone) From bert at freudenbergs.de Tue May 10 14:37:49 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 10 14:37:56 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> Message-ID: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: > > On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima > wrote: >> The VM still does not display anything in the white window after I did >> apt-get dist-upgrade, and copy the .sources file to the same directly. >> (But I did not have an egg this morning). I'll try some display >> options. But also, it appears that the source code for the Cog seems >> to have the part I wrote for the composition input. The goal may be >> nearer than I originally thought. > > It may not as closer than I thought, however. The world evolved to > use ibus; we'd need to add some more stuff, such as DBus... I'll > report more tomorrow. Doesn?t ibus generate ?old? X events, too? The README suggests this should work: XMODIFIERS="@im=ibus" squeak ... which we could put in the startup script. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160510/8ebf060a/smime.bin From asqueaker at gmail.com Tue May 10 17:47:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 10 17:47:43 2016 Subject: [squeak-dev] SmartRefStream has no usable Stream interface. Why? In-Reply-To: <1462877277522-4894185.post@n4.nabble.com> References: <1462877277522-4894185.post@n4.nabble.com> Message-ID: I feel your pain! :) I wouldn't mind ReferenceStream to just be upgraded to be "smart" and then deprecate SmartRefStream. Keeping the nice API of ReferenceStream, of course. If Smalltalk is capable to let volatile memory withstand class-schema changes, I see no reason it should suddenly fail just to thaw cold storage objects into a newer image.. And no instvar mapping "specs" are needed, just map them by name... On Tue, May 10, 2016 at 5:47 AM, marcel.taeumel wrote: > Hi, there! > > If you want to serialize an object with the SmartRefStream to support > addition and removal instance variables in classes, you can do this: > > obj := Morph new. > stream := SmartRefStream on: #[] writeStream. > stream nextPutObjOnly: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream) next. > > Or your can do this, which produces the traditional "file-in format" with a > text header used, for example, when filing out a morph: > > obj := Morph new. > stream := SmartRefStream on: (RWBinaryOrTextStream on: ''). > stream nextPut: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream asBinaryOrTextStream) > nextAndClose. > > This is awkward. It took me some time to figure out that I just cannot use > the regular stream interface, which I can do with ReferenceStream. And > SmartRefStream is just a subclass of it. *sigh* > > So, I want to use #nextPut: and #next: just as usual: > > obj := Morph new. > stream := SmartRefStream on: #[] writeStream. > stream nextPut: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream) next. > > Also, WriteStream DNU #ascii. *sigh* > > Best, > Marcel > > > > > -- > View this message in context: http://forum.world.st/SmartRefStream-has-no-usable-Stream-interface-Why-tp4894185.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From eliot.miranda at gmail.com Tue May 10 18:34:30 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue May 10 18:34:32 2016 Subject: [squeak-dev] DockingBarMorph oldKeyboardFocus holds onto garbage Message-ID: Hi All, just had a case where DockingBarMorph oldKeyboardFocus was the only reference to an Inspector on an object. The Inspector had been closed, and hence the object it was referencing should have been garbage collected except for the reference from oldKeyboardFocus. Anyone who understands this could want to try and void oldKeyboardFocus when it is referencing a model whose window is closed? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160510/07f879cb/attachment.htm From lewis at mail.msen.com Tue May 10 19:49:34 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue May 10 19:49:36 2016 Subject: [squeak-dev] SmartRefStream has no usable Stream interface. Why? In-Reply-To: <1462877277522-4894185.post@n4.nabble.com> References: <1462877277522-4894185.post@n4.nabble.com> Message-ID: <13897.136.1.1.107.1462909774.squirrel@webmail.msen.com> I think that one issue is that SmartRefStream only works on positionable streams, at least for reading. I looked at this a few years ago when I did RemoteTask because I could not serialize some kinds of objects across an OS pipe stream. I think this is fixable, but I never actually did anything about it (I switched to Fuel, which works well for what I was doing). Dave > Hi, there! > > If you want to serialize an object with the SmartRefStream to support > addition and removal instance variables in classes, you can do this: > > obj := Morph new. > stream := SmartRefStream on: #[] writeStream. > stream nextPutObjOnly: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream) next. > > Or your can do this, which produces the traditional "file-in format" with > a > text header used, for example, when filing out a morph: > > obj := Morph new. > stream := SmartRefStream on: (RWBinaryOrTextStream on: ''). > stream nextPut: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream asBinaryOrTextStream) > nextAndClose. > > This is awkward. It took me some time to figure out that I just cannot use > the regular stream interface, which I can do with ReferenceStream. And > SmartRefStream is just a subclass of it. *sigh* > > So, I want to use #nextPut: and #next: just as usual: > > obj := Morph new. > stream := SmartRefStream on: #[] writeStream. > stream nextPut: obj. > stream close. > blob := stream contents. > objCopy := (SmartRefStream on: blob readStream) next. > > Also, WriteStream DNU #ascii. *sigh* > > Best, > Marcel > > > > > -- > View this message in context: > http://forum.world.st/SmartRefStream-has-no-usable-Stream-interface-Why-tp4894185.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Tue May 10 21:45:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 10 21:45:52 2016 Subject: [squeak-dev] The Trunk: Morphic-kb.1143.mcz Message-ID: Balázs Kósi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-kb.1143.mcz ==================== Summary ==================== Name: Morphic-kb.1143 Author: kb Time: 10 May 2016, 11:45:07.978281 pm UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c Ancestors: Morphic-mt.1142 Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. =============== Diff against Morphic-mt.1142 =============== Item was changed: ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- deactivate: evt + | newKeyboardFocus newMouseFocus | self selectItem: nil event: evt. + newKeyboardFocus := self oldKeyboardFocus. + newMouseFocus := self oldMouseFocus. + oldKeyboardFocus := oldMouseFocus := nil. evt hand + newKeyboardFocus: newKeyboardFocus; + newMouseFocus: newMouseFocus! - newKeyboardFocus: self oldKeyboardFocus; - newMouseFocus: self oldMouseFocus! From commits at source.squeak.org Tue May 10 21:58:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 10 21:58:22 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160510215819.15991.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068088.html Name: Morphic-kb.1143 Ancestors: Morphic-mt.1142 Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. ============================================= From asqueaker at gmail.com Tue May 10 22:55:40 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 10 22:56:22 2016 Subject: [squeak-dev] The Trunk: Morphic-kb.1143.mcz In-Reply-To: <57325692.8f4c370a.a6e18.ffffdc2dSMTPIN_ADDED_MISSING@mx.google.com> References: <57325692.8f4c370a.a6e18.ffffdc2dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This may help Eliot in his case this time, but there are other places which could just as easily trap a reference to a user's "domain" object just as inconspicuously. Like the World 'stepList' or the WorldState's 'commandHistory'. Maybe we need some kind of registration/release mechanism..?? On Tue, May 10, 2016 at 4:45 PM, wrote: > Bal?zs K?si uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-kb.1143.mcz > > ==================== Summary ==================== > > Name: Morphic-kb.1143 > Author: kb > Time: 10 May 2016, 11:45:07.978281 pm > UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c > Ancestors: Morphic-mt.1142 > > Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. > > =============== Diff against Morphic-mt.1142 =============== > > Item was changed: > ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- > deactivate: evt > > + | newKeyboardFocus newMouseFocus | > self selectItem: nil event: evt. > + newKeyboardFocus := self oldKeyboardFocus. > + newMouseFocus := self oldMouseFocus. > + oldKeyboardFocus := oldMouseFocus := nil. > evt hand > + newKeyboardFocus: newKeyboardFocus; > + newMouseFocus: newMouseFocus! > - newKeyboardFocus: self oldKeyboardFocus; > - newMouseFocus: self oldMouseFocus! > > From lewis at mail.msen.com Wed May 11 01:59:25 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 11 01:59:27 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> Message-ID: <20160511015925.GA28787@shell.msen.com> On Mon, May 09, 2016 at 10:44:22AM -0700, tim Rowledge wrote: > > > On 09-05-2016, at 3:16 AM, Levente Uzonyi wrote: > > > > The thing is that there's no HostWindowPlugin at all in http://www.mirandabanda.org/files/Cog/VM/latest/cogspur64linuxht-16.18.3692.tgz . > > Dang, he???s right. There is no building of HostWindowPlugin in the linux build trees I???ve checked. Which must mean I???ve only ever set the size of the Scratch window on my iMac, which is seriously weirding me. I would *swear* (loudly) that we???ve been building with it included. Oh well, let???s try it out and see. > > {later} damnitstupidmake > {later} damnintstupidirritatingmake > {time passes???}at last it???s in the buildlist > {late}ooh it appears to build??? > {later} it produces the blank white screen Yoshiki mentioned. Bugger. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > "Bother!" said Pooh, as Piglet pressed on the Microwave... Background: Marcel updated DisplayScreen methods to use HostWindowPlugin to set the Squeak window size and window title. Meanwhile, Tim is trying to get the plugin to compile for a Unix VM for Raspberry Pi. But this cannot possibly work. The window index used by HostWindowPlugin is supposed to be opaque value, known to the plugin but not to the image. On a Windows platform, the window index might be 1. This is the value that we currently have hard-coded in DisplayScreen class>>hostWindowIndex. On a platform with X11 display, the host window index is an integer value of type Window, which might be a value such as 16rA00001 (as tested on my PC a few minutes ago: xwininfo: Window id: 0x3a00001 "squeak.image" For a Unix VM, the HostWindowPlugin delegates to methods in platforms/unix/vm-display-X11/sqUnixX11.c, which contains a check to make sure that all window handles are are integer values greater than 16rFFFF (so of course a value of 1 will fail). Presumably this is because the designers of X11 wanted to ensure that their window handles would be values that could not be easily confused with integers such as 0, 1, 2, 3, ... and most likely Ian Piumarta was aware of this and added the check to fail the primitive if the window handle was a value such as 1. Therefore if Tim gets the HostWindowPlugin to compile, it is not going to work anyway. I suspect that we are missing something here with respect to the earlier Qwaq code, which presumably did work. The missing thing seems to be a way to obtain a handle for the Squeak display window. Possibly we could use one additional HostWindowPlugin primitive to provide this information, such that DisplayScreen class>>hostWindowIndex could call that primitive rather than assuming a hard-coded value of 1. I also would guess that Qwaq actually did the Right Thing, which would be to let the image open its main display window by requesting it from the VM (HostWindowPlugin in this case), and letting the plugin provide the window handle as the result of that request. IMO that would be the right way to do it for Squeak also, but for purposes of backward compatibility in the near term, a HostWindowPlugin>>primitiveDefaultDisplayWindow would be sufficient. On Windows, it would probably answer 1, and on X11 it would answer the Window handle of the Squeak application window. Dave From lewis at mail.msen.com Wed May 11 03:08:57 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 11 03:09:00 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <20160511015925.GA28787@shell.msen.com> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> Message-ID: <20160511030857.GA39819@shell.msen.com> On Tue, May 10, 2016 at 09:59:25PM -0400, David T. Lewis wrote: > On Mon, May 09, 2016 at 10:44:22AM -0700, tim Rowledge wrote: > > > > > On 09-05-2016, at 3:16 AM, Levente Uzonyi wrote: > > > > > > The thing is that there's no HostWindowPlugin at all in http://www.mirandabanda.org/files/Cog/VM/latest/cogspur64linuxht-16.18.3692.tgz . > > > > Dang, he???s right. There is no building of HostWindowPlugin in the linux build trees I???ve checked. Which must mean I???ve only ever set the size of the Scratch window on my iMac, which is seriously weirding me. I would *swear* (loudly) that we???ve been building with it included. Oh well, let???s try it out and see. > > > > {later} damnitstupidmake > > {later} damnintstupidirritatingmake > > {time passes???}at last it???s in the buildlist > > {late}ooh it appears to build??? > > {later} it produces the blank white screen Yoshiki mentioned. Bugger. > > > > > > tim > > -- > > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > > "Bother!" said Pooh, as Piglet pressed on the Microwave... > > Background: Marcel updated DisplayScreen methods to use HostWindowPlugin > to set the Squeak window size and window title. Meanwhile, Tim is trying > to get the plugin to compile for a Unix VM for Raspberry Pi. > > But this cannot possibly work. The window index used by HostWindowPlugin > is supposed to be opaque value, known to the plugin but not to the image. > On a Windows platform, the window index might be 1. This is the value > that we currently have hard-coded in DisplayScreen class>>hostWindowIndex. > On a platform with X11 display, the host window index is an integer value > of type Window, which might be a value such as 16rA00001 (as tested on > my PC a few minutes ago: > > xwininfo: Window id: 0x3a00001 "squeak.image" > > For a Unix VM, the HostWindowPlugin delegates to methods in > platforms/unix/vm-display-X11/sqUnixX11.c, which contains a check to make > sure that all window handles are are integer values greater than 16rFFFF > (so of course a value of 1 will fail). Presumably this is because the > designers of X11 wanted to ensure that their window handles would be values > that could not be easily confused with integers such as 0, 1, 2, 3, ... and > most likely Ian Piumarta was aware of this and added the check to fail the > primitive if the window handle was a value such as 1. > > Therefore if Tim gets the HostWindowPlugin to compile, it is not going > to work anyway. > > I suspect that we are missing something here with respect to the earlier > Qwaq code, which presumably did work. The missing thing seems to be a > way to obtain a handle for the Squeak display window. Possibly we could > use one additional HostWindowPlugin primitive to provide this information, > such that DisplayScreen class>>hostWindowIndex could call that primitive > rather than assuming a hard-coded value of 1. > > I also would guess that Qwaq actually did the Right Thing, which would > be to let the image open its main display window by requesting it from > the VM (HostWindowPlugin in this case), and letting the plugin provide > the window handle as the result of that request. IMO that would be the > right way to do it for Squeak also, but for purposes of backward compatibility > in the near term, a HostWindowPlugin>>primitiveDefaultDisplayWindow would > be sufficient. On Windows, it would probably answer 1, and on X11 it would > answer the Window handle of the Squeak application window. One additional follow up: I just confirmed that if I find the Window ID of my Squeak window (using unix utility xwininfo), and use that value as the window handle, then the Squeak window resize does work. At least the window gets resized and the primitive does not fail, although I am not entirely certain if my window ID is the stWindow or the stParent window, so the resizing behavior may be off by a few pixels. I did this: hostWindowIndex := 16r3800001. [ DisplayScreen primitiveWindow: hostWindowIndex width: 800 height: 600 ] on: Error do: [ :error | error messageText ] The 16r3800001 window ID is what I got from running xwininfo, so I was using this as the window handle in the call to the HostWindowPlugin primitive. Disclaimer: I am testing with an interpreter VM with Qwaq enhancements harvested from oscog added to sqUnixX11.c on my PC, not committed to SVN. This is theoretically equivalent to the latest Cog/Spur but YMMV. Dave From Das.Linux at gmx.de Wed May 11 05:12:21 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed May 11 05:12:27 2016 Subject: [squeak-dev] The Trunk: Morphic-kb.1143.mcz In-Reply-To: References: <57325692.8f4c370a.a6e18.ffffdc2dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <11476883-EAC2-422C-8B02-9C41092B4AC7@gmx.de> On 11.05.2016, at 00:55, Chris Muller wrote: > This may help Eliot in his case this time, but there are other places > which could just as easily trap a reference to a user's "domain" > object just as inconspicuously. > > Like the World 'stepList' or the WorldState's 'commandHistory'. > > Maybe we need some kind of registration/release mechanism..?? Or making those weak? Best regards -Tobias > > On Tue, May 10, 2016 at 4:45 PM, wrote: >> Bal?zs K?si uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-kb.1143.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-kb.1143 >> Author: kb >> Time: 10 May 2016, 11:45:07.978281 pm >> UUID: 8e7819ed-0a1d-4a4d-9c6b-23ce3272097c >> Ancestors: Morphic-mt.1142 >> >> Fix DockingBarMorph keeping unnecessary references to oldMouseFocus and oldKeyboardFocus by clearing them when deactivating. >> >> =============== Diff against Morphic-mt.1142 =============== >> >> Item was changed: >> ----- Method: DockingBarMorph>>deactivate: (in category 'events') ----- >> deactivate: evt >> >> + | newKeyboardFocus newMouseFocus | >> self selectItem: nil event: evt. >> + newKeyboardFocus := self oldKeyboardFocus. >> + newMouseFocus := self oldMouseFocus. >> + oldKeyboardFocus := oldMouseFocus := nil. >> evt hand >> + newKeyboardFocus: newKeyboardFocus; >> + newMouseFocus: newMouseFocus! >> - newKeyboardFocus: self oldKeyboardFocus; >> - newMouseFocus: self oldMouseFocus! From tim at rowledge.org Wed May 11 05:32:14 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed May 11 05:32:18 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <20160511015925.GA28787@shell.msen.com> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> Message-ID: > > But this cannot possibly work. The window index used by HostWindowPlugin > is supposed to be opaque value, known to the plugin but not to the image. > On a Windows platform, the window index might be 1. IIRC (after all, I wrote this 12 years ago) we defined that the ?root? window had to have a 1 index just so we could rely upon something. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim You never finish a program, you just stop working on it. From Marcel.Taeumel at hpi.de Wed May 11 06:19:18 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 11 06:54:32 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-kb.1143.mcz In-Reply-To: References: Message-ID: <1462947558279-4894254.post@n4.nabble.com> Hi Chris and all, the world state's "stepList" is fine, because the entries will be removed before processed and then only re-added if the processing went well. See WorldState >> #runLocalStepMethodsIn: and all references to the instance variable "lastStepMessage" to understand why it can be nil after evaluating it. A world state's "commandHistory" can be cleared via the menu Extras > "Purge Undo Records". This is also done in CommandHistory class >> #cleanUp. If you collect garbage via "Utilities garbageCollectAndReport", you get notified of any records in the history. Memo to myself: I still have to bring CommandHistory and TextEditorCommandHistory back together. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-kb-1143-mcz-tp4894240p4894254.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed May 11 06:34:33 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 11 07:09:47 2016 Subject: [squeak-dev] Re: Fwd: [Vm-dev] Once upon time representsSameBrowseeAs: was moved out of Morphic In-Reply-To: <8ACADDBD-8DD6-4390-8CC9-0EEB5E7ECC88@gmail.com> References: <1462726612096-4893949.post@n4.nabble.com> <8ACADDBD-8DD6-4390-8CC9-0EEB5E7ECC88@gmail.com> Message-ID: <1462948473086-4894255.post@n4.nabble.com> Hi Eliot, okay. I am sure that Nicolas will read it also. :-D I found another interesting pattern: SomeCoolMorph class >> #initialize self registerInFlapsRegistry. SomeCoolMorph class >> #registerInFlapsRegistry ... flapsRegistry registerQuad: ... SomeCoolMorph class >> #unload ... flapsRegistry unregisterQuadsWithReceiver: self ... Now, we cannot put #registerInFlapsRegistry in a Morphic extension because of the same dilemma. However, Flaps and Morphs need morphic anyway. So we are fine here. Can't we use our ServiceRegistry for such things in the future? (Me, *not* wanting to change flaps registration. *g*) Best, Marcel -- View this message in context: http://forum.world.st/Fwd-Vm-dev-Once-upon-time-representsSameBrowseeAs-was-moved-out-of-Morphic-tp4893915p4894255.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Wed May 11 08:47:11 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 11 08:47:17 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> Message-ID: <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> On 11.05.2016, at 07:32, tim Rowledge wrote: >> >> But this cannot possibly work. The window index used by HostWindowPlugin >> is supposed to be opaque value, known to the plugin but not to the image. >> On a Windows platform, the window index might be 1. > > IIRC (after all, I wrote this 12 years ago) we defined that the ?root? window had to have a 1 index just so we could rely upon something. Yep. That's why it's hard-coded in DisplayScreen but a variable in HostWindowProxy. - Bert - From Marcel.Taeumel at hpi.de Wed May 11 11:54:33 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 11 12:29:50 2016 Subject: [squeak-dev] Squeak w/o System Windows Message-ID: <1462967673624-4894295.post@n4.nabble.com> Hi, there! For some reason, I was thinking about window management. Here is a little experiment: no-window-experiment.cs It makes several standard tools, i.e. the StringHolder sub-classes, open without a window. You have to use Morphic's halo concept to move/resize/close them. Only a few changes were necessary. By the way, it is challenging to get the height of our main docking bar. MorphicToolBuilder >> #open:label: also assumed that #open: returns a system window, which is not always the case. Screen real estate for the win!! ^__^ Best, Marcel -- View this message in context: http://forum.world.st/Squeak-w-o-System-Windows-tp4894295.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Wed May 11 12:43:30 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed May 11 12:43:34 2016 Subject: [squeak-dev] Squeak w/o System Windows In-Reply-To: <1462967673624-4894295.post@n4.nabble.com> References: <1462967673624-4894295.post@n4.nabble.com> Message-ID: Cool experiment. Reminds me of the Fabrik stuff Dan Ingalls made where you could open lists and panes based on queries, and build user interfaces on the fly. http://wiki.squeak.org/squeak/1175 Best, Karl On Wed, May 11, 2016 at 1:54 PM, marcel.taeumel wrote: > Hi, there! > > For some reason, I was thinking about window management. Here is a little > experiment: no-window-experiment.cs > > > It makes several standard tools, i.e. the StringHolder sub-classes, open > without a window. You have to use Morphic's halo concept to > move/resize/close them. > > > > Only a few changes were necessary. By the way, it is challenging to get the > height of our main docking bar. MorphicToolBuilder >> #open:label: also > assumed that #open: returns a system window, which is not always the case. > > Screen real estate for the win!! ^__^ > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Squeak-w-o-System-Windows-tp4894295.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/7b9642ad/attachment.htm From lewis at mail.msen.com Wed May 11 13:02:31 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 11 13:02:35 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> Message-ID: <20160511130231.GA67121@shell.msen.com> On Wed, May 11, 2016 at 10:47:11AM +0200, Bert Freudenberg wrote: > On 11.05.2016, at 07:32, tim Rowledge wrote: > > >> > >> But this cannot possibly work. The window index used by HostWindowPlugin > >> is supposed to be opaque value, known to the plugin but not to the image. > >> On a Windows platform, the window index might be 1. > > > > IIRC (after all, I wrote this 12 years ago) we defined that the ???root??? window had to have a 1 index just so we could rely upon something. > > Yep. That's why it's hard-coded in DisplayScreen but a variable in HostWindowProxy. > Hmmm... it looks to me like it may take some work to make the unix plugin work that way. But maybe I was just overlooking something. Dave From bert at freudenbergs.de Wed May 11 13:26:43 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 11 13:26:48 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: References: Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/11362b46/smime.bin From commits at source.squeak.org Wed May 11 13:28:27 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 13:29:14 2016 Subject: [squeak-dev] The Trunk: Tools-bf.700.mcz Message-ID: Bert Freudenberg uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-bf.700.mcz ==================== Summary ==================== Name: Tools-bf.700 Author: bf Time: 11 May 2016, 3:28:07.960335 pm UUID: dc9a06fa-3586-4a29-bafb-578a1c83ac42 Ancestors: Tools-mt.699 Debugger: show stack top only if stack not empty =============== Diff against Tools-mt.699 =============== Item was changed: ----- Method: ContextVariablesInspector>>selection (in category 'selecting') ----- selection "Refer to the comment in Inspector|selection." selectionIndex = 0 ifTrue:[^'']. selectionIndex = 1 ifTrue: [^object]. + selectionIndex = 2 ifTrue: [^object stackPtr > object method numTemps ifTrue: [object top]]. - selectionIndex = 2 ifTrue: [^object stackPtr > 0 ifTrue: [object top]]. selectionIndex = 3 ifTrue: [^object tempsAndValues]. ^object debuggerMap namedTempAt: selectionIndex - 3 in: object! From commits at source.squeak.org Wed May 11 13:30:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 13:31:46 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1019.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1019.mcz ==================== Summary ==================== Name: Kernel-bf.1019 Author: bf Time: 11 May 2016, 3:30:33.093682 pm UUID: 54dc3e86-690f-4e37-9c37-640692047c60 Ancestors: Kernel-nice.1018 Debugger: step over temp vector initializer when entering method =============== Diff against Kernel-nice.1018 =============== Item was added: + ----- Method: MethodContext>>stepToSendOrReturn (in category 'system simulation') ----- + stepToSendOrReturn + ((method at: pc) == 16r8A "push new array" and: [pc = method initialPC]) ifTrue: [ + (method at: pc+2) = 16r68 ifFalse: [self error: 'assumed pop into temp0 bytecode']. + "init temp vector first" + self step; step]. + ^super stepToSendOrReturn! From bert at freudenbergs.de Wed May 11 13:35:49 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 11 13:35:52 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <20160511130231.GA67121@shell.msen.com> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> <20160511130231.GA67121@shell.msen.com> Message-ID: <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> On 11.05.2016, at 15:02, David T. Lewis wrote: > > On Wed, May 11, 2016 at 10:47:11AM +0200, Bert Freudenberg wrote: >> On 11.05.2016, at 07:32, tim Rowledge wrote: >> >>>> >>>> But this cannot possibly work. The window index used by HostWindowPlugin >>>> is supposed to be opaque value, known to the plugin but not to the image. >>>> On a Windows platform, the window index might be 1. >>> >>> IIRC (after all, I wrote this 12 years ago) we defined that the ???root??? window had to have a 1 index just so we could rely upon something. >> >> Yep. That's why it's hard-coded in DisplayScreen but a variable in HostWindowProxy. >> > > Hmmm... it looks to me like it may take some work to make the unix > plugin work that way. But maybe I was just overlooking something. The version I see here actually works *only* for the main Squeak window: static int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle) { if (windowIndex != 1) return -1; XChangeProperty(stDisplay, stParent, XInternAtom(stDisplay, "_NET_WM_NAME", False), XInternAtom(stDisplay, "UTF8_STRING", False), 8, PropModeReplace, newTitle, sizeOfTitle); return 0; } (and setting the size is not implemented) static int display_hostWindowSetSize(int windowIndex, int w, int h) { return -1; } - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/bde764e6/smime-0001.bin From dionisiydk at gmail.com Wed May 11 13:40:07 2016 From: dionisiydk at gmail.com (Denis Kudriashov) Date: Wed May 11 13:40:30 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: References: Message-ID: And here example with not empty stack but still confusing: | t |[ t := 'test'] value. 2016-05-11 15:26 GMT+02:00 Bert Freudenberg : > [moving to squeak-dev since this does not appear to be a VM problem] > > I?d say it?s not only confusing, but actually wrong, since at that point > the stack is empty. The context?s stackPtr is 1, equal to the method?s > numTemps, so there is no valid stack top. > > Another confusing thing is that when you put these lines into a method and > step into it, #(nil nil) will be on the stack. That?s because the context?s > pc is 27, it just pushed the temp vector, but has not stored it yet: > > 25 <8A 02> push: (Array new: 2) > 27 <68> popIntoTemp: 0 > 28 <10> pushTemp: 0 > 29 <8F 10 00 09> closureNumCopied: 1 numArgs: 0 bytes 33 to 41 > 33 <20> pushConstant: 'test' > 34 <8E 00 00> popIntoTemp: 0 inVectorAt: 0 > 37 <21> pushConstant: 'test2' > 38 <8D 01 00> storeIntoTemp: 1 inVectorAt: 0 > 41 <7D> blockReturn > 42 send: value > 43 <87> pop > 44 <8C 01 00> pushTemp: 1 inVectorAt: 0 > 47 send: halt > 48 <7C> returnTop > > Really the context should have been stepped over the temp vector > initialization code ? The way it is now, there is no ?selection? at all, > the first ?step? in the debugger appears to do nothing. > > - Bert - > > > On 11.05.2016, at 12:02, Denis Kudriashov wrote: > > I found reason about it. > When message send executed it pops receiver from current stack. > > But anyway it is very confusing to not see receiver as stack top in > debugger. Maybe extra field "current receiver" should be added to debugger > in that case > > 2016-05-11 11:51 GMT+02:00 Denis Kudriashov : > >> Here better example to see problem: >> >> | t d | >> [ t := 'test'. >> d := 'test2' ] value. >> t. >> ^ d halt >> >> >> Stack top here will show #('test' test2') which is completely confusing >> >> 2016-05-11 11:45 GMT+02:00 Denis Kudriashov : >> >>> Hi. >>> >>> Try to debug following script: >>> >>> | t | >>> [ t := 'test' ] value. >>> ^ t halt >>> >>> >>> You will see in debugger #('test') as stack top value. Why it is not >>> 'test'? >>> I understand that hidden arrays used for variables which are used in >>> closures. But why "context top" in that cases points to vector instead of >>> variable value? >>> >>> Best regards, >>> Denis >>> >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/46a3d387/attachment.htm From bert at freudenbergs.de Wed May 11 13:42:32 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 11 13:42:36 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1019.mcz In-Reply-To: References: Message-ID: <144E2752-1951-42A0-B63F-A3FAAA0B3143@freudenbergs.de> Eliot (and all) - is there a better way than this to detect if a method has the temp vector init code? - Bert - On 11.05.2016, at 13:30, commits@source.squeak.org wrote: > > Bert Freudenberg uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-bf.1019.mcz > > ==================== Summary ==================== > > Name: Kernel-bf.1019 > Author: bf > Time: 11 May 2016, 3:30:33.093682 pm > UUID: 54dc3e86-690f-4e37-9c37-640692047c60 > Ancestors: Kernel-nice.1018 > > Debugger: step over temp vector initializer when entering method > > =============== Diff against Kernel-nice.1018 =============== > > Item was added: > + ----- Method: MethodContext>>stepToSendOrReturn (in category 'system simulation') ----- > + stepToSendOrReturn > + ((method at: pc) == 16r8A "push new array" and: [pc = method initialPC]) ifTrue: [ > + (method at: pc+2) = 16r68 ifFalse: [self error: 'assumed pop into temp0 bytecode']. > + "init temp vector first" > + self step; step]. > + ^super stepToSendOrReturn! -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/e2098530/smime.bin From bert at freudenbergs.de Wed May 11 13:44:55 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed May 11 13:44:58 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: References: Message-ID: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/d99481cd/smime.bin From commits at source.squeak.org Wed May 11 16:57:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 16:58:16 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1020.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1020.mcz ==================== Summary ==================== Name: Kernel-bf.1020 Author: bf Time: 11 May 2016, 6:56:53.270494 pm UUID: 6e52fc30-34bc-4d1b-b149-bdee465f4f75 Ancestors: Kernel-bf.1019 Add MethodContext>>actualStackSize =============== Diff against Kernel-bf.1019 =============== Item was added: + ----- Method: MethodContext>>actualStackSize (in category 'private-debugger') ----- + actualStackSize "For use only by Debugger, Inspectors etc" + ^ stackp - method numTemps! From commits at source.squeak.org Wed May 11 16:59:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 16:59:17 2016 Subject: [squeak-dev] The Trunk: Tools-bf.701.mcz Message-ID: Bert Freudenberg uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-bf.701.mcz ==================== Summary ==================== Name: Tools-bf.701 Author: bf Time: 11 May 2016, 6:58:52.388945 pm UUID: e40b6bec-177e-4bf9-88fb-4149c8cf2391 Ancestors: Tools-bf.700 Debugger: if stack is empty show nothing, not 'nil' =============== Diff against Tools-bf.700 =============== Item was changed: ----- Method: ContextVariablesInspector>>contentsIsString (in category 'selecting') ----- contentsIsString "Hacked so contents empty when deselected and = long printString when item 3" + ^ (selectionIndex = 3) | (selectionIndex = 0) | + (selectionIndex = 2 and: [object actualStackSize = 0])! - ^ (selectionIndex = 3) | (selectionIndex = 0)! Item was changed: ----- Method: ContextVariablesInspector>>selection (in category 'selecting') ----- selection "Refer to the comment in Inspector|selection." selectionIndex = 0 ifTrue:[^'']. selectionIndex = 1 ifTrue: [^object]. + selectionIndex = 2 ifTrue: [^object actualStackSize > 0 ifTrue: [object top] ifFalse: ['']]. - selectionIndex = 2 ifTrue: [^object stackPtr > object method numTemps ifTrue: [object top]]. selectionIndex = 3 ifTrue: [^object tempsAndValues]. ^object debuggerMap namedTempAt: selectionIndex - 3 in: object! From commits at source.squeak.org Wed May 11 17:12:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 17:13:48 2016 Subject: [squeak-dev] The Trunk: Kernel-bf.1021.mcz Message-ID: Bert Freudenberg uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-bf.1021.mcz ==================== Summary ==================== Name: Kernel-bf.1021 Author: bf Time: 11 May 2016, 7:12:33.427889 pm UUID: 17fc93fe-76d6-4961-83c6-399d9a3e9ab8 Ancestors: Kernel-bf.1020 Look for method in the non-meta class. =============== Diff against Kernel-bf.1020 =============== Item was changed: ----- Method: Pragma>>hasLiteral: (in category 'testing') ----- hasLiteral: aLiteral ^keyword == aLiteral or: [(arguments hasLiteral: aLiteral) or: [keyword == #hasLiteralTest: and: [ + self methodClass theNonMetaClass perform: arguments first with: aLiteral]]]! - self methodClass perform: arguments first with: aLiteral]]]! From tim at rowledge.org Wed May 11 17:23:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed May 11 17:23:45 2016 Subject: [squeak-dev] Squeak w/o System Windows In-Reply-To: <1462967673624-4894295.post@n4.nabble.com> References: <1462967673624-4894295.post@n4.nabble.com> Message-ID: <045D68FC-BF7A-4DD4-B35A-BDD0346AF5CF@rowledge.org> > On 11-05-2016, at 4:54 AM, marcel.taeumel wrote: > > Hi, there! > > For some reason, I was thinking about window management. I?d suggest that this might be part of an path into getting those little buggers into host windows? it?s about time something was done. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: EIV: Erase IPL Volume From Yoshiki.Ohshima at acm.org Wed May 11 18:52:55 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 11 18:52:58 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg wrote: > On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: >> >> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima >> wrote: >>> The VM still does not display anything in the white window after I did >>> apt-get dist-upgrade, and copy the .sources file to the same directly. >>> (But I did not have an egg this morning). I'll try some display >>> options. But also, it appears that the source code for the Cog seems >>> to have the part I wrote for the composition input. The goal may be >>> nearer than I originally thought. >> >> It may not as closer than I thought, however. The world evolved to >> use ibus; we'd need to add some more stuff, such as DBus... I'll >> report more tomorrow. > > Doesn?t ibus generate ?old? X events, too? The README suggests this should work: > > XMODIFIERS="@im=ibus" squeak > > ... which we could put in the startup script. This does not quite work. And also Abe-san says that I'd better make it work with scim first so I am taking that path now. BTW, I have a long standing question of the development process. I create a VM by doing ./mvm, which creates display drivers and VM in one way or another, and installs them to products directory somewhere upthere. I have trouble seeing my changes to code gets reflected sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, run mvm and invoke the squeak shell script in products/cogspurlinuxhtARM/ but it seems to pick up a different binary from somewhere else. What do people do to make the debug cycle go faster on Linux? -- -- Yoshiki From eliot.miranda at gmail.com Wed May 11 20:20:22 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed May 11 20:20:27 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: Hi Yoshiki, > On May 11, 2016, at 11:52 AM, Yoshiki Ohshima wrote: > >> On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg wrote: >>> On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: >>> >>> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima >>> wrote: >>>> The VM still does not display anything in the white window after I did >>>> apt-get dist-upgrade, and copy the .sources file to the same directly. >>>> (But I did not have an egg this morning). I'll try some display >>>> options. But also, it appears that the source code for the Cog seems >>>> to have the part I wrote for the composition input. The goal may be >>>> nearer than I originally thought. >>> >>> It may not as closer than I thought, however. The world evolved to >>> use ibus; we'd need to add some more stuff, such as DBus... I'll >>> report more tomorrow. >> >> Doesn?t ibus generate ?old? X events, too? The README suggests this should work: >> >> XMODIFIERS="@im=ibus" squeak >> >> ... which we could put in the startup script. > > This does not quite work. And also Abe-san says that I'd better make > it work with scim first so I am taking that path now. > > BTW, I have a long standing question of the development process. I > create a VM by doing ./mvm, which creates display drivers and VM in > one way or another, and installs them to products directory somewhere > upthere. I have trouble seeing my changes to code gets reflected > sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, > run mvm and invoke the squeak shell script in > products/cogspurlinuxhtARM/ but it seems to pick up a different binary > from somewhere else. It shouldn't. That's where the resulting binary gets installed (or a debug build in products/debug/cogspurlinuxhtARM etc). > > What do people do to make the debug cycle go faster on Linux? That's what I've been using, and I find it unsatisfactory too. I don't like the automake system and want to replace the whole thing with Gnu make makefiles (as is used in the win32 and MacOS builds) which would result in more sharing between the production, assert and debug builds plus accurate dependency information for reliable compilation, and the possibility of making a valid cogspurlinuxhtARM directory tree in the build directory and hence (again as I do in the win32 and MacOS builds) running the executable in the build directory instead of from products. > -- Yoshiki _,,,^..^,,,_ (phone) From eliot.miranda at gmail.com Wed May 11 20:24:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed May 11 20:24:49 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: Hi Yoshiki, > On May 11, 2016, at 1:20 PM, Eliot Miranda wrote: > > Hi Yoshiki, > >>> On May 11, 2016, at 11:52 AM, Yoshiki Ohshima wrote: >>> >>>> On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg wrote: >>>> On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: >>>> >>>> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima >>>> wrote: >>>>> The VM still does not display anything in the white window after I did >>>>> apt-get dist-upgrade, and copy the .sources file to the same directly. >>>>> (But I did not have an egg this morning). I'll try some display >>>>> options. But also, it appears that the source code for the Cog seems >>>>> to have the part I wrote for the composition input. The goal may be >>>>> nearer than I originally thought. >>>> >>>> It may not as closer than I thought, however. The world evolved to >>>> use ibus; we'd need to add some more stuff, such as DBus... I'll >>>> report more tomorrow. >>> >>> Doesn?t ibus generate ?old? X events, too? The README suggests this should work: >>> >>> XMODIFIERS="@im=ibus" squeak >>> >>> ... which we could put in the startup script. >> >> This does not quite work. And also Abe-san says that I'd better make >> it work with scim first so I am taking that path now. >> >> BTW, I have a long standing question of the development process. I >> create a VM by doing ./mvm, which creates display drivers and VM in >> one way or another, and installs them to products directory somewhere >> upthere. I have trouble seeing my changes to code gets reflected >> sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, >> run mvm and invoke the squeak shell script in >> products/cogspurlinuxhtARM/ but it seems to pick up a different binary >> from somewhere else. > > It shouldn't. That's where the resulting binary gets installed (or a debug build in products/debug/cogspurlinuxhtARM etc). > >> >> What do people do to make the debug cycle go faster on Linux? > > That's what I've been using, and I find it unsatisfactory too. I don't like the automake system and want to replace the whole thing with Gnu make makefiles (as is used in the win32 and MacOS builds) which would result in more sharing between the production, assert and debug builds plus accurate dependency information for reliable compilation, and the possibility of making a valid cogspurlinuxhtARM directory tree in the build directory and hence (again as I do in the win32 and MacOS builds) running the executable in the build directory instead of from products. And I forgot to say that indeed sqUnixX11.c is one of the files that suffers from inaccurate dependency info because it includes sqUnixEvent.c and sqUnixXdnd.c but the dependency isn't reflected in the makefiles :-( > >> -- Yoshiki > > _,,,^..^,,,_ (phone) From asqueaker at gmail.com Wed May 11 21:10:11 2016 From: asqueaker at gmail.com (Chris Muller) Date: Wed May 11 21:10:53 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> References: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> Message-ID: Great discussion, the debugger is the most powerful browser. Unfortunately, we still have this very painful and highly occurring bug that renders debugging "Through" essentially too dangerous to use at all.. For example: SearchTopic new updateContents Shift+Cmd+D to "Debug it", then press Through Through (i.e., step through "updateContents"). ... you now have an inescapable Emergency Evaluator. This is a new bug, right? I have a lot of code that uses Mutexes, so I pretty much cannot risk debugging Through at all anymore. :( On Wed, May 11, 2016 at 8:44 AM, Bert Freudenberg wrote: > On 11.05.2016, at 15:40, Denis Kudriashov wrote: > > > And here example with not empty stack but still confusing: > > | t | > [ t := 'test'] value. > > > I think I just fixed both problems in trunk. Update and try again? > > - Bert - > > > > From commits at source.squeak.org Wed May 11 21:58:21 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 11 21:58:23 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160511215821.23263.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068089.html Name: Tools-bf.700 Ancestors: Tools-mt.699 Debugger: show stack top only if stack not empty ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068090.html Name: Kernel-bf.1019 Ancestors: Kernel-nice.1018 Debugger: step over temp vector initializer when entering method ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068091.html Name: Kernel-bf.1020 Ancestors: Kernel-bf.1019 Add MethodContext>>actualStackSize ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068092.html Name: Tools-bf.701 Ancestors: Tools-bf.700 Debugger: if stack is empty show nothing, not 'nil' ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068093.html Name: Kernel-bf.1021 Ancestors: Kernel-bf.1020 Look for method in the non-meta class. ============================================= From lewis at mail.msen.com Thu May 12 02:45:49 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 02:45:53 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> <20160511130231.GA67121@shell.msen.com> <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> Message-ID: <20160512024549.GA27337@shell.msen.com> On Wed, May 11, 2016 at 03:35:49PM +0200, Bert Freudenberg wrote: > On 11.05.2016, at 15:02, David T. Lewis wrote: > > > > On Wed, May 11, 2016 at 10:47:11AM +0200, Bert Freudenberg wrote: > >> On 11.05.2016, at 07:32, tim Rowledge wrote: > >> > >>>> > >>>> But this cannot possibly work. The window index used by HostWindowPlugin > >>>> is supposed to be opaque value, known to the plugin but not to the image. > >>>> On a Windows platform, the window index might be 1. > >>> > >>> IIRC (after all, I wrote this 12 years ago) we defined that the ???root??? window had to have a 1 index just so we could rely upon something. > >> > >> Yep. That's why it's hard-coded in DisplayScreen but a variable in HostWindowProxy. > >> > > > > Hmmm... it looks to me like it may take some work to make the unix > > plugin work that way. But maybe I was just overlooking something. > > The version I see here actually works *only* for the main Squeak window: > > static int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle) > { > if (windowIndex != 1) > return -1; > > XChangeProperty(stDisplay, stParent, > XInternAtom(stDisplay, "_NET_WM_NAME", False), > XInternAtom(stDisplay, "UTF8_STRING", False), > 8, PropModeReplace, newTitle, sizeOfTitle); > > return 0; > } > > (and setting the size is not implemented) > > static int display_hostWindowSetSize(int windowIndex, int w, int h) > { return -1; } > Aha, that gives me an idea. If the established convention is that window handle 1 refers to the Squeak display window, then maybe we can maintain the convention by having sqUnixX11.c check for this and convert it to the actual X11 Window of the display window. The code that you quote above is the current SVN trunk. The oscog branch has the same implementation for display_hostWindowSetTitle, and adds various things from Qwaq including a display_hostWindowSetSize(). The Qwaq methods all to use the X11 Window as the handle, and that is the part that does not yet work. So maybe there is an easy fix, convert index 1 to the window handle of the display window, stParent. For all other cases, treat the handles as opaque values. Yes, I think it will work :-) Dave From commits at source.squeak.org Thu May 12 03:25:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 03:25:24 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz Message-ID: David T. Lewis uploaded a new version of Graphics to project The Inbox: http://source.squeak.org/inbox/Graphics-dtl.335.mcz ==================== Summary ==================== Name: Graphics-dtl.335 Author: dtl Time: 11 May 2016, 11:25:12.450775 pm UUID: df71df68-b235-49be-b4a5-bebb84cb420a Ancestors: Graphics-mt.334 DisplayScreen class>>hostWindowExtent: uses the host window plugin to set the size of the main Squeak display window. Add the complementary #hostWindowExtent to query the plugin for display size. Requires VM support for HostWindowPlugin. Assuming required support from VM HostWindowPlugin: Display width @ Display height = DisplayScreen hostWindowExtent ==> true Recategorize methods for plugin access, and add a method comment to explain the convention of treating host window index 1 as a reference to the Squeak display window. =============== Diff against Graphics-mt.334 =============== Item was added: + ----- Method: DisplayScreen class>>hostWindowExtent (in category 'host window access') ----- + hostWindowExtent + + ^ self primitiveWindowSize: self hostWindowIndex + ! Item was changed: ----- Method: DisplayScreen class>>hostWindowIndex (in category 'host window access') ----- hostWindowIndex + "By convention, the reference to the primary Squeak display window is 1. + The host window plugin may use different conventions for references to + windows. In general, the handles for references to host windows should be + considered as meaningful only to the VM plugin, with host window index 1 + being a special case of a well known handle value." ^ 1! Item was changed: + ----- Method: DisplayScreen class>>primitiveWindow:title: (in category 'primitives - host window access') ----- - ----- Method: DisplayScreen class>>primitiveWindow:title: (in category 'host window access') ----- primitiveWindow: id title: titleString ^self primitiveFailed! Item was changed: + ----- Method: DisplayScreen class>>primitiveWindow:width:height: (in category 'primitives - host window access') ----- - ----- Method: DisplayScreen class>>primitiveWindow:width:height: (in category 'host window access') ----- primitiveWindow: id width: width height: height ^self primitiveFailed! Item was added: + ----- Method: DisplayScreen class>>primitiveWindowSize: (in category 'primitives - host window access') ----- + primitiveWindowSize: id + + + ^self primitiveFailed! From lewis at mail.msen.com Thu May 12 03:44:09 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 03:44:12 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: <201605120325.u4C3PQSF034618@shell.msen.com> References: <201605120325.u4C3PQSF034618@shell.msen.com> Message-ID: <20160512034409.GA34642@shell.msen.com> Marcel, Could you please check if this works on Windows and/or Mac, and if so consider moving to trunk? In particular, check if this works on Windows: Display width @ Display height = DisplayScreen hostWindowExtent ==> true I have the HostWindowPlugin primitives working on a unix VM but will need to clean it up and post the patches. I think that we had an earlier question as to whether the host window decorations (title bar etc) should be included in window size calculations. Based on the above test I would say that the answer should be no, neither the VM nor the image should be aware of the size of any window decorations that are added by a window manager. I expect that this policy should make sense on Windows, OS X, and Risc OS, although I do not know for sure because I am only looking at the X11 case. Dave On Thu, May 12, 2016 at 03:25:16AM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of Graphics to project The Inbox: > http://source.squeak.org/inbox/Graphics-dtl.335.mcz > > ==================== Summary ==================== > > Name: Graphics-dtl.335 > Author: dtl > Time: 11 May 2016, 11:25:12.450775 pm > UUID: df71df68-b235-49be-b4a5-bebb84cb420a > Ancestors: Graphics-mt.334 > > DisplayScreen class>>hostWindowExtent: uses the host window plugin to set the size of the main Squeak display window. Add the complementary #hostWindowExtent to query the plugin for display size. Requires VM support for HostWindowPlugin. > > Assuming required support from VM HostWindowPlugin: > Display width @ Display height = DisplayScreen hostWindowExtent ==> true > > Recategorize methods for plugin access, and add a method comment to explain the convention of treating host window index 1 as a reference to the Squeak display window. > From pdebruic at gmail.com Thu May 12 03:51:25 2016 From: pdebruic at gmail.com (PAUL DEBRUICKER) Date: Thu May 12 03:51:30 2016 Subject: [squeak-dev] in Random class #index inst var is shadowed in 3 methods Message-ID: <85C509FB-6209-4FFD-8542-6FA92DBCB22A@gmail.com> Would that change the behavior of the methods? It doesn't seem to as the tests pass if you rename the index temp vars to idx. Why is that? Thanks Paul -------------- next part -------------- A non-text attachment was scrubbed... Name: Random.pad.1.cs Type: application/octet-stream Size: 1951 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160511/9e703850/Random.pad.1.obj From lewis at mail.msen.com Thu May 12 05:42:28 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 05:42:30 2016 Subject: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work (was: [squeak-dev] Re: The Trunk: Graphics-mt.332.mcz) In-Reply-To: <20160512024549.GA27337@shell.msen.com> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> <20160511130231.GA67121@shell.msen.com> <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> <20160512024549.GA27337@shell.msen.com> Message-ID: <20160512054228.GA54267@shell.msen.com> On Wed, May 11, 2016 at 10:45:49PM -0400, David T. Lewis wrote: > On Wed, May 11, 2016 at 03:35:49PM +0200, Bert Freudenberg wrote: > > On 11.05.2016, at 15:02, David T. Lewis wrote: > > > > > > On Wed, May 11, 2016 at 10:47:11AM +0200, Bert Freudenberg wrote: > > >> On 11.05.2016, at 07:32, tim Rowledge wrote: > > >> > > >>>> > > >>>> But this cannot possibly work. The window index used by HostWindowPlugin > > >>>> is supposed to be opaque value, known to the plugin but not to the image. > > >>>> On a Windows platform, the window index might be 1. > > >>> > > >>> IIRC (after all, I wrote this 12 years ago) we defined that the ???root??? window had to have a 1 index just so we could rely upon something. > > >> > > >> Yep. That's why it's hard-coded in DisplayScreen but a variable in HostWindowProxy. > > >> > > > > > > Hmmm... it looks to me like it may take some work to make the unix > > > plugin work that way. But maybe I was just overlooking something. > > > > The version I see here actually works *only* for the main Squeak window: > > > > static int display_hostWindowSetTitle(int windowIndex, char *newTitle, int sizeOfTitle) > > { > > if (windowIndex != 1) > > return -1; > > > > XChangeProperty(stDisplay, stParent, > > XInternAtom(stDisplay, "_NET_WM_NAME", False), > > XInternAtom(stDisplay, "UTF8_STRING", False), > > 8, PropModeReplace, newTitle, sizeOfTitle); > > > > return 0; > > } > > > > (and setting the size is not implemented) > > > > static int display_hostWindowSetSize(int windowIndex, int w, int h) > > { return -1; } > > > > Aha, that gives me an idea. If the established convention is that window > handle 1 refers to the Squeak display window, then maybe we can maintain > the convention by having sqUnixX11.c check for this and convert it to the > actual X11 Window of the display window. > > The code that you quote above is the current SVN trunk. The oscog branch > has the same implementation for display_hostWindowSetTitle, and adds various > things from Qwaq including a display_hostWindowSetSize(). The Qwaq methods > all to use the X11 Window as the handle, and that is the part that does > not yet work. > > So maybe there is an easy fix, convert index 1 to the window handle > of the display window, stParent. For all other cases, treat the handles > as opaque values. Yes, I think it will work :-) > Sorry for replying to my own post, but I found one more "aha". I now know that the original intent of the window handles for the host window plugin included an assumption that handle 1 should always refer to the main Squeak display. But I also know from Andreas' previous work that any time the VM (a plugin) provides a "handle" reference to something internal to that plugin, that it was very important that the handle be treated as an opaque reference. In other words, the image should not be able to decode that handle to figure out what was going on internally within the plugin (as I routinely did with e.g. UnixOSProcessPlugin, to Andreas' great dismay). So, based on that background, I was expecting that the host window handles in HostWindowPlugin would be treated in the same manner, and that is why I was surprised to find that DisplayScreen class>>hostWindowIndex was hard coded to answer 1, when I might have expected that it should instead ask the VM for an opaque handle to the Squeak display window. I came up with a workaround for the X11 display module that simply maps host window handle 1 to the actual display window. That works very well, and I can now resize the display window on a unix VM. Based on that, I put an update in the inbox, which should be good independent of this discussion. I then took a look at some of the other Qwaq updates to sqUnixX11.c, and I see that there are more recent updates that (AFIK) are not yet in use in the Squeak VMs. These are identified by a version level in vm/SqDisplay.h (SqDisplayVersionMinor >= 3). One of the newer methods is: void *display_ioGetWindowHandle() { return (void *)stParent; } This is exactly what I would have expected. stParent is the address of a Window struct for the X11 window that contains the Squeak display. The handle in this case would be a 32-bit or 64-bit C pointer, and the expectation would be that the image should treat this as an opaque handle, meaningful to the VM but serving only as a handle reference within the image. My opinion: For our immediate purposes, we should respect the convention of treating host window handle 1 as a reference to the display window. Hack the plugin and X11 loadable VM module as needed make it work. It does work, and I'll post some VM patches as soon as I can (maybe a couple of days, I'm done looking at it for now). But what we really should do: Implement it as I believe that it was probably done at Qwaq. The handles should be opaque, and the host window plugin should have an addition primitive to answer the window handle for the main host window. That primitive would, in the case of the X11 VM module, call this to get the handle: void *display_ioGetWindowHandle() { return (void *)stParent; } This can be done in a backward compatible manner, because the image can call the primitive to obtain the main window handle, and fall back to a default value of 1 if the primitive fails. Dave From Marcel.Taeumel at hpi.de Thu May 12 06:46:21 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 12 07:21:45 2016 Subject: [squeak-dev] Re: in Random class #index inst var is shadowed in 3 methods In-Reply-To: <85C509FB-6209-4FFD-8542-6FA92DBCB22A@gmail.com> References: <85C509FB-6209-4FFD-8542-6FA92DBCB22A@gmail.com> Message-ID: <1463035581271-4894393.post@n4.nabble.com> Hi Paul, your change set works fine here in Squeak Trunk in Windows 10. Random-Tests pass before and after file-in. Best, Marcel -- View this message in context: http://forum.world.st/in-Random-class-index-inst-var-is-shadowed-in-3-methods-tp4894387p4894393.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 12 07:32:30 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 07:32:31 2016 Subject: [squeak-dev] The Trunk: Graphics-dtl.335.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-dtl.335.mcz ==================== Summary ==================== Name: Graphics-dtl.335 Author: dtl Time: 11 May 2016, 11:25:12.450775 pm UUID: df71df68-b235-49be-b4a5-bebb84cb420a Ancestors: Graphics-mt.334 DisplayScreen class>>hostWindowExtent: uses the host window plugin to set the size of the main Squeak display window. Add the complementary #hostWindowExtent to query the plugin for display size. Requires VM support for HostWindowPlugin. Assuming required support from VM HostWindowPlugin: Display width @ Display height = DisplayScreen hostWindowExtent ==> true Recategorize methods for plugin access, and add a method comment to explain the convention of treating host window index 1 as a reference to the Squeak display window. =============== Diff against Graphics-mt.334 =============== Item was added: + ----- Method: DisplayScreen class>>hostWindowExtent (in category 'host window access') ----- + hostWindowExtent + + ^ self primitiveWindowSize: self hostWindowIndex + ! Item was changed: ----- Method: DisplayScreen class>>hostWindowIndex (in category 'host window access') ----- hostWindowIndex + "By convention, the reference to the primary Squeak display window is 1. + The host window plugin may use different conventions for references to + windows. In general, the handles for references to host windows should be + considered as meaningful only to the VM plugin, with host window index 1 + being a special case of a well known handle value." ^ 1! Item was changed: + ----- Method: DisplayScreen class>>primitiveWindow:title: (in category 'primitives - host window access') ----- - ----- Method: DisplayScreen class>>primitiveWindow:title: (in category 'host window access') ----- primitiveWindow: id title: titleString ^self primitiveFailed! Item was changed: + ----- Method: DisplayScreen class>>primitiveWindow:width:height: (in category 'primitives - host window access') ----- - ----- Method: DisplayScreen class>>primitiveWindow:width:height: (in category 'host window access') ----- primitiveWindow: id width: width height: height ^self primitiveFailed! Item was added: + ----- Method: DisplayScreen class>>primitiveWindowSize: (in category 'primitives - host window access') ----- + primitiveWindowSize: id + + + ^self primitiveFailed! From Marcel.Taeumel at hpi.de Thu May 12 07:03:19 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 12 07:38:41 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <20160512034409.GA34642@shell.msen.com> References: <20160512034409.GA34642@shell.msen.com> Message-ID: <1463036599791-4894398.post@n4.nabble.com> Hi Dave, no, the host window extent includes title bar and shadows in Windows 10. That's why I implemented DisplayScreen class >> #setNewScreenSize: with the two passes. I copied this version over to trunk and adapted the calculation of the new screen size to use #hostWindowExtent and a single call. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Graphics-dtl-335-mcz-tp4894384p4894398.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 12 07:39:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 07:39:03 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.336.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.336.mcz ==================== Summary ==================== Name: Graphics-mt.336 Author: mt Time: 12 May 2016, 9:38:38.58863 am UUID: 01f5f8b2-0ae6-f040-aa5f-848b34cfd3ae Ancestors: Graphics-dtl.335 Use host window extent to calculate the new screen size. =============== Diff against Graphics-dtl.335 =============== Item was changed: ----- Method: DisplayScreen class>>setNewScreenSize: (in category 'display box access') ----- setNewScreenSize: aPoint + "Ensure that the Display is set to the given extent. Due to the behavior of host-window plugin, we may have to account for host window shadows and title bars." - "Ensure that the Display is set to the given extent. Due to the behavior of host-window plugin, this may need two attempts because the plugin tends to account for host window shadows and title bars." + self hostWindowExtent: aPoint + self hostWindowExtent - self actualScreenSize. + self checkForNewScreenSize.! - self hostWindowExtent: aPoint. - self checkForNewScreenSize. - - Display extent < aPoint ifTrue: [ - self hostWindowExtent: 2*aPoint - Display extent. - self checkForNewScreenSize].! From Marcel.Taeumel at hpi.de Thu May 12 07:12:13 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 12 07:47:34 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: References: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> Message-ID: <1463037133356-4894406.post@n4.nabble.com> Hi Chris, this might be new. There is a DNU on the receiver, which is the mutex, in ContextPart >> #doPrimitive:method:receiver:args:. So, we do not have (and did not have in 5.0) any implementors of #primitiveEnterCriticalSectionOnBehalfOf: or #primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf:. Is there some code missing? Or is this VM magic? Best, Marcel -- View this message in context: http://forum.world.st/Re-Why-context-top-points-to-tempVector-and-not-to-variable-value-tp4894305p4894406.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu May 12 07:16:43 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 12 07:52:05 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: <1463037133356-4894406.post@n4.nabble.com> References: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> <1463037133356-4894406.post@n4.nabble.com> Message-ID: <1463037403121-4894407.post@n4.nabble.com> Hi, there. There seems to be a bug with "through" and Mutex. Try to debug-it via "through": Mutex new critical: [3+4]. It works fine with a Semaphore: Semaphore forMutualExclusion critical: [3+4]. Best, Marcel -- View this message in context: http://forum.world.st/Re-Why-context-top-points-to-tempVector-and-not-to-variable-value-tp4894305p4894407.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From dionisiydk at gmail.com Thu May 12 07:51:49 2016 From: dionisiydk at gmail.com (Denis Kudriashov) Date: Thu May 12 07:52:12 2016 Subject: [squeak-dev] Re: Why "context top" points to "tempVector" and not to variable value? In-Reply-To: <1463037133356-4894406.post@n4.nabble.com> References: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> <1463037133356-4894406.post@n4.nabble.com> Message-ID: 2016-05-12 9:12 GMT+02:00 marcel.taeumel : > So, we do not have (and did not have in 5.0) any implementors of > #primitiveEnterCriticalSectionOnBehalfOf: or > #primitiveTestAndSetOwnershipOfCriticalSectionOnBehalfOf:. > It used to simulate new lock primitives which I think not used in system -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/30176268/attachment.htm From bert at freudenbergs.de Thu May 12 08:23:14 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu May 12 08:23:17 2016 Subject: [squeak-dev] Why "context top" points to "tempVector" and not to variable value? In-Reply-To: References: <45C32CBF-9166-4151-A1E5-1C02989CFFC4@freudenbergs.de> Message-ID: <54FABE56-4F56-44D2-8716-7E5465F7EEEF@freudenbergs.de> On 11.05.2016, at 23:10, Chris Muller wrote: > > Great discussion, the debugger is the most powerful browser. > Unfortunately, we still have this very painful and highly occurring > bug that renders debugging "Through" essentially too dangerous to use > at all.. > > For example: > > SearchTopic new updateContents > > Shift+Cmd+D to "Debug it", then press Through Through (i.e., step > through "updateContents"). > > ... you now have an inescapable Emergency Evaluator. Alt-. gets you out. But yes, there?s something seriously wrong. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/714ad280/smime.bin From leves at caesar.elte.hu Thu May 12 08:23:58 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 12 08:24:04 2016 Subject: [squeak-dev] in Random class #index inst var is shadowed in 3 methods In-Reply-To: <85C509FB-6209-4FFD-8542-6FA92DBCB22A@gmail.com> References: <85C509FB-6209-4FFD-8542-6FA92DBCB22A@gmail.com> Message-ID: On Wed, 11 May 2016, PAUL DEBRUICKER wrote: > > Would that change the behavior of the methods? > > > It doesn't seem to as the tests pass if you rename the index temp vars to idx. > > > Why is that? > Because shadowing means that the shadowed variable will not be used. Since those methods don't use the instance variable, it's perfectly fine to reuse the name "index" instead of "idx" or "i" or whatever. Levente > > Thanks > > Paul > > > From commits at source.squeak.org Thu May 12 08:25:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 08:25:47 2016 Subject: [squeak-dev] The Trunk: 50Deprecated-mt.2.mcz Message-ID: Marcel Taeumel uploaded a new version of 50Deprecated to project The Trunk: http://source.squeak.org/trunk/50Deprecated-mt.2.mcz ==================== Summary ==================== Name: 50Deprecated-mt.2 Author: mt Time: 12 May 2016, 10:24:52.792798 am UUID: b6f355c5-d95a-204b-aaf8-8986e9227b28 Ancestors: 50Deprecated-eem.1 Deprecations were moved to 51Deprecated. This package should not exist because we used 46Deprecated for the last release. =============== Diff against 50Deprecated-eem.1 =============== Item was removed: - ----- Method: Dictionary>>fasterKeys (in category '*50Deprecated-accessing') ----- - fasterKeys - "Contrary to old version of #keys, this method returned an Array rather than a Set. - This was faster because no lookup: was performed. - But now, #keys also return an Array, so don't use #fasterKeys anymore." - - self deprecated: 'use #keys'. - - ^self keys. - ! Item was removed: - ----- Method: Dictionary>>keyForIdentity: (in category '*50Deprecated-accessing') ----- - keyForIdentity: anObject - "If anObject is one of the values of the receive, return its key, else return nil. Contrast #keyAtValue: in which there is only an equality check, here there is an identity check" - - self deprecated: 'Use #keyAtIdentityValue:ifAbsent:'. - ^self keyAtIdentityValue: anObject ifAbsent: nil! From bert at freudenbergs.de Thu May 12 08:56:35 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu May 12 08:56:39 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: <1463036599791-4894398.post@n4.nabble.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> Message-ID: <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> On 12.05.2016, at 09:03, marcel.taeumel wrote: > > Hi Dave, > > no, the host window extent includes title bar and shadows in Windows 10. > That's why I implemented DisplayScreen class >> #setNewScreenSize: with the > two passes. > > I copied this version over to trunk and adapted the calculation of the new > screen size to use #hostWindowExtent and a single call. I agree with Dave: We do not need or want to read hostWindowExtent. For the main window we already have actualScreenSize which gives us the extent. We should set the window size to the expected value, check actualScreenSize, and adjust if needed to work around the Windows VM?s bug (and fix the Windows VM). - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/90a7ae43/smime.bin From commits at source.squeak.org Thu May 12 09:07:31 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 09:08:20 2016 Subject: [squeak-dev] The Trunk: Graphics-mt.337.mcz Message-ID: Marcel Taeumel uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-mt.337.mcz ==================== Summary ==================== Name: Graphics-mt.337 Author: mt Time: 12 May 2016, 11:07:11.878798 am UUID: e72639c7-032e-cd44-8161-78e83af64554 Ancestors: Graphics-mt.336 Revert previous commit and document the current implementation. We have to fix the host window plugin in Windows. =============== Diff against Graphics-mt.336 =============== Item was changed: ----- Method: DisplayScreen class>>setNewScreenSize: (in category 'display box access') ----- setNewScreenSize: aPoint + "Ensure that the Display is set to the given extent." - "Ensure that the Display is set to the given extent. Due to the behavior of host-window plugin, we may have to account for host window shadows and title bars." + self hostWindowExtent: aPoint. + self checkForNewScreenSize. + + "In the Windows version of the host window plugin, the extent currently includes window decorations. Therefore, we need two attempts to ensure that the Display extent is aPoint. Note that this is a bug in the plugin." + Display extent < aPoint ifTrue: [ + self hostWindowExtent: 2*aPoint - Display extent. + self checkForNewScreenSize].! - self hostWindowExtent: aPoint + self hostWindowExtent - self actualScreenSize. - self checkForNewScreenSize.! From commits at source.squeak.org Thu May 12 09:41:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 09:41:54 2016 Subject: [squeak-dev] The Trunk: Graphics-bf.338.mcz Message-ID: Bert Freudenberg uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-bf.338.mcz ==================== Summary ==================== Name: Graphics-bf.338 Author: bf Time: 12 May 2016, 11:41:33.008808 am UUID: bba96f0e-d745-4368-a35b-fae22934052a Ancestors: Graphics-mt.337 Remove unnecessary primitive. =============== Diff against Graphics-mt.337 =============== Item was removed: - ----- Method: DisplayScreen class>>hostWindowExtent (in category 'host window access') ----- - hostWindowExtent - - ^ self primitiveWindowSize: self hostWindowIndex - ! Item was removed: - ----- Method: DisplayScreen class>>primitiveWindowSize: (in category 'primitives - host window access') ----- - primitiveWindowSize: id - - - ^self primitiveFailed! From bert at freudenbergs.de Thu May 12 09:51:09 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu May 12 09:51:13 2016 Subject: [squeak-dev] Re: DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work In-Reply-To: <20160512054228.GA54267@shell.msen.com> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> <20160511130231.GA67121@shell.msen.com> <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> <20160512024549.GA27337@shell.msen.com> <20160512054228.GA54267@shell.msen.com> Message-ID: <76422014-0329-42C2-A6E9-FDBCAB30AC27@freudenbergs.de> On 12.05.2016, at 07:42, David T. Lewis wrote: > > For our immediate purposes, we should respect the convention of treating > host window handle 1 as a reference to the display window. Hack the plugin > and X11 loadable VM module as needed make it work. It does work, and I'll > post some VM patches as soon as I can (maybe a couple of days, I'm done > looking at it for now). > > But what we really should do: Implement it as I believe that it was probably > done at Qwaq. The handles should be opaque, and the host window plugin > should have an addition primitive to answer the window handle for the > main host window. That primitive would, in the case of the X11 VM module, > call this to get the handle: > > void *display_ioGetWindowHandle() { return (void *)stParent; } > > This can be done in a backward compatible manner, because the image > can call the primitive to obtain the main window handle, and fall back > to a default value of 1 if the primitive fails. > > Dave +1 This is a sensible and pragmatic approach. The other option would be to actually have a registry in the plugin and only hand indices to the image instead of leaking raw window handles. That way the handles would be completely opaque, and couldn?t be forged by the image. Index 1 would be pre-allocated to the main window. But I agree that the added complexity in the plugin is not worth that effort. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/0d67f358/smime.bin From lewis at mail.msen.com Thu May 12 12:00:32 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 12:00:35 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> Message-ID: <20160512120032.GA29810@shell.msen.com> On Thu, May 12, 2016 at 10:56:35AM +0200, Bert Freudenberg wrote: > On 12.05.2016, at 09:03, marcel.taeumel wrote: > > > > Hi Dave, > > > > no, the host window extent includes title bar and shadows in Windows 10. > > That's why I implemented DisplayScreen class >> #setNewScreenSize: with the > > two passes. > > > > I copied this version over to trunk and adapted the calculation of the new > > screen size to use #hostWindowExtent and a single call. > > I agree with Dave: We do not need or want to read hostWindowExtent. For the main window we already have actualScreenSize which gives us the extent. > > We should set the window size to the expected value, check actualScreenSize, and adjust if needed to work around the Windows VM???s bug (and fix the Windows VM). > Thanks Marcel and Bert, I added the DisplayScreen>>hostWindowExtent method in Graphics-dtl.335. If it is not needed, should I remove it? It is useful for exercising the HostWindowPlugin, but maybe it does not belong in trunk. Dave From lewis at mail.msen.com Thu May 12 12:02:18 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 12:02:21 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: <20160512120032.GA29810@shell.msen.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> Message-ID: <20160512120218.GB29810@shell.msen.com> Sorry, please disregard. I see that Marcel has already handled it :-) Thanks, Dave On Thu, May 12, 2016 at 08:00:32AM -0400, David T. Lewis wrote: > On Thu, May 12, 2016 at 10:56:35AM +0200, Bert Freudenberg wrote: > > On 12.05.2016, at 09:03, marcel.taeumel wrote: > > > > > > Hi Dave, > > > > > > no, the host window extent includes title bar and shadows in Windows 10. > > > That's why I implemented DisplayScreen class >> #setNewScreenSize: with the > > > two passes. > > > > > > I copied this version over to trunk and adapted the calculation of the new > > > screen size to use #hostWindowExtent and a single call. > > > > I agree with Dave: We do not need or want to read hostWindowExtent. For the main window we already have actualScreenSize which gives us the extent. > > > > We should set the window size to the expected value, check actualScreenSize, and adjust if needed to work around the Windows VM???s bug (and fix the Windows VM). > > > > Thanks Marcel and Bert, > > I added the DisplayScreen>>hostWindowExtent method in Graphics-dtl.335. > If it is not needed, should I remove it? It is useful for exercising the > HostWindowPlugin, but maybe it does not belong in trunk. > > Dave > From bert at freudenbergs.de Thu May 12 12:12:58 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu May 12 12:13:03 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: <20160512120032.GA29810@shell.msen.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> Message-ID: > On 12.05.2016, at 14:00, David T. Lewis wrote: > > On Thu, May 12, 2016 at 10:56:35AM +0200, Bert Freudenberg wrote: >> On 12.05.2016, at 09:03, marcel.taeumel wrote: >>> >>> Hi Dave, >>> >>> no, the host window extent includes title bar and shadows in Windows 10. >>> That's why I implemented DisplayScreen class >> #setNewScreenSize: with the >>> two passes. >>> >>> I copied this version over to trunk and adapted the calculation of the new >>> screen size to use #hostWindowExtent and a single call. >> >> I agree with Dave: We do not need or want to read hostWindowExtent. For the main window we already have actualScreenSize which gives us the extent. >> >> We should set the window size to the expected value, check actualScreenSize, and adjust if needed to work around the Windows VM???s bug (and fix the Windows VM). >> > > Thanks Marcel and Bert, > > I added the DisplayScreen>>hostWindowExtent method in Graphics-dtl.335. > If it is not needed, should I remove it? It is useful for exercising the > HostWindowPlugin, but maybe it does not belong in trunk. It is needed and used in HostWindowProxy. But for the main window we have actualScreenSize. That?s why I deleted it. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160512/9791fbdd/smime.bin From commits at source.squeak.org Thu May 12 14:43:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 14:43:07 2016 Subject: [squeak-dev] The Trunk: Monticello-mt.632.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-mt.632.mcz ==================== Summary ==================== Name: Monticello-mt.632 Author: mt Time: 12 May 2016, 4:42:54.059309 pm UUID: 9611f9ba-d971-1e45-be48-9036bfa2738a Ancestors: Monticello-ul.631 Add custom warnings to support ignoring the loading of empty (diffy) versions via #on:do:. =============== Diff against Monticello-ul.631 =============== Item was added: + MCEmptyVersion subclass: #MCEmptyDiffyVersion + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Monticello-Storing'! Item was added: + ----- Method: MCEmptyDiffyVersion class>>signal (in category 'exceptionInstantiator') ----- + signal + + self signal: 'About to serialize an empty diffy version.' ! Item was added: + Warning subclass: #MCEmptyVersion + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Monticello-Storing'! Item was added: + ----- Method: MCEmptyVersion class>>signal (in category 'exceptionInstantiator') ----- + signal + + self signal: 'About to serialize an empty mcz version.'! Item was changed: ----- Method: MCMcdWriter>>writePatch: (in category 'visiting') ----- writePatch: aPatch | old new | old := OrderedCollection new. new := OrderedCollection new. aPatch operations do: [ : ea | ea isRemoval ifTrue: [ old add: ea definition ]. ea isAddition ifTrue: [ new add: ea definition ]. ea isModification ifTrue: [ old add: ea baseDefinition. new add: ea definition ] ]. + (old isEmpty and: [ new isEmpty ]) ifTrue: [ MCEmptyDiffyVersion signal ]. - (old isEmpty and: [ new isEmpty ]) ifTrue: [ Warning signal: 'About to serialize an empty diffy version.' ]. self writeOldDefinitions: old ; writeNewDefinitions: new ; addString: (self serializeInBinary: aPatch) at: 'patch.bin'! Item was changed: ----- Method: MCMczWriter>>writeSnapshot: (in category 'visiting') ----- writeSnapshot: aSnapshot + aSnapshot definitions ifEmpty: [ MCEmptyVersion signal ]. - aSnapshot definitions ifEmpty: [ Warning signal: 'About to serialize an empty mcz version.' ]. self addString: (self serializeDefinitions: aSnapshot definitions) at: 'snapshot/source.' , self snapshotWriterClass extension encodedTo: 'utf8' ; addString: (self serializeInBinary: aSnapshot) at: 'snapshot.bin'! From commits at source.squeak.org Thu May 12 14:51:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 14:52:48 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.131.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.131.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.131 Author: mt Time: 12 May 2016, 4:51:52.306309 pm UUID: 2adf101d-9026-1f49-a311-0a6af2533db8 Ancestors: ReleaseBuilder-mt.130 CLEAN-UP RELEASE BUILDER - make use of latest project refactorings - support for local release builds (enabled by default) - add update map to release repository - do code update during the process - unload foreign packages (i.e. the ones not in the update map) - provide option to re-load dirty packages automatically - disable full-screen when setting the display extent - automatically quit the VM after saving the build artifact Try out local builds via "ReleaseBuilder saveAsNewRelease". =============== Diff against ReleaseBuilder-mt.130 =============== Item was changed: Object subclass: #ReleaseBuilder instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ReleaseBuilder'! + !ReleaseBuilder commentStamp: 'mt 5/12/2016 16:50' prior: 0! + I'm the script that prepares a trunk image for release. For the next release version please update #releaseVersionMajor and #releaseVersionMinor. + + Prepare and save this image as a release image via "ReleaseBuilder saveAsNewRelease." + If you want to save this image as the next alpha release, do: "ReleaseBuilder saveAsNextVersionAlpha." + + If you want to try it locally, change #localBuild to return true. + + Most of the code operates (read-only) on the build repository, which is usually the trunk. For releases, there is a release repository, to which some package versions will be copied from trunk.! - !ReleaseBuilder commentStamp: 'fbs 5/2/2013 22:36' prior: 0! - I'm the script that prepares a trunk image for release. Which version of Squeak I release is stored in ReleaseBuilder class >> squeakVersion.! Item was added: + ----- Method: ReleaseBuilder class>>buildConfiguration (in category 'accessing') ----- + buildConfiguration + + | max versionName | + max := 0. + versionName := ''. + + (self buildRepository versionNamesForPackageNamed: 'update') do: [:nm | + ((nm findTokens: $.) atLast: 2) asInteger in: [:versionNumber | + versionNumber > max ifTrue: [max := versionNumber. versionName := nm]]]. + + ^ self buildRepository versionNamed: versionName + ! Item was changed: + ----- Method: ReleaseBuilder class>>buildRepository (in category 'accessing') ----- - ----- Method: ReleaseBuilder class>>buildRepository (in category 'private') ----- buildRepository ^ MCRepository trunk! Item was added: + ----- Method: ReleaseBuilder class>>buildRepositoryUrl (in category 'accessing') ----- + buildRepositoryUrl + ^ self buildRepository description! Item was changed: ----- Method: ReleaseBuilder class>>checkForDirtyPackages (in category 'scripts') ----- checkForDirtyPackages + + | modifiedWorkingCopies unmergedWorkingCopies | MCWorkingCopy checkModified: true. + modifiedWorkingCopies := MCWorkingCopy allManagers + select: [:wc | wc ancestors size = 1 and: [wc modified] ]. + unmergedWorkingCopies := MCWorkingCopy allManagers + select: [:wc | (wc ancestors size = 1) not ]. + + unmergedWorkingCopies ifNotEmpty: [ + "Sort to simplify exploration. MC browser does also show packages sorted." + (modifiedWorkingCopies sortBy: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore. + Warning signal: 'There are unmerged packages.']. + + modifiedWorkingCopies ifNotEmpty: [ + "Sort to simplify exploration. MC browser does also show packages sorted." + (modifiedWorkingCopies sortBy: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore. + + (Project current uiManager + confirm: 'Do you want to discard all local changes?' + orCancel: [^ Error signal: 'Release building canceled.'] + title: 'Dirty Packages Found') + ifTrue: [modifiedWorkingCopies do: [:wc | + [(self buildRepository versionWithInfo: wc ancestors first) load] + on: Warning do: [:warning | warning resume]]]].! - (MCWorkingCopy allManagers anySatisfy: - [ : wc | (wc ancestors size = 1) not or: [ wc modified ] ]) ifTrue: [ Warning signal: 'There are dirty and/or unmerged packages.' ]! Item was changed: + ----- Method: ReleaseBuilder class>>configureDesktop (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>configureDesktop (in category 'private') ----- configureDesktop self deleteAllWindows. - MorphicProject initialize. Project current resourceManager reset. "Zap eventual resources" "Replace docking bar instance in case its code has changed." Project current removeMainDockingBar. TheWorldMainDockingBar updateInstances! Item was added: + ----- Method: ReleaseBuilder class>>copyPackagesFrom:to:depth: (in category 'scripts') ----- + copyPackagesFrom: sourceRepository to: targetRepository depth: historyDepth + "Copy the packages currently loaded in the image from the source repository to a target repository. Follow ancestry up to the depth specified." + + | currentDepth nextVersions currentVersions ignoredVersions | + currentDepth := 0. + nextVersions := (MCWorkingCopy allManagers gather: [:wc | wc ancestors]) asOrderedCollection. + ignoredVersions := OrderedCollection new. + + [nextVersions notEmpty] whileTrue: [ + currentVersions := nextVersions. + nextVersions := OrderedCollection new. + currentDepth := currentDepth + 1. + + currentVersions do: [:versionInfo | + (targetRepository includesVersionNamed: versionInfo versionName) + ifTrue: [Transcript showln: ('[ReleaseBuilder] Version {1} already exists in {2}' + format: {versionInfo versionName. targetRepository description})] + ifFalse: [(sourceRepository versionWithInfo: versionInfo) + ifNil: [ignoredVersions add: versionInfo] + ifNotNil: [:version | targetRepository storeVersion: version ] ]. + currentDepth < historyDepth ifTrue: [ + nextVersions addAll: versionInfo ancestors]]]. + + ignoredVersions ifNotEmpty: [ + ignoredVersions explore. + Warning signal: 'There were versions not found in the source repository.'].! Item was added: + ----- Method: ReleaseBuilder class>>copyUpdateMapTo: (in category 'scripts') ----- + copyUpdateMapTo: targetRepository + + self buildConfiguration in: [:config | + | newConfig | + newConfig := MCConfiguration new. + newConfig repositories add: targetRepository. + newConfig dependencies addAll: config dependencies. + newConfig name: config name. + + targetRepository storeVersion: newConfig].! Item was changed: + ----- Method: ReleaseBuilder class>>deleteAllWindows (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>deleteAllWindows (in category 'private') ----- deleteAllWindows (SystemWindow + windowsIn: Project current world - windowsIn: ActiveWorld satisfying: [ : window | true ]) do: [ : window | [ window makeClosable; delete ] on: ProvideAnswerNotification do: [ : noti | noti resume: true ] ]! Item was changed: + ----- Method: ReleaseBuilder class>>loadWellKnownPackages (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>loadWellKnownPackages (in category 'private') ----- loadWellKnownPackages "Load into the release image those packages that have been stripped from Trunk, but still deemed necessary for a release artifact." Installer new merge: #squeakRelease! Item was added: + ----- Method: ReleaseBuilder class>>localBuild (in category 'accessing') ----- + localBuild + "If true, use a local, directory-based repository. Usually in the working directory." + + ^ true! Item was changed: + ----- Method: ReleaseBuilder class>>openWelcomeWorkspaces (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>openWelcomeWorkspaces (in category 'private') ----- openWelcomeWorkspaces |offset | offset:= 50@50. #('License Information' 'The Squeak User Interface' 'Working With Squeak' 'Release Notes') with: #(#licenseInformation #squeakUserInterface #workingWithSqueak #releaseNotes) do: [ : eachLabel : eachAccessor | TheWorldMainDockingBar instance showWelcomeText: eachAccessor label: eachLabel in: (offset extent: 500@300). offset := offset + (30@30)]! Item was added: + ----- Method: ReleaseBuilder class>>prepareEnvironment (in category 'preparing') ----- + prepareEnvironment + "Prepare everything that should be done for a new image build. Clear caches, passwords, etc." + "ReleaseBuilder prepareNewBuild" + + TTCFont registerAll. + FileList initialize. + RealEstateAgent standardSize: 600 @ 400. + SMLoaderPlus setDefaultFilters: (OrderedCollection with: #filterSafelyAvailable). + " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." + self + setDisplayExtent: 800 @ 600 ; + setPreferences ; "<-- remove this after defaultValueTableForCurrentRelease is fixed up." + discardUserObjects ; + configureDesktop. + Smalltalk cleanUp: true. + MCFileBasedRepository flushAllCaches. + MCHttpRepository clearCredentials. + Utilities setAuthorInitials: String empty. + Environment allInstancesDo: [ : env | env purgeUndeclared ]. + Undeclared removeUnreferencedKeys. + Smalltalk garbageCollect. + [ self loadWellKnownPackages "<-- 4.5 is not ready for unloaded / reloaded packages" ]. + Compiler recompileAll. + self openWelcomeWorkspaces.! Item was removed: - ----- Method: ReleaseBuilder class>>prepareNewBuild (in category 'scripts') ----- - prepareNewBuild - self prepareNewBuild: self buildRepository.! Item was removed: - ----- Method: ReleaseBuilder class>>prepareNewBuild: (in category 'scripts') ----- - prepareNewBuild: anMCRepository - "ReleaseBuilderTrunk prepareNewBuild" - "Prepare everything that should be done for a new image build" - MCMcmUpdater updateMissingPackages: true. - MCMcmUpdater enableUpdatesForAllPackages. - TTCFont registerAll. - FileList initialize. - RealEstateAgent standardSize: 600 @ 400. - SystemVersion newVersion: self versionString. - SMLoaderPlus setDefaultFilters: (OrderedCollection with: #filterSafelyAvailable). - " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." - self - setDisplayExtent: 800 @ 600 ; - switchToNewRepository: anMCRepository ; - setPreferences ; "<-- remove this after defaultValueTableForCurrentRelease is fixed up." - checkForDirtyPackages ; - discardUserObjects ; - configureDesktop. - Smalltalk cleanUp: true. - MCFileBasedRepository flushAllCaches. - MCHttpRepository clearCredentials. - Utilities setAuthorInitials: String empty. - Environment allInstancesDo: [ : env | env purgeUndeclared ]. - Undeclared removeUnreferencedKeys. - Smalltalk garbageCollect. - [ self loadWellKnownPackages "<-- 4.5 is not ready for unloaded / reloaded packages" ]. - Compiler recompileAll. - self - setProjectBackground: Color darkGray ; - openWelcomeWorkspaces! Item was changed: + ----- Method: ReleaseBuilder class>>prepareNewRelease (in category 'preparing') ----- - ----- Method: ReleaseBuilder class>>prepareNewRelease (in category 'scripts') ----- prepareNewRelease "This method is run at time of release to transfer the top trunk versions into my releaseRepository, and produce a release image." + + | source target | + source := self buildRepository. + target := self releaseRepository. + + [ self + setTopProject; + prepareSourceCode; + copyPackagesFrom: source to: target depth: 1; + copyUpdateMapTo: target; + prepareEnvironment; + switchToNewRepository: target. + ] on: MCEmptyVersion do: [:warning | warning resume]. + + SystemVersion newVersion: self versionString.! - self - transferCurrentPackagesAsUser: Utilities authorInitials - password: (UIManager default requestPassword: 'Enter password for ' , self projectUrl). - self prepareNewBuild: self releaseRepository! Item was changed: + ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'preparing') ----- - ----- Method: ReleaseBuilder class>>prepareNextVersionAlpha (in category 'scripts') ----- prepareNextVersionAlpha "Prepare the first alpha image for next release." + + self + setTopProject; + prepareSourceCode; + prepareEnvironment; + switchToNewRepository: self buildRepository. + + SystemVersion newVersion: self versionStringAlpha.! - SystemVersion - newVersion: ((UIManager default request: 'Please specify the name of the\new version of Squeak.' withCRs initialAnswer: SystemVersion current version) - ifEmpty: [^ self inform: 'Aborted.']). - MCFileBasedRepository flushAllCaches. - MCHttpRepository clearCredentials. - Utilities setAuthorInitials: String empty. - self switchToNewRepository: self buildRepository! Item was added: + ----- Method: ReleaseBuilder class>>prepareSourceCode (in category 'preparing') ----- + prepareSourceCode + "Update code. Remove foreign packages." + + MCMcmUpdater defaultUpdateURL: self buildRepository description. + + MCMcmUpdater updateMissingPackages: true. + MCMcmUpdater enableUpdatesForAllPackages. + + MCMcmUpdater default doUpdate: false. "non-interactive". + + self unloadForeignPackages. + self checkForDirtyPackages.! Item was removed: - ----- Method: ReleaseBuilder class>>projectUrl (in category 'private') ----- - projectUrl - ^ (self repositoryUrl , '/', (self versionString copyWithout: $.)) asLowercase! Item was changed: + ----- Method: ReleaseBuilder class>>releaseRepository (in category 'accessing') ----- - ----- Method: ReleaseBuilder class>>releaseRepository (in category 'private') ----- releaseRepository + + ^ (MCRepository location: self releaseRepositoryUrl) in: [:repo | + self localBuild ifFalse: [ + repo + user: (UIManager default + request: 'Enter user for ', self releaseRepositoryUrl + initialAnswer: Utilities authorInitials); + password: (UIManager default + requestPassword: 'Enter password for ' , self releaseRepositoryUrl)]. + repo].! - ^ MCRepository location: self projectUrl! Item was added: + ----- Method: ReleaseBuilder class>>releaseRepositoryUrl (in category 'accessing') ----- + releaseRepositoryUrl + + ^ self localBuild + ifFalse: [(self serverUrl, '/', (self versionString copyWithout: $.)) asLowercase] + ifTrue: [(FileDirectory default on: 'repositories', FileDirectory slash, (self versionString copyWithout: $.) asLowercase) + assureExistence; + fullName]! Item was added: + ----- Method: ReleaseBuilder class>>releaseVersionMajor (in category 'accessing') ----- + releaseVersionMajor + + ^ 5! Item was added: + ----- Method: ReleaseBuilder class>>releaseVersionMinor (in category 'accessing') ----- + releaseVersionMinor + + ^ 1! Item was removed: - ----- Method: ReleaseBuilder class>>repositoryUrl (in category 'private') ----- - repositoryUrl - ^ 'http://source.squeak.org'! Item was added: + ----- Method: ReleaseBuilder class>>saveAsNewRelease (in category 'saving') ----- + saveAsNewRelease + "ReleaseManager saveAsNewRelease" + + (Project current uiManager + confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionString, String cr, String cr, 'The VM will quit after that. Continue?' + title: 'Release Builder') ifFalse: [^ self]. + + self prepareNewRelease. + Smalltalk saveAs: self versionString, '-', SystemVersion current highestUpdate asString. + Smalltalk snapshot: true "Important!!" andQuit: true.! Item was added: + ----- Method: ReleaseBuilder class>>saveAsNextVersionAlpha (in category 'saving') ----- + saveAsNextVersionAlpha + "ReleaseBuilder saveNextVersionAlpha." + + (Project current uiManager + confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionStringAlpha, String cr, String cr, 'The VM will quit after that. Continue?' + title: 'Release Builder') ifFalse: [^ self]. + + self prepareNextVersionAlpha. + Smalltalk saveAs: self versionStringAlpha, '-', SystemVersion current highestUpdate asString. + Smalltalk snapshot: true "Important!!" andQuit: true.! Item was added: + ----- Method: ReleaseBuilder class>>serverUrl (in category 'accessing') ----- + serverUrl + ^ 'http://source.squeak.org'! Item was changed: + ----- Method: ReleaseBuilder class>>setDisplayExtent: (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>setDisplayExtent: (in category 'private') ----- setDisplayExtent: extent + + DisplayScreen + fullScreenOff; + setNewScreenSize: extent. + + self assert: Display extent = extent.! - "Uncomment next line when the primitives become available in the Squeak VM." - " DisplayScreen hostWindowSize: extent." - Display extent = extent ifFalse: [ Warning signal: 'Display extent not set to ', extent ]! Item was changed: + ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>setPreferences (in category 'preferences') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" self setProjectBackground: Color darkGray. "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; disable: #mouseOverForKeyboardFocus ; enable: #swapMouseButtons. Morph indicateKeyboardFocus: true. + ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. Preferences disable: #roundedWindowCorners. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" BalloonMorph balloonColor: (TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.75). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. + SystemNavigation thoroughSenders: true. + Preferences disable: #debugLogTimestamp. - SystemNavigation thoroughSenders: true. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! Item was changed: + ----- Method: ReleaseBuilder class>>setProjectBackground: (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>setProjectBackground: (in category 'private') ----- setProjectBackground: aFormOrColorOrFillStyle MorphicProject defaultFill: (aFormOrColorOrFillStyle isForm ifTrue: [InfiniteForm with: aFormOrColorOrFillStyle] ifFalse: [aFormOrColorOrFillStyle isColor ifTrue: [SolidFillStyle color: aFormOrColorOrFillStyle] ifFalse: [aFormOrColorOrFillStyle]]). ActiveWorld fillStyle: MorphicProject defaultFill.! Item was added: + ----- Method: ReleaseBuilder class>>setTopProject (in category 'scripts') ----- + setTopProject + + Project current isMorphic ifFalse: [ + Warning signal: 'The current project is not Morphic. A new Morphic project will be created and entered. Please restart the release building process after that.'. + MorphicProject new enter "current process terminates after this"]. + + Project current removeAllOtherProjects.! Item was changed: + ----- Method: ReleaseBuilder class>>switchToNewRepository: (in category 'scripts') ----- - ----- Method: ReleaseBuilder class>>switchToNewRepository: (in category 'private') ----- switchToNewRepository: anMCRepository MCMcmUpdater defaultUpdateURL: anMCRepository description. MCRepositoryGroup reset. MCRepositoryGroup default addRepository: anMCRepository. MCWorkingCopy allManagers do: [ : each | each repositoryGroup: (MCRepositoryGroup new addRepository: anMCRepository ; yourself) ]! Item was removed: - ----- Method: ReleaseBuilder class>>transferCurrentPackagesAsUser:password: (in category 'scripts') ----- - transferCurrentPackagesAsUser: username password: password - "Copy the packages currently loaded in the image from the trunk repository to my releaseRepository." - | releaseRep | - releaseRep := self releaseRepository - user: username; - password: password; - yourself. - MCWorkingCopy allManagers do: - [ : eachWorkingCopy | eachWorkingCopy ancestors do: - [ : eachVersionInfo | (releaseRep includesVersionNamed: eachVersionInfo versionName) ifFalse: - [ (MCRepository trunk versionWithInfo: eachVersionInfo) - ifNil: [ Warning signal: eachVersionInfo name , ' not found in trunk.' ] - ifNotNilDo: [ : ver | releaseRep storeVersion: ver ] ] ] ]! Item was added: + ----- Method: ReleaseBuilder class>>unloadForeignPackages (in category 'scripts') ----- + unloadForeignPackages + "Removes all packages that are not present in the build configuration." + + self buildConfiguration in: [:config | + MCWorkingCopy allManagers + reject: [:wc | config dependencies anySatisfy: [:dep | dep package name = wc package name]] + thenDo: [:wc | wc unload]].! Item was changed: + ----- Method: ReleaseBuilder class>>versionString (in category 'accessing') ----- - ----- Method: ReleaseBuilder class>>versionString (in category 'private') ----- versionString + "Result format is specified in SystemVersion." + ^ 'Squeak{1}.{2}' format: {self releaseVersionMajor. self releaseVersionMinor}! - ^ 'Squeak5.0'! Item was added: + ----- Method: ReleaseBuilder class>>versionStringAlpha (in category 'accessing') ----- + versionStringAlpha + "Result format is specified in SystemVersion." + ^ 'Squeak{1}.{2}alpha' format: {self releaseVersionMajor. self releaseVersionMinor+1}! From Marcel.Taeumel at hpi.de Thu May 12 14:19:46 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 12 14:55:11 2016 Subject: [squeak-dev] Re: The Trunk: ReleaseBuilder-mt.131.mcz In-Reply-To: References: Message-ID: <1463062786908-4894491.post@n4.nabble.com> Hey Chris, hey all, do we still need "TrunkScript-cmm.5"? And "50Deprecated-mt.2", which is empty? They are not on the current update map. If not, would we have to account for their version number in "Squeak-Version"? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ReleaseBuilder-mt-131-mcz-tp4894490p4894491.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 12 15:09:26 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 15:09:28 2016 Subject: [squeak-dev] The Inbox: Tools-mt.702.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Inbox: http://source.squeak.org/inbox/Tools-mt.702.mcz ==================== Summary ==================== Name: Tools-mt.702 Author: mt Time: 12 May 2016, 5:09:18.851775 pm UUID: 7646ebd5-0873-e149-a688-3d1ade262772 Ancestors: Tools-bf.701 Ask before discarding changes made in the code pane in object explorers and inspectors. Let's try this out for a while and see whether it turns out to be too annoying. =============== Diff against Tools-bf.701 =============== Item was changed: ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') ----- buildCodePaneWith: builder | textSpec | textSpec := builder pluggableCodePaneSpec new. textSpec model: self; getText: #expression; editText: #expression:; help: #helpText; selection: #contentsSelection; + menu: #codePaneMenu:shifted:. - menu: #codePaneMenu:shifted:; - askBeforeDiscardingEdits: false. ^textSpec! Item was added: + ----- Method: ObjectExplorer>>okToChange (in category 'updating') ----- + okToChange + + self canDiscardEdits ifTrue: [^ true]. + self changed: #wantToChange. "Solicit cancel from view" + ^ self canDiscardEdits! From commits at source.squeak.org Thu May 12 16:07:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 16:07:44 2016 Subject: [squeak-dev] The Inbox: Monticello-mt.633.mcz Message-ID: Marcel Taeumel uploaded a new version of Monticello to project The Inbox: http://source.squeak.org/inbox/Monticello-mt.633.mcz ==================== Summary ==================== Name: Monticello-mt.633 Author: mt Time: 12 May 2016, 6:07:39.136671 pm UUID: 1b562f44-5a2e-e246-9a4f-edac73fc2c54 Ancestors: Monticello-mt.632 Adds a directory repository with support for a relative path. This allows more copying images and files around while keeping Monticello working. The path is relative to "FileDirectory default". =============== Diff against Monticello-mt.632 =============== Item was changed: ----- Method: MCDirectoryRepository>>allFileNames (in category 'accessing') ----- allFileNames + ^self directory entries - ^directory entries sort: [ :a :b | a modificationTime >= b modificationTime ]; replace: [ :ea | ea name asMCVersionName ]! Item was changed: ----- Method: MCDirectoryRepository>>description (in category 'accessing') ----- description + ^ self directory pathName! - ^ directory pathName! Item was changed: ----- Method: MCDirectoryRepository>>hash (in category 'comparing') ----- hash + ^ self directory pathName hash! - ^ directory pathName hash! Item was changed: ----- Method: MCDirectoryRepository>>isValid (in category 'accessing') ----- isValid + ^ self directory exists! - ^directory exists! Item was changed: ----- Method: MCDirectoryRepository>>readStreamForFileNamed:do: (in category 'accessing') ----- readStreamForFileNamed: aString do: aBlock | file val | + file := FileStream readOnlyFileNamed: (self directory fullNameFor: aString). - file := FileStream readOnlyFileNamed: (directory fullNameFor: aString). val := aBlock value: file. file close. ^ val! Item was changed: ----- Method: MCDirectoryRepository>>writeStreamForFileNamed:replace:do: (in category 'accessing') ----- writeStreamForFileNamed: aString replace: aBoolean do: aBlock | file sel | sel := aBoolean ifTrue: [#forceNewFileNamed:] ifFalse: [#newFileNamed:]. + file := FileStream perform: sel with: (self directory fullNameFor: aString). - file := FileStream perform: sel with: (directory fullNameFor: aString). aBlock value: file. file close.! Item was added: + MCDirectoryRepository subclass: #MCRelativeDirectoryRepository + instanceVariableNames: 'relativePath' + classVariableNames: '' + poolDictionaries: '' + category: 'Monticello-Repositories'! + + !MCRelativeDirectoryRepository commentStamp: 'mt 5/12/2016 17:39' prior: 0! + Path is relative to "FileDirectory default".! Item was added: + ----- Method: MCRelativeDirectoryRepository class>>description (in category 'configuring') ----- + description + ^ 'directory (relative)'! Item was added: + ----- Method: MCRelativeDirectoryRepository>>description (in category 'accessing') ----- + description + + ^ self relativePath! Item was added: + ----- Method: MCRelativeDirectoryRepository>>directory (in category 'accessing') ----- + directory + + ^ self isConsistent + ifTrue: [directory] + ifFalse: [directory := FileDirectory default directoryNamed: self relativePath]! Item was added: + ----- Method: MCRelativeDirectoryRepository>>directory: (in category 'accessing') ----- + directory: aDirectory + + directory := aDirectory. + + self relativePath: (FileDirectory default relativeNameIfAbsoluteFor: aDirectory fullName).! Item was added: + ----- Method: MCRelativeDirectoryRepository>>isConsistent (in category 'testing') ----- + isConsistent + + ^ (directory notNil + and: [(FileDirectory default relativeNameIfAbsoluteFor: directory fullName) = self relativePath]) + and: [directory exists]! Item was added: + ----- Method: MCRelativeDirectoryRepository>>relativePath (in category 'accessing') ----- + relativePath + + ^ relativePath copyReplaceAll: '/' with: FileDirectory slash! Item was added: + ----- Method: MCRelativeDirectoryRepository>>relativePath: (in category 'accessing') ----- + relativePath: aString + + relativePath := aString copyReplaceAll: '\' with: '/'.! Item was changed: ----- Method: MCSubDirectoryRepository>>allDirectories (in category 'enumeration') ----- allDirectories | remaining dir dirs | remaining := OrderedCollection new. dirs := OrderedCollection new. + remaining addLast: self directory. - remaining addLast: directory. [remaining isEmpty] whileFalse: [dir := remaining removeFirst. dirs add: dir. dir entries do: [:ent | ent isDirectory ifTrue: [remaining addLast: (dir directoryNamed: ent name)]]]. ^ dirs! Item was changed: ----- Method: MCSubDirectoryRepository>>description (in category 'user interface') ----- description + ^ self directory pathName, FileDirectory slash, '*'! - ^ directory pathName, FileDirectory slash, '*'! Item was changed: ----- Method: MCSubDirectoryRepository>>findFullNameForWriting: (in category 'as yet unclassified') ----- findFullNameForWriting: aBaseName | possible split prefix fpattern now | + split := self directory splitNameVersionExtensionFor: aBaseName. - split := directory splitNameVersionExtensionFor: aBaseName. fpattern := split first, '*'. possible := SortedCollection sortBlock: [ :a :b | a first = b first ifTrue: [ a second = b second ifFalse: [ a second < b second ] ifTrue: [ a third fullName size < b third fullName size ]] ifFalse: [ a first > b first ] ]. now := Time totalSeconds. + prefix := self directory pathParts size. - prefix := directory pathParts size. self allDirectories do: [:dir | | parts dirScore fileScore | parts := dir pathParts allButFirst: prefix. dirScore := (parts select: [ :part | fpattern match: part ]) size. fileScore := (dir entries collect: [ :ent | (ent isDirectory not and: [ fpattern match: ent name ]) ifFalse: [ SmallInteger maxVal ] ifTrue: [ now - ent modificationTime ]]). "minimum age" fileScore := fileScore isEmpty ifTrue: [ SmallInteger maxVal ] ifFalse: [ fileScore min ]. possible add: { dirScore. fileScore. dir } ]. ^ (possible first third) fullNameFor: aBaseName! From tim at rowledge.org Thu May 12 16:43:32 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 12 16:43:34 2016 Subject: [squeak-dev] DisplayScreen class>>hostWindowExtent: with HostWindowPlugin on X11 cannot possibly work In-Reply-To: <76422014-0329-42C2-A6E9-FDBCAB30AC27@freudenbergs.de> References: <1462777519961-4893981.post@n4.nabble.com> <638E4051-1CD3-4A81-8375-C6EB0B6D8875@rowledge.org> <20160511015925.GA28787@shell.msen.com> <9791D16C-A0B6-4C4E-895E-127B27F64110@freudenbergs.de> <20160511130231.GA67121@shell.msen.com> <319AF4C7-88E5-49DE-99E1-D517A62E2C75@freudenbergs.de> <20160512024549.GA27337@shell.msen.com> <20160512054228.GA54267@shell.msen.com> <76422014-0329-42C2-A6E9-FDBCAB30AC27@freudenbergs.de> Message-ID: <813C1608-202C-47DF-8912-FC5D97EEC852@rowledge.org> > On 12-05-2016, at 2:51 AM, Bert Freudenberg wrote: > > The other option would be to actually have a registry in the plugin and only hand indices to the image instead of leaking raw window handles. That way the handles would be completely opaque, and couldn?t be forged by the image. Index 1 would be pre-allocated to the main window. But I agree that the added complexity in the plugin is not worth that effort. That is the original design requirement; the plugin is supposed to only give the image an opaque (smallinteger) value. If your OS has window descriptor structures that can be used that way (ie fixed addresses below the SI limit, actual opaque handles of its own) then feel free to use them. Other wise use a trivial linked list of the actual OS structures. There?s a well tested example in sqRPCWindows.c and a similarly grey-bearded version in sqMacHostWindow.c There?s no special technical reason for not handing back OS structures in ByteArrays (like we do with file descriptors) or even using Aliens these days; the practical reason when we originally wrote this stuff was that we knew people would attempt obscene things if they knew the value was a pointer of struct. The size passed in to open or resize a window *must* be the user area, ignoring the Hosts wrappers; we don?t know what they will be like, how big, if they might appear and disappear or morph? so don?t count them. Yes, this may mean having to compensate for the wrapper sizes in the vm code, in which case blame the damned idiot OS makers. We specified flags to set which bits of wrapper should be created where possible - partly to allow for us making our own pseudo-wrapper in a plain envelope. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: FCE: Fill Core with Epoxy From tim at rowledge.org Thu May 12 16:45:15 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 12 16:45:15 2016 Subject: [squeak-dev] The Inbox: Graphics-dtl.335.mcz In-Reply-To: References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> Message-ID: <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> > On 12-05-2016, at 5:12 AM, Bert Freudenberg wrote: > > It is needed and used in HostWindowProxy. But for the main window we have actualScreenSize. That?s why I deleted it. For actual screen size we ought to be using the pseudo-proxy and using the hostwindow primitive tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Loyalty oaths.Secret searches.No-fly lists.Detention without legal recourse.Remind me - who won the cold war? From asqueaker at gmail.com Thu May 12 19:00:41 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu May 12 19:01:22 2016 Subject: [squeak-dev] Re: The Trunk: ReleaseBuilder-mt.131.mcz In-Reply-To: <1463062786908-4894491.post@n4.nabble.com> References: <1463062786908-4894491.post@n4.nabble.com> Message-ID: Hi, IIRC, the TrunkScript's were for when a major method of the trunk update process, itself, needed to change, and use the new version immediately even if there were more updates to process. I'm sure we need them anymore. No one would try to update such an old image from trunk.. 50Deprecated-mt.2 is a truly empty package (no scripts). Only you would know whether its needed. :) Best, Chris On Thu, May 12, 2016 at 9:19 AM, marcel.taeumel wrote: > Hey Chris, hey all, > > do we still need "TrunkScript-cmm.5"? And "50Deprecated-mt.2", which is > empty? They are not on the current update map. If not, would we have to > account for their version number in "Squeak-Version"? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-ReleaseBuilder-mt-131-mcz-tp4894490p4894491.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Thu May 12 19:23:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu May 12 19:24:11 2016 Subject: [squeak-dev] The Inbox: Tools-mt.702.mcz In-Reply-To: <57349caa.85dde90a.8c2b0.4f95SMTPIN_ADDED_MISSING@mx.google.com> References: <57349caa.85dde90a.8c2b0.4f95SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Most of the time, Inspectors and Explorers are "hot" tools; e.g., they are used only very briefly on any particular object, i.e., to do a quick interrogation, then dismissed. A confirmation prompt puts a hurdle into that process, only to support a very rare use-case of "Prevent user from accidently closing Inspector, in case their interrogation code is valuable, but forgot to copy it." As an alternative, what if we could add to the Window menu: "Reopen the last-closed window"? OR, maybe something even more general: "Reopen the last-deleted Morph"..!! ? Best, Chris PS -- It would be nice if inspectors and explorers would behave like Workspaces w.r.t. "Accept" and "Cancel" commands -- Cancel should restore to the text to the state of the last Accept... On Thu, May 12, 2016 at 10:09 AM, wrote: > Marcel Taeumel uploaded a new version of Tools to project The Inbox: > http://source.squeak.org/inbox/Tools-mt.702.mcz > > ==================== Summary ==================== > > Name: Tools-mt.702 > Author: mt > Time: 12 May 2016, 5:09:18.851775 pm > UUID: 7646ebd5-0873-e149-a688-3d1ade262772 > Ancestors: Tools-bf.701 > > Ask before discarding changes made in the code pane in object explorers and inspectors. > > Let's try this out for a while and see whether it turns out to be too annoying. > > =============== Diff against Tools-bf.701 =============== > > Item was changed: > ----- Method: Inspector>>buildCodePaneWith: (in category 'toolbuilder') ----- > buildCodePaneWith: builder > | textSpec | > textSpec := builder pluggableCodePaneSpec new. > textSpec > model: self; > getText: #expression; > editText: #expression:; > help: #helpText; > selection: #contentsSelection; > + menu: #codePaneMenu:shifted:. > - menu: #codePaneMenu:shifted:; > - askBeforeDiscardingEdits: false. > ^textSpec! > > Item was added: > + ----- Method: ObjectExplorer>>okToChange (in category 'updating') ----- > + okToChange > + > + self canDiscardEdits ifTrue: [^ true]. > + self changed: #wantToChange. "Solicit cancel from view" > + ^ self canDiscardEdits! > > From lecteur at zogotounga.net Thu May 12 19:31:57 2016 From: lecteur at zogotounga.net (=?UTF-8?Q?St=c3=a9phane_Rollandin?=) Date: Thu May 12 19:31:41 2016 Subject: [squeak-dev] The Inbox: Tools-mt.702.mcz In-Reply-To: References: <57349caa.85dde90a.8c2b0.4f95SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <5734DA2D.3060609@zogotounga.net> > OR, maybe something even more general: "Reopen the last-deleted Morph"..!! ? +1 Stef From leves at caesar.elte.hu Thu May 12 20:25:26 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 12 20:25:32 2016 Subject: [squeak-dev] Re: The Trunk: ReleaseBuilder-mt.131.mcz In-Reply-To: References: <1463062786908-4894491.post@n4.nabble.com> Message-ID: On Thu, 12 May 2016, Chris Muller wrote: > Hi, IIRC, the TrunkScript's were for when a major method of the trunk > update process, itself, needed to change, and use the new version > immediately even if there were more updates to process. I'm sure we > need them anymore. No one would try to update such an old image from > trunk.. I wouldn't be so sure about that. It would bea lot more convenient if you could specify a configuration you'd like your image to be updated to. Also, why break the update mechanism for basically no benefit? In an ideal world, you would be able to update your 3.11 image to 4.6 using the classic VM. Levente > > 50Deprecated-mt.2 is a truly empty package (no scripts). Only you > would know whether its needed. :) > > Best, > Chris > > On Thu, May 12, 2016 at 9:19 AM, marcel.taeumel wrote: >> Hey Chris, hey all, >> >> do we still need "TrunkScript-cmm.5"? And "50Deprecated-mt.2", which is >> empty? They are not on the current update map. If not, would we have to >> account for their version number in "Squeak-Version"? >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: http://forum.world.st/The-Trunk-ReleaseBuilder-mt-131-mcz-tp4894490p4894491.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> > > From ma.chris.m at gmail.com Thu May 12 20:43:16 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Thu May 12 20:43:58 2016 Subject: [squeak-dev] [OT] Squeak-powered app on CBBC Newsround Message-ID: The mission-control app I've been working on this year appeared in a special episode of CBBC Newsround yesterday! http://www.bbc.co.uk/newsround/36247103 The segment about Reserve Protection Agency with several screenshots of the app begins at time index 9:40 and runs until 12:25. I recommend watching the entire episode though, its a worthwhile message. No one will know it its powered by Squeak but that's okay, the important message is the one about the danger faced by rhinos as a species. From hannes.hirzel at gmail.com Thu May 12 21:34:33 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Thu May 12 21:34:35 2016 Subject: [squeak-dev] [OT] Squeak-powered app on CBBC Newsround In-Reply-To: References: Message-ID: Thank you for the link. What did you use for the user interface? Maui ? http://wiki.squeak.org/squeak/3836 On 5/12/16, Chris Muller wrote: > The mission-control app I've been working on this year appeared in a > special episode of CBBC Newsround yesterday! > > http://www.bbc.co.uk/newsround/36247103 > > The segment about Reserve Protection Agency with several screenshots > of the app begins at time index 9:40 and runs until 12:25. I > recommend watching the entire episode though, its a worthwhile > message. > > No one will know it its powered by Squeak but that's okay, the > important message is the one about the danger faced by rhinos as a > species. > > From commits at source.squeak.org Thu May 12 21:58:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 12 21:58:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160512215809.3253.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068094.html Name: Graphics-dtl.335 Ancestors: Graphics-mt.334 DisplayScreen class>>hostWindowExtent: uses the host window plugin to set the size of the main Squeak display window. Add the complementary #hostWindowExtent to query the plugin for display size. Requires VM support for HostWindowPlugin. Assuming required support from VM HostWindowPlugin: Display width @ Display height = DisplayScreen hostWindowExtent ==> true Recategorize methods for plugin access, and add a method comment to explain the convention of treating host window index 1 as a reference to the Squeak display window. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068095.html Name: Graphics-mt.336 Ancestors: Graphics-dtl.335 Use host window extent to calculate the new screen size. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068096.html Name: 50Deprecated-mt.2 Ancestors: 50Deprecated-eem.1 Deprecations were moved to 51Deprecated. This package should not exist because we used 46Deprecated for the last release. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068097.html Name: Graphics-mt.337 Ancestors: Graphics-mt.336 Revert previous commit and document the current implementation. We have to fix the host window plugin in Windows. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068098.html Name: Graphics-bf.338 Ancestors: Graphics-mt.337 Remove unnecessary primitive. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068099.html Name: Monticello-mt.632 Ancestors: Monticello-ul.631 Add custom warnings to support ignoring the loading of empty (diffy) versions via #on:do:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068100.html Name: ReleaseBuilder-mt.131 Ancestors: ReleaseBuilder-mt.130 CLEAN-UP RELEASE BUILDER - make use of latest project refactorings - support for local release builds (enabled by default) - add update map to release repository - do code update during the process - unload foreign packages (i.e. the ones not in the update map) - provide option to re-load dirty packages automatically - disable full-screen when setting the display extent - automatically quit the VM after saving the build artifact Try out local builds via "ReleaseBuilder saveAsNewRelease". ============================================= From asqueaker at gmail.com Thu May 12 22:42:06 2016 From: asqueaker at gmail.com (Chris Muller) Date: Thu May 12 22:42:49 2016 Subject: [squeak-dev] [OT] Squeak-powered app on CBBC Newsround In-Reply-To: References: Message-ID: Yes, Maui. On Thu, May 12, 2016 at 4:34 PM, H. Hirzel wrote: > Thank you for the link. What did you use for the user interface? > > Maui ? > http://wiki.squeak.org/squeak/3836 > > > > > On 5/12/16, Chris Muller wrote: >> The mission-control app I've been working on this year appeared in a >> special episode of CBBC Newsround yesterday! >> >> http://www.bbc.co.uk/newsround/36247103 >> >> The segment about Reserve Protection Agency with several screenshots >> of the app begins at time index 9:40 and runs until 12:25. I >> recommend watching the entire episode though, its a worthwhile >> message. >> >> No one will know it its powered by Squeak but that's okay, the >> important message is the one about the danger faced by rhinos as a >> species. >> >> > From lewis at mail.msen.com Thu May 12 23:42:02 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 12 23:42:04 2016 Subject: [squeak-dev] [OT] Squeak-powered app on CBBC Newsround In-Reply-To: References: Message-ID: <20160512234202.GA41196@shell.msen.com> On Thu, May 12, 2016 at 03:43:16PM -0500, Chris Muller wrote: > The mission-control app I've been working on this year appeared in a > special episode of CBBC Newsround yesterday! > > http://www.bbc.co.uk/newsround/36247103 > > The segment about Reserve Protection Agency with several screenshots > of the app begins at time index 9:40 and runs until 12:25. I > recommend watching the entire episode though, its a worthwhile > message. > > No one will know it its powered by Squeak but that's okay, the > important message is the one about the danger faced by rhinos as a > species. That's wonderful! Thanks for sharing this Chris. Dave From Das.Linux at gmx.de Fri May 13 06:43:56 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri May 13 06:44:00 2016 Subject: [squeak-dev] [OT] Squeak-powered app on CBBC Newsround In-Reply-To: References: Message-ID: <6B45F8A9-377E-43DA-8BBD-97855872D536@gmx.de> On 12.05.2016, at 22:43, Chris Muller wrote: > The mission-control app I've been working on this year appeared in a > special episode of CBBC Newsround yesterday! > > http://www.bbc.co.uk/newsround/36247103 > > The segment about Reserve Protection Agency with several screenshots > of the app begins at time index 9:40 and runs until 12:25. I > recommend watching the entire episode though, its a worthwhile > message. > I think this is really awesome and on-topic as it gets. Congrats and thanks for sharing! Best regards -Tobias > No one will know it its powered by Squeak but that's okay, the > important message is the one about the danger faced by rhinos as a > species. From Marcel.Taeumel at hpi.de Fri May 13 06:33:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 07:08:51 2016 Subject: [squeak-dev] Re: [OT] Squeak-powered app on CBBC Newsround In-Reply-To: References: Message-ID: <1463121202042-4894580.post@n4.nabble.com> Hey Chris, this is great! :-) Best, Marcel -- View this message in context: http://forum.world.st/OT-Squeak-powered-app-on-CBBC-Newsround-tp4894551p4894580.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri May 13 08:30:24 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 08:31:09 2016 Subject: [squeak-dev] The Trunk: SystemReporter-mt.26.mcz Message-ID: Marcel Taeumel uploaded a new version of SystemReporter to project The Trunk: http://source.squeak.org/trunk/SystemReporter-mt.26.mcz ==================== Summary ==================== Name: SystemReporter-mt.26 Author: mt Time: 13 May 2016, 10:30:20.511561 am UUID: acc8a264-1325-8842-91d1-2d0446d0f098 Ancestors: SystemReporter-eem.25 Fix spelling. =============== Diff against SystemReporter-eem.25 =============== Item was changed: ----- Method: SystemReporter>>reportTestRunner: (in category 'reporting') ----- reportTestRunner: aStream testRunner ifNil: [ (UIManager default + confirm: 'Running all tests might\take some minutes.' withCRs translated - confirm: 'Running all tests might\take a some minutes.' withCRs translated title: 'Continue?') ifTrue: [ testRunner := TestRunner new runAll ] ifFalse: [ categoriesSelected remove: #SUnit. ^ self changed: #categorySelected ] ]. self header: 'SUnit Results' on: aStream. aStream nextPutAll: testRunner statusText ; cr ; cr. self header: 'Failed Tests' on: aStream. testRunner failedList do: [ : each | self printDebugExpressionFor: each on: aStream. aStream cr ]. aStream cr. self header: 'Errors' on: aStream. testRunner errorList do: [ : each | self printDebugExpressionFor: each on: aStream. aStream cr ]! From commits at source.squeak.org Fri May 13 08:38:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 08:38:40 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.28.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.28.mcz ==================== Summary ==================== Name: 51Deprecated-mt.28 Author: mt Time: 13 May 2016, 10:38:32.831561 am UUID: b042330a-4e0a-0b44-a812-ec4f1742611d Ancestors: 51Deprecated-mt.27 Deprecate #includesSubString: with capital S. =============== Diff against 51Deprecated-mt.27 =============== Item was added: + ----- Method: String>>includesSubString: (in category '*51Deprecated') ----- + includesSubString: subString + + self deprecated: 'Use #includesSubstring: instead.'. + ^self includesSubstring: subString! From commits at source.squeak.org Fri May 13 08:39:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 08:39:42 2016 Subject: [squeak-dev] The Trunk: Collections-mt.692.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.692.mcz ==================== Summary ==================== Name: Collections-mt.692 Author: mt Time: 13 May 2016, 10:39:16.768561 am UUID: 13bdc3eb-7645-0749-a45c-78613894b24c Ancestors: Collections-mt.691 Deprecate #includesSubString: with capital S. =============== Diff against Collections-mt.691 =============== Item was removed: - ----- Method: String>>includesSubString: (in category 'testing') ----- - includesSubString: subString - - self deprecated: 'Use #includesSubstring: instead.'. - ^self includesSubstring: subString! From stephan at stack.nl Fri May 13 08:44:11 2016 From: stephan at stack.nl (Stephan Eggermont) Date: Fri May 13 08:44:27 2016 Subject: [squeak-dev] Re: [OT] Squeak-powered app on CBBC Newsround In-Reply-To: <6B45F8A9-377E-43DA-8BBD-97855872D536@gmx.de> References: <6B45F8A9-377E-43DA-8BBD-97855872D536@gmx.de> Message-ID: On 13-05-16 08:43, Tobias Pape wrote: > On 12.05.2016, at 22:43, Chris Muller wrote: > >> The mission-control app I've been working on this year appeared in a >> special episode of CBBC Newsround yesterday! >> >> http://www.bbc.co.uk/newsround/36247103 >> >> The segment about Reserve Protection Agency with several screenshots >> of the app begins at time index 9:40 and runs until 12:25. I >> recommend watching the entire episode though, its a worthwhile >> message. >> > I think this is really awesome and on-topic as it gets. > Congrats and thanks for sharing! +1 We want more success stories Stephan From commits at source.squeak.org Fri May 13 09:05:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 09:05:57 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1144.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1144.mcz ==================== Summary ==================== Name: Morphic-mt.1144 Author: mt Time: 13 May 2016, 11:04:30.317561 am UUID: af32b5c8-bcc6-9c47-90b2-8505917d5b94 Ancestors: Morphic-kb.1143 Fixes an older issue where it was not possible to set the keyboard focus of a text morph w/o discarding its selection. Most prominent in the System Browser where one could not simply overwrite the method template but had to re-select everything. This only affects users who disable "Focus follows mouse" and "mouseOverForKeyboardFocus". Here is the trick: Clicking inside the text morph's bounds still discards the selection. Embedded in a pluggable text morph, however, it is possible to click outside the text morph but inside the pluggable text morph. In this case, just do not handle the event except for context menu and keyboard focus. This does still not work for pluggable text morphs whose text morphs fill out the whole (scrollable) viewpoint. =============== Diff against Morphic-kb.1143 =============== Item was changed: ----- Method: TextMorph>>mouseDown: (in category 'event handling') ----- mouseDown: evt "Make this TextMorph be the keyboard input focus, if it isn't already, and repond to the text selection gesture." + + evt yellowButtonPressed ifTrue: [ + "First check for option (menu) click" + ^ self yellowButtonActivity: evt shiftPressed]. + - evt yellowButtonPressed - ifTrue: ["First check for option (menu) click" - ^ self yellowButtonActivity: evt shiftPressed]. evt hand newKeyboardFocus: self. + + (self bounds containsPoint: evt position) ifTrue: [ + self + handleInteraction: [editor mouseDown: evt] + fromEvent: evt].! - self - handleInteraction: [editor mouseDown: evt] - fromEvent: evt. - ! From hannes.hirzel at gmail.com Fri May 13 09:20:54 2016 From: hannes.hirzel at gmail.com (H. Hirzel) Date: Fri May 13 09:20:56 2016 Subject: [squeak-dev] The Trunk: ST80-mt.211.mcz In-Reply-To: <5730a0e4.c8c98c0a.a2814.ffffbce7SMTPIN_ADDED_MISSING@mx.google.com> References: <5730a0e4.c8c98c0a.a2814.ffffbce7SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Thank you, Marcel, for this great fix for MVC projects. The UI look is neat again. Helpful to work on Morphic while using a MVC project. --Hannes On Mon, 9 May 2016 14:38:17.523 0000, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of ST80 to project The Trunk: > http://source.squeak.org/trunk/ST80-mt.211.mcz > > ==================== Summary ==================== > > Name: ST80-mt.211 > Author: mt > Time: 9 May 2016, 4:38:16.550999 pm > UUID: 34bab149-f6f2-194f-b1ba-5695b06e143b > Ancestors: ST80-mt.210 > > Fixes font rendering in pop-up menus. Also removes the hack that forced > black text on white background. Now, the example at the end of the method > works again. > > Note that the crappy font rendering was due to an issue with bitmapped fonts > at the moment. We cannot check whether a StrikeFont has nice AA in its > glyphs. > > =============== Diff against ST80-mt.210 =============== > > Item was changed: > ----- Method: Paragraph>>asForm (in category 'converting') ----- > asForm > "Answer a Form made up of the bits that represent the receiver's > displayable text." > + > + | theForm | > + theForm := (Form extent: compositionRectangle extent depth: Display > depth) > - | theForm oldBackColor oldForeColor | > - textStyle isTTCStyle ifTrue: [ > - theForm := (Form extent: compositionRectangle extent depth: 32) > offset: offset. > + > - ] ifFalse: [ > - theForm := (ColorForm extent: compositionRectangle extent) > - offset: offset; > - colors: (Array > - with: (backColor == nil ifTrue: [Color transparent] ifFalse: > [backColor]) > - with: (foreColor == nil ifTrue: [Color black] ifFalse: [foreColor])). > - ]. > - oldBackColor := backColor. > - oldForeColor := foreColor. > - backColor := Color white. > - foreColor := Color black. > self displayOn: theForm > at: 0@0 > clippingBox: theForm boundingBox > rule: Form over > fillColor: nil. > + > - backColor := oldBackColor. > - foreColor := oldForeColor. > ^ theForm > > "Example: > | p | > p := 'Abc' asParagraph. > p foregroundColor: Color red backgroundColor: Color black. > p asForm displayOn: Display at: 30@30 rule: Form over" > ! > > > From Marcel.Taeumel at hpi.de Fri May 13 11:12:49 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 11:48:19 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> Message-ID: <1463137969130-4894624.post@n4.nabble.com> Note that the HostWindowPlugin does not work properly if the window is minimized. At least in Windows 10. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Graphics-dtl-335-mcz-tp4894384p4894624.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri May 13 11:55:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 11:56:02 2016 Subject: [squeak-dev] The Trunk: System-mt.829.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.829.mcz ==================== Summary ==================== Name: System-mt.829 Author: mt Time: 13 May 2016, 1:54:56.020794 pm UUID: 0d199e8c-ffd6-c449-a1a3-80716e8d2752 Ancestors: System-mt.828 Use only one implementation to remove all but one project from the system. =============== Diff against System-mt.828 =============== Item was changed: ----- Method: Project class>>removeAllButCurrent (in category 'utilities') ----- removeAllButCurrent "Project removeAllButCurrent" + self current removeAllOtherProjects.! - AllProjects := nil. - Smalltalk garbageCollect. - - self removeAll: (Project allSubInstances copyWithout: Project current). - - AllProjects := nil. - Smalltalk garbageCollect. - - Smalltalk garbageCollect. - Project rebuildAllProjects. - ^AllProjects! From commits at source.squeak.org Fri May 13 12:20:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 12:20:02 2016 Subject: [squeak-dev] The Trunk: EToys-mt.136.mcz Message-ID: Marcel Taeumel uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-mt.136.mcz ==================== Summary ==================== Name: EToys-mt.136 Author: mt Time: 13 May 2016, 2:19:45.346213 pm UUID: 12c7aa71-4ed4-0943-a691-a3a28efd13f0 Ancestors: EToys-mt.135 When eToys clean-up aggressively, let it not mess around with the project hierarchy in general. This is the job of ReleaseBuilder. Only dump presenters in all morphic projects. As user objects are now in the more generic category "UserObjects", also let the ReleaseBuilder discard those uni-classes in a clean fashion. We do not know about the order of clean-up calls, so ReleaseBuilder >> #discardUserObjects is still useful. =============== Diff against EToys-mt.135 =============== Item was changed: ----- Method: EToySystem class>>cleanUp: (in category 'class initialization') ----- cleanUp: aggressive + aggressive ifTrue: [ + StandardScriptingSystem removeUnreferencedPlayers. + Player removeUninstantiatedSubclassesSilently. + Project allMorphicProjects do: [:mp | mp world dumpPresenter]. + Preferences removePreference: #allowEtoyUserCustomEvents.]! - StandardScriptingSystem removeUnreferencedPlayers. - Project removeAllButCurrent. - #('Morphic-UserObjects' 'EToy-UserObjects' 'Morphic-Imported' ) do: - [ : each | SystemOrganization removeSystemCategory: each ]. - World dumpPresenter. - Preferences removePreference: #allowEtoyUserCustomEvents.]! From commits at source.squeak.org Fri May 13 12:29:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 12:29:52 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.132.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.132.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.132 Author: mt Time: 13 May 2016, 2:29:01.268213 pm UUID: e0d68a5b-f098-b54f-9abb-b809062a0a07 Ancestors: ReleaseBuilder-mt.131 More refactoring. Separate image preparation into a) preparing source code and b) preparing environment. Seperating environment preparation into 1) clear caches, 2) configure tools, 3) set preferences, and 4) configure desktop/content. The steps 2) and 3) are somewhat similar. 3) means the (pragma) preferences mechanism only whereas 2) addresses configuration in other ways. =============== Diff against ReleaseBuilder-mt.131 =============== Item was changed: + ----- Method: ReleaseBuilder class>>checkForDirtyPackages (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>checkForDirtyPackages (in category 'scripts') ----- checkForDirtyPackages | modifiedWorkingCopies unmergedWorkingCopies | MCWorkingCopy checkModified: true. modifiedWorkingCopies := MCWorkingCopy allManagers select: [:wc | wc ancestors size = 1 and: [wc modified] ]. unmergedWorkingCopies := MCWorkingCopy allManagers select: [:wc | (wc ancestors size = 1) not ]. unmergedWorkingCopies ifNotEmpty: [ "Sort to simplify exploration. MC browser does also show packages sorted." (modifiedWorkingCopies sortBy: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore. Warning signal: 'There are unmerged packages.']. modifiedWorkingCopies ifNotEmpty: [ "Sort to simplify exploration. MC browser does also show packages sorted." (modifiedWorkingCopies sortBy: [:wc1 :wc2 | wc1 packageName <= wc2 packageName]) explore. (Project current uiManager confirm: 'Do you want to discard all local changes?' orCancel: [^ Error signal: 'Release building canceled.'] title: 'Dirty Packages Found') ifTrue: [modifiedWorkingCopies do: [:wc | [(self buildRepository versionWithInfo: wc ancestors first) load] on: Warning do: [:warning | warning resume]]]].! Item was added: + ----- Method: ReleaseBuilder class>>clearCaches (in category 'scripts') ----- + clearCaches + "Clear caches, discard unused references, free space." + + Smalltalk cleanUp: true. + Project current resourceManager reset. "Zap eventual resources" + self discardUserObjects. + MCFileBasedRepository flushAllCaches. + + "Clear all user login data." + MCHttpRepository clearCredentials. + Utilities setAuthorInitials: String empty. + + Environment allInstancesDo: [ : env | env purgeUndeclared ]. + Undeclared removeUnreferencedKeys. + + Smalltalk garbageCollect.! Item was changed: ----- Method: ReleaseBuilder class>>configureDesktop (in category 'scripts') ----- configureDesktop + "Open tools, multimedia content, etc." + + self setDisplayExtent: 800 @ 600. + self setProjectBackground: Color darkGray. + self deleteAllWindows. + - Project current resourceManager reset. "Zap eventual resources" "Replace docking bar instance in case its code has changed." Project current removeMainDockingBar. + TheWorldMainDockingBar updateInstances. + + self openWelcomeWorkspaces.! - TheWorldMainDockingBar updateInstances! Item was added: + ----- Method: ReleaseBuilder class>>configureTools (in category 'scripts') ----- + configureTools + "Initialize well-known tools and other resources." + + TTCFont registerAll. + FileList initialize. "register file reader services" + RealEstateAgent standardSize: 600 @ 400. + SMLoaderPlus setDefaultFilters: #(filterSafelyAvailable). + ! Item was changed: + ----- Method: ReleaseBuilder class>>copyPackagesFrom:to:depth: (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>copyPackagesFrom:to:depth: (in category 'scripts') ----- copyPackagesFrom: sourceRepository to: targetRepository depth: historyDepth "Copy the packages currently loaded in the image from the source repository to a target repository. Follow ancestry up to the depth specified." | currentDepth nextVersions currentVersions ignoredVersions | currentDepth := 0. nextVersions := (MCWorkingCopy allManagers gather: [:wc | wc ancestors]) asOrderedCollection. ignoredVersions := OrderedCollection new. [nextVersions notEmpty] whileTrue: [ currentVersions := nextVersions. nextVersions := OrderedCollection new. currentDepth := currentDepth + 1. currentVersions do: [:versionInfo | (targetRepository includesVersionNamed: versionInfo versionName) ifTrue: [Transcript showln: ('[ReleaseBuilder] Version {1} already exists in {2}' format: {versionInfo versionName. targetRepository description})] ifFalse: [(sourceRepository versionWithInfo: versionInfo) ifNil: [ignoredVersions add: versionInfo] ifNotNil: [:version | targetRepository storeVersion: version ] ]. currentDepth < historyDepth ifTrue: [ nextVersions addAll: versionInfo ancestors]]]. ignoredVersions ifNotEmpty: [ ignoredVersions explore. Warning signal: 'There were versions not found in the source repository.'].! Item was changed: + ----- Method: ReleaseBuilder class>>copyUpdateMapTo: (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>copyUpdateMapTo: (in category 'scripts') ----- copyUpdateMapTo: targetRepository self buildConfiguration in: [:config | | newConfig | newConfig := MCConfiguration new. newConfig repositories add: targetRepository. newConfig dependencies addAll: config dependencies. newConfig name: config name. targetRepository storeVersion: newConfig].! Item was changed: + ----- Method: ReleaseBuilder class>>deleteAllWindows (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>deleteAllWindows (in category 'scripts') ----- deleteAllWindows (SystemWindow windowsIn: Project current world satisfying: [ : window | true ]) do: [ : window | [ window makeClosable; delete ] on: ProvideAnswerNotification do: [ : noti | noti resume: true ] ]! Item was changed: + ----- Method: ReleaseBuilder class>>discardUserObjects (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>discardUserObjects (in category 'scripts') ----- discardUserObjects Player removeUninstantiatedSubclassesSilently. + MorphicModel removeUninstantiatedSubclassesSilently. + + "Remove empty categories for user objects." + SystemOrganizer cleanUp: true.! - MorphicModel removeUninstantiatedSubclassesSilently.! Item was changed: + ----- Method: ReleaseBuilder class>>loadWellKnownPackages (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>loadWellKnownPackages (in category 'scripts') ----- loadWellKnownPackages "Load into the release image those packages that have been stripped from Trunk, but still deemed necessary for a release artifact." + + "Not ready yet." + "Installer new merge: #squeakRelease"! - Installer new merge: #squeakRelease! Item was changed: + ----- Method: ReleaseBuilder class>>openWelcomeWorkspaces (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>openWelcomeWorkspaces (in category 'scripts') ----- openWelcomeWorkspaces |offset | offset:= 50@50. #('License Information' 'The Squeak User Interface' 'Working With Squeak' 'Release Notes') with: #(#licenseInformation #squeakUserInterface #workingWithSqueak #releaseNotes) do: [ : eachLabel : eachAccessor | TheWorldMainDockingBar instance showWelcomeText: eachAccessor label: eachLabel in: (offset extent: 500@300). offset := offset + (30@30)]! Item was changed: ----- Method: ReleaseBuilder class>>prepareEnvironment (in category 'preparing') ----- prepareEnvironment "Prepare everything that should be done for a new image build. Clear caches, passwords, etc." "ReleaseBuilder prepareNewBuild" - TTCFont registerAll. - FileList initialize. - RealEstateAgent standardSize: 600 @ 400. - SMLoaderPlus setDefaultFilters: (OrderedCollection with: #filterSafelyAvailable). - " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." self + clearCaches; + configureTools; + setPreferences; + configureDesktop.! - setDisplayExtent: 800 @ 600 ; - setPreferences ; "<-- remove this after defaultValueTableForCurrentRelease is fixed up." - discardUserObjects ; - configureDesktop. - Smalltalk cleanUp: true. - MCFileBasedRepository flushAllCaches. - MCHttpRepository clearCredentials. - Utilities setAuthorInitials: String empty. - Environment allInstancesDo: [ : env | env purgeUndeclared ]. - Undeclared removeUnreferencedKeys. - Smalltalk garbageCollect. - [ self loadWellKnownPackages "<-- 4.5 is not ready for unloaded / reloaded packages" ]. - Compiler recompileAll. - self openWelcomeWorkspaces.! Item was changed: ----- Method: ReleaseBuilder class>>prepareSourceCode (in category 'preparing') ----- prepareSourceCode "Update code. Remove foreign packages." MCMcmUpdater defaultUpdateURL: self buildRepository description. MCMcmUpdater updateMissingPackages: true. MCMcmUpdater enableUpdatesForAllPackages. MCMcmUpdater default doUpdate: false. "non-interactive". + self + unloadForeignPackages; + checkForDirtyPackages; + loadWellKnownPackages. + + Compiler recompileAll.! - self unloadForeignPackages. - self checkForDirtyPackages.! Item was changed: ----- Method: ReleaseBuilder class>>saveAsNewRelease (in category 'saving') ----- saveAsNewRelease "ReleaseManager saveAsNewRelease" (Project current uiManager confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionString, String cr, String cr, 'The VM will quit after that. Continue?' title: 'Release Builder') ifFalse: [^ self]. self prepareNewRelease. + Smalltalk saveAs: self versionString, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). - Smalltalk saveAs: self versionString, '-', SystemVersion current highestUpdate asString. Smalltalk snapshot: true "Important!!" andQuit: true.! Item was changed: ----- Method: ReleaseBuilder class>>saveAsNextVersionAlpha (in category 'saving') ----- saveAsNextVersionAlpha "ReleaseBuilder saveNextVersionAlpha." (Project current uiManager confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionStringAlpha, String cr, String cr, 'The VM will quit after that. Continue?' title: 'Release Builder') ifFalse: [^ self]. self prepareNextVersionAlpha. + Smalltalk saveAs: self versionStringAlpha, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). - Smalltalk saveAs: self versionStringAlpha, '-', SystemVersion current highestUpdate asString. Smalltalk snapshot: true "Important!!" andQuit: true.! Item was changed: + ----- Method: ReleaseBuilder class>>setDisplayExtent: (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>setDisplayExtent: (in category 'scripts') ----- setDisplayExtent: extent DisplayScreen fullScreenOff; setNewScreenSize: extent. self assert: Display extent = extent.! Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" + " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." - self setProjectBackground: Color darkGray. "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; disable: #mouseOverForKeyboardFocus ; enable: #swapMouseButtons. Morph indicateKeyboardFocus: true. ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. Model windowActiveOnFirstClick: false. "Not good for 800x600" Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. Preferences disable: #roundedWindowCorners. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" + BalloonMorph balloonColor: (Color r: 0.92 g: 0.92 b: 0.706). - BalloonMorph balloonColor: - (TranslucentColor r: 0.92 g: 0.92 b: 0.706 alpha: 0.75). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! Item was changed: + ----- Method: ReleaseBuilder class>>setProjectBackground: (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>setProjectBackground: (in category 'scripts') ----- setProjectBackground: aFormOrColorOrFillStyle MorphicProject defaultFill: (aFormOrColorOrFillStyle isForm ifTrue: [InfiniteForm with: aFormOrColorOrFillStyle] ifFalse: [aFormOrColorOrFillStyle isColor ifTrue: [SolidFillStyle color: aFormOrColorOrFillStyle] ifFalse: [aFormOrColorOrFillStyle]]). ActiveWorld fillStyle: MorphicProject defaultFill.! Item was changed: + ----- Method: ReleaseBuilder class>>setTopProject (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>setTopProject (in category 'scripts') ----- setTopProject Project current isMorphic ifFalse: [ Warning signal: 'The current project is not Morphic. A new Morphic project will be created and entered. Please restart the release building process after that.'. MorphicProject new enter "current process terminates after this"]. Project current removeAllOtherProjects.! Item was changed: + ----- Method: ReleaseBuilder class>>switchToNewRepository: (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>switchToNewRepository: (in category 'scripts') ----- switchToNewRepository: anMCRepository MCMcmUpdater defaultUpdateURL: anMCRepository description. MCRepositoryGroup reset. MCRepositoryGroup default addRepository: anMCRepository. MCWorkingCopy allManagers do: [ : each | each repositoryGroup: (MCRepositoryGroup new addRepository: anMCRepository ; yourself) ]! Item was changed: + ----- Method: ReleaseBuilder class>>unloadForeignPackages (in category 'scripts - support') ----- - ----- Method: ReleaseBuilder class>>unloadForeignPackages (in category 'scripts') ----- unloadForeignPackages "Removes all packages that are not present in the build configuration." self buildConfiguration in: [:config | MCWorkingCopy allManagers reject: [:wc | config dependencies anySatisfy: [:dep | dep package name = wc package name]] thenDo: [:wc | wc unload]].! From lewis at mail.msen.com Fri May 13 12:36:07 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 13 12:36:09 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <1463137969130-4894624.post@n4.nabble.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> <1463137969130-4894624.post@n4.nabble.com> Message-ID: <20160513123607.GA86409@shell.msen.com> On Fri, May 13, 2016 at 04:12:49AM -0700, marcel.taeumel wrote: > Note that the HostWindowPlugin does not work properly if the window is > minimized. At least in Windows 10. > What symptoms do you see? FWIW, it does seem to be working properly now on my Ubuntu + V3 "trunk" image + interpreter + local plugin hacks. Dave From commits at source.squeak.org Fri May 13 12:58:13 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 12:58:13 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1145.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1145.mcz ==================== Summary ==================== Name: Morphic-mt.1145 Author: mt Time: 13 May 2016, 2:57:36.871874 pm UUID: 1c7a50e2-ebed-b646-ae51-a50b313f7b35 Ancestors: Morphic-mt.1144 Pluggable text morphs can keep their selection/offset w/o using deferred UI messages. This is more robust when add/remove instance variables in classes related to text editing and tools. No need for locking the offset in scroll panes anymore. Was a left-over from 4.5. =============== Diff against Morphic-mt.1144 =============== Item was changed: ----- Method: PluggableTextMorph>>accept (in category 'menu commands') ----- accept "Inform the model of text to be accepted, and return true if OK." + | priorSelection priorScrollerOffset | - | ok saveSelection saveScrollerOffset | - "sps 8/13/2001 22:41: save selection and scroll info" - saveSelection := self selectionInterval copy. - saveScrollerOffset := scroller offset copy. (self canDiscardEdits and: [(self hasProperty: #alwaysAccept) not]) ifTrue: [^ self flash]. + self hasEditingConflicts ifTrue: [ + (self confirm: 'Caution!! This method may have been\changed elsewhere since you started\editing it here. Accept anyway?' withCRs translated) ifFalse: [^ self flash]]. - self hasEditingConflicts ifTrue: - [(self confirm: - 'Caution!! This method may have been - changed elsewhere since you started - editing it here. Accept anyway?' translated) ifFalse: [^ self flash]]. - ok := self acceptTextInModel. - ok==true ifTrue: - [self setText: self getText. - self hasUnacceptedEdits: false. - (model dependents detect: [:dep | (dep isKindOf: PluggableTextMorph) and: [dep getTextSelector == #annotation]] ifNone: [nil]) ifNotNil: - [:aPane | model changed: #annotation]]. + priorSelection := self selectionInterval copy. + priorScrollerOffset := scroller offset copy. + + self acceptTextInModel + ifFalse: [^ self "something went wrong"]. + + self setText: self getText. + self hasUnacceptedEdits: false. - "sps 8/13/2001 22:41: restore selection and scroll info" - ["During the step for the browser, updateCodePaneIfNeeded is called, and - invariably resets the contents of the codeholding PluggableTextMorph - at that time, resetting the cursor position and scroller in the process. - The following line forces that update without waiting for the step, then restores the cursor and scrollbar" + (model dependents + detect: [:dep | (dep isKindOf: PluggableTextMorph) and: [dep getTextSelector == #annotation]] + ifNone: [nil]) + ifNotNil: [:aPane | model changed: #annotation]. - ok ifTrue: "(don't bother if there was an error during compile)" - [(model respondsTo: #updateCodePaneIfNeeded) - ifTrue: [model updateCodePaneIfNeeded]. - WorldState addDeferredUIMessage: - [self currentHand newKeyboardFocus: textMorph. - scroller offset: saveScrollerOffset. - self setScrollDeltas. - selectionInterval := saveSelection. "restore prior selection" - self selectFrom: saveSelection first to: saveSelection last]]] + "Update the model's internal caches. Note that this is specific to CodeHolder and the stepping it uses for updating. We have to trigger this here manually to avoid that the next step message destroys our selection and scrolling offset." + (model respondsTo: #updateCodePaneIfNeeded) + ifTrue: [model updateCodePaneIfNeeded]. + + "Restore prior selection:" + scroller offset: priorScrollerOffset. + selectionInterval := priorSelection. + self selectFrom: priorSelection first to: priorSelection last.! - on: Error do: [] - ! Item was changed: ----- Method: ScrollPane>>hScrollBarValue: (in category 'scrolling') ----- hScrollBarValue: scrollValue scroller hasSubmorphs ifFalse: [^ self]. + scroller offset: (scrollValue max: 0) @ scroller offset y.! - lockOffset == true ifFalse: [ - scroller offset: (scrollValue max: 0) @ scroller offset y]. - ! Item was changed: ----- Method: ScrollPane>>scrollToShow: (in category 'scrolling') ----- scrollToShow: aRectangle - "We have to lock the callback into me because rounding errors in scrollbar values would reset the offset to a different value. The given rectangle may not be visible anymore." scroller offset: (self offsetToShow: aRectangle). - lockOffset := true. self setScrollDeltas. + ! - lockOffset := false.! Item was changed: ----- Method: ScrollPane>>vScrollBarValue: (in category 'scrolling') ----- vScrollBarValue: scrollValue scroller hasSubmorphs ifFalse: [^ self]. + scroller offset: scroller offset x @ (scrollValue max: 0).! - lockOffset == true ifFalse: [ - scroller offset: scroller offset x @ (scrollValue max: 0)]. - ! From commits at source.squeak.org Fri May 13 13:03:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 13:04:27 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1146.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1146.mcz ==================== Summary ==================== Name: Morphic-mt.1146 Author: mt Time: 13 May 2016, 3:02:50.901874 pm UUID: f43bc24f-46a0-244f-ab6a-7a6959af9326 Ancestors: Morphic-mt.1145 Forgot to restore the "== true" pattern here. Be more robust against strange models... =============== Diff against Morphic-mt.1145 =============== Item was changed: ----- Method: PluggableTextMorph>>accept (in category 'menu commands') ----- accept "Inform the model of text to be accepted, and return true if OK." | priorSelection priorScrollerOffset | (self canDiscardEdits and: [(self hasProperty: #alwaysAccept) not]) ifTrue: [^ self flash]. self hasEditingConflicts ifTrue: [ (self confirm: 'Caution!! This method may have been\changed elsewhere since you started\editing it here. Accept anyway?' withCRs translated) ifFalse: [^ self flash]]. priorSelection := self selectionInterval copy. priorScrollerOffset := scroller offset copy. + self acceptTextInModel == true - self acceptTextInModel ifFalse: [^ self "something went wrong"]. self setText: self getText. self hasUnacceptedEdits: false. (model dependents detect: [:dep | (dep isKindOf: PluggableTextMorph) and: [dep getTextSelector == #annotation]] ifNone: [nil]) ifNotNil: [:aPane | model changed: #annotation]. "Update the model's internal caches. Note that this is specific to CodeHolder and the stepping it uses for updating. We have to trigger this here manually to avoid that the next step message destroys our selection and scrolling offset." (model respondsTo: #updateCodePaneIfNeeded) ifTrue: [model updateCodePaneIfNeeded]. "Restore prior selection:" scroller offset: priorScrollerOffset. selectionInterval := priorSelection. self selectFrom: priorSelection first to: priorSelection last.! From commits at source.squeak.org Fri May 13 13:12:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 13:13:12 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1147.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1147.mcz ==================== Summary ==================== Name: Morphic-mt.1147 Author: mt Time: 13 May 2016, 3:11:29.319874 pm UUID: 95a039a1-366d-1e4e-9ed6-eb5e4970c82d Ancestors: Morphic-mt.1146 Remove the lockOffset variable. Let's hope that all open tools survive this... =============== Diff against Morphic-mt.1146 =============== Item was changed: MorphicModel subclass: #ScrollPane + instanceVariableNames: 'scrollBar scroller retractableScrollBar scrollBarOnLeft getMenuSelector getMenuTitleSelector hasFocus hScrollBar hScrollBarPolicy vScrollBarPolicy scrollBarThickness' - instanceVariableNames: 'scrollBar scroller retractableScrollBar scrollBarOnLeft getMenuSelector getMenuTitleSelector hasFocus hScrollBar lockOffset hScrollBarPolicy vScrollBarPolicy scrollBarThickness' classVariableNames: 'UseRetractableScrollBars' poolDictionaries: '' category: 'Morphic-Windows'! !ScrollPane commentStamp: 'mk 8/9/2005 10:34' prior: 0! The scroller (a transform) of a scrollPane is driven by the scrollBar. The scroll values vary from 0.0, meaning zero offset to 1.0 meaning sufficient offset such that the bottom of the scrollable material appears 3/4 of the way down the pane. The total distance to achieve this range is called the totalScrollRange. Basic clue about utilization of the ScrollPane class is given in: ScrollPane example1. ScrollPane example2.! From Marcel.Taeumel at hpi.de Fri May 13 14:27:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 15:03:23 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <20160513123607.GA86409@shell.msen.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> <1463137969130-4894624.post@n4.nabble.com> <20160513123607.GA86409@shell.msen.com> Message-ID: <1463149672460-4894654.post@n4.nabble.com> Hi Dave, nothing happens. I tried it via (DisplayScreen future: 5000) hostWindowExtent: 1024@768. which gives you 5 seconds to minimize the window. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Graphics-dtl-335-mcz-tp4894384p4894654.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Fri May 13 15:44:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri May 13 15:45:20 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1144.mcz In-Reply-To: <573598ca.4c14370a.bb12.ffffd849SMTPIN_ADDED_MISSING@mx.google.com> References: <573598ca.4c14370a.bb12.ffffd849SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This broke Window Active On First Click. All you needed to do was disable that. On Fri, May 13, 2016 at 4:04 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.1144.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.1144 > Author: mt > Time: 13 May 2016, 11:04:30.317561 am > UUID: af32b5c8-bcc6-9c47-90b2-8505917d5b94 > Ancestors: Morphic-kb.1143 > > Fixes an older issue where it was not possible to set the keyboard focus of a text morph w/o discarding its selection. Most prominent in the System Browser where one could not simply overwrite the method template but had to re-select everything. > > This only affects users who disable "Focus follows mouse" and "mouseOverForKeyboardFocus". > > Here is the trick: Clicking inside the text morph's bounds still discards the selection. Embedded in a pluggable text morph, however, it is possible to click outside the text morph but inside the pluggable text morph. In this case, just do not handle the event except for context menu and keyboard focus. > > This does still not work for pluggable text morphs whose text morphs fill out the whole (scrollable) viewpoint. > > =============== Diff against Morphic-kb.1143 =============== > > Item was changed: > ----- Method: TextMorph>>mouseDown: (in category 'event handling') ----- > mouseDown: evt > "Make this TextMorph be the keyboard input focus, if it isn't > already, and repond to the text selection gesture." > + > + evt yellowButtonPressed ifTrue: [ > + "First check for option (menu) click" > + ^ self yellowButtonActivity: evt shiftPressed]. > + > - evt yellowButtonPressed > - ifTrue: ["First check for option (menu) click" > - ^ self yellowButtonActivity: evt shiftPressed]. > evt hand newKeyboardFocus: self. > + > + (self bounds containsPoint: evt position) ifTrue: [ > + self > + handleInteraction: [editor mouseDown: evt] > + fromEvent: evt].! > - self > - handleInteraction: [editor mouseDown: evt] > - fromEvent: evt. > - ! > > From commits at source.squeak.org Fri May 13 15:50:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 15:50:51 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.133.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.133.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.133 Author: mt Time: 13 May 2016, 5:50:05.366492 pm UUID: 446f4aae-bbcc-f744-8997-ddeed31e8ebd Ancestors: ReleaseBuilder-mt.132 Condense changes. Note that we may want to have more control about the contents in the changes file for the release process. Right now, it is based on the local changes only. We could, for example, fetch all updates since the last release and rewrite the changes file. This would yield a consistent output and the versions browser would be more fun to use in a new release. =============== Diff against ReleaseBuilder-mt.132 =============== Item was changed: ----- Method: ReleaseBuilder class>>prepareSourceCode (in category 'preparing') ----- prepareSourceCode "Update code. Remove foreign packages." MCMcmUpdater defaultUpdateURL: self buildRepository description. MCMcmUpdater updateMissingPackages: true. MCMcmUpdater enableUpdatesForAllPackages. MCMcmUpdater default doUpdate: false. "non-interactive". self unloadForeignPackages; checkForDirtyPackages; loadWellKnownPackages. + Compiler recompileAll. + Smalltalk condenseChanges.! - Compiler recompileAll.! From Marcel.Taeumel at hpi.de Fri May 13 15:16:55 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 15:52:27 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: References: Message-ID: <1463152615216-4894674.post@n4.nabble.com> Hi Chris, "Window active on first click" still works fine here. What did you try and where did it break? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894674.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri May 13 15:24:11 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 15:59:43 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: References: Message-ID: <1463153051723-4894677.post@n4.nabble.com> Hi, there. I am referring to this discussion: http://forum.world.st/Deceptive-focus-cue-in-4-6-browsers-td4827358.html Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894677.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Fri May 13 16:06:24 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri May 13 16:07:07 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: <1463152615216-4894674.post@n4.nabble.com> References: <1463152615216-4894674.post@n4.nabble.com> Message-ID: > "Window active on first click" still works fine here. > > What did you try and where did it break? Before your change: 0) PreState: turn off Focus Follows Mouse, mosueOverForKeyboardFocus. Turn on Window Active On First Click and Windows Raise On Click. ... then ... 1) select some text in some code pane 2) select something in another window 3) now try to select different text in the original code pane 4) because "Window Active On First Click" is set, it should *immediately* change your selection however, due to your chage, this now broken. The window is not active on the first click and I first have to make it active before I can interact with it. From commits at source.squeak.org Fri May 13 16:09:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 16:09:26 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.134.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.134.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.134 Author: mt Time: 13 May 2016, 6:09:21.281327 pm UUID: 19d98f5a-a251-5a4a-b55f-de5a00aaddf4 Ancestors: ReleaseBuilder-mt.133 We can only condense the changes once we have written the new changes/image files. Otherwise, we will break our master image because its changes file would be inconsistent to the image. I wonder why #condenseChanges does not automatically snapshot the image. It is dangerous. =============== Diff against ReleaseBuilder-mt.133 =============== Item was changed: ----- Method: ReleaseBuilder class>>prepareSourceCode (in category 'preparing') ----- prepareSourceCode "Update code. Remove foreign packages." MCMcmUpdater defaultUpdateURL: self buildRepository description. MCMcmUpdater updateMissingPackages: true. MCMcmUpdater enableUpdatesForAllPackages. MCMcmUpdater default doUpdate: false. "non-interactive". self unloadForeignPackages; checkForDirtyPackages; loadWellKnownPackages. + Compiler recompileAll.! - Compiler recompileAll. - Smalltalk condenseChanges.! Item was changed: ----- Method: ReleaseBuilder class>>saveAsNewRelease (in category 'saving') ----- saveAsNewRelease "ReleaseManager saveAsNewRelease" (Project current uiManager confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionString, String cr, String cr, 'The VM will quit after that. Continue?' title: 'Release Builder') ifFalse: [^ self]. self prepareNewRelease. Smalltalk saveAs: self versionString, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). + Smalltalk condenseChanges. Smalltalk snapshot: true "Important!!" andQuit: true.! Item was changed: ----- Method: ReleaseBuilder class>>saveAsNextVersionAlpha (in category 'saving') ----- saveAsNextVersionAlpha "ReleaseBuilder saveNextVersionAlpha." (Project current uiManager confirm: 'About to build new release', (self localBuild ifTrue: [' (locally!!)'] ifFalse: ['']),': ', self versionStringAlpha, String cr, String cr, 'The VM will quit after that. Continue?' title: 'Release Builder') ifFalse: [^ self]. self prepareNextVersionAlpha. Smalltalk saveAs: self versionStringAlpha, '-', SystemVersion current highestUpdate asString, (self localBuild ifTrue: ['-offline'] ifFalse: ['']). + Smalltalk condenseChanges. Smalltalk snapshot: true "Important!!" andQuit: true.! From Marcel.Taeumel at hpi.de Fri May 13 15:42:48 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 16:18:22 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: References: <1463152615216-4894674.post@n4.nabble.com> Message-ID: <1463154168809-4894685.post@n4.nabble.com> Hi Chris, here you can see that this still works fine: So, what other preference might interfere with this change? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894685.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri May 13 15:47:59 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 13 16:23:30 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: References: <1463152615216-4894674.post@n4.nabble.com> Message-ID: <1463154479555-4894687.post@n4.nabble.com> Hi Chris, if you take a look at SystemWindow >> #mouseDown:, you see that my change in TextMorph cannot possibly break that "window active on first click" because an inactive window has first to process #mouseDown: and activate its submorphs (including any (Pluggable)TextMorph) before the additonal check for #containsPoint: is even executed. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894687.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Fri May 13 16:29:42 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri May 13 16:30:24 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.1144.mcz In-Reply-To: <1463154479555-4894687.post@n4.nabble.com> References: <1463152615216-4894674.post@n4.nabble.com> <1463154479555-4894687.post@n4.nabble.com> Message-ID: By coincidence, I had tested it against a selection in the Transcript window in the image after loading your code, but against two code windows for the test before your change. Because, for some odd reason, Window Active On First Click does not work with Transcript windows (though I assumed it did), I concluded it was your change that broke it. In fact, I just needed to do the *exact* same test in both images. So, it appears you're right, sorry for the false alarm.. (strange about the Transcript window though) On Fri, May 13, 2016 at 10:47 AM, marcel.taeumel wrote: > Hi Chris, > > if you take a look at SystemWindow >> #mouseDown:, you see that my change in > TextMorph cannot possibly break that "window active on first click" because > an inactive window has first to process #mouseDown: and activate its > submorphs (including any (Pluggable)TextMorph) before the additonal check > for #containsPoint: is even executed. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-tp4894605p4894687.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From commits at source.squeak.org Fri May 13 19:37:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:38:25 2016 Subject: [squeak-dev] The Trunk: Collections-mt.693.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.693.mcz ==================== Summary ==================== Name: Collections-mt.693 Author: mt Time: 13 May 2016, 9:37:08.465429 pm UUID: 68109039-441c-e344-a65b-e5b114d57cfa Ancestors: Collections-mt.692 Extend the TranscriptStream's model protocol to support "Window Active On First Click" preference. Usually, only subclasses of Model behave accordingly. Other "models" have to mimick the protocol. =============== Diff against Collections-mt.692 =============== Item was added: + ----- Method: TranscriptStream>>windowActiveOnFirstClick (in category 'model protocol') ----- + windowActiveOnFirstClick + + ^ Model windowActiveOnFirstClick! From commits at source.squeak.org Fri May 13 19:37:37 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:38:26 2016 Subject: [squeak-dev] The Trunk: Compiler-eem.322.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-eem.322.mcz ==================== Summary ==================== Name: Compiler-eem.322 Author: eem Time: 13 May 2016, 12:36:54.992126 pm UUID: b7bb5d79-1a2e-4a45-a6cc-dd0a8cf438bb Ancestors: Compiler-nice.321 Add bytecode scanning machinery to identify "synthetic" stores, i.e. the stores of indirect temp vectors at the start of methods containing closures. Add a "high-quality" pcPreviousTo:in:for: that answers nil for the first pcs of blocks, and answers the block creation bytecode's pc for the pc following an embedded block, and use it to disambiguate bytecode sequences that look like pushNewArray of an empty array.. Add isTempStoreAt:in: & pcFollowingBlockAt:in: to support the above. =============== Diff against Compiler-nice.321 =============== Item was added: + ----- Method: BytecodeEncoder class>>createClosureCode (in category 'bytecode decoding') ----- + createClosureCode + "Answer the create closure bytecode, if it exists in the encoder's byetcode set, or nil if not." + ^nil! Item was added: + ----- Method: BytecodeEncoder class>>isNonSyntheticStoreAt:in:for: (in category 'instruction stream support') ----- + isNonSyntheticStoreAt: pc in: method for: anInstructionStream + "Answer whether the bytecode at pc is a store or store-pop into an explicit variable. + This eliminates stores into indirect temp vectors, which implement mutable closed-over + variables in the the closure implementation, and hence stores into temp vectors are not real stores." + + ^(self isStoreAt: pc in: method) + and: [(self isSyntheticStoreAt: pc in: method for: anInstructionStream) not]! Item was added: + ----- Method: BytecodeEncoder class>>isSyntheticStoreAt:in:for: (in category 'instruction stream support') ----- + isSyntheticStoreAt: pc in: method for: anInstructionStream + "Answer whether the bytecode at pc is a store or store-pop of an indirect temp vector, + which implement mutable closed-over variables in the the closure implementation. + Stores into temp vectors are not real stores." + + self subclassResponsibility! Item was added: + ----- Method: BytecodeEncoder class>>pcFollowingBlockAt:in: (in category 'bytecode decoding') ----- + pcFollowingBlockAt: pc in: method + "Assuming the pc is that of a block creation bytecode, answer the pc immediately following the block, + i.e. the next pc after the block creation." + self subclassResponsibility! Item was added: + ----- Method: BytecodeEncoder class>>pcPreviousTo:in:for: (in category 'bytecode decoding') ----- + pcPreviousTo: thePC in: method for: anInstructionStreamOrContext + "Answer the pc of the bytecode before the bytecode at thePC. + Unlike CompiledMethod>>pcPreviousTo:, this version answers nil for + the first bytecode of an embedded block, and answers the pc of the + block creation bytecode for a bytecode following an embedded block." + | pc nextPc prevPc byte createClosureCode | + thePC > method endPC ifTrue: + [^method endPC]. + pc := method initialPC. + "We could save time by scanning from the block creation bytecode of an embedded block, + using the following, but it saves less time than it loses in additional tests." + "(anInstructionStreamOrContext isContext + and: [anInstructionStreamOrContext isClosureContext + and: [(nextPc := anInstructionStreamOrContext startpc) > pc]]) ifTrue: + [pc := self pcOfBlockCreationBytecodeForBlockStartingAt: nextPc in: method]." + createClosureCode := self createClosureCode. + [pc < thePC] whileTrue: + [byte := method at: (prevPc := pc). + [pc := createClosureCode == byte + ifTrue: + [nextPc := self pcFollowingBlockAt: pc in: method. + nextPc = thePC ifTrue: "first bytecode following block" + [^prevPc]. + nextPc > thePC + ifTrue: + [pc + (self bytecodeSize: byte) = thePC ifTrue: "first bytecode of block" + [^nil]. + pc + (self bytecodeSize: byte)] + ifFalse: [nextPc]] + ifFalse: [pc + (self bytecodeSize: byte)]. + self isExtension: byte] whileTrue: + [byte := method at: pc]]. + ^prevPc + + "Here's code to measure the effect of short-cutting scanning for blocks by starting at the startpc. + It measures how much time is used to scan for the pcs from the last block to the end of all mwetods containing blocks. Uncomment out the short-cut above to compare time with the optimization and time without. I see approximately 290ms for all such methods with the optimization and 292 ms without, so given that this slows down the substantial majority of methods without blocks, we KISS." + "| candidates | + candidates := Dictionary new. + self systemNavigation allSelect: + [:m| | ebc | + (m isQuick or: [(ebc := m embeddedBlockClosures) isEmpty]) ifFalse: + [candidates at: m put: { ebc last. + Array streamContents: + [:s| | is | + (is:= InstructionStream on: m) + pc: ebc last startpc; + scanFor: + [:b| + s nextPut: is pc. + false]] }]. + false]. + (1 to: 10) collect: + [:ign| + { [candidates keysAndValuesDo: + [:m :tuple| + [:ebc :pcs| | c | + c := ebc outerContext. + pcs do: + [:pc| m encoderClass pcPreviousTo: pc in: m for: c]] valueWithArguments: tuple]] timeToRun. + [candidates keysAndValuesDo: + [:m :tuple| + [:ebc :pcs| | c | + c := ebc outerContext. + pcs do: + [:pc| m encoderClass pcPreviousTo: pc in: m for: nil]] valueWithArguments: tuple]] timeToRun. }]"! Item was added: + ----- Method: BytecodeEncoder class>>pushNewArrayCode (in category 'bytecode decoding') ----- + pushNewArrayCode + "Answer the pushNewArray bytecode, if it exists in the encoder's byetcode set, or nil if not." + ^nil! Item was added: + ----- Method: EncoderForV3 class>>isSyntheticStoreAt:in:for: (in category 'instruction stream support') ----- + isSyntheticStoreAt: pc in: method for: anInstructionStream + "Answer whether the bytecode at pc is a store or store-pop of an indirect temp vector, + which implement mutable closed-over variables in the the closure implementation. + Stores into temp vectors are not real stores." + + ^false! Item was added: + ----- Method: EncoderForV3 class>>isTempStoreAt:in: (in category 'instruction stream support') ----- + isTempStoreAt: pc in: method + "Answer whether the bytecode at pc is a store or store-pop into a temporary variable. + 104-111 01101iii Pop and Store Temporary Location #iii + 129 10000001 jjkkkkkk Store (Receiver Variable, Temporary Location, Illegal, Literal Variable) [jj] #kkkkkk + 130 10000010 jjkkkkkk Pop and Store (Receiver Variable, Temporary Location, Illegal, Literal Variable) [jj] #kkkkkk" + + | byte | + byte := method at: pc. + ^byte >= 104 + and: [byte <= 111 + or: [byte <= 130 and: [byte >= 129 and: [(method at: pc + 1) >> 6 = 1]]]]! Item was added: + ----- Method: EncoderForV3PlusClosures class>>createClosureCode (in category 'bytecode decoding') ----- + createClosureCode + "Answer the create closure bytecode, if it exists in the encoder's byetcode set, or nil if not." + ^143! Item was added: + ----- Method: EncoderForV3PlusClosures class>>isSyntheticStoreAt:in:for: (in category 'instruction stream support') ----- + isSyntheticStoreAt: pc in: method for: anInstructionStream + "Answer whether the bytecode at pc is a store or store-pop of an indirect temp vector, + which implement mutable closed-over variables in the the closure implementation. + Stores into temp vectors are not real stores. N.B. pcPreviousTo:in:for: is slow, so filter + out any preceding bytecodes other than what looks like a pushNewArrayCode. But the + pcPreviousTo:in:for: is still necessary, since the presence of a pcPreviousTo:in:for: in the + right place is potentially ambiguous, possibly part of a different bytecode seqence." + + ^(self isTempStoreAt: pc in: method) + and: [pc - 2 >= method initialPC + and: [(method at: pc - 2) = self pushNewArrayCode + and: [(method at: pc - 1) <= 127 + and: [pc - 2 = (self pcPreviousTo: pc in: method for: anInstructionStream)]]]]! Item was added: + ----- Method: EncoderForV3PlusClosures class>>pcFollowingBlockAt:in: (in category 'bytecode decoding') ----- + pcFollowingBlockAt: pc in: method + "Assuming the pc is that of a block creation bytecode, answer the pc immediately following the block, + i.e. the next pc after the block creation." + self assert: (method at: pc) = self createClosureCode. + ^(method at: pc + 2) * 256 + (method at: pc + 3) + pc + 4! Item was added: + ----- Method: EncoderForV3PlusClosures class>>pushNewArrayCode (in category 'bytecode decoding') ----- + pushNewArrayCode + "138 10001010 jkkkkkkk Push (Array new: kkkkkkk) (j = 0) + or Pop kkkkkkk elements into: (Array new: kkkkkkk) (j = 1)" + ^138! From commits at source.squeak.org Fri May 13 19:40:29 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:40:31 2016 Subject: [squeak-dev] The Trunk: Tests-eem.340.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.340.mcz ==================== Summary ==================== Name: Tests-eem.340 Author: eem Time: 13 May 2016, 12:39:54.269153 pm UUID: 8d0d2cc1-ea8a-4517-a986-8ff469407533 Ancestors: Tests-ul.339 Add tests for the new bytecode scanning machinery (see Compiler-eem.322). Nuke some misplaced class vars. =============== Diff against Tests-ul.339 =============== Item was added: + LongTestCase subclass: #BytecodeDecodingTests + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-Compiler'! Item was added: + ----- Method: BytecodeDecodingTests>>testPCPreviousTo (in category 'tests') ----- + testPCPreviousTo + "Check that the pcPreviousTo machinery answers the truth for all bytecodes." + self systemNavigation allSelect: + [:m| | ec is prevPC prevBlockCreationPC exclude | + m isQuick ifFalse: + [ec := m encoderClass. + is:= InstructionStream on: m. + exclude := OrderedCollection new. + m embeddedBlockClosures do: + [:ebc| | followingpc | + followingpc := ebc endPC + (ec bytecodeSize: (m at: ebc endPC)). + exclude addLast: ebc startpc; addLast: followingpc.. + self assert: nil + equals: (ec pcPreviousTo: ebc startpc in: m for: nil). + self assert: (ec pcOfBlockCreationBytecodeForBlockStartingAt: ebc startpc in: m) + equals: (ec pcPreviousTo: followingpc in: m for: nil)]. + is scanFor: + [:b| + (exclude includes: is pc) ifFalse: + [self assert: prevPC + equals: (ec pcPreviousTo: is pc in: m for: nil)]. + prevPC := is pc. + b = ec createClosureCode ifTrue: [prevBlockCreationPC := prevPC]. + false].]. + false]! Item was added: + ----- Method: BytecodeDecodingTests>>testWillReallyStore (in category 'tests') ----- + testWillReallyStore + "Check that the willReallyStore machinery answers the truth for all bytecodes." + self systemNavigation allSelect: + [:m| | is sawITV pnac | + m isQuick ifFalse: + [sawITV := false. pnac := m encoderClass pushNewArrayCode. + is:= InstructionStream on: m. + is scanFor: + [:b| + sawITV + ifTrue: + [self assert: (m encoderClass isSyntheticStoreAt: is pc in: m for: nil)] + ifFalse: + [self deny: (m encoderClass isSyntheticStoreAt: is pc in: m for: nil)]. + "The only bytecode following a pushNewArrayCode that creates an empty array should be a synthetic store." + sawITV := b = pnac and: [is secondByte <= 127]. + false]]. + false]! Item was changed: TestCase subclass: #ClosureCompilerTest instanceVariableNames: '' + classVariableNames: '' - classVariableNames: 'CmpRR CogRTLOpcodes Jump MoveCqR Nop' poolDictionaries: '' category: 'Tests-Compiler'! From commits at source.squeak.org Fri May 13 19:42:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:42:58 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1022.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1022.mcz ==================== Summary ==================== Name: Kernel-eem.1022 Author: eem Time: 13 May 2016, 12:42:06.679822 pm UUID: a39b0f45-dcca-4780-aec1-1466aaadd607 Ancestors: Kernel-bf.1021 Revise the fix in Kernel-bf.1019 (Debugger: step over temp vector initializer when entering method). Use the new bytecode scanning mahcinery from Compiler-eem.322 to implement willReallyStore and use it in stepToSendOrReturn to filter-out stores of indirect temp vectors. =============== Diff against Kernel-bf.1021 =============== Item was changed: ----- Method: ContextPart>>stepToSendOrReturn (in category 'system simulation') ----- stepToSendOrReturn "Simulate the execution of bytecodes until either sending a message or returning a value to the receiver (that is, until switching contexts)." | ctxt | + [self willReallySend or: [self willReturn or: [self willReallyStore]]] whileFalse: - [self willReallySend or: [self willReturn or: [self willStore]]] whileFalse: [ctxt := self step. ctxt == self ifFalse: [self halt. "Caused by mustBeBoolean handling" ^ctxt]]! Item was added: + ----- Method: InstructionStream>>willReallyStore (in category 'testing') ----- + willReallyStore + "Answer whether the bytecode at pc is a store or store-pop into an explicit variable. + This eliminates stores into indirect temp vectors, which implement mutable closed-over + variables in the the closure implementation, and hence stores into temp vectors are not real stores." + | method | + method := self method. + ^method encoderClass isNonSyntheticStoreAt: pc in: method for: self! Item was removed: - ----- Method: MethodContext>>stepToSendOrReturn (in category 'system simulation') ----- - stepToSendOrReturn - ((method at: pc) == 16r8A "push new array" and: [pc = method initialPC]) ifTrue: [ - (method at: pc+2) = 16r68 ifFalse: [self error: 'assumed pop into temp0 bytecode']. - "init temp vector first" - self step; step]. - ^super stepToSendOrReturn! From commits at source.squeak.org Fri May 13 19:48:54 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:48:56 2016 Subject: [squeak-dev] The Trunk: Kernel-eem.1023.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.1023.mcz ==================== Summary ==================== Name: Kernel-eem.1023 Author: eem Time: 13 May 2016, 12:47:58.825645 pm UUID: dbe31b16-e7d4-4342-a314-a2faedcc6ce3 Ancestors: Kernel-eem.1022 CompiledMethod>>pcPreviousTo: is used in places other thna the debugger, so it has to be in kernel. Some time it may be replaceable with the new BytecodeEncoder class>>#pcPreviousTo:in:for:, but for now put it in the right package. =============== Diff against Kernel-eem.1022 =============== Item was added: + ----- Method: CompiledMethod>>pcPreviousTo: (in category 'scanning') ----- + pcPreviousTo: thePC + "Answer the pc of the bytecode before the bytecode at thePC." + | pc prevPc byte encoderClass | + thePC > self endPC ifTrue: [^self endPC]. + pc := self initialPC. + encoderClass := self encoderClass. + [pc < thePC] whileTrue: + [byte := self at: (prevPc := pc). + [pc := pc + (encoderClass bytecodeSize: byte). + encoderClass isExtension: byte] whileTrue: + [byte := self at: pc]]. + ^prevPc! From commits at source.squeak.org Fri May 13 19:51:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 19:51:57 2016 Subject: [squeak-dev] The Trunk: Tools-eem.702.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.702.mcz ==================== Summary ==================== Name: Tools-eem.702 Author: eem Time: 13 May 2016, 12:50:20.522711 pm UUID: 6e329560-7a10-4edf-ba1c-eb2ac424ceab Ancestors: Tools-bf.701 See Kernel-eem.1023. CompiledMethod>>pcPreviousTo: is used in places other thna the debugger, so it has to be in kernel. =============== Diff against Tools-bf.701 =============== Item was removed: - ----- Method: CompiledMethod>>pcPreviousTo: (in category '*Tools-Debugger-support') ----- - pcPreviousTo: thePC - "Answer the pc of the bytecode before the bytecode at thePC." - | pc prevPc byte encoderClass | - self flag: 'belongs in DebuggerMethodMap?'. - thePC > self endPC ifTrue: [^self endPC]. - pc := self initialPC. - encoderClass := self encoderClass. - [pc < thePC] whileTrue: - [byte := self at: (prevPc := pc). - [pc := pc + (encoderClass bytecodeSize: byte). - encoderClass isExtension: byte] whileTrue: - [byte := self at: pc]]. - ^prevPc! From commits at source.squeak.org Fri May 13 21:58:15 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 13 21:58:17 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160513215815.2484.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068101.html Name: SystemReporter-mt.26 Ancestors: SystemReporter-eem.25 Fix spelling. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068102.html Name: 51Deprecated-mt.28 Ancestors: 51Deprecated-mt.27 Deprecate #includesSubString: with capital S. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068103.html Name: Collections-mt.692 Ancestors: Collections-mt.691 Deprecate #includesSubString: with capital S. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068104.html Name: Morphic-mt.1144 Ancestors: Morphic-kb.1143 Fixes an older issue where it was not possible to set the keyboard focus of a text morph w/o discarding its selection. Most prominent in the System Browser where one could not simply overwrite the method template but had to re-select everything. This only affects users who disable "Focus follows mouse" and "mouseOverForKeyboardFocus". Here is the trick: Clicking inside the text morph's bounds still discards the selection. Embedded in a pluggable text morph, however, it is possible to click outside the text morph but inside the pluggable text morph. In this case, just do not handle the event except for context menu and keyboard focus. This does still not work for pluggable text morphs whose text morphs fill out the whole (scrollable) viewpoint. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068105.html Name: System-mt.829 Ancestors: System-mt.828 Use only one implementation to remove all but one project from the system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068106.html Name: EToys-mt.136 Ancestors: EToys-mt.135 When eToys clean-up aggressively, let it not mess around with the project hierarchy in general. This is the job of ReleaseBuilder. Only dump presenters in all morphic projects. As user objects are now in the more generic category "UserObjects", also let the ReleaseBuilder discard those uni-classes in a clean fashion. We do not know about the order of clean-up calls, so ReleaseBuilder >> #discardUserObjects is still useful. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068107.html Name: ReleaseBuilder-mt.132 Ancestors: ReleaseBuilder-mt.131 More refactoring. Separate image preparation into a) preparing source code and b) preparing environment. Seperating environment preparation into 1) clear caches, 2) configure tools, 3) set preferences, and 4) configure desktop/content. The steps 2) and 3) are somewhat similar. 3) means the (pragma) preferences mechanism only whereas 2) addresses configuration in other ways. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068108.html Name: Morphic-mt.1145 Ancestors: Morphic-mt.1144 Pluggable text morphs can keep their selection/offset w/o using deferred UI messages. This is more robust when add/remove instance variables in classes related to text editing and tools. No need for locking the offset in scroll panes anymore. Was a left-over from 4.5. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068109.html Name: Morphic-mt.1146 Ancestors: Morphic-mt.1145 Forgot to restore the "== true" pattern here. Be more robust against strange models... ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068110.html Name: Morphic-mt.1147 Ancestors: Morphic-mt.1146 Remove the lockOffset variable. Let's hope that all open tools survive this... ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068111.html Name: ReleaseBuilder-mt.133 Ancestors: ReleaseBuilder-mt.132 Condense changes. Note that we may want to have more control about the contents in the changes file for the release process. Right now, it is based on the local changes only. We could, for example, fetch all updates since the last release and rewrite the changes file. This would yield a consistent output and the versions browser would be more fun to use in a new release. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068112.html Name: ReleaseBuilder-mt.134 Ancestors: ReleaseBuilder-mt.133 We can only condense the changes once we have written the new changes/image files. Otherwise, we will break our master image because its changes file would be inconsistent to the image. I wonder why #condenseChanges does not automatically snapshot the image. It is dangerous. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068113.html Name: Collections-mt.693 Ancestors: Collections-mt.692 Extend the TranscriptStream's model protocol to support "Window Active On First Click" preference. Usually, only subclasses of Model behave accordingly. Other "models" have to mimick the protocol. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068114.html Name: Compiler-eem.322 Ancestors: Compiler-nice.321 Add bytecode scanning machinery to identify "synthetic" stores, i.e. the stores of indirect temp vectors at the start of methods containing closures. Add a "high-quality" pcPreviousTo:in:for: that answers nil for the first pcs of blocks, and answers the block creation bytecode's pc for the pc following an embedded block, and use it to disambiguate bytecode sequences that look like pushNewArray of an empty array.. Add isTempStoreAt:in: & pcFollowingBlockAt:in: to support the above. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068115.html Name: Tests-eem.340 Ancestors: Tests-ul.339 Add tests for the new bytecode scanning machinery (see Compiler-eem.322). Nuke some misplaced class vars. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068116.html Name: Kernel-eem.1022 Ancestors: Kernel-bf.1021 Revise the fix in Kernel-bf.1019 (Debugger: step over temp vector initializer when entering method). Use the new bytecode scanning mahcinery from Compiler-eem.322 to implement willReallyStore and use it in stepToSendOrReturn to filter-out stores of indirect temp vectors. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068117.html Name: Kernel-eem.1023 Ancestors: Kernel-eem.1022 CompiledMethod>>pcPreviousTo: is used in places other thna the debugger, so it has to be in kernel. Some time it may be replaceable with the new BytecodeEncoder class>>#pcPreviousTo:in:for:, but for now put it in the right package. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068118.html Name: Tools-eem.702 Ancestors: Tools-bf.701 See Kernel-eem.1023. CompiledMethod>>pcPreviousTo: is used in places other thna the debugger, so it has to be in kernel. ============================================= From Yoshiki.Ohshima at acm.org Fri May 13 22:57:01 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri May 13 22:57:04 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: I am slowly working my way up. Most of the problems was about getting the right environment variables for right processes, including the X Server and Squeak. I now get vanilla UTF32 values for characters I type into the scim preedit window on Squeak. The big question now is on the image side. We used to have StrikeFontSet as the default font and it was tad easier to just load language specific fonts into the image. At the same time, the clients' need here for me this time around (i.e., make Squeak on raspi support Japanese input, I'd side step all regular Squeak stuff and minimum changes. I am inclined to take this path now. Tim, is there a repo of the NuScratch that is used in the NuScratch image? On Wed, May 11, 2016 at 1:24 PM, Eliot Miranda wrote: > Hi Yoshiki, > >> On May 11, 2016, at 1:20 PM, Eliot Miranda wrote: >> >> Hi Yoshiki, >> >>>> On May 11, 2016, at 11:52 AM, Yoshiki Ohshima wrote: >>>> >>>>> On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg wrote: >>>>> On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: >>>>> >>>>> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima >>>>> wrote: >>>>>> The VM still does not display anything in the white window after I did >>>>>> apt-get dist-upgrade, and copy the .sources file to the same directly. >>>>>> (But I did not have an egg this morning). I'll try some display >>>>>> options. But also, it appears that the source code for the Cog seems >>>>>> to have the part I wrote for the composition input. The goal may be >>>>>> nearer than I originally thought. >>>>> >>>>> It may not as closer than I thought, however. The world evolved to >>>>> use ibus; we'd need to add some more stuff, such as DBus... I'll >>>>> report more tomorrow. >>>> >>>> Doesn?t ibus generate ?old? X events, too? The README suggests this should work: >>>> >>>> XMODIFIERS="@im=ibus" squeak >>>> >>>> ... which we could put in the startup script. >>> >>> This does not quite work. And also Abe-san says that I'd better make >>> it work with scim first so I am taking that path now. >>> >>> BTW, I have a long standing question of the development process. I >>> create a VM by doing ./mvm, which creates display drivers and VM in >>> one way or another, and installs them to products directory somewhere >>> upthere. I have trouble seeing my changes to code gets reflected >>> sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, >>> run mvm and invoke the squeak shell script in >>> products/cogspurlinuxhtARM/ but it seems to pick up a different binary >>> from somewhere else. >> >> It shouldn't. That's where the resulting binary gets installed (or a debug build in products/debug/cogspurlinuxhtARM etc). >> >>> >>> What do people do to make the debug cycle go faster on Linux? >> >> That's what I've been using, and I find it unsatisfactory too. I don't like the automake system and want to replace the whole thing with Gnu make makefiles (as is used in the win32 and MacOS builds) which would result in more sharing between the production, assert and debug builds plus accurate dependency information for reliable compilation, and the possibility of making a valid cogspurlinuxhtARM directory tree in the build directory and hence (again as I do in the win32 and MacOS builds) running the executable in the build directory instead of from products. > > And I forgot to say that indeed sqUnixX11.c is one of the files that suffers from inaccurate dependency info because it includes sqUnixEvent.c and sqUnixXdnd.c but the dependency isn't reflected in the makefiles :-( > >> >>> -- Yoshiki >> >> _,,,^..^,,,_ (phone) > -- -- Yoshiki From Yoshiki.Ohshima at acm.org Fri May 13 23:48:50 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri May 13 23:48:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: Iit appears that most bits and pieces are there. For example, sqUnixX11.c does have two functions setCompositionFocus() and setCompositionWIndowPosition(), which used to be in a separated loadable VM plugin but now sitting in there without any caller (if I'm not mistaken). And the NuSqueak image has calls to Hand>>compositionWindowManager, and miraculously, returns an instance of ImmX11. In ImmX11, setCompositionWindowPositionX:y: has a primitive call into ImmX11Plugin; but it appears that all I have to do is to change it to call the above-mentioned function in sqUnixX11.c. To make it right, I'd propose to add two more functions to the display module interface. I see the implementation of those for X11 is there, and I remember writing something for Windows; but it can be an empty function. So, if there is no opposition to add these to the display interface, I'd write a patch for it. But one thing I don't know much about is the HostWindowPlugin. If people think it makes sense to have them there for some reason, we can make that work, too. On Fri, May 13, 2016 at 3:57 PM, Yoshiki Ohshima wrote: > I am slowly working my way up. Most of the problems was about getting > the right environment variables for right processes, including the X > Server and Squeak. I now get vanilla UTF32 values for characters I > type into the scim preedit window on Squeak. > > The big question now is on the image side. We used to have > StrikeFontSet as the default font and it was tad easier to just load > language specific fonts into the image. > > At the same time, the clients' need here for me this time around > (i.e., make Squeak on raspi support Japanese input, I'd side step all > regular Squeak stuff and minimum changes. I am inclined to take this > path now. > > Tim, is there a repo of the NuScratch that is used in the NuScratch image? > > On Wed, May 11, 2016 at 1:24 PM, Eliot Miranda wrote: >> Hi Yoshiki, >> >>> On May 11, 2016, at 1:20 PM, Eliot Miranda wrote: >>> >>> Hi Yoshiki, >>> >>>>> On May 11, 2016, at 11:52 AM, Yoshiki Ohshima wrote: >>>>> >>>>>> On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg wrote: >>>>>> On 10.05.2016, at 02:23, Yoshiki Ohshima wrote: >>>>>> >>>>>> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima >>>>>> wrote: >>>>>>> The VM still does not display anything in the white window after I did >>>>>>> apt-get dist-upgrade, and copy the .sources file to the same directly. >>>>>>> (But I did not have an egg this morning). I'll try some display >>>>>>> options. But also, it appears that the source code for the Cog seems >>>>>>> to have the part I wrote for the composition input. The goal may be >>>>>>> nearer than I originally thought. >>>>>> >>>>>> It may not as closer than I thought, however. The world evolved to >>>>>> use ibus; we'd need to add some more stuff, such as DBus... I'll >>>>>> report more tomorrow. >>>>> >>>>> Doesn?t ibus generate ?old? X events, too? The README suggests this should work: >>>>> >>>>> XMODIFIERS="@im=ibus" squeak >>>>> >>>>> ... which we could put in the startup script. >>>> >>>> This does not quite work. And also Abe-san says that I'd better make >>>> it work with scim first so I am taking that path now. >>>> >>>> BTW, I have a long standing question of the development process. I >>>> create a VM by doing ./mvm, which creates display drivers and VM in >>>> one way or another, and installs them to products directory somewhere >>>> upthere. I have trouble seeing my changes to code gets reflected >>>> sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, >>>> run mvm and invoke the squeak shell script in >>>> products/cogspurlinuxhtARM/ but it seems to pick up a different binary >>>> from somewhere else. >>> >>> It shouldn't. That's where the resulting binary gets installed (or a debug build in products/debug/cogspurlinuxhtARM etc). >>> >>>> >>>> What do people do to make the debug cycle go faster on Linux? >>> >>> That's what I've been using, and I find it unsatisfactory too. I don't like the automake system and want to replace the whole thing with Gnu make makefiles (as is used in the win32 and MacOS builds) which would result in more sharing between the production, assert and debug builds plus accurate dependency information for reliable compilation, and the possibility of making a valid cogspurlinuxhtARM directory tree in the build directory and hence (again as I do in the win32 and MacOS builds) running the executable in the build directory instead of from products. >> >> And I forgot to say that indeed sqUnixX11.c is one of the files that suffers from inaccurate dependency info because it includes sqUnixEvent.c and sqUnixXdnd.c but the dependency isn't reflected in the makefiles :-( >> >>> >>>> -- Yoshiki >>> >>> _,,,^..^,,,_ (phone) >> > > > > -- > -- Yoshiki -- -- Yoshiki From lewis at mail.msen.com Fri May 13 23:51:37 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 13 23:51:40 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <1463149672460-4894654.post@n4.nabble.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> <1463137969130-4894624.post@n4.nabble.com> <20160513123607.GA86409@shell.msen.com> <1463149672460-4894654.post@n4.nabble.com> Message-ID: <20160513235137.GA2672@shell.msen.com> On Fri, May 13, 2016 at 07:27:52AM -0700, marcel.taeumel wrote: > Hi Dave, > > nothing happens. I tried it via > > (DisplayScreen future: 5000) hostWindowExtent: 1024@768. > > which gives you 5 seconds to minimize the window. > Hi Marcel, I get the same result on unix/X11, so it is not a Windows thing. The window stays minimized, and when I reopen it the dimensions are 1024@768. I'm not sure that this is a bug. The window extent is being set correctly, but the new dimensions have no effect until we tell the the window manager to reopen the window. Are you seeing the same thing? If you reexpand the window after waiting for more than 5 seconds, does it open with the new window extent in effect? If yes, then I would say that this is reasonable behavior, and not a bug. Dave From eliot.miranda at gmail.com Sat May 14 00:22:59 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 14 00:23:02 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima wrote: > Iit appears that most bits and pieces are there. For example, > sqUnixX11.c does have two functions setCompositionFocus() and > setCompositionWIndowPosition(), which used to be in a separated > loadable VM plugin but now sitting in there without any caller (if I'm > not mistaken). And the NuSqueak image has calls to > Hand>>compositionWindowManager, and miraculously, returns an instance > of ImmX11. > > In ImmX11, setCompositionWindowPositionX:y: has a primitive call into > ImmX11Plugin; but it appears that all I have to do is to change it to > call the above-mentioned function in sqUnixX11.c. > > To make it right, I'd propose to add two more functions to the display > module interface. I see the implementation of those for X11 is there, > and I remember writing something for Windows; but it can be an empty > function. > > So, if there is no opposition to add these to the display interface, > I'd write a patch for it. But one thing I don't know much about is > the HostWindowPlugin. If people think it makes sense to have them > there for some reason, we can make that work, too. > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) On Fri, May 13, 2016 at 3:57 PM, Yoshiki Ohshima > wrote: > > I am slowly working my way up. Most of the problems was about getting > > the right environment variables for right processes, including the X > > Server and Squeak. I now get vanilla UTF32 values for characters I > > type into the scim preedit window on Squeak. > > > > The big question now is on the image side. We used to have > > StrikeFontSet as the default font and it was tad easier to just load > > language specific fonts into the image. > > > > At the same time, the clients' need here for me this time around > > (i.e., make Squeak on raspi support Japanese input, I'd side step all > > regular Squeak stuff and minimum changes. I am inclined to take this > > path now. > > > > Tim, is there a repo of the NuScratch that is used in the NuScratch > image? > > > > On Wed, May 11, 2016 at 1:24 PM, Eliot Miranda > wrote: > >> Hi Yoshiki, > >> > >>> On May 11, 2016, at 1:20 PM, Eliot Miranda > wrote: > >>> > >>> Hi Yoshiki, > >>> > >>>>> On May 11, 2016, at 11:52 AM, Yoshiki Ohshima < > Yoshiki.Ohshima@acm.org> wrote: > >>>>> > >>>>>> On Tue, May 10, 2016 at 7:37 AM, Bert Freudenberg < > bert@freudenbergs.de> wrote: > >>>>>> On 10.05.2016, at 02:23, Yoshiki Ohshima > wrote: > >>>>>> > >>>>>> On Mon, May 9, 2016 at 10:35 AM, Yoshiki Ohshima > >>>>>> wrote: > >>>>>>> The VM still does not display anything in the white window after I > did > >>>>>>> apt-get dist-upgrade, and copy the .sources file to the same > directly. > >>>>>>> (But I did not have an egg this morning). I'll try some display > >>>>>>> options. But also, it appears that the source code for the Cog > seems > >>>>>>> to have the part I wrote for the composition input. The goal may > be > >>>>>>> nearer than I originally thought. > >>>>>> > >>>>>> It may not as closer than I thought, however. The world evolved to > >>>>>> use ibus; we'd need to add some more stuff, such as DBus... I'll > >>>>>> report more tomorrow. > >>>>> > >>>>> Doesn?t ibus generate ?old? X events, too? The README suggests this > should work: > >>>>> > >>>>> XMODIFIERS="@im=ibus" squeak > >>>>> > >>>>> ... which we could put in the startup script. > >>>> > >>>> This does not quite work. And also Abe-san says that I'd better make > >>>> it work with scim first so I am taking that path now. > >>>> > >>>> BTW, I have a long standing question of the development process. I > >>>> create a VM by doing ./mvm, which creates display drivers and VM in > >>>> one way or another, and installs them to products directory somewhere > >>>> upthere. I have trouble seeing my changes to code gets reflected > >>>> sometimes. (Say, I change a printf message somehwere in sqUnixX11.c, > >>>> run mvm and invoke the squeak shell script in > >>>> products/cogspurlinuxhtARM/ but it seems to pick up a different binary > >>>> from somewhere else. > >>> > >>> It shouldn't. That's where the resulting binary gets installed (or a > debug build in products/debug/cogspurlinuxhtARM etc). > >>> > >>>> > >>>> What do people do to make the debug cycle go faster on Linux? > >>> > >>> That's what I've been using, and I find it unsatisfactory too. I > don't like the automake system and want to replace the whole thing with Gnu > make makefiles (as is used in the win32 and MacOS builds) which would > result in more sharing between the production, assert and debug builds plus > accurate dependency information for reliable compilation, and the > possibility of making a valid cogspurlinuxhtARM directory tree in the build > directory and hence (again as I do in the win32 and MacOS builds) running > the executable in the build directory instead of from products. > >> > >> And I forgot to say that indeed sqUnixX11.c is one of the files that > suffers from inaccurate dependency info because it includes sqUnixEvent.c > and sqUnixXdnd.c but the dependency isn't reflected in the makefiles :-( > >> > >>> > >>>> -- Yoshiki > >>> > >>> _,,,^..^,,,_ (phone) > >> > > > > > > > > -- > > -- Yoshiki > > > > -- > -- Yoshiki > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160513/3c32ca22/attachment.htm From Yoshiki.Ohshima at acm.org Sat May 14 02:31:07 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat May 14 02:31:10 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <6748A234-E4F4-45DE-89F1-3F17100C360E@gmail.com> <9E2C1A17-4E7F-4221-AC98-9111DB77B058@rowledge.org> <532DC9AB-A808-4BC1-8237-46D75F456530@gmail.com> <2EA61A16-85FC-466E-AC7A-D37CDAC5484C@rowledge.org> <20160505233441.GA7203@shell.msen.com> <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: > > > On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima > wrote: >> >> Iit appears that most bits and pieces are there. For example, >> sqUnixX11.c does have two functions setCompositionFocus() and >> setCompositionWIndowPosition(), which used to be in a separated >> loadable VM plugin but now sitting in there without any caller (if I'm >> not mistaken). And the NuSqueak image has calls to >> Hand>>compositionWindowManager, and miraculously, returns an instance >> of ImmX11. >> >> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into >> ImmX11Plugin; but it appears that all I have to do is to change it to >> call the above-mentioned function in sqUnixX11.c. >> >> To make it right, I'd propose to add two more functions to the display >> module interface. I see the implementation of those for X11 is there, >> and I remember writing something for Windows; but it can be an empty >> function. >> >> So, if there is no opposition to add these to the display interface, >> I'd write a patch for it. But one thing I don't know much about is >> the HostWindowPlugin. If people think it makes sense to have them >> there for some reason, we can make that work, too. > > > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) Yes, SqDisplay.h is what would be changed. What I wrote above has some confusion, and I am indeed confused by this: - the display vm plugin mechanism has primitives that are numbered as well as primitives that are in plugins like HostWindowPlugin. Is it possible to make then setCompositionFocus() and setCompositionWindowPosition() to be non-numbered yet make them be looked up from a plugin? Wasn't there a way to say to load a primitive from the core VM itself? In any case, what to be edited seems to be minimal on the image side and isolated in the ImmX11 class; so it looks like it is close. -- -- Yoshiki From lewis at mail.msen.com Sat May 14 02:31:39 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 14 02:31:41 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: <20160514023139.GA15271@shell.msen.com> On Fri, May 13, 2016 at 05:22:59PM -0700, Eliot Miranda wrote: > On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima > wrote: > > > Iit appears that most bits and pieces are there. For example, > > sqUnixX11.c does have two functions setCompositionFocus() and > > setCompositionWIndowPosition(), which used to be in a separated > > loadable VM plugin but now sitting in there without any caller (if I'm > > not mistaken). And the NuSqueak image has calls to > > Hand>>compositionWindowManager, and miraculously, returns an instance > > of ImmX11. > > > > In ImmX11, setCompositionWindowPositionX:y: has a primitive call into > > ImmX11Plugin; but it appears that all I have to do is to change it to > > call the above-mentioned function in sqUnixX11.c. > > > > To make it right, I'd propose to add two more functions to the display > > module interface. I see the implementation of those for X11 is there, > > and I remember writing something for Windows; but it can be an empty > > function. > > > > So, if there is no opposition to add these to the display interface, > > I'd write a patch for it. But one thing I don't know much about is > > the HostWindowPlugin. If people think it makes sense to have them > > there for some reason, we can make that work, too. > > > > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) > That sounds right to me also. Yoshiki, I have some changes to HostWindowPlugin that makes it work for the latest Squeak trunk. I do not think that this will conflict with any of your changes, and I will post the updates as soon as I can (but maybe not for a couple of days). I do not know if primSetCompositionWindowPosition should better be in ImmX11Plugin or in HostWindowPlugin, but I see no reason to worry about it now. If someone finds a reason to change it, they can do that later. Eliot, The SqDisplayVersionMinor in oscog is 5, and in trunk it is 2. Adding the Qwaq enhancements needed for HostWindowPlugin would make trunk go from 2 -> 3, and the actual implementations in oscog seem to imply we should be at 3 there also. Maybe there were other Qwaq enhancements (that are not relevant here?) that moved the version number to 5. Yoshiki's interface enhancement should probably bump the minor version up by one, making it either 3 -> 4 or 5 -> 6. I'm inclined to think that we should just declare the current minor version to be 5 (as in oscog now) and chalk up the difference to missing Qwaq features, and then let Yoshiki's enhancement be SqDisplayVersionMinor be 6. Does that sound right? Dave From lewis at mail.msen.com Sat May 14 03:05:35 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 14 03:05:38 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> Message-ID: <20160514030535.GB15271@shell.msen.com> On Fri, May 13, 2016 at 07:31:07PM -0700, Yoshiki Ohshima wrote: > On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: > > > > > > On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima > > wrote: > >> > >> Iit appears that most bits and pieces are there. For example, > >> sqUnixX11.c does have two functions setCompositionFocus() and > >> setCompositionWIndowPosition(), which used to be in a separated > >> loadable VM plugin but now sitting in there without any caller (if I'm > >> not mistaken). And the NuSqueak image has calls to > >> Hand>>compositionWindowManager, and miraculously, returns an instance > >> of ImmX11. > >> > >> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into > >> ImmX11Plugin; but it appears that all I have to do is to change it to > >> call the above-mentioned function in sqUnixX11.c. > >> > >> To make it right, I'd propose to add two more functions to the display > >> module interface. I see the implementation of those for X11 is there, > >> and I remember writing something for Windows; but it can be an empty > >> function. > >> > >> So, if there is no opposition to add these to the display interface, > >> I'd write a patch for it. But one thing I don't know much about is > >> the HostWindowPlugin. If people think it makes sense to have them > >> there for some reason, we can make that work, too. > > > > > > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) > > Yes, SqDisplay.h is what would be changed. > > What I wrote above has some confusion, and I am indeed confused by this: > > - the display vm plugin mechanism has primitives that are numbered as > well as primitives that are in plugins like HostWindowPlugin. Is it > possible to make then setCompositionFocus() and > setCompositionWindowPosition() to be non-numbered yet make them be > looked up from a plugin? Wasn't there a way to say to load a > primitive from the core VM itself? Yes they can be non-numbered, and it is better for them to be named primitives. And yes, a named primitive in the VM can be called directly, but here is is better if you let them be named primitives in either ImmX11Plugin or HostWindowPlugin. To summarize with an example, #primitiveHostWindowPosition is called as a named primitive: HostWindowProxy>>primitiveWindowPosition: id "Find the topleft corner of the window" ^self windowProxyError: 'get position' The primitive calls ioPositionOfWindow(windowIndex() in the unix support code, declared in platforms/Cross/plugins/HostWindowPlugin.h, implemented in platforms/unix/plugins/sqHostWindowPlugin.c. The plugin implementation calls a function in whatever VM module has been loaded for the display: dpy->hostWindowGetSize(windowIndex) For unix/X11, the display module is implemented in sqUnixX11.c, and the function in that loaded module is display_hostWindowGetSize(). You can follow exactly the same pattern for the two new methods that you are adding. Your new primitives can be named primitives in either ImmX11Plugin or HostWindowPlugin. I do not know which plugin would be better to use, but either one will work. Dave > > In any case, what to be edited seems to be minimal on the image side > and isolated in the ImmX11 class; so it looks like it is close. > > -- > -- Yoshiki From Yoshiki.Ohshima at acm.org Sat May 14 04:04:08 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sat May 14 04:04:11 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160514030535.GB15271@shell.msen.com> References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> <20160514030535.GB15271@shell.msen.com> Message-ID: Thanks! I don't have the environment right now, but I'll follow this. But adding ImmX11Plugin (back again) seems to be right thing to do. If I'm not mistaken, this does not actually involve the VMMaker? On Fri, May 13, 2016 at 8:05 PM, David T. Lewis wrote: > On Fri, May 13, 2016 at 07:31:07PM -0700, Yoshiki Ohshima wrote: >> On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: >> > >> > >> > On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima >> > wrote: >> >> >> >> Iit appears that most bits and pieces are there. For example, >> >> sqUnixX11.c does have two functions setCompositionFocus() and >> >> setCompositionWIndowPosition(), which used to be in a separated >> >> loadable VM plugin but now sitting in there without any caller (if I'm >> >> not mistaken). And the NuSqueak image has calls to >> >> Hand>>compositionWindowManager, and miraculously, returns an instance >> >> of ImmX11. >> >> >> >> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into >> >> ImmX11Plugin; but it appears that all I have to do is to change it to >> >> call the above-mentioned function in sqUnixX11.c. >> >> >> >> To make it right, I'd propose to add two more functions to the display >> >> module interface. I see the implementation of those for X11 is there, >> >> and I remember writing something for Windows; but it can be an empty >> >> function. >> >> >> >> So, if there is no opposition to add these to the display interface, >> >> I'd write a patch for it. But one thing I don't know much about is >> >> the HostWindowPlugin. If people think it makes sense to have them >> >> there for some reason, we can make that work, too. >> > >> > >> > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) >> >> Yes, SqDisplay.h is what would be changed. >> >> What I wrote above has some confusion, and I am indeed confused by this: >> >> - the display vm plugin mechanism has primitives that are numbered as >> well as primitives that are in plugins like HostWindowPlugin. Is it >> possible to make then setCompositionFocus() and >> setCompositionWindowPosition() to be non-numbered yet make them be >> looked up from a plugin? Wasn't there a way to say to load a >> primitive from the core VM itself? > > Yes they can be non-numbered, and it is better for them to be named > primitives. And yes, a named primitive in the VM can be called directly, > but here is is better if you let them be named primitives in either > ImmX11Plugin or HostWindowPlugin. > > To summarize with an example, #primitiveHostWindowPosition is called as a > named primitive: > > HostWindowProxy>>primitiveWindowPosition: id > "Find the topleft corner of the window" > > ^self windowProxyError: 'get position' > > The primitive calls ioPositionOfWindow(windowIndex() in the unix support > code, declared in platforms/Cross/plugins/HostWindowPlugin.h, implemented in > platforms/unix/plugins/sqHostWindowPlugin.c. > > The plugin implementation calls a function in whatever VM module has been > loaded for the display: > dpy->hostWindowGetSize(windowIndex) > > For unix/X11, the display module is implemented in sqUnixX11.c, and the > function in that loaded module is display_hostWindowGetSize(). > > You can follow exactly the same pattern for the two new methods that > you are adding. Your new primitives can be named primitives in either > ImmX11Plugin or HostWindowPlugin. > > I do not know which plugin would be better to use, but either one will work. > > Dave > > >> >> In any case, what to be edited seems to be minimal on the image side >> and isolated in the ImmX11 class; so it looks like it is close. >> >> -- >> -- Yoshiki > -- -- Yoshiki From lewis at mail.msen.com Sat May 14 05:16:31 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 14 05:16:34 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> <20160514030535.GB15271@shell.msen.com> Message-ID: <20160514051631.GA52670@shell.msen.com> On Fri, May 13, 2016 at 09:04:08PM -0700, Yoshiki Ohshima wrote: > Thanks! I don't have the environment right now, but I'll follow this. > But adding ImmX11Plugin (back again) seems to be right thing to do. > If I'm not mistaken, this does not actually involve the VMMaker? I think that is right. I just tried generating source for ImmX11Plugin from my VMMaker. It seems to compile without problems (but probably it would have unresolved references). The generated ImmX11Plugin.c calls the function declared as extern int setCompositionWindowPosition(int, int). So I think that what may be needed is to create a new source file platforms/unix/plugins/ImmX11Plugin/sqUnixImmX11Plugin.c and this source file would call the function in the VM display module. I see now that I do not know enough about the ImmX11Plugin, so I am not sure if I fully understand what needs to be done. But it works for HostWindowPlugin, so I think that we can make it work for ImmX11Plugin in a similar way. Dave > > On Fri, May 13, 2016 at 8:05 PM, David T. Lewis wrote: > > On Fri, May 13, 2016 at 07:31:07PM -0700, Yoshiki Ohshima wrote: > >> On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: > >> > > >> > > >> > On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima > >> > wrote: > >> >> > >> >> Iit appears that most bits and pieces are there. For example, > >> >> sqUnixX11.c does have two functions setCompositionFocus() and > >> >> setCompositionWIndowPosition(), which used to be in a separated > >> >> loadable VM plugin but now sitting in there without any caller (if I'm > >> >> not mistaken). And the NuSqueak image has calls to > >> >> Hand>>compositionWindowManager, and miraculously, returns an instance > >> >> of ImmX11. > >> >> > >> >> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into > >> >> ImmX11Plugin; but it appears that all I have to do is to change it to > >> >> call the above-mentioned function in sqUnixX11.c. > >> >> > >> >> To make it right, I'd propose to add two more functions to the display > >> >> module interface. I see the implementation of those for X11 is there, > >> >> and I remember writing something for Windows; but it can be an empty > >> >> function. > >> >> > >> >> So, if there is no opposition to add these to the display interface, > >> >> I'd write a patch for it. But one thing I don't know much about is > >> >> the HostWindowPlugin. If people think it makes sense to have them > >> >> there for some reason, we can make that work, too. > >> > > >> > > >> > This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) > >> > >> Yes, SqDisplay.h is what would be changed. > >> > >> What I wrote above has some confusion, and I am indeed confused by this: > >> > >> - the display vm plugin mechanism has primitives that are numbered as > >> well as primitives that are in plugins like HostWindowPlugin. Is it > >> possible to make then setCompositionFocus() and > >> setCompositionWindowPosition() to be non-numbered yet make them be > >> looked up from a plugin? Wasn't there a way to say to load a > >> primitive from the core VM itself? > > > > Yes they can be non-numbered, and it is better for them to be named > > primitives. And yes, a named primitive in the VM can be called directly, > > but here is is better if you let them be named primitives in either > > ImmX11Plugin or HostWindowPlugin. > > > > To summarize with an example, #primitiveHostWindowPosition is called as a > > named primitive: > > > > HostWindowProxy>>primitiveWindowPosition: id > > "Find the topleft corner of the window" > > > > ^self windowProxyError: 'get position' > > > > The primitive calls ioPositionOfWindow(windowIndex() in the unix support > > code, declared in platforms/Cross/plugins/HostWindowPlugin.h, implemented in > > platforms/unix/plugins/sqHostWindowPlugin.c. > > > > The plugin implementation calls a function in whatever VM module has been > > loaded for the display: > > dpy->hostWindowGetSize(windowIndex) > > > > For unix/X11, the display module is implemented in sqUnixX11.c, and the > > function in that loaded module is display_hostWindowGetSize(). > > > > You can follow exactly the same pattern for the two new methods that > > you are adding. Your new primitives can be named primitives in either > > ImmX11Plugin or HostWindowPlugin. > > > > I do not know which plugin would be better to use, but either one will work. > > > > Dave > > > > > >> > >> In any case, what to be edited seems to be minimal on the image side > >> and isolated in the ImmX11 class; so it looks like it is close. > >> > >> -- > >> -- Yoshiki > > > > > > -- > -- Yoshiki From Marcel.Taeumel at hpi.de Sat May 14 06:19:36 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 14 06:55:12 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <20160513235137.GA2672@shell.msen.com> References: <20160512034409.GA34642@shell.msen.com> <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> <1463137969130-4894624.post@n4.nabble.com> <20160513123607.GA86409@shell.msen.com> <1463149672460-4894654.post@n4.nabble.com> <20160513235137.GA2672@shell.msen.com> Message-ID: <1463206776529-4894778.post@n4.nabble.com> Hi Dave, it's okay that the window stays minimized. But when I open it again, it still has the old resolution, which was 800@600 in my experiment. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Graphics-dtl-335-mcz-tp4894384p4894778.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat May 14 06:43:22 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 14 07:18:58 2016 Subject: [squeak-dev] Re: The Inbox: Monticello-mt.633.mcz In-Reply-To: References: Message-ID: <1463208202848-4894783.post@n4.nabble.com> Hi, there. Any thoughts on this? Such relative-path repositories can, for example, be used in all-in-one (or similar) bundles. Right now, we cannot move the VM to another place and expect directory repositories to keep on working if those are kept close to the VM path. Note that this rather affects an offline scenario. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Monticello-mt-633-mcz-tp4894506p4894783.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sat May 14 07:18:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 14 07:54:15 2016 Subject: [squeak-dev] Add the "do" menu to world main docking bar Message-ID: <1463210319295-4894792.post@n4.nabble.com> Hi, there. We have a convenient mini-script-shortcut feature: the "do..." menu, accessible via the world menu. Very easy to modify. What about adding it to the docking bar? Here is a change set that does that: do-menu.cs You need to rebuild the menus after that. ("Extras" -> "Rebuild menus"). Best, Marcel -- View this message in context: http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Sat May 14 14:36:20 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 14 14:36:24 2016 Subject: [squeak-dev] Add the "do" menu to world main docking bar In-Reply-To: <1463210319295-4894792.post@n4.nabble.com> References: <1463210319295-4894792.post@n4.nabble.com> Message-ID: <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> > On May 14, 2016, at 12:18 AM, marcel.taeumel wrote: > > Hi, there. > > We have a convenient mini-script-shortcut feature: the "do..." menu, > accessible via the world menu. Very easy to modify. > > What about adding it to the docking bar? > > Here is a change set that does that: do-menu.cs > > > You need to rebuild the menus after that. ("Extras" -> "Rebuild menus"). +1. If we accept this, Marcel, would it be possible to add a drag and drop action to drag a text selection into the do menu to add to it? Or do you think that "edit this menu" is good enough? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From lewis at mail.msen.com Sat May 14 14:42:40 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 14 14:42:42 2016 Subject: [squeak-dev] Re: The Inbox: Monticello-mt.633.mcz In-Reply-To: <1463208202848-4894783.post@n4.nabble.com> References: <1463208202848-4894783.post@n4.nabble.com> Message-ID: <20160514144240.GA50134@shell.msen.com> On Fri, May 13, 2016 at 11:43:22PM -0700, marcel.taeumel wrote: > Hi, there. > > Any thoughts on this? > > Such relative-path repositories can, for example, be used in all-in-one (or > similar) bundles. Right now, we cannot move the VM to another place and > expect directory repositories to keep on working if those are kept close to > the VM path. > > Note that this rather affects an offline scenario. > This seems like a reasonable thing to do, and if it helps with packaging an all-in-one, then it would be good to have it in trunk. I note that MCRelativeDirectoryRepository has a class comment (thank you) but most of the other repository types do not. If anyone feels motivated to add comments to the other classes, that would be a good thing :-) Dave From eliot.miranda at gmail.com Sat May 14 14:44:29 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 14 14:44:35 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> <20160514030535.GB15271@shell.msen.com> Message-ID: <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> Hi Yoshiki, > On May 13, 2016, at 9:04 PM, Yoshiki Ohshima wrote: > > Thanks! I don't have the environment right now, but I'll follow this. > But adding ImmX11Plugin (back again) seems to be right thing to do. > If I'm not mistaken, this does not actually involve the VMMaker? Hopefully :-). The Cog build tree is designed to put control on the set of plugins to compile into the hands of a particular build. Plugins are generated to src/plugins, and the idea is for VMMaker to generate as many of them as can be generated. Then to specify what set of plugins to compile into a VM simply edit the plugins.int & plugins.ext in buildOSNNProc/flavour, eg build.linuxARM/squeak.cog.spur/{plugins.int,plugins.ext}. So provided src/plugins/ImmX11Plugin/ImmX11Plugin.c exists (on my phone right now, will check soon) all you need to do is edit the relevant plugins.int & plugins.ext. > >> On Fri, May 13, 2016 at 8:05 PM, David T. Lewis wrote: >>> On Fri, May 13, 2016 at 07:31:07PM -0700, Yoshiki Ohshima wrote: >>>> On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: >>>> >>>> >>>> On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima >>>> wrote: >>>>> >>>>> Iit appears that most bits and pieces are there. For example, >>>>> sqUnixX11.c does have two functions setCompositionFocus() and >>>>> setCompositionWIndowPosition(), which used to be in a separated >>>>> loadable VM plugin but now sitting in there without any caller (if I'm >>>>> not mistaken). And the NuSqueak image has calls to >>>>> Hand>>compositionWindowManager, and miraculously, returns an instance >>>>> of ImmX11. >>>>> >>>>> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into >>>>> ImmX11Plugin; but it appears that all I have to do is to change it to >>>>> call the above-mentioned function in sqUnixX11.c. >>>>> >>>>> To make it right, I'd propose to add two more functions to the display >>>>> module interface. I see the implementation of those for X11 is there, >>>>> and I remember writing something for Windows; but it can be an empty >>>>> function. >>>>> >>>>> So, if there is no opposition to add these to the display interface, >>>>> I'd write a patch for it. But one thing I don't know much about is >>>>> the HostWindowPlugin. If people think it makes sense to have them >>>>> there for some reason, we can make that work, too. >>>> >>>> >>>> This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) >>> >>> Yes, SqDisplay.h is what would be changed. >>> >>> What I wrote above has some confusion, and I am indeed confused by this: >>> >>> - the display vm plugin mechanism has primitives that are numbered as >>> well as primitives that are in plugins like HostWindowPlugin. Is it >>> possible to make then setCompositionFocus() and >>> setCompositionWindowPosition() to be non-numbered yet make them be >>> looked up from a plugin? Wasn't there a way to say to load a >>> primitive from the core VM itself? >> >> Yes they can be non-numbered, and it is better for them to be named >> primitives. And yes, a named primitive in the VM can be called directly, >> but here is is better if you let them be named primitives in either >> ImmX11Plugin or HostWindowPlugin. >> >> To summarize with an example, #primitiveHostWindowPosition is called as a >> named primitive: >> >> HostWindowProxy>>primitiveWindowPosition: id >> "Find the topleft corner of the window" >> >> ^self windowProxyError: 'get position' >> >> The primitive calls ioPositionOfWindow(windowIndex() in the unix support >> code, declared in platforms/Cross/plugins/HostWindowPlugin.h, implemented in >> platforms/unix/plugins/sqHostWindowPlugin.c. >> >> The plugin implementation calls a function in whatever VM module has been >> loaded for the display: >> dpy->hostWindowGetSize(windowIndex) >> >> For unix/X11, the display module is implemented in sqUnixX11.c, and the >> function in that loaded module is display_hostWindowGetSize(). >> >> You can follow exactly the same pattern for the two new methods that >> you are adding. Your new primitives can be named primitives in either >> ImmX11Plugin or HostWindowPlugin. >> >> I do not know which plugin would be better to use, but either one will work. >> >> Dave >>> >>> In any case, what to be edited seems to be minimal on the image side >>> and isolated in the ImmX11 class; so it looks like it is close. >>> >>> -- Yoshiki > > -- Yoshiki _,,,^..^,,,_ (phone) From lewis at mail.msen.com Sat May 14 14:44:53 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 14 14:44:55 2016 Subject: [squeak-dev] Re: The Inbox: Graphics-dtl.335.mcz In-Reply-To: <1463206776529-4894778.post@n4.nabble.com> References: <1463036599791-4894398.post@n4.nabble.com> <73A3F388-86E5-436B-844C-D2FAFA095245@freudenbergs.de> <20160512120032.GA29810@shell.msen.com> <9A6A0D00-4674-4F1B-9007-DE90763ABDC9@rowledge.org> <1463137969130-4894624.post@n4.nabble.com> <20160513123607.GA86409@shell.msen.com> <1463149672460-4894654.post@n4.nabble.com> <20160513235137.GA2672@shell.msen.com> <1463206776529-4894778.post@n4.nabble.com> Message-ID: <20160514144453.GB50134@shell.msen.com> On Fri, May 13, 2016 at 11:19:36PM -0700, marcel.taeumel wrote: > Hi Dave, > > it's okay that the window stays minimized. But when I open it again, it > still has the old resolution, which was 800@600 in my experiment. It must be a Windows plugin issue then. Dave From eliot.miranda at gmail.com Sat May 14 14:47:56 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 14 14:48:01 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160514023139.GA15271@shell.msen.com> References: <77A1ED90-125C-474F-84DD-4C4F6D2CB1BB@freudenbergs.de> <20160514023139.GA15271@shell.msen.com> Message-ID: <829EB777-1D68-4200-86E7-B820718CAE15@gmail.com> Hi Dave, > On May 13, 2016, at 7:31 PM, David T. Lewis wrote: > >> On Fri, May 13, 2016 at 05:22:59PM -0700, Eliot Miranda wrote: >> On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima >> wrote: >> >>> Iit appears that most bits and pieces are there. For example, >>> sqUnixX11.c does have two functions setCompositionFocus() and >>> setCompositionWIndowPosition(), which used to be in a separated >>> loadable VM plugin but now sitting in there without any caller (if I'm >>> not mistaken). And the NuSqueak image has calls to >>> Hand>>compositionWindowManager, and miraculously, returns an instance >>> of ImmX11. >>> >>> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into >>> ImmX11Plugin; but it appears that all I have to do is to change it to >>> call the above-mentioned function in sqUnixX11.c. >>> >>> To make it right, I'd propose to add two more functions to the display >>> module interface. I see the implementation of those for X11 is there, >>> and I remember writing something for Windows; but it can be an empty >>> function. >>> >>> So, if there is no opposition to add these to the display interface, >>> I'd write a patch for it. But one thing I don't know much about is >>> the HostWindowPlugin. If people think it makes sense to have them >>> there for some reason, we can make that work, too. >> >> This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) > > That sounds right to me also. > > Yoshiki, > > I have some changes to HostWindowPlugin that makes it work for the > latest Squeak trunk. I do not think that this will conflict with any > of your changes, and I will post the updates as soon as I can (but > maybe not for a couple of days). > > I do not know if primSetCompositionWindowPosition should better be > in ImmX11Plugin or in HostWindowPlugin, but I see no reason to worry > about it now. If someone finds a reason to change it, they can do > that later. > > Eliot, > > The SqDisplayVersionMinor in oscog is 5, and in trunk it is 2. Adding > the Qwaq enhancements needed for HostWindowPlugin would make trunk > go from 2 -> 3, and the actual implementations in oscog seem to imply > we should be at 3 there also. Maybe there were other Qwaq enhancements > (that are not relevant here?) that moved the version number to 5. I made at least two changes after Qwaq. I can check, but they fixed deficiencies, perhaps with sound, perhaps with dnd. I'll figure it out and post. But 5 is meaningful, not arbitrary :-). > > Yoshiki's interface enhancement should probably bump the minor version > up by one, making it either 3 -> 4 or 5 -> 6. > > I'm inclined to think that we should just declare the current minor > version to be 5 (as in oscog now) and chalk up the difference to missing > Qwaq features, and then let Yoshiki's enhancement be SqDisplayVersionMinor > be 6. > > Does that sound right? Yes, spot on. > Dave Cheers, both! From Marcel.Taeumel at hpi.de Sat May 14 14:19:52 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 14 14:55:31 2016 Subject: [squeak-dev] Re: Add the "do" menu to world main docking bar In-Reply-To: <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> References: <1463210319295-4894792.post@n4.nabble.com> <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> Message-ID: <1463235592963-4894865.post@n4.nabble.com> Hi Eliot, I don't think that menu morphs are good in accepting drops at the moment. One would have to think about it and add that feature first. Best, Marcel -- View this message in context: http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792p4894865.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Sat May 14 20:00:49 2016 From: asqueaker at gmail.com (Chris Muller) Date: Sat May 14 20:01:32 2016 Subject: [squeak-dev] Re: The Inbox: Monticello-mt.633.mcz In-Reply-To: <20160514144240.GA50134@shell.msen.com> References: <1463208202848-4894783.post@n4.nabble.com> <20160514144240.GA50134@shell.msen.com> Message-ID: Relative paths are already supported by underlying FileDirectory, so I don't see why we should need a new MC repository type for that. I'm not clear exactly what you want to do.. On Sat, May 14, 2016 at 9:42 AM, David T. Lewis wrote: > On Fri, May 13, 2016 at 11:43:22PM -0700, marcel.taeumel wrote: >> Hi, there. >> >> Any thoughts on this? >> >> Such relative-path repositories can, for example, be used in all-in-one (or >> similar) bundles. Right now, we cannot move the VM to another place and >> expect directory repositories to keep on working if those are kept close to >> the VM path. >> >> Note that this rather affects an offline scenario. >> > > This seems like a reasonable thing to do, and if it helps with packaging > an all-in-one, then it would be good to have it in trunk. > > I note that MCRelativeDirectoryRepository has a class comment (thank you) > but most of the other repository types do not. If anyone feels motivated > to add comments to the other classes, that would be a good thing :-) > > Dave > > From lewis at mail.msen.com Sun May 15 04:58:34 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 15 04:58:38 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> Message-ID: <20160515045834.GA18254@shell.msen.com> On Sat, May 14, 2016 at 07:44:29AM -0700, Eliot Miranda wrote: > Hi Yoshiki, > > > On May 13, 2016, at 9:04 PM, Yoshiki Ohshima wrote: > > > > Thanks! I don't have the environment right now, but I'll follow this. > > But adding ImmX11Plugin (back again) seems to be right thing to do. > > If I'm not mistaken, this does not actually involve the VMMaker? > > Hopefully :-). The Cog build tree is designed to put control on the set of plugins to compile into the hands of a particular build. Plugins are generated to src/plugins, and the idea is for VMMaker to generate as many of them as can be generated. Then to specify what set of plugins to compile into a VM simply edit the plugins.int & plugins.ext in buildOSNNProc/flavour, eg build.linuxARM/squeak.cog.spur/{plugins.int,plugins.ext}. > > So provided src/plugins/ImmX11Plugin/ImmX11Plugin.c exists (on my phone right now, will check soon) all you need to do is edit the relevant plugins.int & plugins.ext. > Yoshiki, I have done some additional testing, and I think that on Linux the ImmX11Plugin will work without any code changes at all :-) I was expecting that some code changes would be needed to enable the primSetCompositionWindowPosition() function in ImmX11Plugin to call setCompositionWindowPosition() in the vm-display-X11 VM module. But I tried compiling ImmX11Plugin as an external module, and running under a gdb debugger. I can confirm that the ImmX11Plugin is calling the external setCompositionWindowPosition() function successfully. I cannot test this with Cog due to issues with gcc/autotools on the Ubuntu system I am using now, but there should be no differences in doing this on Cog. So I think that if you add ImmX11Plugin to plugins.ext as Eliot describes, then the plugin probably will work for Raspbian without any other changes. Dave > > > > >> On Fri, May 13, 2016 at 8:05 PM, David T. Lewis wrote: > >>> On Fri, May 13, 2016 at 07:31:07PM -0700, Yoshiki Ohshima wrote: > >>>> On Fri, May 13, 2016 at 5:22 PM, Eliot Miranda wrote: > >>>> > >>>> > >>>> On Fri, May 13, 2016 at 4:48 PM, Yoshiki Ohshima > >>>> wrote: > >>>>> > >>>>> Iit appears that most bits and pieces are there. For example, > >>>>> sqUnixX11.c does have two functions setCompositionFocus() and > >>>>> setCompositionWIndowPosition(), which used to be in a separated > >>>>> loadable VM plugin but now sitting in there without any caller (if I'm > >>>>> not mistaken). And the NuSqueak image has calls to > >>>>> Hand>>compositionWindowManager, and miraculously, returns an instance > >>>>> of ImmX11. > >>>>> > >>>>> In ImmX11, setCompositionWindowPositionX:y: has a primitive call into > >>>>> ImmX11Plugin; but it appears that all I have to do is to change it to > >>>>> call the above-mentioned function in sqUnixX11.c. > >>>>> > >>>>> To make it right, I'd propose to add two more functions to the display > >>>>> module interface. I see the implementation of those for X11 is there, > >>>>> and I remember writing something for Windows; but it can be an empty > >>>>> function. > >>>>> > >>>>> So, if there is no opposition to add these to the display interface, > >>>>> I'd write a patch for it. But one thing I don't know much about is > >>>>> the HostWindowPlugin. If people think it makes sense to have them > >>>>> there for some reason, we can make that work, too. > >>>> > >>>> > >>>> This is in struct SqDisplay in platforms/unix/vm/SqDisplay.h? Go for it :-) > >>> > >>> Yes, SqDisplay.h is what would be changed. > >>> > >>> What I wrote above has some confusion, and I am indeed confused by this: > >>> > >>> - the display vm plugin mechanism has primitives that are numbered as > >>> well as primitives that are in plugins like HostWindowPlugin. Is it > >>> possible to make then setCompositionFocus() and > >>> setCompositionWindowPosition() to be non-numbered yet make them be > >>> looked up from a plugin? Wasn't there a way to say to load a > >>> primitive from the core VM itself? > >> > >> Yes they can be non-numbered, and it is better for them to be named > >> primitives. And yes, a named primitive in the VM can be called directly, > >> but here is is better if you let them be named primitives in either > >> ImmX11Plugin or HostWindowPlugin. > >> > >> To summarize with an example, #primitiveHostWindowPosition is called as a > >> named primitive: > >> > >> HostWindowProxy>>primitiveWindowPosition: id > >> "Find the topleft corner of the window" > >> > >> ^self windowProxyError: 'get position' > >> > >> The primitive calls ioPositionOfWindow(windowIndex() in the unix support > >> code, declared in platforms/Cross/plugins/HostWindowPlugin.h, implemented in > >> platforms/unix/plugins/sqHostWindowPlugin.c. > >> > >> The plugin implementation calls a function in whatever VM module has been > >> loaded for the display: > >> dpy->hostWindowGetSize(windowIndex) > >> > >> For unix/X11, the display module is implemented in sqUnixX11.c, and the > >> function in that loaded module is display_hostWindowGetSize(). > >> > >> You can follow exactly the same pattern for the two new methods that > >> you are adding. Your new primitives can be named primitives in either > >> ImmX11Plugin or HostWindowPlugin. > >> > >> I do not know which plugin would be better to use, but either one will work. > >> > >> Dave > >>> > >>> In any case, what to be edited seems to be minimal on the image side > >>> and isolated in the ImmX11 class; so it looks like it is close. > >>> > >>> -- Yoshiki > > > > -- Yoshiki > > > _,,,^..^,,,_ (phone) From Marcel.Taeumel at hpi.de Sun May 15 05:25:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 15 06:01:09 2016 Subject: [squeak-dev] Re: The Inbox: Monticello-mt.633.mcz In-Reply-To: References: <1463208202848-4894783.post@n4.nabble.com> <20160514144240.GA50134@shell.msen.com> Message-ID: <1463289925482-4894895.post@n4.nabble.com> Hi Chris, how can I create a Directory Repository with Monticello and make it relative to the VM path (resp. FileDirectory default)? The requirement is that working copies do not lose their repositories if I copy it together with the VM to another place, keeping the relative path stable. Monticello's cache repository hacks in by recreating itself. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Monticello-mt-633-mcz-tp4894506p4894895.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Sun May 15 18:00:23 2016 From: gettimothy at zoho.com (gettimothy) Date: Sun May 15 18:00:26 2016 Subject: [squeak-dev] HelpBrowser openOn:topic page:???? Message-ID: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> Hi all, I would like to access a particular page on one of my custom HelpTopics. Browsing the HelpAPI help, I see several ways to open on a HelpTopic but no way to open a help browser on a HelpTopic at a particular page. This functionality (or the "link" functionality I see on the Help search results) would be very helpful in the custom Help I am working on for CMakeVMMakerSqueak. Does this exist? thanks for your time. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160515/daa75723/attachment.htm From Yoshiki.Ohshima at acm.org Sun May 15 20:29:50 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sun May 15 20:29:55 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160515045834.GA18254@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> Message-ID: (if you see this twice but with a difference, I'm sorry.) Hi, David, At Sun, 15 May 2016 00:58:34 -0400, David T. Lewis wrote: > > On Sat, May 14, 2016 at 07:44:29AM -0700, Eliot Miranda wrote: > > Hi Yoshiki, > > > > > On May 13, 2016, at 9:04 PM, Yoshiki Ohshima wrote: > > > > > > Thanks! I don't have the environment right now, but I'll follow this. > > > But adding ImmX11Plugin (back again) seems to be right thing to do. > > > If I'm not mistaken, this does not actually involve the VMMaker? > > > > Hopefully :-). The Cog build tree is designed to put control on the set of plugins to compile into the hands of a particular build. Plugins are generated to src/plugins, and the idea is for VMMaker to generate as many of them as can be generated. Then to specify what set of plugins to compile into a VM simply edit the plugins.int & plugins.ext in buildOSNNProc/flavour, eg build.linuxARM/squeak.cog.spur/{plugins.int,plugins.ext}. > > > > So provided src/plugins/ImmX11Plugin/ImmX11Plugin.c exists (on my phone right now, will check soon) all you need to do is edit the relevant plugins.int & plugins.ext. > > > > Yoshiki, > > I have done some additional testing, and I think that on Linux the ImmX11Plugin > will work without any code changes at all :-) > > I was expecting that some code changes would be needed to enable the > primSetCompositionWindowPosition() function in ImmX11Plugin to call > setCompositionWindowPosition() in the vm-display-X11 VM module. But I > tried compiling ImmX11Plugin as an external module, and running under > a gdb debugger. I can confirm that the ImmX11Plugin is calling the external > setCompositionWindowPosition() function successfully. > > I cannot test this with Cog due to issues with gcc/autotools on the Ubuntu > system I am using now, but there should be no differences in doing this > on Cog. So I think that if you add ImmX11Plugin to plugins.ext as Eliot > describes, then the plugin probably will work for Raspbian without any > other changes. It indeed was to my surprise to find out that ImmX11Plugin was in the distribution! It even has more than two primitives I wrote while ago. I can confirm that many things are working; but it still does require some code change in the VM and in the image. Mr Hachisuka worked on a similar change and mentioned this: http://www2.asu.ac.jp/hachi/v3/scratch14ime.html Effectively, his change to recordPendingKeys() takes UTF8 string but cook them into UTF32 in there. Without this change, the image receives those octets separately, and the way things are set up currently, they are interpreted as individual characters. We used to have a theory that this might be a job on the image side, but I'd be willing to go along with the idea that the VM does it in recordPendingKeys(). (Attached patch for now has an ifdef, but once it is accepted as a main stream patch, it'd not have to be there.) Then on the image side, we need to fix ImmX11>>keyboardFocusForMorph: to support non-TextMorphs. My feeble attempt involves to test whether the given morph understand #paragraph and make it read: ------------------- keyboardFocusForAMorph: aMorph aMorph ifNil: [^ self]. [ | left bottom pos height | pos := aMorph preferredKeyboardPosition. left := (pos x min: Display width max: 0) asInteger. (aMorph respondsTo: #paragraph) ifTrue: [ height := (aMorph paragraph characterBlockForIndex: aMorph editor selectionInterval first) height ] ifFalse: [ height := 0]. bottom := (pos y min: Display height max: 0) asInteger + height. self setCompositionWindowPositionX: left y: bottom asInteger ] on: Error do: [:ex |]. ------------------- (#asInteger is sent so that the primitive does not get floats.) and then to use it StringFieldMorph (and possible a few other classes) need its #keyboardFocusChange: to read: ------------------- keyboardFocusChange: t1 (t1 and: [isKeyboardFocus not]) ifTrue: [lastContents := stringMorph contents]. (isKeyboardFocus and: [t1 not]) ifTrue: [lastContents := nil. isNumeric ifTrue: [self contents: stringMorph contents asNumberNoError printStringNoExponent]. acceptWhenFocusLost ifTrue: [self acceptEdits]]. isKeyboardFocus := t1. isKeyboardFocus ifTrue: [selectionStart := 0. selectionEnd := stringMorph contents size]. "This line below" isKeyboardFocus ifTrue: [ActiveHand compositionWindowManager keyboardFocusForAMorph: self]. self changed ------------------- The result is that when the input method is enabled, and the user tries to type into a field, the preedit window shows up right there where you are typing in. The prerequite for this is to have all the right environment variables for the X Server and Squeak VM and then the good old -vm-display-X11 -compositioninput is passed in to invoke the VM. Thank you everybody for all the help! We'll need to fold these changes and I'll test a few more configurations so that a novice user invoking Scratch on Raspbian sees everything al right, but it is getting there! -- Yoshiki -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.diff Type: application/octet-stream Size: 3172 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160515/2cc033e7/diff.obj -------------- next part -------------- A non-text attachment was scrubbed... Name: preedit.png Type: image/png Size: 53503 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160515/2cc033e7/preedit.png From tim at rowledge.org Sun May 15 20:32:51 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun May 15 20:32:52 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> Message-ID: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> > On 15-05-2016, at 1:29 PM, Yoshiki Ohshima wrote: > > Thank you everybody for all the help! We'll need to fold these > changes and I'll test a few more configurations so that a novice user > invoking Scratch on Raspbian sees everything al right, but it is > getting there! I wish I could have offered something but unix non-anglo character input is so far outside my area I probably can?t even spell it correctly? but once you?ve got it working to your satisfaction I can certainly make sure it gets into the next available Pi release. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Always responds to "Make Money Fast" postings on the Net. From Yoshiki.Ohshima at acm.org Sun May 15 21:16:17 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Sun May 15 21:16:21 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> Message-ID: On Sun, May 15, 2016 at 1:32 PM, tim Rowledge wrote: > >> On 15-05-2016, at 1:29 PM, Yoshiki Ohshima wrote: >> >> Thank you everybody for all the help! We'll need to fold these >> changes and I'll test a few more configurations so that a novice user >> invoking Scratch on Raspbian sees everything al right, but it is >> getting there! > > I wish I could have offered something but unix non-anglo character input is so far outside my area I probably can?t even spell it correctly? > but once you?ve got it working to your satisfaction I can certainly make sure it gets into the next available Pi release. Great. One thing I just started poking around was how Scratch actually gets executed when you choose it from the menu. What would have to happen is that the script executed from there (I presume /usr/bin/scratch) checks the LANG environment variable (or call the locale command, and when the result is either ja, ko, or cn (or actually the value of XMODIFIERS has @im), it invokes the VM with "-vm-display-X11 -compositioninput". Then to the image, two changes to ImmX11>> keyboardFocusForMorph and StringFieldMorph>> keyboardFocusChange. There are some others that implement #keyboardFocusChange: but I have not all understood which ones are relevant to Scratch, and keyboard text input. With those, and the change to recordPendingKeys(), it will be in good shape. -- -- Yoshiki From commits at source.squeak.org Sun May 15 21:34:42 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 15 21:35:42 2016 Subject: [squeak-dev] The Trunk: Files-ul.154.mcz Message-ID: Levente Uzonyi uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-ul.154.mcz ==================== Summary ==================== Name: Files-ul.154 Author: ul Time: 15 May 2016, 11:17:08.015805 pm UUID: 7a4281ea-9f72-4784-ac30-b324ca3b456e Ancestors: Files-nice.153 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections =============== Diff against Files-nice.153 =============== Item was changed: ----- Method: StandardFileStream>>ascii (in category 'properties-setting') ----- ascii "opposite of binary" + + ByteString adoptInstance: buffer1. + collection ifNotNil: [ ByteString adoptInstance: collection ]. - buffer1 := ByteString new: 1. - collection ifNotNil: [collection := collection asString]. lastWritten ifNotNil: [lastWritten isInteger ifTrue: [lastWritten := lastWritten asCharacter]]! Item was changed: ----- Method: StandardFileStream>>binary (in category 'properties-setting') ----- binary + + ByteArray adoptInstance: buffer1. + collection ifNotNil: [ ByteArray adoptInstance: collection ]. - buffer1 := ByteArray new: 1. - collection ifNotNil: [collection := collection asByteArray]. lastWritten ifNotNil: [lastWritten isCharacter ifTrue: [lastWritten := lastWritten asInteger]]! From commits at source.squeak.org Sun May 15 21:35:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 15 21:35:43 2016 Subject: [squeak-dev] The Trunk: Network-ul.177.mcz Message-ID: Levente Uzonyi uploaded a new version of Network to project The Trunk: http://source.squeak.org/trunk/Network-ul.177.mcz ==================== Summary ==================== Name: Network-ul.177 Author: ul Time: 15 May 2016, 11:20:55.796798 pm UUID: c12022de-43c5-4532-ac05-e2f8603fb063 Ancestors: Network-ul.176 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections =============== Diff against Network-ul.176 =============== Item was changed: ----- Method: SocketStream>>ascii (in category 'configuration') ----- ascii "Tell the SocketStream to send data as Strings instead of ByteArrays. This is default." binary := false. inBuffer ifNil: [self resetBuffers] + ifNotNil: [ + ByteString + adoptInstance: inBuffer; + adoptInstance: outBuffer ]! - ifNotNil: - [inBuffer := inBuffer asString. - outBuffer := outBuffer asString]! Item was changed: ----- Method: SocketStream>>binary (in category 'configuration') ----- binary "Tell the SocketStream to send data as ByteArrays instead of Strings. Default is ascii." binary := true. inBuffer ifNil: [self resetBuffers] + ifNotNil: [ + ByteArray + adoptInstance: inBuffer; + adoptInstance: outBuffer ]! - ifNotNil: - [inBuffer := inBuffer asByteArray. - outBuffer := outBuffer asByteArray]! From commits at source.squeak.org Sun May 15 21:35:34 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 15 21:36:24 2016 Subject: [squeak-dev] The Trunk: SqueakSSL-Core-ul.31.mcz Message-ID: Levente Uzonyi uploaded a new version of SqueakSSL-Core to project The Trunk: http://source.squeak.org/trunk/SqueakSSL-Core-ul.31.mcz ==================== Summary ==================== Name: SqueakSSL-Core-ul.31 Author: ul Time: 15 May 2016, 11:21:55.817852 pm UUID: c4ddb187-9880-4b51-9774-b6e2402ed5d4 Ancestors: SqueakSSL-Core-eem.30 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections =============== Diff against SqueakSSL-Core-eem.30 =============== Item was changed: ----- Method: SecureSocketStream>>ascii (in category 'accessing') ----- ascii "Switch to ASCII" super ascii. + ByteString adoptInstance: decoded originalContents! - decoded := (ReadStream - on: decoded originalContents asString - from: 1 to: decoded size) - position: decoded position; - yourself. - ! Item was changed: ----- Method: SecureSocketStream>>binary (in category 'accessing') ----- binary "Switch to binary" super binary. + ByteArray adoptInstance: decoded originalContents! - decoded := (ReadStream - on: decoded originalContents asByteArray - from: 1 to: decoded size) - position: decoded position; - yourself. - ! From commits at source.squeak.org Sun May 15 21:58:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun May 15 21:58:09 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160515215807.32688.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068119.html Name: Files-ul.154 Ancestors: Files-nice.153 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068120.html Name: Network-ul.177 Ancestors: Network-ul.176 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068121.html Name: SqueakSSL-Core-ul.31 Ancestors: SqueakSSL-Core-eem.30 - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections ============================================= From lewis at mail.msen.com Mon May 16 02:27:13 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 16 02:27:15 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> Message-ID: <20160516022713.GA45004@shell.msen.com> On Sun, May 15, 2016 at 02:16:17PM -0700, Yoshiki Ohshima wrote: > On Sun, May 15, 2016 at 1:32 PM, tim Rowledge wrote: > > > >> On 15-05-2016, at 1:29 PM, Yoshiki Ohshima wrote: > >> > >> Thank you everybody for all the help! We'll need to fold these > >> changes and I'll test a few more configurations so that a novice user > >> invoking Scratch on Raspbian sees everything al right, but it is > >> getting there! > > > > I wish I could have offered something but unix non-anglo character input is so far outside my area I probably can???t even spell it correctly??? > > but once you???ve got it working to your satisfaction I can certainly make sure it gets into the next available Pi release. > > Great. One thing I just started poking around was how Scratch > actually gets executed when you choose it from the menu. What would > have to happen is that the script executed from there (I presume > /usr/bin/scratch) checks the LANG environment variable (or call the > locale command, and when the result is either ja, ko, or cn (or > actually the value of XMODIFIERS has @im), it invokes the VM with > "-vm-display-X11 -compositioninput". > > Then to the image, two changes to ImmX11>> keyboardFocusForMorph and > StringFieldMorph>> keyboardFocusChange. There are some others that > implement #keyboardFocusChange: but I have not all understood which > ones are relevant to Scratch, and keyboard text input. > > With those, and the change to recordPendingKeys(), it will be in good shape. > > -- > -- Yoshiki If I understand correctly, here is what we need to do: 1) Apply the changes of Mr Hachisuka to the VM. - The diff is in the earlier email from Yoshiki: http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html http://www2.asu.ac.jp/hachi/v3/scratch14ime.html - Test updated VM to make sure the changes do not cause problems. Make sure it works without problems for Squeak trunk and for Scratch. - Apply the update in SVN for both oscog and trunk. I can help here. - Test the VM. Tim, I need help on this. I do not currently have a working Cog build environment (Unbuntu/autotools/gcc version issues). Can you apply the patch from Yoshiki's email and see if your resulting Cog VM continues to work for you as expected on Pi with Scratch? - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can you please give his full name for the commit notice? I assume the patch is MIT licensed. 2) Make updates to the image. - Start with Yoshiki's recommendations. - Make sure that it works in Scratch, and that all updates are also in Squeak trunk. 3) Make updates to the scripts that call Scratch from the menu (see above, this email). 4) Confirm that Scratch users around the world are happy :-) Dave From Yoshiki.Ohshima at acm.org Mon May 16 16:30:02 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 16:30:06 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160516022713.GA45004@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: At Sun, 15 May 2016 22:27:13 -0400, David T. Lewis wrote: > > On Sun, May 15, 2016 at 02:16:17PM -0700, Yoshiki Ohshima wrote: > > On Sun, May 15, 2016 at 1:32 PM, tim Rowledge wrote: > > > > > >> On 15-05-2016, at 1:29 PM, Yoshiki Ohshima wrote: > > >> > > >> Thank you everybody for all the help! We'll need to fold these > > >> changes and I'll test a few more configurations so that a novice user > > >> invoking Scratch on Raspbian sees everything al right, but it is > > >> getting there! > > > > > > I wish I could have offered something but unix non-anglo character input is so far outside my area I probably can???t even spell it correctly??? > > > but once you???ve got it working to your satisfaction I can certainly make sure it gets into the next available Pi release. > > > > Great. One thing I just started poking around was how Scratch > > actually gets executed when you choose it from the menu. What would > > have to happen is that the script executed from there (I presume > > /usr/bin/scratch) checks the LANG environment variable (or call the > > locale command, and when the result is either ja, ko, or cn (or > > actually the value of XMODIFIERS has @im), it invokes the VM with > > "-vm-display-X11 -compositioninput". > > > > Then to the image, two changes to ImmX11>> keyboardFocusForMorph and > > StringFieldMorph>> keyboardFocusChange. There are some others that > > implement #keyboardFocusChange: but I have not all understood which > > ones are relevant to Scratch, and keyboard text input. > > > > With those, and the change to recordPendingKeys(), it will be in good shape. > > > > -- > > -- Yoshiki > > If I understand correctly, here is what we need to do: > > 1) Apply the changes of Mr Hachisuka to the VM. > - The diff is in the earlier email from Yoshiki: > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html Yes, the attachment to my email is basically a reformatted version of Mr. Hachisuka's patch (with an ifdef) > http://www2.asu.ac.jp/hachi/v3/scratch14ime.html > - Test updated VM to make sure the changes do not cause problems. Make sure > it works without problems for Squeak trunk and for Scratch. Yes. One potential problem I think is that there is an assumption that the code delivered to the pendingKeys is UTF-8. On a platform this assumption is not correct, we would need an additional mechanism. > - Apply the update in SVN for both oscog and trunk. I can help > - here. Thanks! > - Test the VM. Tim, I need help on this. I do not currently have a working > Cog build environment (Unbuntu/autotools/gcc version issues). Can you > apply the patch from Yoshiki's email and see if your resulting Cog VM > continues to work for you as expected on Pi with Scratch? And more testing would be nice. > - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can > you please give his full name for the commit notice? I assume the patch > is MIT licensed. I'll ask him about the license. > 2) Make updates to the image. > - Start with Yoshiki's recommendations. > - Make sure that it works in Scratch, and that all updates are also in > Squeak trunk. > > 3) Make updates to the scripts that call Scratch from the menu (see above, > this email). I'll work on the script (I think) today. > 4) Confirm that Scratch users around the world are happy :-) Thank you! -- Yoshiki From tim at rowledge.org Mon May 16 17:04:11 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 16 17:04:15 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Sona si Latine loqueris = Honk if you speak Latin. From Yoshiki.Ohshima at acm.org Mon May 16 17:06:43 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 17:06:48 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: On Mon, May 16, 2016 at 10:04 AM, tim Rowledge wrote: > Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? It should work for any other languages that ibus or scim can handle. Yes, it will be usable with the on-screen keyboard. -- -- Yoshiki From Yoshiki.Ohshima at acm.org Mon May 16 17:14:29 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 17:14:31 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: On Mon, May 16, 2016 at 10:06 AM, Yoshiki Ohshima wrote: > On Mon, May 16, 2016 at 10:04 AM, tim Rowledge wrote: >> Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? > > It should work for any other languages that ibus or scim can handle. > Yes, it will be usable with the on-screen keyboard. So I wrote about two possible options on changes to /usr/bin/scratch; I think that the option that uses the XMODIFIERS environment variable, or some other ways to tell that there is an input method running, is more suitable for this purpose. -- -- Yoshiki From Marcel.Taeumel at hpi.de Mon May 16 18:16:46 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 16 18:52:39 2016 Subject: [squeak-dev] Re: HelpBrowser openOn:topic page:???? In-Reply-To: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> References: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> Message-ID: <1463422606189-4895185.post@n4.nabble.com> Hi Timothy, this help system consists of help topics, which form a hierarchy. Each such topic has text content. Given this, there is no distinction between "topic" and "page". There are just topics. As you have correctly found out, you can open any help topic via HelpBrowser class >> #openOn:. This works with all arguments that understand #asHelpTopic and are hence able to represent themselves in the right format. You can browse implementors of #asHelpTopic for more details. While you can open any help topic (in any tree of topics) with the help browser, you are right, it might be helpful to open some "root topic" and select some sub topic in it. I guess that's the "page" you are referring to. :-) Here is an example on how to do that: (HelpBrowser openOn: HelpOnHelp) model showTopicThat: [:topic | topic title beginsWith: 'API']. This iterates the help structure until one topic returns "true". It's like #detect:. It selects the result. However, there can be a problem with writing such code because display strings tend to be translated and changed. Therfore, help topics can have a #key property to encode an id to refer to in that block. If there is no key, you have to check for another property. You might wonder, why this is so. Well, the creation of help topics is a dynamic process. There is, for example, SWikiHelp, which fetches Web content and parses sub-topics. So, we have to search for the topic to show, instead of directly referring to it object-wise. If you get access to an instance of HelpTopic, you can read it, but it might not be valid for a long time because the Help Browser can update its caches. Best, Marcel -- View this message in context: http://forum.world.st/HelpBrowser-openOn-topic-page-tp4895008p4895185.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Mon May 16 19:05:25 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 19:05:28 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: The relationship between /usr/bin/scratch and /usr/bin/squeak is somewhat confused. /usr/bin/scratch has some code to handle VMOPTIONS but it is not actually passed to /usr/bin/squeak. But then if /usr/bin/scratch was passing those to /usr/bin/squeak, that shell script does not handle them. I'd think it might be good to copy the LD_LIBRARY_PATH part of /usr/bin/squeak to /usr/bin/scratch, and the latter does not deal with the former. What do you guys think? On Mon, May 16, 2016 at 10:14 AM, Yoshiki Ohshima wrote: > On Mon, May 16, 2016 at 10:06 AM, Yoshiki Ohshima > wrote: >> On Mon, May 16, 2016 at 10:04 AM, tim Rowledge wrote: >>> Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? >> >> It should work for any other languages that ibus or scim can handle. >> Yes, it will be usable with the on-screen keyboard. > > So I wrote about two possible options on changes to /usr/bin/scratch; > I think that the option that uses the XMODIFIERS environment variable, > or some other ways to tell that there is an input method running, is > more suitable for this purpose. > > > -- > -- Yoshiki -- -- Yoshiki From lewis at mail.msen.com Mon May 16 20:23:51 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 16 20:23:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> I have not actually looked at the /usr/bin/scratch script, but I do know that the use of /usr/bin/squeak (or /usr/local/bin/squeak) is already overloaded depending on what flavor of VM was installed most recently. I suspect that it would be better to have a /usr/bin/scratch script that does exactly what you want it to do, possibly not relying at all on the /usr/bin/squeak script. Tim, when someone installs Scratch on their Pi, does that installation include the VM? Or does it expect a VM to be installed separately? I am assuming that the Scratch installation would include a VM and with the Scratch plugins, and that you would not want other installations of VMs to affect the Scratch application. Is that right? Dave > The relationship between /usr/bin/scratch and /usr/bin/squeak is > somewhat confused. /usr/bin/scratch has some code to handle VMOPTIONS > but it is not actually passed to /usr/bin/squeak. But then if > /usr/bin/scratch was passing those to /usr/bin/squeak, that shell > script does not handle them. I'd think it might be good to copy the > LD_LIBRARY_PATH part of /usr/bin/squeak to /usr/bin/scratch, and the > latter does not deal with the former. > > What do you guys think? > > On Mon, May 16, 2016 at 10:14 AM, Yoshiki Ohshima > wrote: >> On Mon, May 16, 2016 at 10:06 AM, Yoshiki Ohshima >> wrote: >>> On Mon, May 16, 2016 at 10:04 AM, tim Rowledge >>> wrote: >>>> Forgive me if I???m being hopelessly naive here, but does this text >>>> input mechanism work for other languages too? Would it, for example, >>>> be usable as an on-screen keyboard for theRaspberry Pi lcd >>>> touchscreen? >>> >>> It should work for any other languages that ibus or scim can handle. >>> Yes, it will be usable with the on-screen keyboard. >> >> So I wrote about two possible options on changes to /usr/bin/scratch; >> I think that the option that uses the XMODIFIERS environment variable, >> or some other ways to tell that there is an input method running, is >> more suitable for this purpose. >> >> >> -- >> -- Yoshiki > > > > -- > -- Yoshiki > From Yoshiki.Ohshima at acm.org Mon May 16 22:28:06 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 22:28:09 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> Message-ID: On Mon, May 16, 2016 at 1:23 PM, David T. Lewis wrote: > I have not actually looked at the /usr/bin/scratch script, but I do know > that the use of /usr/bin/squeak (or /usr/local/bin/squeak) is already > overloaded depending on what flavor of VM was installed most recently. I > suspect that it would be better to have a /usr/bin/scratch script that > does exactly what you want it to do, possibly not relying at all on the > /usr/bin/squeak script. > > Tim, when someone installs Scratch on their Pi, does that installation > include the VM? Or does it expect a VM to be installed separately? I am > assuming that the Scratch installation would include a VM and with the > Scratch plugins, and that you would not want other installations of VMs to > affect the Scratch application. Is that right? The "nuscratch" package comes with the following files (besides some other files). The thing is that the package seems to have dependency on the scratch package, which in turn has dependency on squeak-vm. Note that both /usr/bin/squeak and /usr/bin/scratch are replaced with the ones that come in the nuscratch package and old ones are renamed to /usr/bin/squeak.old and /usr/bin/scratch.old. Yes, I think it is good that the nuscratch package only replaces /usr/bin/scratch, and not depend on the squeak-vm package. nuscratch: /usr/bin/scratch nuscratch: /usr/bin/squeak nuscratch: /usr/lib/squeak/5.0-3663/LocalePlugin nuscratch: /usr/lib/squeak/5.0-3663/Squeak3D nuscratch: /usr/lib/squeak/5.0-3663/SqueakFFIPrims nuscratch: /usr/lib/squeak/5.0-3663/SqueakSSL nuscratch: /usr/lib/squeak/5.0-3663/UUIDPlugin nuscratch: /usr/lib/squeak/5.0-3663/UnicodePlugin nuscratch: /usr/lib/squeak/5.0-3663/UnixOSProcessPlugin nuscratch: /usr/lib/squeak/5.0-3663/WeDoPlugin nuscratch: /usr/lib/squeak/5.0-3663/XDisplayControlPlugin nuscratch: /usr/lib/squeak/5.0-3663/squeak nuscratch: /usr/lib/squeak/5.0-3663/vm-display-X11 nuscratch: /usr/lib/squeak/5.0-3663/vm-display-null nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-ALSA nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-OSS nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-null nuscratch: /usr/share/scratch/NuScratch02052016.image ... -- -- Yoshiki From ma.chris.m at gmail.com Mon May 16 22:47:59 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon May 16 22:48:41 2016 Subject: [squeak-dev] text selection broken Message-ID: Clicking beyond the end of a text is no longer responsive. I use it to quickly and easily select / deselect text in a workspaces. I keep thinking something has locked up.. Please do not break gross-motor gestures..! One of your changes Marcel? From asqueaker at gmail.com Mon May 16 23:24:15 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 16 23:24:57 2016 Subject: [squeak-dev] text selection broken In-Reply-To: References: Message-ID: > Please do not break gross-motor gestures..! Err, I mean, this gesture is a good one, we should keep it. :) From gettimothy at zoho.com Mon May 16 23:41:01 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 16 23:41:05 2016 Subject: [squeak-dev] Re: HelpBrowser openOn:topic page:???? In-Reply-To: <1463422606189-4895185.post@n4.nabble.com> References: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> <1463422606189-4895185.post@n4.nabble.com> Message-ID: <154bbf1b8a8.b0fb4dfb19083.3424966007713322384@zoho.com> Hi Marcel, Thank you for your time and reply. I understand what the openOn: method does. Here is what I would like to do... In my CustomHelp subclass: #CMakeVMMakerSqueakHelp I have the class side method pages ^#(overview prerequisites namingConventions ) When I run HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp it opens the HelpBrowser just fine and the pages appear in the left hand panel. What I would like to do is have it select the namingConventions page Something like: HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp page: #namingConventions If the functionality does not exist, so be it. I may try adding it at another time. cheers, tty ---- On Mon, 16 May 2016 14:16:46 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- Hi Timothy, this help system consists of help topics, which form a hierarchy. Each such topic has text content. Given this, there is no distinction between "topic" and "page". There are just topics. As you have correctly found out, you can open any help topic via HelpBrowser class >> #openOn:. This works with all arguments that understand #asHelpTopic and are hence able to represent themselves in the right format. You can browse implementors of #asHelpTopic for more details. While you can open any help topic (in any tree of topics) with the help browser, you are right, it might be helpful to open some "root topic" and select some sub topic in it. I guess that's the "page" you are referring to. :-) Here is an example on how to do that: (HelpBrowser openOn: HelpOnHelp) model showTopicThat: [:topic | topic title beginsWith: 'API']. This iterates the help structure until one topic returns "true". It's like #detect:. It selects the result. However, there can be a problem with writing such code because display strings tend to be translated and changed. Therfore, help topics can have a #key property to encode an id to refer to in that block. If there is no key, you have to check for another property. You might wonder, why this is so. Well, the creation of help topics is a dynamic process. There is, for example, SWikiHelp, which fetches Web content and parses sub-topics. So, we have to search for the topic to show, instead of directly referring to it object-wise. If you get access to an instance of HelpTopic, you can read it, but it might not be valid for a long time because the Help Browser can update its caches. Best, Marcel -- View this message in context: http://forum.world.st/HelpBrowser-openOn-topic-page-tp4895008p4895185.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160516/b4224433/attachment.htm From Yoshiki.Ohshima at acm.org Mon May 16 23:44:51 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 16 23:44:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> Message-ID: My suggested change to /usr/bin/scratch would look like attached diff. Basically, it brings in the part to figure out the right LD_LIBRARY_PATH based on the VM's architecture, add a way to specify the display vm module, add a way to specify display module options, and finally figures out the need for -compositioninput based on the XMODIFIERS environment variable. On Mon, May 16, 2016 at 3:28 PM, Yoshiki Ohshima wrote: > On Mon, May 16, 2016 at 1:23 PM, David T. Lewis wrote: >> I have not actually looked at the /usr/bin/scratch script, but I do know >> that the use of /usr/bin/squeak (or /usr/local/bin/squeak) is already >> overloaded depending on what flavor of VM was installed most recently. I >> suspect that it would be better to have a /usr/bin/scratch script that >> does exactly what you want it to do, possibly not relying at all on the >> /usr/bin/squeak script. >> >> Tim, when someone installs Scratch on their Pi, does that installation >> include the VM? Or does it expect a VM to be installed separately? I am >> assuming that the Scratch installation would include a VM and with the >> Scratch plugins, and that you would not want other installations of VMs to >> affect the Scratch application. Is that right? > > The "nuscratch" package comes with the following files (besides some > other files). The thing is that the package seems to have dependency > on the scratch package, which in turn has dependency on squeak-vm. > Note that both /usr/bin/squeak and /usr/bin/scratch are replaced with > the ones that come in the nuscratch package and old ones are renamed > to /usr/bin/squeak.old and /usr/bin/scratch.old. > > Yes, I think it is good that the nuscratch package only replaces > /usr/bin/scratch, and not depend on the squeak-vm package. > > nuscratch: /usr/bin/scratch > nuscratch: /usr/bin/squeak > nuscratch: /usr/lib/squeak/5.0-3663/LocalePlugin > nuscratch: /usr/lib/squeak/5.0-3663/Squeak3D > nuscratch: /usr/lib/squeak/5.0-3663/SqueakFFIPrims > nuscratch: /usr/lib/squeak/5.0-3663/SqueakSSL > nuscratch: /usr/lib/squeak/5.0-3663/UUIDPlugin > nuscratch: /usr/lib/squeak/5.0-3663/UnicodePlugin > nuscratch: /usr/lib/squeak/5.0-3663/UnixOSProcessPlugin > nuscratch: /usr/lib/squeak/5.0-3663/WeDoPlugin > nuscratch: /usr/lib/squeak/5.0-3663/XDisplayControlPlugin > nuscratch: /usr/lib/squeak/5.0-3663/squeak > nuscratch: /usr/lib/squeak/5.0-3663/vm-display-X11 > nuscratch: /usr/lib/squeak/5.0-3663/vm-display-null > nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-ALSA > nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-OSS > nuscratch: /usr/lib/squeak/5.0-3663/vm-sound-null > nuscratch: /usr/share/scratch/NuScratch02052016.image > ... > > > > -- > -- Yoshiki -- -- Yoshiki -------------- next part -------------- *** /usr/bin/scratch Fri Jan 15 03:07:43 2016 --- scratch Mon May 16 23:13:52 2016 *************** *** 5,13 **** # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM="/usr/bin/squeak" IMAGE="/usr/share/scratch/NuScratch15012016.image" IMOPTIONS="" DOCUMENT="" WRAPPER="sudo -E " # prevent wiringPi from terminating brutally --- 5,14 ---- # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM=`echo /usr/lib/squeak/5.0-*/squeak|sort -r | head -1` IMAGE="/usr/share/scratch/NuScratch15012016.image" IMOPTIONS="" + DISPLAYMODULE=-vm-display-X11 DOCUMENT="" WRAPPER="sudo -E " # prevent wiringPi from terminating brutally *************** *** 28,34 **** { echo "Usage: scratch [--param value] [-vmopt value] [arg value]" echo " where --param is --vm, --image, or --document;" ! echo " -vmopt is an option passed to the Squeak VM;" echo " and args are passed to the Squeak image." } --- 29,36 ---- { echo "Usage: scratch [--param value] [-vmopt value] [arg value]" echo " where --param is --vm, --image, or --document;" ! echo " -display-module is an option to specify a vm display module;" ! echo " -displayopt is an option passed to the display module;" echo " and args are passed to the Squeak image." } *************** *** 58,64 **** *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in --- 60,66 ---- *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in *************** *** 67,73 **** *) IMAGE="$PWD/$2" ;; esac ! shift ;; --vm) case "$2" in --- 69,79 ---- *) IMAGE="$PWD/$2" ;; esac ! shift ! ;; ! -vmopt) ! VMOPTIONS="$VMOPTIONS $2" ! shift ;; --vm) case "$2" in *************** *** 78,84 **** esac shift ;; ! -*) VMOPTIONS="$VMOPTIONS $1 $2" shift ;; *) IMOPTIONS="$IMOPTIONS $1 $2" --- 84,93 ---- esac shift ;; ! -display-module) DISPLAYMODULE="$2" ! shift ! ;; ! -displayopt) DISPLAYOPTIONS="$DISPLAYOPTIONS $2" shift ;; *) IMOPTIONS="$IMOPTIONS $1 $2" *************** *** 99,105 **** sudo modprobe i2c-dev fi # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS ! exec $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS --- 108,141 ---- sudo modprobe i2c-dev fi + BIN=`/usr/bin/dirname $VM` + # At least on linux LD_LIBRARY_PATH's components must be absolute path names + case "$BIN" in + /*) PLUGINS="$BIN";; + *) PLUGINS="`pwd`/$BIN" + esac + + # On some linuxes there multiple versions of the C library. If the image uses + # libc (e.g. through the FFI) then it must use the same version that the VM uses + # and so it should take precedence over /lib libc. This is done by setting + # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM. + LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`" + case "$LIBC_SO" in + /lib/arm-linux-gnueabihf/libc*) \ + SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";; + "") case `/bin/uname -m || /usr/bin/uname -m` in + *) echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2 + esac + exit 1;; + *) echo "Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for $LIBC_SO to $0. Please report your edit to squeak vm-dev." 1>&2 + exit 1 + esac + + if echo $XMODIFIERS | grep '@im='; then + DISPLAYOPTIONS="$DISPLAYOPTIONS -compositioninput" + fi + # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER $VM $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS $IMAGE $DOCUMENT $IMOPTIONS ! exec env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER "$VM" $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS "$IMAGE" "$DOCUMENT" $IMOPTIONS From tim at rowledge.org Mon May 16 23:55:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 16 23:55:03 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> Message-ID: <194BA6D6-7404-4925-A119-D4E715C0841C@rowledge.org> NuScratch is not at all properly packaged so far as I?m aware. I simply zip up all the relevant files and dump them on the Pi people, they install them in the Raspbian releases and there you are. So, no dependencies on packages, no users installing it, no complications of multiple VMs. It?s all there ready to run as soon as you boot. As for the two shell scripts? they?re hacked up versions of the mess I inherited. In my view the /usr/bin/scratch script should gather up all the scratch specific settings, variable, paths and pass them onto the /usr/bin/squeak script which should run the appropriate vm under the appropriate settings with the given image and possible extra options. If someone has a better way to do it I?m very happy to learn. There are no faffing arounds with working out cpu architecture etc since we just don?t care about anyone not smart enough to run on a Pi :-) And if anyone is worrying about licenses etc (I know they?re out there; just like Zombies in the movies, they?re *always out there*) please don?t ask me. Not my issue; my views on license stuff are well scatted across the net and are probably not safe for the faint of heart. Email the Raspberry Pi Foundation and talk to them. Oh, and Yoshiki, you have an out of date version. Fetch a new copy of Raspbian... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Four wheels move the body. Two wheels move the soul From Yoshiki.Ohshima at acm.org Tue May 17 00:01:43 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 17 00:01:46 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <194BA6D6-7404-4925-A119-D4E715C0841C@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> <194BA6D6-7404-4925-A119-D4E715C0841C@rowledge.org> Message-ID: On Mon, May 16, 2016 at 4:55 PM, tim Rowledge wrote: > NuScratch is not at all properly packaged so far as I?m aware. I simply zip up all the relevant files and dump them on the Pi people, they install them in the Raspbian releases and there you are. So, no dependencies on packages, no users installing it, no complications of multiple VMs. It?s all there ready to run as soon as you boot. > > As for the two shell scripts? they?re hacked up versions of the mess I inherited. In my view the /usr/bin/scratch script should gather up all the scratch specific settings, variable, paths and pass them onto the /usr/bin/squeak script which should run the appropriate vm under the appropriate settings with the given image and possible extra options. If someone has a better way to do it I?m very happy to learn. > > There are no faffing arounds with working out cpu architecture etc since we just don?t care about anyone not smart enough to run on a Pi :-) And if anyone is worrying about licenses etc (I know they?re out there; just like Zombies in the movies, they?re *always out there*) please don?t ask me. Not my issue; my views on license stuff are well scatted across the net and are probably not safe for the faint of heart. Email the Raspberry Pi Foundation and talk to them. > > Oh, and Yoshiki, you have an out of date version. Fetch a new copy of Raspbian... Oh, shoot. Are you talking about "May-10" version? I am just now trying apt-get dist-upgrade but would it update /usr/bin/scratch? In any case, at least the patch attached to my last email captures the change that is needed and get rid of the need to call /usr/bin/squeak. So adapting this should not be hard. -- -- Yoshiki From tim at rowledge.org Tue May 17 00:07:24 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue May 17 00:07:24 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> <194BA6D6-7404-4925-A119-D4E715C0841C@rowledge.org> Message-ID: <8454D41B-681C-44F2-9510-3257A4530A8C@rowledge.org> > On 16-05-2016, at 5:01 PM, Yoshiki Ohshima wrote: > > Oh, shoot. Are you talking about "May-10" version? I am just now > trying apt-get dist-upgrade but would it update /usr/bin/scratch? Yup. upgrade etc *ought* to work but I too often read of problems, so I just fetch a full release and so on. I guess you might try specifically updating nuscratch (can you do that? I dunno, probably too logical for unix), though you ought to get the pigpio libraries/daemon as well or the gpio server will not work. > > In any case, at least the patch attached to my last email captures the > change that is needed and get rid of the need to call /usr/bin/squeak. > So adapting this should not be hard. > > > > -- > -- Yoshiki > > tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Both.." said Pooh, as the guillotine came down From leves at caesar.elte.hu Tue May 17 01:07:37 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue May 17 01:07:41 2016 Subject: [squeak-dev] text selection broken In-Reply-To: References: Message-ID: It still works for me. Levente On Mon, 16 May 2016, Chris Muller wrote: > Clicking beyond the end of a text is no longer responsive. > > I use it to quickly and easily select / deselect text in a workspaces. > > I keep thinking something has locked up.. > > Please do not break gross-motor gestures..! > > One of your changes Marcel? > > From Yoshiki.Ohshima at acm.org Tue May 17 01:27:06 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 17 01:27:10 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <8454D41B-681C-44F2-9510-3257A4530A8C@rowledge.org> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <28774.136.1.1.113.1463430231.squirrel@webmail.msen.com> <194BA6D6-7404-4925-A119-D4E715C0841C@rowledge.org> <8454D41B-681C-44F2-9510-3257A4530A8C@rowledge.org> Message-ID: Okay. I think dist-upgrade did it and here is a new patch that is against the latest /usr/bin/scratch: On Mon, May 16, 2016 at 5:07 PM, tim Rowledge wrote: > >> On 16-05-2016, at 5:01 PM, Yoshiki Ohshima wrote: >> >> Oh, shoot. Are you talking about "May-10" version? I am just now >> trying apt-get dist-upgrade but would it update /usr/bin/scratch? > > Yup. upgrade etc *ought* to work but I too often read of problems, so I just fetch a full release and so on. I guess you might try specifically updating nuscratch (can you do that? I dunno, probably too logical for unix), though you ought to get the pigpio libraries/daemon as well or the gpio server will not work. > >> >> In any case, at least the patch attached to my last email captures the >> change that is needed and get rid of the need to call /usr/bin/squeak. >> So adapting this should not be hard. >> >> >> >> -- >> -- Yoshiki >> >> > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > "Both.." said Pooh, as the guillotine came down > > > -- -- Yoshiki -------------- next part -------------- *** /usr/bin/scratch 2016-05-02 18:38:55.000000000 +0000 --- scratch 2016-05-17 01:24:53.503234451 +0000 *************** *** 5,13 **** # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM="/usr/bin/squeak" ! IMAGE="/usr/share/scratch/NuScratch02052016.image" IMOPTIONS="" DOCUMENT="" WRAPPER="" #set to 1 to work around OLPC bug #8008 --- 5,14 ---- # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM=`echo /usr/lib/squeak/5.0-*/squeak|sort -r | head -1` ! IMAGE="/usr/share/scratch/NuScratch15012016.image" IMOPTIONS="" + DISPLAYMODULE=-vm-display-X11 DOCUMENT="" WRAPPER="" #set to 1 to work around OLPC bug #8008 *************** *** 26,32 **** { echo "Usage: scratch [--param value] [-vmopt value] [arg value]" echo " where --param is --vm, --image, or --document;" ! echo " -vmopt is an option passed to the Squeak VM;" echo " and args are passed to the Squeak image." } --- 27,34 ---- { echo "Usage: scratch [--param value] [-vmopt value] [arg value]" echo " where --param is --vm, --image, or --document;" ! echo " -display-module is an option to specify a vm display module;" ! echo " -displayopt is an option passed to the display module;" echo " and args are passed to the Squeak image." } *************** *** 56,62 **** *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in --- 58,64 ---- *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in *************** *** 65,71 **** *) IMAGE="$PWD/$2" ;; esac ! shift ;; --vm) case "$2" in --- 67,77 ---- *) IMAGE="$PWD/$2" ;; esac ! shift ! ;; ! -vmopt) ! VMOPTIONS="$VMOPTIONS $2" ! shift ;; --vm) case "$2" in *************** *** 76,82 **** esac shift ;; ! -*) VMOPTIONS="$VMOPTIONS $1 $2" shift ;; *) IMOPTIONS="$IMOPTIONS $1 $2" --- 82,91 ---- esac shift ;; ! -display-module) DISPLAYMODULE="$2" ! shift ! ;; ! -displayopt) DISPLAYOPTIONS="$DISPLAYOPTIONS $2" shift ;; *) IMOPTIONS="$IMOPTIONS $1 $2" *************** *** 101,112 **** PIGPIOD_ACTIVE=$? sudo systemctl start pigpiod # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS ! $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS if [ $PIGPIOD_ACTIVE -ne 0 ]; then sudo systemctl stop pigpiod fi - --- 110,148 ---- PIGPIOD_ACTIVE=$? sudo systemctl start pigpiod + + BIN=`/usr/bin/dirname $VM` + # At least on linux LD_LIBRARY_PATH's components must be absolute path names + case "$BIN" in + /*) PLUGINS="$BIN";; + *) PLUGINS="`pwd`/$BIN" + esac + + # On some linuxes there multiple versions of the C library. If the image uses + # libc (e.g. through the FFI) then it must use the same version that the VM uses + # and so it should take precedence over /lib libc. This is done by setting + # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM. + LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`" + case "$LIBC_SO" in + /lib/arm-linux-gnueabihf/libc*) \ + SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";; + "") case `/bin/uname -m || /usr/bin/uname -m` in + *) echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2 + esac + exit 1;; + *) echo "Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for $LIBC_SO to $0. Please report your edit to squeak vm-dev." 1>&2 + exit 1 + esac + + if echo $XMODIFIERS | grep '@im='; then + DISPLAYOPTIONS="$DISPLAYOPTIONS -compositioninput" + fi + # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER $VM $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS $IMAGE $DOCUMENT $IMOPTIONS ! env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER "$VM" $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS "$IMAGE" "$DOCUMENT" $IMOPTIONS if [ $PIGPIOD_ACTIVE -ne 0 ]; then sudo systemctl stop pigpiod fi From asqueaker at gmail.com Tue May 17 02:05:07 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 17 02:05:52 2016 Subject: [squeak-dev] text selection broken In-Reply-To: References: Message-ID: Are you running the latest updates to 15956? I just verified it against a Squeak5.1-15113 (with stock preferences). Before updating, clicking *below* the last line of any text or code pane works normally. After updating, it doesn't. On Mon, May 16, 2016 at 8:07 PM, Levente Uzonyi wrote: > It still works for me. > > Levente > > > On Mon, 16 May 2016, Chris Muller wrote: > >> Clicking beyond the end of a text is no longer responsive. >> >> I use it to quickly and easily select / deselect text in a workspaces. >> >> I keep thinking something has locked up.. >> >> Please do not break gross-motor gestures..! >> >> One of your changes Marcel? >> >> > From lists at fniephaus.com Tue May 17 08:03:24 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Tue May 17 08:03:36 2016 Subject: [squeak-dev] How do we build a new Squeak trunk image? Message-ID: Hi all, I'm trying to understand how we build a new Squeak trunk image. AFAIK, a Jenkins projects [1] runs squeak-ci [2] to build a new image, but I'm not sure I have figured everything out that happens during the build process. I guess squeak-ci opens an older Squeak image, updates it using the MCMcmUpdater and then saves the new version. Or is there anything else that I am missing? Best, Fabio [1] http://build.squeak.org/job/Trunk/ [2] https://github.com/squeak-smalltalk/squeak-ci -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160517/bfd798aa/attachment.htm From leves at caesar.elte.hu Tue May 17 08:15:54 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue May 17 08:16:00 2016 Subject: [squeak-dev] text selection broken In-Reply-To: References: Message-ID: On Mon, 16 May 2016, Chris Muller wrote: > Are you running the latest updates to 15956? I just verified it > against a Squeak5.1-15113 (with stock preferences). Before updating, > clicking *below* the last line of any text or code pane works > normally. After updating, it doesn't. You're right. If the code pane has extra space below the text, then clicking there won't select anything. Clicking the empty area in the last line still works though. Levente > > On Mon, May 16, 2016 at 8:07 PM, Levente Uzonyi wrote: >> It still works for me. >> >> Levente >> >> >> On Mon, 16 May 2016, Chris Muller wrote: >> >>> Clicking beyond the end of a text is no longer responsive. >>> >>> I use it to quickly and easily select / deselect text in a workspaces. >>> >>> I keep thinking something has locked up.. >>> >>> Please do not break gross-motor gestures..! >>> >>> One of your changes Marcel? >>> >>> >> > > From Marcel.Taeumel at hpi.de Tue May 17 08:45:05 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 09:21:02 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: References: Message-ID: <1463474705059-4895300.post@n4.nabble.com> Hi, there. Yes, I changed that to address an issue with method templates and the focus *not* following the mouse cursor but requiring a click: http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-td4894605.html We can discuss the impact of such trade-off but let me first explain the technical perspective and the offer some alternatives to the issues at hand. A mouse click in a pluggable text morph can target three different areas: A) Inside text (lines), inside text morph, inside pluggable text morph B) Outside text (lines), inside text morph, inside pluggable text morph C) Outside text (lines), outside text morph, inside pluggable text morph Here is the situation for method templates: Here is the situation with a method that is larger than the screen space available: Here is the situation with a one-liner, for example, our world search bar: Before my change in Morphic-mt.1144, B and C provided the same behavior. Now, C does nothing to the text selection while B still does. Now, a large area C helps for extending the behavior of B. Note that we still have CMD+A to select the whole text and I assume we follow a bi-manual interaction scheme using both keyboard and mouse on a regular basis. Additionally, I noticed a strong interest in good keyboard shortcuts around here. :-) So, I see the following options here: 1) Make C only behave differently to B when the focus does not follow the mouse cursor. Either way, make C behave like B when facing a one-line text morph such as our search bar. 2) Always make C behave like B and ignore the issue with the method template. 3) Keep it as it is now, meaning C is always different to B. You votes? Best, Marcel -- View this message in context: http://forum.world.st/text-selection-broken-tp4895226p4895300.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 17 08:49:56 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 09:25:55 2016 Subject: [squeak-dev] Re: How do we build a new Squeak trunk image? In-Reply-To: References: Message-ID: <1463474996484-4895306.post@n4.nabble.com> Hi Fabio, after may latest refactorings to the ReleaseBuilder, let me point you to ReleaseBuilder >> #prepareNextVersionAlpha. Basically, you are right. You just have to update the previous trunk. If you made more changes, you might want to restore preferences and reset caches. Best, Marcel -- View this message in context: http://forum.world.st/How-do-we-build-a-new-Squeak-trunk-image-tp4895272p4895306.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 17 08:54:26 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 09:30:23 2016 Subject: [squeak-dev] Re: HelpBrowser openOn:topic page:???? In-Reply-To: <154bbf1b8a8.b0fb4dfb19083.3424966007713322384@zoho.com> References: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> <1463422606189-4895185.post@n4.nabble.com> <154bbf1b8a8.b0fb4dfb19083.3424966007713322384@zoho.com> Message-ID: <1463475266355-4895307.post@n4.nabble.com> Hi Timothy, for this case, this should work: (HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp) model showTopicThat: [:topic | topic key = #namingConventions]. Yes, you can add a shortcut like #openOn:page: if you want to. :-) Best, Marcel -- View this message in context: http://forum.world.st/HelpBrowser-openOn-topic-page-tp4895008p4895307.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Tue May 17 10:05:04 2016 From: gettimothy at zoho.com (gettimothy) Date: Tue May 17 10:05:10 2016 Subject: [squeak-dev] Re: HelpBrowser openOn:topic page:???? In-Reply-To: <1463475266355-4895307.post@n4.nabble.com> References: <154b59380bc.ee7bd51d53636.763669592074563015@zoho.com> <1463422606189-4895185.post@n4.nabble.com> <154bbf1b8a8.b0fb4dfb19083.3424966007713322384@zoho.com> <1463475266355-4895307.post@n4.nabble.com> Message-ID: <154be2d1030.c6d9c7051205.3542835542937053787@zoho.com> Hi Marcel, My apologies I replied before trying your code. (HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp) model showTopicThat: [:topic | topic key = #namingConventions]. Is exactly what I am looking for. If you are the maintainer of the Help System then this information would be useful in one of the pages in this section here: (HelpBrowser openOn: HelpHowToHelpTopics) model showTopicThat: [:topic | topic key = #page5]. Since the functionality exists, I will look into (when I get time) creating the functionality that exists in the Search Results where (open topic) "hyperlinks" are created. thank you for your time. tty ---- On Tue, 17 May 2016 04:54:26 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- Hi Timothy, for this case, this should work: (HelpBrowser openOn: CMakeVMMakerSqueakOverviewHelp) model showTopicThat: [:topic | topic key = #namingConventions]. Yes, you can add a shortcut like #openOn:page: if you want to. :-) Best, Marcel -- View this message in context: http://forum.world.st/HelpBrowser-openOn-topic-page-tp4895008p4895307.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160517/ab61fc40/attachment.htm From commits at source.squeak.org Tue May 17 12:20:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 17 12:20:46 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.174.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.174.mcz ==================== Summary ==================== Name: MorphicExtras-mt.174 Author: mt Time: 17 May 2016, 2:20:29.347089 pm UUID: b22e6fc2-bfaf-de4f-930c-c192fc6dacd0 Ancestors: MorphicExtras-mt.173 Add a simple check whether there are flaps visible in a world. =============== Diff against MorphicExtras-mt.173 =============== Item was added: + ----- Method: Flaps class>>anyFlapsVisibleIn: (in category 'testing') ----- + anyFlapsVisibleIn: aWorld + + aWorld submorphsDo: [:m | + (m isKindOf: FlapTab) ifTrue: [^ true]]. + + ^ false! From commits at source.squeak.org Tue May 17 12:25:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 17 12:25:04 2016 Subject: [squeak-dev] The Trunk: System-mt.830.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.830.mcz ==================== Summary ==================== Name: System-mt.830 Author: mt Time: 17 May 2016, 2:24:39.256089 pm UUID: 7cf55fb7-9e1f-5c45-baf8-eb29fcf2ac91 Ancestors: System-mt.829 Fixes a bug where space was reserved for flaps when positioning windows although no flaps were visible at all. Now, the preference #fullScreenLeavesDeskMargins works as expected. =============== Diff against System-mt.829 =============== Item was changed: ----- Method: RealEstateAgent class>>maximumUsableAreaInWorld: (in category 'accessing') ----- maximumUsableAreaInWorld: aWorldOrNil | allowedArea | allowedArea := Display usableArea. aWorldOrNil ifNotNil: [ allowedArea := allowedArea intersect: aWorldOrNil visibleClearArea. + Smalltalk isMorphic ifTrue: [ + (((Smalltalk classNamed: 'Flaps') ifNil: [false] ifNotNil: [:cls | cls anyFlapsVisibleIn: aWorldOrNil]) + and: [self respondsTo: #reduceByFlaps:]) + ifTrue: [allowedArea := self reduceByFlaps: allowedArea]]]. - ]. - (Smalltalk isMorphic and: [self respondsTo: #reduceByFlaps:]) ifTrue: - [allowedArea := self reduceByFlaps: allowedArea]. ^allowedArea! From bert at freudenbergs.de Tue May 17 14:18:39 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 17 14:18:39 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: <1463474705059-4895300.post@n4.nabble.com> References: <1463474705059-4895300.post@n4.nabble.com> Message-ID: <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> On 17.05.2016, at 10:45, marcel.taeumel wrote: > > I see the following options here: > > 1) Make C only behave differently to B when the focus does not follow the > mouse cursor. Either way, make C behave like B when facing a one-line text > morph such as our search bar. > 2) Always make C behave like B and ignore the issue with the method > template. > 3) Keep it as it is now, meaning C is always different to B. > > You votes? IMHO it shouldn?t matter if you click in A, B, or C. And I?m not sure what the special issue with the template is. When focus-follows-mouse is disabled, the first click should only set the focus and not change the selection no matter where you click. When focus-follows-mouse is enabled, the field is already focused. In both cases, clicking in a focused text field will then change the selection. Wouldn?t that be the simplest option? AFAICT that?s how text fields work in general (outside Squeak). - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160517/e8476c8a/smime.bin From bert at freudenbergs.de Tue May 17 14:29:44 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 17 14:29:44 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: <4F68BDFB-9214-4DCA-B5D4-13BCD450A3CB@freudenbergs.de> > On 16.05.2016, at 19:06, Yoshiki Ohshima wrote: > > On Mon, May 16, 2016 at 10:04 AM, tim Rowledge wrote: >> Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? > > It should work for any other languages that ibus or scim can handle. > Yes, it will be usable with the on-screen keyboard. Would it be feasible to make the VM primitives generic? That is, do not call it ?ImmX11Plugin? but e.g. ?KeyboardPlugin? and the ?focus? primitive would be called whenever a text field is focused, and the image would pass the cursor position as arguments (plus possibly the text field bounds). Then we could implement the same primitives in e.g. the iOS or Android VMs to support the on-screen keyboard. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160517/29525b80/smime.bin From Yoshiki.Ohshima at acm.org Tue May 17 16:46:04 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 17 16:46:07 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <4F68BDFB-9214-4DCA-B5D4-13BCD450A3CB@freudenbergs.de> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <4F68BDFB-9214-4DCA-B5D4-13BCD450A3CB@freudenbergs.de> Message-ID: On Tue, May 17, 2016 at 7:29 AM, Bert Freudenberg wrote: > >> On 16.05.2016, at 19:06, Yoshiki Ohshima wrote: >> >> On Mon, May 16, 2016 at 10:04 AM, tim Rowledge wrote: >>> Forgive me if I?m being hopelessly naive here, but does this text input mechanism work for other languages too? Would it, for example, be usable as an on-screen keyboard for theRaspberry Pi lcd touchscreen? >> >> It should work for any other languages that ibus or scim can handle. >> Yes, it will be usable with the on-screen keyboard. > > Would it be feasible to make the VM primitives generic? That is, do not call it ?ImmX11Plugin? but e.g. ?KeyboardPlugin? and the ?focus? primitive would be called whenever a text field is focused, and the image would pass the cursor position as arguments (plus possibly the text field bounds). > > Then we could implement the same primitives in e.g. the iOS or Android VMs to support the on-screen keyboard. I think it's feasible in theory. Originally, we had separated primitives for different platforms and the dispatch was done in the image. But standard primitive sounds reasonable. On the practice side, The current ImmX11Plugin somehow got some Unix Locale features, which must have been added by for some reasons; it is is a bit overloaded and may require to disentangle them. -- -- Yoshiki From bernhard at pieber.com Tue May 17 17:28:45 2016 From: bernhard at pieber.com (Bernhard Pieber) Date: Tue May 17 17:28:49 2016 Subject: [squeak-dev] How do we build a new Squeak trunk image? In-Reply-To: References: Message-ID: <401A88E0-58F2-487D-8AA9-E20700A78A14@pieber.com> Hi Fabio, Here is how Eliot does it: [[[MCMcmUpdater defaultUpdateURL: 'http://source.squeak.org/trunk'; updateFromServer] valueSupplyingAnswer: true] on: Deprecation do: [:ex| ex resume: nil]] on: Warning do: [:ex| | text | text := ex messageText. ((text beginsWith: 'This package depends on the following classes') or: [text beginsWith: 'About to serialize an empty diffy version.']) ifFalse: [ex pass]. ex resume]. Smalltalk snapshot: true andQuit: true See: http://www.squeakvm.org/svn/squeak/branches/Cog/image/UpdateSqueakTrunkImage.st http://www.mirandabanda.org/cogblog/build-image/ Cheers, Bernhard > Am 17.05.2016 um 10:03 schrieb Fabio Niephaus : > > Hi all, > > I'm trying to understand how we build a new Squeak trunk image. > AFAIK, a Jenkins projects [1] runs squeak-ci [2] to build a new image, but I'm not sure I have > figured everything out that happens during the build process. > I guess squeak-ci opens an older Squeak image, updates it using the MCMcmUpdater and then > saves the new version. Or is there anything else that I am missing? > > Best, > Fabio > > [1] http://build.squeak.org/job/Trunk/ > [2] https://github.com/squeak-smalltalk/squeak-ci From Marcel.Taeumel at hpi.de Tue May 17 18:22:39 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 18:58:46 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> References: <1463474705059-4895300.post@n4.nabble.com> <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> Message-ID: <1463509359363-4895473.post@n4.nabble.com> Hi Bert, this would make list interaction awkward. Having to double-click an item if it is in another list... :-/ I think that such extra activation, as configurable for system windows, is neither necessary nor convenient for widgets. I just tried it out with the Firefox address bar, it directly sets the text cursor. It is not even capable of keeping the selection if not focused. :-D Best, Marcel -- View this message in context: http://forum.world.st/text-selection-broken-tp4895226p4895473.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Tue May 17 19:19:05 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 17 19:19:08 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: <1463509359363-4895473.post@n4.nabble.com> References: <1463474705059-4895300.post@n4.nabble.com> <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> <1463509359363-4895473.post@n4.nabble.com> Message-ID: On 17.05.2016, at 20:22, marcel.taeumel wrote: > > Hi Bert, > > this would make list interaction awkward. Having to double-click an item if > it is in another list... :-/ I think that such extra activation, as > configurable for system windows, is neither necessary nor convenient for > widgets. I thought we were talking about text, not lists. > I just tried it out with the Firefox address bar, it directly sets the text > cursor. It is not even capable of keeping the selection if not focused. :-D On the Mac, the first click in the address bar activates the window. The second sets the cursor. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160517/fe7f88c5/smime.bin From Marcel.Taeumel at hpi.de Tue May 17 20:28:33 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 21:04:35 2016 Subject: [squeak-dev] Event filters for user input events (i.e. mouse clicks etc.) Message-ID: <1463516913916-4895521.post@n4.nabble.com> Hi, there. Here is a change set that adds event filters to Squeak: event-filters.cs It is implemented like event listeners but with a spearation between global event filters in the HandMorph and local event filters in any other Morph. Both event filters and event listeners do only work on event copies to not interfere with regular event dispatching. Such bugs would be quite challenging to hunt down. Here is a usage example: m := ActiveWorld submorphs third. "some system window" filter := PluggableEventFilter new on: [:evt :target | Transcript showln: evt printString. false]. m addEventFilter: filter. m removeEventFilter: filter. m addKeyboardFilter: filter. Just like event listeners, there are generic event filters, mouse event filters, and keyboard event filters. All filter objects are weakly referenced - just like event filters. Where to use event filters? - Processing global keyboard shortcuts and avoiding some other Morph to handle the same key - Temporarily disable specific events for a morph from the outside The general idea is based on the Qt framework: http://doc.qt.io/qt-5/eventsandfilters.html#event-filters Do we want that in the Trunk? Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 17 20:32:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 17 21:08:42 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463516913916-4895521.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> Message-ID: <1463517162184-4895523.post@n4.nabble.com> Hi, there. I just noticed that event filters include the whole event listener functionality. If filters always return false, they behave like listeners. Plus, any morph can have its own set of filters attached. Anyway, old projects might depend on traditional event listeners with the #handleListenEvent: callback. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4895523.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Tue May 17 21:44:37 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 17 21:45:20 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: <1463474705059-4895300.post@n4.nabble.com> References: <1463474705059-4895300.post@n4.nabble.com> Message-ID: Hi Marcel, thanks for the good visual explanation. It does seem tempting, at least initially, given that we *can* make different behaviors for red-clicking in B or C, to maybe find some opportunity to extend some functionality.. However, such delineation of B from C comes at too much cost. First casualty is the "Add a new line of code to a method" use-case.. Its just *too common* that the user will click below the last line, often right where they wish to place the cursor to start typing the new line.. .. but since most methods did not end with a blank line, the effect is \nothing\, and there's this inevitable few seconds of disconcert where the system feels non-responsive.. Its a totally understandable confusion because, visually, all the user knows is they clicked inside the nougat of the text widget. They expected all of that area to be sensitive to input. A red-click there should be responsive. For it to not be so is truly a disruptive experience that pulls me right out of my thoughts. So, I guess I would vote for option 2, with a fallback vote for option 1. Wait, how about option 4? --> If Focus Follows Mouse and mouseOverForKeyboardFocus are both Disabled, then don't pre-select the contents of the method template, so when they click down there, it'll select it all and then they can just start typing..?? Even still, people who use Click For Focus are *accustomed* to having to make extra clicks, constantly, all the time..! mouseOverForKeyboardFocus is the only real way to de-couple widget focus from application input.. On Tue, May 17, 2016 at 3:45 AM, marcel.taeumel wrote: > Hi, there. > > Yes, I changed that to address an issue with method templates and the focus > *not* following the mouse cursor but requiring a click: > http://forum.world.st/The-Trunk-Morphic-mt-1144-mcz-td4894605.html > > We can discuss the impact of such trade-off but let me first explain the > technical perspective and the offer some alternatives to the issues at hand. > > A mouse click in a pluggable text morph can target three different areas: > A) Inside text (lines), inside text morph, inside pluggable text morph > B) Outside text (lines), inside text morph, inside pluggable text morph > C) Outside text (lines), outside text morph, inside pluggable text morph > > Here is the situation for method templates: > > > Here is the situation with a method that is larger than the screen space > available: > > > Here is the situation with a one-liner, for example, our world search bar: > > > Before my change in Morphic-mt.1144, B and C provided the same behavior. > Now, C does nothing to the text selection while B still does. Now, a large > area C helps for extending the behavior of B. Note that we still have CMD+A > to select the whole text and I assume we follow a bi-manual interaction > scheme using both keyboard and mouse on a regular basis. Additionally, I > noticed a strong interest in good keyboard shortcuts around here. :-) > > So, I see the following options here: > > 1) Make C only behave differently to B when the focus does not follow the > mouse cursor. Either way, make C behave like B when facing a one-line text > morph such as our search bar. > 2) Always make C behave like B and ignore the issue with the method > template. > 3) Keep it as it is now, meaning C is always different to B. > > You votes? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/text-selection-broken-tp4895226p4895300.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Tue May 17 21:52:35 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 17 21:53:18 2016 Subject: [squeak-dev] The Trunk: System-mt.830.mcz In-Reply-To: <573b0da2.4b45370a.1f781.ffffe9eeSMTPIN_ADDED_MISSING@mx.google.com> References: <573b0da2.4b45370a.1f781.ffffe9eeSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Nice! Turning off that preference has been broken forever... On Tue, May 17, 2016 at 7:24 AM, wrote: > Marcel Taeumel uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-mt.830.mcz > > ==================== Summary ==================== > > Name: System-mt.830 > Author: mt > Time: 17 May 2016, 2:24:39.256089 pm > UUID: 7cf55fb7-9e1f-5c45-baf8-eb29fcf2ac91 > Ancestors: System-mt.829 > > Fixes a bug where space was reserved for flaps when positioning windows although no flaps were visible at all. > > Now, the preference #fullScreenLeavesDeskMargins works as expected. > > =============== Diff against System-mt.829 =============== > > Item was changed: > ----- Method: RealEstateAgent class>>maximumUsableAreaInWorld: (in category 'accessing') ----- > maximumUsableAreaInWorld: aWorldOrNil > > | allowedArea | > allowedArea := Display usableArea. > aWorldOrNil ifNotNil: [ > allowedArea := allowedArea intersect: aWorldOrNil visibleClearArea. > + Smalltalk isMorphic ifTrue: [ > + (((Smalltalk classNamed: 'Flaps') ifNil: [false] ifNotNil: [:cls | cls anyFlapsVisibleIn: aWorldOrNil]) > + and: [self respondsTo: #reduceByFlaps:]) > + ifTrue: [allowedArea := self reduceByFlaps: allowedArea]]]. > - ]. > - (Smalltalk isMorphic and: [self respondsTo: #reduceByFlaps:]) ifTrue: > - [allowedArea := self reduceByFlaps: allowedArea]. > ^allowedArea! > > From commits at source.squeak.org Tue May 17 21:58:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 17 21:58:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160517215803.5580.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068122.html Name: MorphicExtras-mt.174 Ancestors: MorphicExtras-mt.173 Add a simple check whether there are flaps visible in a world. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068123.html Name: System-mt.830 Ancestors: System-mt.829 Fixes a bug where space was reserved for flaps when positioning windows although no flaps were visible at all. Now, the preference #fullScreenLeavesDeskMargins works as expected. ============================================= From nicolaihess at gmail.com Tue May 17 22:28:16 2016 From: nicolaihess at gmail.com (Nicolai Hess) Date: Tue May 17 22:28:18 2016 Subject: [squeak-dev] endless loop on debugging self or nil Message-ID: evaluating "self" in an inspector workspace pane or "nil" with "do it" "inspect it" works. But if you use "debug it", enters an endless loop. I opened a bug report for squeak (bugs.squeak.org) and on fogbugz for pharo. I am not sure this bug has the same cause in squeak and pharo, because the stack trace is different. On pharo, this behavior starts with version 50519 with integrating a fix for issue 17251 "Quick method primitive not set correctly for #spurVMHeader" but I don't think this is the real cause of this behavior. nicolai -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/e2563505/attachment.htm From eliot.miranda at gmail.com Wed May 18 00:52:46 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed May 18 00:52:52 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: References: <1463474705059-4895300.post@n4.nabble.com> <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> <1463509359363-4895473.post@n4.nabble.com> Message-ID: <9FD5B5E8-8398-4B9C-BFCC-B34EFA990AF0@gmail.com> > On May 17, 2016, at 12:19 PM, Bert Freudenberg wrote: > >> On 17.05.2016, at 20:22, marcel.taeumel wrote: >> >> Hi Bert, >> >> this would make list interaction awkward. Having to double-click an item if >> it is in another list... :-/ I think that such extra activation, as >> configurable for system windows, is neither necessary nor convenient for >> widgets. > > I thought we were talking about text, not lists. > >> I just tried it out with the Firefox address bar, it directly sets the text >> cursor. It is not even capable of keeping the selection if not focused. :-D > > On the Mac, the first click in the address bar activates the window. The second sets the cursor. The Mac being a platform that has strong consistent UI guidelines. Marcel, using Firefox (on Windows?) as an authority isn't that convincing. > > - Bert - > > > From Yoshiki.Ohshima at acm.org Wed May 18 01:29:59 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 18 01:30:02 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: On Mon, May 16, 2016 at 9:30 AM, Yoshiki Ohshima wrote: > At Sun, 15 May 2016 22:27:13 -0400, > David T. Lewis wrote: > >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> you please give his full name for the commit notice? I assume the patch >> is MIT licensed. > > I'll ask him about the license. Mr. Hachisuka stated that it is fine to use the MIT license for that code. -- -- Yoshiki From lewis at mail.msen.com Wed May 18 01:34:42 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 18 01:34:44 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: <20160518013442.GA56610@shell.msen.com> On Tue, May 17, 2016 at 06:29:59PM -0700, Yoshiki Ohshima wrote: > On Mon, May 16, 2016 at 9:30 AM, Yoshiki Ohshima > wrote: > > At Sun, 15 May 2016 22:27:13 -0400, > > David T. Lewis wrote: > > > >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can > >> you please give his full name for the commit notice? I assume the patch > >> is MIT licensed. > > > > I'll ask him about the license. > > Mr. Hachisuka stated that it is fine to use the MIT license for that code. Yoshiki, Thank you for confirming this. Dave From Marcel.Taeumel at hpi.de Wed May 18 06:07:50 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 18 06:43:55 2016 Subject: [squeak-dev] Re: text selection broken In-Reply-To: <9FD5B5E8-8398-4B9C-BFCC-B34EFA990AF0@gmail.com> References: <1463474705059-4895300.post@n4.nabble.com> <7D9B15A5-6D07-49A3-8D6A-4E46C768BC1C@freudenbergs.de> <1463509359363-4895473.post@n4.nabble.com> <9FD5B5E8-8398-4B9C-BFCC-B34EFA990AF0@gmail.com> Message-ID: <1463551670947-4895568.post@n4.nabble.com> Hi Eliot, an example is not an authority. :-) It is just some input for the discussion. So, what do the strong consistent UI guidelines on the Mac say about this? Best, Marcel -- View this message in context: http://forum.world.st/text-selection-broken-tp4895226p4895568.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Wed May 18 06:12:34 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 18 06:48:38 2016 Subject: [squeak-dev] Re: endless loop on debugging self or nil In-Reply-To: References: Message-ID: <1463551954022-4895569.post@n4.nabble.com> Hi Nicolas, when I select "debug it" on the expression "self" in a workspace of the code pane of an inspector, I get an information box saying "Nothign to debug; expression is optimized". Then a debugger pops up with a single frame "MethodContext >> #halt". I am working in the Cog Spur VM r3663 in Windows 10. No endless loop. Best, Marcel -- View this message in context: http://forum.world.st/endless-loop-on-debugging-self-or-nil-tp4895539p4895569.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed May 18 07:10:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 18 07:11:02 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1148.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1148.mcz ==================== Summary ==================== Name: Morphic-mt.1148 Author: mt Time: 18 May 2016, 9:09:28.46726 am UUID: 07784181-3cb6-0b41-b79a-f1af6919a9a1 Ancestors: Morphic-mt.1147 Next attempt to improve the support for not discarding existing selections when the text morph needs a mouse click to get keyboard focus. See: http://forum.world.st/text-selection-broken-td4895226.html =============== Diff against Morphic-mt.1147 =============== Item was changed: ----- Method: TextMorph>>mouseDown: (in category 'event handling') ----- mouseDown: evt "Make this TextMorph be the keyboard input focus, if it isn't already, and repond to the text selection gesture." evt yellowButtonPressed ifTrue: [ "First check for option (menu) click" ^ self yellowButtonActivity: evt shiftPressed]. + "If focus does not follow the mouse cursor and we click below everything, just grab the focus to not destroy the selection." + ((self hasKeyboardFocus: evt hand) not and: [(self bounds containsPoint: evt position) not]) + ifTrue: [evt hand newKeyboardFocus: self] + ifFalse: [ + evt hand newKeyboardFocus: self. + self + handleInteraction: [editor mouseDown: evt] + fromEvent: evt].! - evt hand newKeyboardFocus: self. - - (self bounds containsPoint: evt position) ifTrue: [ - self - handleInteraction: [editor mouseDown: evt] - fromEvent: evt].! From nicolaihess at gmail.com Wed May 18 07:42:38 2016 From: nicolaihess at gmail.com (Nicolai Hess) Date: Wed May 18 07:42:40 2016 Subject: [squeak-dev] Re: endless loop on debugging self or nil In-Reply-To: <1463551954022-4895569.post@n4.nabble.com> References: <1463551954022-4895569.post@n4.nabble.com> Message-ID: 2016-05-18 8:12 GMT+02:00 marcel.taeumel : > Hi Nicolas, > > when I select "debug it" on the expression "self" in a workspace of the > code > pane of an inspector, I get an information box saying "Nothign to debug; > expression is optimized". Then a debugger pops up with a single frame > "MethodContext >> #halt". > > I am working in the Cog Spur VM r3663 in Windows 10. > > No endless loop. > Yes, but only in the trunk image. If I load the all-in-one image (image version 15113) and update to the latest version (15117), I still get this endless loop. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/endless-loop-on-debugging-self-or-nil-tp4895539p4895569.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/bb519034/attachment.htm From Marcel.Taeumel at hpi.de Wed May 18 10:57:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 18 11:33:49 2016 Subject: [squeak-dev] [Please Test] Refactoring of System Window Behavior Message-ID: <1463569064877-4895669.post@n4.nabble.com> Hi, there! I did another refactoring of SystemWindow. It primarily addresses the changes around fall 2015, where we got the feature that background windows do not raise with any click while still being interactive and not locked. Here is the refactoring: all-windows-focus-refactoring.cs The preference to play around with are: - windows raise on click - windows accept input on first click - background windows lock title bar - focus follows mouse All present in the "windows" category in the preference browser. Best, Marcel -- View this message in context: http://forum.world.st/Please-Test-Refactoring-of-System-Window-Behavior-tp4895669.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Wed May 18 16:12:49 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed May 18 16:12:52 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463517162184-4895523.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> Message-ID: <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> > On 17-05-2016, at 1:32 PM, marcel.taeumel wrote: > > Hi, there. > > I just noticed that event filters include the whole event listener > functionality. If filters always return false, they behave like listeners. > Plus, any morph can have its own set of filters attached. I was about to mention that. It would make reasonable sense to replace the listeners with filters, assuming a tolerable legacy api can be supported. I?m not sure about having the filters work only on copies of events though. Seems to me that a significant part of the potential usefulness would be to have filters transform events either in the geometric sense of altering coordinates etc or in changing the other details (convert a Leap Motion input event coming in via socket into a mouse event, stuff like that) or even just dropping it entirely because it is a MouseEventForLockedDemo. Another use would be a fake event filter that reads lists of x/y/button and transforms into ?real? events as a way to handle recorded event stream for playback. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- His page was intentionally left blank. From Marcel.Taeumel at hpi.de Wed May 18 16:25:21 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Wed May 18 17:01:28 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> Message-ID: <1463588721564-4895797.post@n4.nabble.com> Hi, Tim. The idea of using event filters to actually transform events is interesting. How would a fake event filter be triggered if not by real events? Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4895797.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tonyg at ccs.neu.edu Wed May 18 20:02:27 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Wed May 18 20:02:30 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> Message-ID: On 05/18/2016 12:12 PM, tim Rowledge wrote: > Seems to me that a significant part of the potential > usefulness would be to have filters transform events [...] One interesting approach would be to take a leaf from functional programming. Instead of returning a boolean from a filter, you'd have it expect a continuation block. filter := PluggableEventFilter new on: [:e :target :k | Transcript showln: e printString. k value: e ]. It would invoke the block with some event, or not, according to the filtering decision. This gives it an opportunity to pass on either its argument; or a copy of its argument; or its argument, modified; or something unrelated. Tony From frank.shearar at gmail.com Wed May 18 20:46:54 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed May 18 20:46:58 2016 Subject: [squeak-dev] How do we build a new Squeak trunk image? In-Reply-To: References: Message-ID: On 17 May 2016 at 01:03, Fabio Niephaus wrote: > Hi all, > > I'm trying to understand how we build a new Squeak trunk image. > AFAIK, a Jenkins projects [1] runs squeak-ci [2] to build a new image, but > I'm not sure I have > figured everything out that happens during the build process. > I guess squeak-ci opens an older Squeak image, updates it using > the MCMcmUpdater and then > saves the new version. Or is there anything else that I am missing? > > That is the essential part of the process. The devil's in the details. If you look at https://github.com/squeak-smalltalk/squeak-ci/blob/master/update-image.st you'll see the script squeak-ci uses to update the image. Most of that file is nonsense like doing sensible things when you're offline, or handling the vagaries of changed protocols in MCMcmUpdater and various other things. And dumping out enormous amounts of debugging information. frank > Best, > Fabio > > [1] http://build.squeak.org/job/Trunk/ > [2] https://github.com/squeak-smalltalk/squeak-ci > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/85e594d8/attachment.htm From frank.shearar at gmail.com Wed May 18 20:49:35 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Wed May 18 20:49:36 2016 Subject: [squeak-dev] How do we build a new Squeak trunk image? In-Reply-To: References: Message-ID: On 18 May 2016 at 13:46, Frank Shearar wrote: > On 17 May 2016 at 01:03, Fabio Niephaus wrote: > >> Hi all, >> >> I'm trying to understand how we build a new Squeak trunk image. >> AFAIK, a Jenkins projects [1] runs squeak-ci [2] to build a new image, >> but I'm not sure I have >> figured everything out that happens during the build process. >> I guess squeak-ci opens an older Squeak image, updates it using >> the MCMcmUpdater and then >> saves the new version. Or is there anything else that I am missing? >> >> That is the essential part of the process. The devil's in the details. If > you look at > https://github.com/squeak-smalltalk/squeak-ci/blob/master/update-image.st > you'll see the script squeak-ci uses to update the image. Most of that file > is nonsense like doing sensible things when you're offline, or handling the > vagaries of changed protocols in MCMcmUpdater and various other things. And > dumping out enormous amounts of debugging information. > I should add that you _should_ need to just run "rake update_base_image" to have the process generate a fresh image. If that doesn't work, and you have followed the instructions on the README, please feel free to yell at the maintainers through a bug report. frank > frank > > >> Best, >> Fabio >> >> [1] http://build.squeak.org/job/Trunk/ >> [2] https://github.com/squeak-smalltalk/squeak-ci >> >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/2df7493b/attachment.htm From commits at source.squeak.org Wed May 18 21:58:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 18 21:58:15 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160518215812.28394.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068124.html Name: Morphic-mt.1148 Ancestors: Morphic-mt.1147 Next attempt to improve the support for not discarding existing selections when the text morph needs a mouse click to get keyboard focus. See: http://forum.world.st/text-selection-broken-td4895226.html ============================================= From lists at fniephaus.com Wed May 18 22:22:59 2016 From: lists at fniephaus.com (Fabio Niephaus) Date: Wed May 18 22:23:10 2016 Subject: [squeak-dev] How do we build a new Squeak trunk image? In-Reply-To: References: Message-ID: On Wed, May 18, 2016 at 10:49 PM Frank Shearar wrote: > On 18 May 2016 at 13:46, Frank Shearar wrote: > >> On 17 May 2016 at 01:03, Fabio Niephaus wrote: >> >>> Hi all, >>> >>> I'm trying to understand how we build a new Squeak trunk image. >>> AFAIK, a Jenkins projects [1] runs squeak-ci [2] to build a new image, >>> but I'm not sure I have >>> figured everything out that happens during the build process. >>> I guess squeak-ci opens an older Squeak image, updates it using >>> the MCMcmUpdater and then >>> saves the new version. Or is there anything else that I am missing? >>> >>> That is the essential part of the process. The devil's in the details. >> If you look at >> https://github.com/squeak-smalltalk/squeak-ci/blob/master/update-image.st >> you'll see the script squeak-ci uses to update the image. Most of that file >> is nonsense like doing sensible things when you're offline, or handling the >> vagaries of changed protocols in MCMcmUpdater and various other things. And >> dumping out enormous amounts of debugging information. >> > > I should add that you _should_ need to just run "rake update_base_image" > to have the process generate a fresh image. If that doesn't work, and you > have followed the instructions on the README, please feel free to yell at > the maintainers through a bug report. > > frank > > >> frank >> >> >>> Best, >>> Fabio >>> >>> [1] http://build.squeak.org/job/Trunk/ >>> [2] https://github.com/squeak-smalltalk/squeak-ci >>> >>> >>> >>> >>> >> Thanks for the pointers. I think I understand the process now! Fabio -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/717905db/attachment.htm From lewis at mail.msen.com Thu May 19 02:52:42 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 19 02:52:47 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: <20160519025242.GA30971@shell.msen.com> On Mon, May 16, 2016 at 09:30:02AM -0700, Yoshiki Ohshima wrote: > At Sun, 15 May 2016 22:27:13 -0400, > David T. Lewis wrote: > > > - Test the VM. Tim, I need help on this. I do not currently have a working > > Cog build environment (Unbuntu/autotools/gcc version issues). Can you > > apply the patch from Yoshiki's email and see if your resulting Cog VM > > continues to work for you as expected on Pi with Scratch? > > And more testing would be nice. > Tim, The attached sqUnixX11.c should get the HostWindowPlugin functions working on Cog/Spur. If that is confirmed, I will commit to SVN oscog branch and then we can follow up with the ImmX11 updates. When you get a chance, can you please compile a VM with the attached sqUnixX11.c and let me know if the following works on Squeak trunk and Raspberry Pi: saveExtent := Display width @ Display height. DisplayScreen hostWindowExtent: 500@100. (Delay forSeconds: 4) wait. DisplayScreen hostWindowExtent: saveExtent. Thanks, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: sqUnixX11.c.gz Type: application/octet-stream Size: 48384 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160518/667eabec/sqUnixX11.c-0001.obj From commits at source.squeak.org Thu May 19 08:13:50 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 08:13:52 2016 Subject: [squeak-dev] The Inbox: Multilingual-pre.212.mcz Message-ID: A new version of Multilingual was added to project The Inbox: http://source.squeak.org/inbox/Multilingual-pre.212.mcz ==================== Summary ==================== Name: Multilingual-pre.212 Author: pre Time: 19 May 2016, 10:09:04.266052 am UUID: 4faefd5e-594d-5944-9aca-eb2ab8b6f562 Ancestors: Multilingual-ul.211 Fixes broken TestIndenting as StrikeFontSet did not fullfill the interface required for a Font although it is a subclass of AbstractFont =============== Diff against Multilingual-ul.211 =============== Item was added: + ----- Method: StrikeFontSet>>depth (in category 'as yet unclassified') ----- + depth + + ^ self glyphs depth! From timfelgentreff at gmail.com Thu May 19 07:50:50 2016 From: timfelgentreff at gmail.com (timfelgentreff) Date: Thu May 19 08:27:02 2016 Subject: [squeak-dev] Fixing SecureHashAlgorithm without plugins Message-ID: <1463644250026-4895951.post@n4.nabble.com> Hi, we're running the fallback code for SecureHashAlgorithm, LargePositiveInteger, and lots of the optional primitives. In the fallback code of SecureHashAlgorithm>>finalHash there is a call that looks like this: (LargePositiveInteger new: result size) replaceFrom: 1 to: result size with: result startingAt: 1; normalize Here, result is a ByteArray. The replaceFrom:to:with:startingAt: goes to call primitive 105, which is marked as optional in the comment, so we do not implement it. However, the fallback code in Integer>>replaceFrom:to:with:startingAt: sends digitAt: to the replacement object, and ByteArray doesn't understand that message. Clearly the fallback code behaves differently from the primitive. 1) One way to fix it would be to check the object type in the fallback code. If it is a byte object, we simply use at: (which is the same as digitAt: for Large*Integer). 2) Another fix is to add digitAt: to ByteArray. This feels very wrong to me. 3) Alternatively, we might say that calling replaceFrom:to:with:startingAt: on an integer with any byte object is illegal. In that case, we could instead fix the fallback code in SecureHashAlgorithm>>finalHash to do this in the end: LargePositiveInteger adoptInstance: result. ^ result normalize This will fix the problem, but the fallback code will still be inconsistent with the primitive. I'm torn between 1 and 3, so what do you say? Cheers, Tim -- View this message in context: http://forum.world.st/Fixing-SecureHashAlgorithm-without-plugins-tp4895951.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 19 08:44:18 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 08:45:00 2016 Subject: [squeak-dev] The Trunk: System-ul.831.mcz Message-ID: Levente Uzonyi uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-ul.831.mcz ==================== Summary ==================== Name: System-ul.831 Author: ul Time: 19 May 2016, 10:43:32.712543 am UUID: 71e758e2-381c-4c5a-84b5-87e206f286a9 Ancestors: System-mt.830 - use #adoptInstance: instead of copying the ByteArray into a new LargeInteger in SecureHashAlgorithm >> #finalHash. This should be somewhat quicker and it should also avoid running the fallback code of LargePositiveInteger >> #replaceFrom:to:with:startingAt: with a ByteArray argument, which wouldn't work. =============== Diff against System-mt.830 =============== Item was changed: ----- Method: SecureHashAlgorithm>>finalHash (in category 'private') ----- finalHash "Concatenate the final totals to build the 160-bit integer result." "Details: If the primitives are supported, the results are in the totals array. Otherwise, they are in the instance variables totalA through totalE." | result | result := ByteArray new: 20. totals ifNil: [ "compute final hash when not using primitives" result unsignedShortAt: 1 put: totalE low bigEndian: false; unsignedShortAt: 3 put: totalE hi bigEndian: false; unsignedShortAt: 5 put: totalD low bigEndian: false; unsignedShortAt: 7 put: totalD hi bigEndian: false; unsignedShortAt: 9 put: totalC low bigEndian: false; unsignedShortAt: 11 put: totalC hi bigEndian: false; unsignedShortAt: 13 put: totalB low bigEndian: false; unsignedShortAt: 15 put: totalB hi bigEndian: false; unsignedShortAt: 17 put: totalA low bigEndian: false; unsignedShortAt: 19 put: totalA hi bigEndian: false ] ifNotNil: [ "compute final hash when using primitives" result unsignedLongAt: 1 put: (totals at: 5) bigEndian: false; unsignedLongAt: 5 put: (totals at: 4) bigEndian: false; unsignedLongAt: 9 put: (totals at: 3) bigEndian: false; unsignedLongAt: 13 put: (totals at: 2) bigEndian: false; unsignedLongAt: 17 put: (totals at: 1) bigEndian: false ]. + LargePositiveInteger adoptInstance: result. + ^result normalize! - ^(LargePositiveInteger new: result size) - replaceFrom: 1 - to: result size - with: result - startingAt: 1; - normalize! From patrick.rein at hpi.de Thu May 19 08:14:19 2016 From: patrick.rein at hpi.de (Patrick R.) Date: Thu May 19 08:50:30 2016 Subject: [squeak-dev] StrikeFonstSet vs StrikeFont Message-ID: <1463645659348-4895960.post@n4.nabble.com> Hi everyone :) I am currently fixing some tests in the Multilingual package. While doing this I edited the StrikeFontSet class and was wondering about its purpose. Although it is called a FontSet it is actually a subclass of AbstractFont and all instances available in a recent image do only contain one single font. Even further some methods of the class are implemented along the line of: self fontArray first ... Unfortunately the class does not include a class comment yet and I would like to fix this. That is why I wanted to ask whether anyone still knows the rationale behind this seeming contradiction. Thanks! and Bests Patrick -- View this message in context: http://forum.world.st/StrikeFonstSet-vs-StrikeFont-tp4895960.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Thu May 19 08:51:12 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 08:51:18 2016 Subject: [squeak-dev] Fixing SecureHashAlgorithm without plugins In-Reply-To: <1463644250026-4895951.post@n4.nabble.com> References: <1463644250026-4895951.post@n4.nabble.com> Message-ID: Hi Tim, I made a workaround using #adoptInstance: instead of copying in System-ul.831. Hopefully you have one of the primitives (160, 115) it uses implemented. I think it would be worth moving the fallback code from Integer down to LargePositiveInteger, because that way SmallInteger receivers would signal DNU instead of 'You can''t store in a SmallInteger'. Levente On Thu, 19 May 2016, timfelgentreff wrote: > Hi, > > we're running the fallback code for SecureHashAlgorithm, > LargePositiveInteger, and lots of the optional primitives. In the fallback > code of SecureHashAlgorithm>>finalHash there is a call that looks like this: > > (LargePositiveInteger new: result size) > replaceFrom: 1 > to: result size > with: result > startingAt: 1; > normalize > > Here, result is a ByteArray. The replaceFrom:to:with:startingAt: goes to > call primitive 105, which is marked as optional in the comment, so we do not > implement it. However, the fallback code in > Integer>>replaceFrom:to:with:startingAt: sends digitAt: to the replacement > object, and ByteArray doesn't understand that message. > > Clearly the fallback code behaves differently from the primitive. > > 1) One way to fix it would be to check the object type in the fallback code. > If it is a byte object, we simply use at: (which is the same as digitAt: for > Large*Integer). > > 2) Another fix is to add digitAt: to ByteArray. This feels very wrong to me. > > 3) Alternatively, we might say that calling replaceFrom:to:with:startingAt: > on an integer with any byte object is illegal. In that case, we could > instead fix the fallback code in SecureHashAlgorithm>>finalHash to do this > in the end: > > LargePositiveInteger adoptInstance: result. > ^ result normalize > > This will fix the problem, but the fallback code will still be inconsistent > with the primitive. > > I'm torn between 1 and 3, so what do you say? > > Cheers, > Tim > > > > -- > View this message in context: http://forum.world.st/Fixing-SecureHashAlgorithm-without-plugins-tp4895951.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From timfelgentreff at gmail.com Thu May 19 08:37:22 2016 From: timfelgentreff at gmail.com (timfelgentreff) Date: Thu May 19 09:13:34 2016 Subject: [squeak-dev] Re: Fixing SecureHashAlgorithm without plugins In-Reply-To: References: <1463644250026-4895951.post@n4.nabble.com> Message-ID: <1463647042638-4895970.post@n4.nabble.com> Hi Levente, thank you, that change works great for me :) Cheers, Tim Levente Uzonyi wrote > Hi Tim, > > I made a workaround using #adoptInstance: instead of copying in > System-ul.831. Hopefully you have one of the primitives (160, 115) it uses > implemented. > I think it would be worth moving the fallback code from Integer down to > LargePositiveInteger, because that way SmallInteger receivers would > signal DNU instead of 'You can''t store in a SmallInteger'. > > Levente > > On Thu, 19 May 2016, timfelgentreff wrote: > >> Hi, >> >> we're running the fallback code for SecureHashAlgorithm, >> LargePositiveInteger, and lots of the optional primitives. In the >> fallback >> code of SecureHashAlgorithm>>finalHash there is a call that looks like >> this: >> >> (LargePositiveInteger new: result size) >> replaceFrom: 1 >> to: result size >> with: result >> startingAt: 1; >> normalize >> >> Here, result is a ByteArray. The replaceFrom:to:with:startingAt: goes to >> call primitive 105, which is marked as optional in the comment, so we do >> not >> implement it. However, the fallback code in >> Integer>>replaceFrom:to:with:startingAt: sends digitAt: to the >> replacement >> object, and ByteArray doesn't understand that message. >> >> Clearly the fallback code behaves differently from the primitive. >> >> 1) One way to fix it would be to check the object type in the fallback >> code. >> If it is a byte object, we simply use at: (which is the same as digitAt: >> for >> Large*Integer). >> >> 2) Another fix is to add digitAt: to ByteArray. This feels very wrong to >> me. >> >> 3) Alternatively, we might say that calling >> replaceFrom:to:with:startingAt: >> on an integer with any byte object is illegal. In that case, we could >> instead fix the fallback code in SecureHashAlgorithm>>finalHash to do >> this >> in the end: >> >> LargePositiveInteger adoptInstance: result. >> ^ result normalize >> >> This will fix the problem, but the fallback code will still be >> inconsistent >> with the primitive. >> >> I'm torn between 1 and 3, so what do you say? >> >> Cheers, >> Tim >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Fixing-SecureHashAlgorithm-without-plugins-tp4895951.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> -- View this message in context: http://forum.world.st/Fixing-SecureHashAlgorithm-without-plugins-tp4895951p4895970.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 19 09:31:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 09:32:31 2016 Subject: [squeak-dev] The Trunk: ST80Tests-pre.4.mcz Message-ID: Patrick Rein uploaded a new version of ST80Tests to project The Trunk: http://source.squeak.org/trunk/ST80Tests-pre.4.mcz ==================== Summary ==================== Name: ST80Tests-pre.4 Author: pre Time: 19 May 2016, 11:31:47.505052 am UUID: 5fdce0f2-ef8e-054b-99ce-5178af9ee632 Ancestors: ST80Tests-ul.3 Fixes a test for the ST80 package which asserts the packages the ST80 package depends on. Adds Monticello to the list as it is now needed for the unloading capabilities =============== Diff against ST80Tests-ul.3 =============== Item was changed: ----- Method: ST80PackageDependencyTest>>testST80 (in category 'as yet unclassified') ----- testST80 self testPackage: #ST80 dependsExactlyOn: #( #'Chronology-Core' Collections Compiler Files Graphics Kernel Morphic Multilingual Network SUnit System #'ToolBuilder-Kernel' Tools + Monticello ).! From commits at source.squeak.org Thu May 19 12:45:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 12:45:07 2016 Subject: [squeak-dev] The Trunk: Multilingual-pre.212.mcz Message-ID: Patrick Rein uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-pre.212.mcz ==================== Summary ==================== Name: Multilingual-pre.212 Author: pre Time: 19 May 2016, 10:09:04.266052 am UUID: 4faefd5e-594d-5944-9aca-eb2ab8b6f562 Ancestors: Multilingual-ul.211 Fixes broken TestIndenting as StrikeFontSet did not fullfill the interface required for a Font although it is a subclass of AbstractFont =============== Diff against Multilingual-ul.211 =============== Item was added: + ----- Method: StrikeFontSet>>depth (in category 'as yet unclassified') ----- + depth + + ^ self glyphs depth! From commits at source.squeak.org Thu May 19 12:52:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 12:52:49 2016 Subject: [squeak-dev] The Trunk: ToolsTests-pre.77.mcz Message-ID: Patrick Rein uploaded a new version of ToolsTests to project The Trunk: http://source.squeak.org/trunk/ToolsTests-pre.77.mcz ==================== Summary ==================== Name: ToolsTests-pre.77 Author: pre Time: 19 May 2016, 2:52:01.715168 pm UUID: 237de745-810d-433e-80c2-0752d24b2226 Ancestors: ToolsTests-nice.76 Fixes a test for the FileList class. The itemsForFile: method requires a fully qualified path which is stated in the method and also provided by internal methods of FileList. The test however used a relative path. =============== Diff against ToolsTests-nice.76 =============== Item was changed: ----- Method: FileListTest>>testServicesForFileEnding (in category 'test') ----- testServicesForFileEnding "(self selector: #testServicesForFileEnding) debug" + | items | + items := (FileList new directory: FileDirectory default; yourself) + itemsForFile: (FileDirectory default fullNameFor: 'aaa.kkk'). + self assert: (items anySatisfy: [ :ea | self checkIsServiceIsFromDummyTool: ea ]). - self assert: (((FileList new directory: FileDirectory default; yourself) itemsForFile: 'aaa.kkk') anySatisfy: [ :ea | self checkIsServiceIsFromDummyTool: ea ]). ! From leves at caesar.elte.hu Thu May 19 12:59:56 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 13:00:01 2016 Subject: [squeak-dev] The Trunk: ST80Tests-pre.4.mcz In-Reply-To: References: Message-ID: IMHO ST80 should be able to exist without Monticello in the image, so we should resolve this dependency. Levente On Thu, 19 May 2016, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of ST80Tests to project The Trunk: > http://source.squeak.org/trunk/ST80Tests-pre.4.mcz > > ==================== Summary ==================== > > Name: ST80Tests-pre.4 > Author: pre > Time: 19 May 2016, 11:31:47.505052 am > UUID: 5fdce0f2-ef8e-054b-99ce-5178af9ee632 > Ancestors: ST80Tests-ul.3 > > Fixes a test for the ST80 package which asserts the packages the ST80 package depends on. Adds Monticello to the list as it is now needed for the unloading capabilities > > =============== Diff against ST80Tests-ul.3 =============== > > Item was changed: > ----- Method: ST80PackageDependencyTest>>testST80 (in category 'as yet unclassified') ----- > testST80 > self testPackage: #ST80 dependsExactlyOn: #( > #'Chronology-Core' > Collections > Compiler > Files > Graphics > Kernel > Morphic > Multilingual > Network > SUnit > System > #'ToolBuilder-Kernel' > Tools > + Monticello > ).! > > > From Marcel.Taeumel at hpi.de Thu May 19 12:33:59 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 19 13:10:12 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> Message-ID: <1463661239003-4896027.post@n4.nabble.com> Tony Garnock-Jones-3 wrote > On 05/18/2016 12:12 PM, tim Rowledge wrote: >> Seems to me that a significant part of the potential >> usefulness would be to have filters transform events [...] > > One interesting approach would be to take a leaf from functional > programming. > > Instead of returning a boolean from a filter, you'd have it expect a > continuation block. > > filter := PluggableEventFilter new on: [:e :target :k | > Transcript showln: e printString. > k value: e ]. > > It would invoke the block with some event, or not, according to the > filtering decision. > > This gives it an opportunity to pass on either its argument; or a copy > of its argument; or its argument, modified; or something unrelated. > > Tony Hi Tony, I like the idea of filters transforming events. Here, the filter could just return the transformed event instead of a boolean value. (Note that the last statement in a block determines its return value.) Here is a new version of event filter that does that: event-filters.cs Don't forget to revert the previous change set because I cleaned up this one. Use a fresh trunk image at best. wnd := ActiveWorld submorphs third. "some window?" filter := PluggableEventFilter on: [:evt :target | evt isMouseOver ifFalse: [ Transcript showln: evt printString, ' ', target printString]. evt wasIgnored: true. evt]. wnd addMouseFilter: filter. wnd removeMouseFilter: filter. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4896027.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu May 19 12:44:56 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 19 13:21:09 2016 Subject: [squeak-dev] Re: StrikeFonstSet vs StrikeFont In-Reply-To: <1463645659348-4895960.post@n4.nabble.com> References: <1463645659348-4895960.post@n4.nabble.com> Message-ID: <1463661896461-4896031.post@n4.nabble.com> Patrick R. wrote > Hi everyone :) > > I am currently fixing some tests in the Multilingual package. While doing > this I edited the StrikeFontSet class and was wondering about its purpose. > Although it is called a FontSet it is actually a subclass of AbstractFont > and all instances available in a recent image do only contain one single > font. Even further some methods of the class are implemented along the > line of: > > self fontArray first ... > > Unfortunately the class does not include a class comment yet and I would > like to fix this. That is why I wanted to ask whether anyone still knows > the rationale behind this seeming contradiction. > > Thanks! and Bests > Patrick Hi Patrick, looking at FontSet, I don't think it does something useful. Maybe it was a helper class in the past. See FontSet class >> #installAsTextStyle. The idea of StrikeFontSet to behave like a single font but being a set of (similar?) fonts is interesting. However, I think that there should be no need for that because we have the TextStyle abstraction to group multiple fonts to be used during layouting and rendering. If the idea of StrikeFontSet (or any font set) actually is to describe a set of similar fonts that belong to the same *font family*, such a grouping will be interesting in an object-oriented sense. Better than text styles, which group arbitrary fonts. Best, Marcel -- View this message in context: http://forum.world.st/StrikeFonstSet-vs-StrikeFont-tp4895960p4896031.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Thu May 19 12:46:46 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 19 13:22:59 2016 Subject: [squeak-dev] Re: The Trunk: ST80Tests-pre.4.mcz In-Reply-To: References: Message-ID: <1463662006216-4896032.post@n4.nabble.com> Levente Uzonyi wrote > IMHO ST80 should be able to exist without Monticello in the image, so we > should resolve this dependency. > > Levente Hi Levente, I talked about this with Tobias today. The issue is package/code unloading. PackageInfo should be capable of remove code (including extensions) from the system. We still need, however, another hook to also clean up Monticello working copies for that case. We could use object events for that. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ST80Tests-pre-4-mcz-tp4895974p4896032.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu May 19 15:34:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 15:34:25 2016 Subject: [squeak-dev] The Inbox: Tests-pre.341.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Inbox: http://source.squeak.org/inbox/Tests-pre.341.mcz ==================== Summary ==================== Name: Tests-pre.341 Author: pre Time: 19 May 2016, 5:34:18.672168 pm UUID: 0209ce70-2b8b-4d53-b743-ed1024d367ea Ancestors: Tests-eem.340 By moving the PBColorPreferenceView from the EToys package to the PreferenceBrowser package, the PB package now depends on etyos through the UpdatingRectangleMorph. If this is intentional we should make the following modification to the PackageDependencyTests. =============== Diff against Tests-eem.340 =============== Item was changed: ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- testPreferenceBrowser self testPackage: #PreferenceBrowser dependsExactlyOn: #( #'Chronology-Core' Collections Graphics Kernel Morphic MorphicExtras System Tools + #'ToolBuilder-Morphic' + EToys + Balloon ).! From leves at caesar.elte.hu Thu May 19 15:51:19 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 15:51:22 2016 Subject: [squeak-dev] The Inbox: Tests-pre.341.mcz In-Reply-To: References: Message-ID: Hi Patrick, Even if the change was intentional, PreferenceBrowser depending on Etoys is not something we would want. Accepting this dependency would mean that if we were able to unload Etoys, we would lose PreferenceBrowser as well. Instead, we should move UpdatingRectangleMorph from Etoys to Morphic or MorphicExtras. Levente On Thu, 19 May 2016, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Tests to project The Inbox: > http://source.squeak.org/inbox/Tests-pre.341.mcz > > ==================== Summary ==================== > > Name: Tests-pre.341 > Author: pre > Time: 19 May 2016, 5:34:18.672168 pm > UUID: 0209ce70-2b8b-4d53-b743-ed1024d367ea > Ancestors: Tests-eem.340 > > By moving the PBColorPreferenceView from the EToys package to the PreferenceBrowser package, the PB package now depends on etyos through the UpdatingRectangleMorph. If this is intentional we should make the following modification to the PackageDependencyTests. > > =============== Diff against Tests-eem.340 =============== > > Item was changed: > ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- > testPreferenceBrowser > self testPackage: #PreferenceBrowser dependsExactlyOn: #( > #'Chronology-Core' > Collections > Graphics > Kernel > Morphic > MorphicExtras > System > Tools > + #'ToolBuilder-Morphic' > + EToys > + Balloon > ).! > > > From commits at source.squeak.org Thu May 19 15:56:56 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 15:56:58 2016 Subject: [squeak-dev] The Trunk: Tests-pre.342.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-pre.342.mcz ==================== Summary ==================== Name: Tests-pre.342 Author: pre Time: 19 May 2016, 5:56:44.520731 pm UUID: 9f7000bc-c8e8-497d-80cc-40ced18f376b Ancestors: Tests-pre.341 As discussed several times on the mailing list the ExceptionTests>>testHandlerFromAction test is a feature request test and should be regarded as an expectedFailure. =============== Diff against Tests-eem.340 =============== Item was changed: ----- Method: ExceptionTests>>expectedFailures (in category 'testing-outer') ----- expectedFailures + "This test is a feature request. For more information on this issue visit: + http://forum.world.st/The-Inbox-Tests-TestRunner-156-mcz-tc4643910.html#a4643987 + http://forum.world.st/ExceptionTests-Wrong-error-handler-tc4848699.html + http://forum.world.st/ExceptionTests-gt-testHandlerFromAction-fails-tc4872828.html#a4872958" + + ^ #(testHandlerFromAction).! - ^ #().! Item was changed: ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- testPreferenceBrowser self testPackage: #PreferenceBrowser dependsExactlyOn: #( #'Chronology-Core' Collections Graphics Kernel Morphic MorphicExtras System Tools + #'ToolBuilder-Morphic' + EToys + Balloon ).! From leves at caesar.elte.hu Thu May 19 16:16:49 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 16:16:52 2016 Subject: [squeak-dev] The Trunk: Tests-pre.342.mcz In-Reply-To: References: Message-ID: The change of PackageDependencyTest >> #testPreferenceBrowser Tests-pre.341 seems to have slipped through. Levente On Thu, 19 May 2016, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-pre.342.mcz > > ==================== Summary ==================== > > Name: Tests-pre.342 > Author: pre > Time: 19 May 2016, 5:56:44.520731 pm > UUID: 9f7000bc-c8e8-497d-80cc-40ced18f376b > Ancestors: Tests-pre.341 > > As discussed several times on the mailing list the ExceptionTests>>testHandlerFromAction test is a feature request test and should be regarded as an expectedFailure. > > =============== Diff against Tests-eem.340 =============== > > Item was changed: > ----- Method: ExceptionTests>>expectedFailures (in category 'testing-outer') ----- > expectedFailures > + "This test is a feature request. For more information on this issue visit: > + http://forum.world.st/The-Inbox-Tests-TestRunner-156-mcz-tc4643910.html#a4643987 > + http://forum.world.st/ExceptionTests-Wrong-error-handler-tc4848699.html > + http://forum.world.st/ExceptionTests-gt-testHandlerFromAction-fails-tc4872828.html#a4872958" > + > + ^ #(testHandlerFromAction).! > - ^ #().! > > Item was changed: > ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- > testPreferenceBrowser > self testPackage: #PreferenceBrowser dependsExactlyOn: #( > #'Chronology-Core' > Collections > Graphics > Kernel > Morphic > MorphicExtras > System > Tools > + #'ToolBuilder-Morphic' > + EToys > + Balloon > ).! > > > From Patrick.Rein at hpi.de Thu May 19 16:17:59 2016 From: Patrick.Rein at hpi.de (Rein, Patrick) Date: Thu May 19 16:18:02 2016 Subject: AW: [squeak-dev] The Trunk: Tests-pre.342.mcz In-Reply-To: References: , Message-ID: <1463674680213.5470@hpi.de> Sorry. Thanks for checking! I'll revert that in a minute. ________________________________________ Von: squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Levente Uzonyi Gesendet: Donnerstag, 19. Mai 2016 18:16 An: squeak-dev@lists.squeakfoundation.org Cc: packages@lists.squeakfoundation.org Betreff: Re: [squeak-dev] The Trunk: Tests-pre.342.mcz The change of PackageDependencyTest >> #testPreferenceBrowser Tests-pre.341 seems to have slipped through. Levente On Thu, 19 May 2016, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-pre.342.mcz > > ==================== Summary ==================== > > Name: Tests-pre.342 > Author: pre > Time: 19 May 2016, 5:56:44.520731 pm > UUID: 9f7000bc-c8e8-497d-80cc-40ced18f376b > Ancestors: Tests-pre.341 > > As discussed several times on the mailing list the ExceptionTests>>testHandlerFromAction test is a feature request test and should be regarded as an expectedFailure. > > =============== Diff against Tests-eem.340 =============== > > Item was changed: > ----- Method: ExceptionTests>>expectedFailures (in category 'testing-outer') ----- > expectedFailures > + "This test is a feature request. For more information on this issue visit: > + http://forum.world.st/The-Inbox-Tests-TestRunner-156-mcz-tc4643910.html#a4643987 > + http://forum.world.st/ExceptionTests-Wrong-error-handler-tc4848699.html > + http://forum.world.st/ExceptionTests-gt-testHandlerFromAction-fails-tc4872828.html#a4872958" > + > + ^ #(testHandlerFromAction).! > - ^ #().! > > Item was changed: > ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- > testPreferenceBrowser > self testPackage: #PreferenceBrowser dependsExactlyOn: #( > #'Chronology-Core' > Collections > Graphics > Kernel > Morphic > MorphicExtras > System > Tools > + #'ToolBuilder-Morphic' > + EToys > + Balloon > ).! > > > From Patrick.Rein at hpi.de Thu May 19 16:21:11 2016 From: Patrick.Rein at hpi.de (Rein, Patrick) Date: Thu May 19 16:21:14 2016 Subject: AW: [squeak-dev] The Inbox: Tests-pre.341.mcz In-Reply-To: References: , Message-ID: <1463674872669.14132@hpi.de> Hi Levente, that is what I thought when I checked the test but I wanted to check back with everyone. I think it could belong to MorphicExtras, although if I understand them correctly they are also somewhat optional? So to guarantee maintenance of the PreferenceBrowser we should actually move it to Morphic? Bests Patrick ________________________________________ Von: squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Levente Uzonyi Gesendet: Donnerstag, 19. Mai 2016 17:51 An: squeak-dev@lists.squeakfoundation.org Betreff: Re: [squeak-dev] The Inbox: Tests-pre.341.mcz Hi Patrick, Even if the change was intentional, PreferenceBrowser depending on Etoys is not something we would want. Accepting this dependency would mean that if we were able to unload Etoys, we would lose PreferenceBrowser as well. Instead, we should move UpdatingRectangleMorph from Etoys to Morphic or MorphicExtras. Levente On Thu, 19 May 2016, commits@source.squeak.org wrote: > Patrick Rein uploaded a new version of Tests to project The Inbox: > http://source.squeak.org/inbox/Tests-pre.341.mcz > > ==================== Summary ==================== > > Name: Tests-pre.341 > Author: pre > Time: 19 May 2016, 5:34:18.672168 pm > UUID: 0209ce70-2b8b-4d53-b743-ed1024d367ea > Ancestors: Tests-eem.340 > > By moving the PBColorPreferenceView from the EToys package to the PreferenceBrowser package, the PB package now depends on etyos through the UpdatingRectangleMorph. If this is intentional we should make the following modification to the PackageDependencyTests. > > =============== Diff against Tests-eem.340 =============== > > Item was changed: > ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- > testPreferenceBrowser > self testPackage: #PreferenceBrowser dependsExactlyOn: #( > #'Chronology-Core' > Collections > Graphics > Kernel > Morphic > MorphicExtras > System > Tools > + #'ToolBuilder-Morphic' > + EToys > + Balloon > ).! > > > From commits at source.squeak.org Thu May 19 16:24:38 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 16:24:40 2016 Subject: [squeak-dev] The Trunk: Tests-pre.343.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-pre.343.mcz ==================== Summary ==================== Name: Tests-pre.343 Author: pre Time: 19 May 2016, 6:24:26.418731 pm UUID: e46cc1be-f541-4e22-b763-0cb981f3769f Ancestors: Tests-pre.342 Reverts accidential change to the PackageDependencyTest which actually resides in the inbox =============== Diff against Tests-pre.342 =============== Item was changed: ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- testPreferenceBrowser self testPackage: #PreferenceBrowser dependsExactlyOn: #( #'Chronology-Core' Collections Graphics Kernel Morphic MorphicExtras System Tools - #'ToolBuilder-Morphic' - EToys - Balloon ).! From leves at caesar.elte.hu Thu May 19 16:28:55 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 16:28:58 2016 Subject: AW: [squeak-dev] The Inbox: Tests-pre.341.mcz In-Reply-To: <1463674872669.14132@hpi.de> References: , <1463674872669.14132@hpi.de> Message-ID: Hi Patrick, I'm not knowledgeable about Morphic, so I can't tell which package would be the better choice, but PreferenceBrowser already depends on both Morphic and MorpicExtras, so the move would not introduce any new dependencies either way. Levente On Thu, 19 May 2016, Rein, Patrick wrote: > Hi Levente, > > that is what I thought when I checked the test but I wanted to check back with everyone. I think it could belong to MorphicExtras, although if I understand them correctly they are also somewhat optional? So to guarantee maintenance of the PreferenceBrowser we should actually move it to Morphic? > > Bests > Patrick > ________________________________________ > Von: squeak-dev-bounces@lists.squeakfoundation.org im Auftrag von Levente Uzonyi > Gesendet: Donnerstag, 19. Mai 2016 17:51 > An: squeak-dev@lists.squeakfoundation.org > Betreff: Re: [squeak-dev] The Inbox: Tests-pre.341.mcz > > Hi Patrick, > > Even if the change was intentional, PreferenceBrowser depending on Etoys > is not something we would want. Accepting this dependency would mean that > if we were able to unload Etoys, we would lose PreferenceBrowser as well. > Instead, we should move UpdatingRectangleMorph from Etoys to Morphic or > MorphicExtras. > > Levente > > On Thu, 19 May 2016, commits@source.squeak.org wrote: > >> Patrick Rein uploaded a new version of Tests to project The Inbox: >> http://source.squeak.org/inbox/Tests-pre.341.mcz >> >> ==================== Summary ==================== >> >> Name: Tests-pre.341 >> Author: pre >> Time: 19 May 2016, 5:34:18.672168 pm >> UUID: 0209ce70-2b8b-4d53-b743-ed1024d367ea >> Ancestors: Tests-eem.340 >> >> By moving the PBColorPreferenceView from the EToys package to the PreferenceBrowser package, the PB package now depends on etyos through the UpdatingRectangleMorph. If this is intentional we should make the following modification to the PackageDependencyTests. >> >> =============== Diff against Tests-eem.340 =============== >> >> Item was changed: >> ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- >> testPreferenceBrowser >> self testPackage: #PreferenceBrowser dependsExactlyOn: #( >> #'Chronology-Core' >> Collections >> Graphics >> Kernel >> Morphic >> MorphicExtras >> System >> Tools >> + #'ToolBuilder-Morphic' >> + EToys >> + Balloon >> ).! >> >> >> > From tim at rowledge.org Thu May 19 17:44:38 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 19 17:44:40 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463588721564-4895797.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> Message-ID: > On 18-05-2016, at 9:25 AM, marcel.taeumel wrote: > The idea of using event filters to actually transform events is interesting. Filters can often be useful. We have, for example, the various canvases and scroll-wrapping morphs which filter how input and output is seen by the wrapped bitmaps etc. An obvious event filter (and maybe a stupid one in the real world) would be one that centralises the mouse button swapping; if button swapping is turned on it, err, swaps the button value around. Right now we have a centralised place in EventSensor>processEvent: for something that global (and seriously - for a mouse type event we check the platform name every time?) but having a type of filter involved at lower levels would allow some morphs to *not* get swapped buttons. I dunno, maybe useful for testing how the UI behaves on a different GUI? If you pass your events *through* a filter instead of just having them on the side then you can do much more. > > How would a fake event filter be triggered if not by real events? If some morph/app has a suitable event filter then clearly we can transform any incoming event into any other kind of event (as long as it is one that the morph will not raise an error for) as they are sent by the whole Hand/PasteUp complex. To trigger a faking-filter I guess the best thing would be to throw a FakeEvent at the event handling code at whatever level you need (anywhere from the local world PasteUpMorph on down to your local morph of interest) and let you filter convert that to whatever it wants. Why not simply make the ?actual? event type and pass that in? You might have a variety of faking-filters doing different things and want to test them, maybe you want the FakeEvents to be easily assembled by parsing a socket stream or file, I don?t know. It just needs you to bypass the eventsensor and push an event. I honestly don?t know if it?s an actually useful idea. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Asking whether machines can think is like asking whether submarines can swim. From commits at source.squeak.org Thu May 19 18:49:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 18:50:03 2016 Subject: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz Message-ID: Patrick Rein uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-pre.51.mcz ==================== Summary ==================== Name: Regex-Core-pre.51 Author: pre Time: 19 May 2016, 8:49:05.994548 pm UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca Ancestors: Regex-Core-ul.50 Fixes an erroring test of RxMatcher by replacing a copy with a veryDeepCopy to sustain the integrity of the RxmLink tree. =============== Diff against Regex-Core-ul.50 =============== Item was changed: ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') ----- makeQuantified: anRxmLink min: min max: max "Perform recursive poor-man's transformation of the {,} quantifiers." | aMatcher | "{,} ==> ({1,})?" min = 0 ifTrue: [ ^ self makeOptional: (self makeQuantified: anRxmLink min: 1 max: max) ]. "{,} ==> {-1, -1}+" max ifNil: [ + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink copy) ]. "{,} ==> ... " min = max ifTrue: [ + aMatcher := anRxmLink veryDeepCopy. + (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink veryDeepCopy ]. - aMatcher := anRxmLink copy. - (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink copy ]. ^ aMatcher ]. "{,} ==> {,}({1,-1})?" + aMatcher := self makeOptional: anRxmLink veryDeepCopy. - aMatcher := self makeOptional: anRxmLink copy. (max - min - 1) timesRepeat: [ + aMatcher := self makeOptional: (anRxmLink veryDeepCopy pointTailTo: aMatcher) ]. - aMatcher := self makeOptional: (anRxmLink copy pointTailTo: aMatcher) ]. ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: aMatcher! From commits at source.squeak.org Thu May 19 18:51:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 18:51:02 2016 Subject: [squeak-dev] The Inbox: Regex-Tests-Core-pre.6.mcz Message-ID: Patrick Rein uploaded a new version of Regex-Tests-Core to project The Inbox: http://source.squeak.org/inbox/Regex-Tests-Core-pre.6.mcz ==================== Summary ==================== Name: Regex-Tests-Core-pre.6 Author: pre Time: 19 May 2016, 8:50:59.559548 pm UUID: e1cbdf20-9ce2-4e4a-b1d8-574186c2e746 Ancestors: Regex-Tests-Core-ul.5 Adjustments to the Regex tests for optional subexpressions in multiple quantifiers. These tests demonstrate the different behavior when nesting subexpressions in quantifiers and the other way round. =============== Diff against Regex-Tests-Core-ul.5 =============== Item was added: + ----- Method: RxMatcherTest>>testOptionalMultipleQuantifiedSubexpression (in category 'testing') ----- + testOptionalMultipleQuantifiedSubexpression + + + self runRegex: #('((aa?){2})' + '' false nil + 'a' false nil + 'aa' true (1 'aa') + 'baaa' true (2 'aaa'))! Item was changed: ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- testOptionalNestedIntoMultipleQuantified self runRegex: #('(aa?){2}' '' false nil 'a' false nil 'aa' true (1 'aa') + 'baaa' true (2 'a'))! - 'baaa' true (2 'aaa'))! From Patrick.Rein at hpi.de Thu May 19 18:55:21 2016 From: Patrick.Rein at hpi.de (Rein, Patrick) Date: Thu May 19 18:55:24 2016 Subject: [squeak-dev] The Inbox: Regex-Tests-Core-pre.6.mcz In-Reply-To: <20160519185108.27D7F6066D@mail2.hpi.uni-potsdam.de> References: <20160519185108.27D7F6066D@mail2.hpi.uni-potsdam.de> Message-ID: <1463684122383.1242@hpi.de> I would like to comment further on these changes as they change the expected Regex engine behavior. The behavior, that matching groups in a multiple quantifier return the last match of the group is consistent with for example the Ruby regex engine: http://rubular.com/r/kxoreyPolG The issue is also decribed here: http://www.regular-expressions.info/captureall.html However, I am not sure what the intended behavior for RxMatcher is. Has this ever been working and what was the intended behavior? Bests Patrick ________________________________________ From: squeak-dev-bounces@lists.squeakfoundation.org on behalf of commits@source.squeak.org Sent: Thursday, May 19, 2016 13:50 To: squeak-dev@lists.squeakfoundation.org Subject: [squeak-dev] The Inbox: Regex-Tests-Core-pre.6.mcz Patrick Rein uploaded a new version of Regex-Tests-Core to project The Inbox: http://source.squeak.org/inbox/Regex-Tests-Core-pre.6.mcz ==================== Summary ==================== Name: Regex-Tests-Core-pre.6 Author: pre Time: 19 May 2016, 8:50:59.559548 pm UUID: e1cbdf20-9ce2-4e4a-b1d8-574186c2e746 Ancestors: Regex-Tests-Core-ul.5 Adjustments to the Regex tests for optional subexpressions in multiple quantifiers. These tests demonstrate the different behavior when nesting subexpressions in quantifiers and the other way round. =============== Diff against Regex-Tests-Core-ul.5 =============== Item was added: + ----- Method: RxMatcherTest>>testOptionalMultipleQuantifiedSubexpression (in category 'testing') ----- + testOptionalMultipleQuantifiedSubexpression + + + self runRegex: #('((aa?){2})' + '' false nil + 'a' false nil + 'aa' true (1 'aa') + 'baaa' true (2 'aaa'))! Item was changed: ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- testOptionalNestedIntoMultipleQuantified self runRegex: #('(aa?){2}' '' false nil 'a' false nil 'aa' true (1 'aa') + 'baaa' true (2 'a'))! - 'baaa' true (2 'aaa'))! From henrik.s.johansen at veloxit.no Thu May 19 19:05:58 2016 From: henrik.s.johansen at veloxit.no (Henrik Sperre Johansen) Date: Thu May 19 19:42:13 2016 Subject: [squeak-dev] Re: StrikeFonstSet vs StrikeFont In-Reply-To: <1463661896461-4896031.post@n4.nabble.com> References: <1463645659348-4895960.post@n4.nabble.com> <1463661896461-4896031.post@n4.nabble.com> Message-ID: <1463684758782-4896167.post@n4.nabble.com> The string draw primitive only accepts a map with 256 indices into a bitmap, so a single StrikeFont can at most be used to draw 256 different glyphs. This is obviously not enough to display most content outside of ISO8859-1, so a StrikeFontSet includes multiple StrikeFonts; each covering a 256-glyph range of the Unicode character set (and also lets you use different glyphs depending on the leadingChar of the WideString, arguably useful for preserving CJK) Double dispatch then lets a WideString be drawn as consecutive calls to the primitive with the pieces that are covered by a single StrikeFont entry in the StrikeFontSet. (At least, that's how my memory of how it should work is) -- View this message in context: http://forum.world.st/StrikeFonstSet-vs-StrikeFont-tp4895960p4896167.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolas.cellier.aka.nice at gmail.com Thu May 19 20:18:34 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Thu May 19 20:18:37 2016 Subject: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz In-Reply-To: <573e0ab2.43c28c0a.df44d.09cbSMTPIN_ADDED_MISSING@mx.google.com> References: <573e0ab2.43c28c0a.df44d.09cbSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Patrick, IMO copy should copy deep enough without the need to invoke veryDeepCopy. Wouldn't it be a missing postCopy in RxmLookahead? postCopy super postCopy. lookahead := lookahead copy 2016-05-19 20:49 GMT+02:00 : > Patrick Rein uploaded a new version of Regex-Core to project The Trunk: > http://source.squeak.org/trunk/Regex-Core-pre.51.mcz > > ==================== Summary ==================== > > Name: Regex-Core-pre.51 > Author: pre > Time: 19 May 2016, 8:49:05.994548 pm > UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca > Ancestors: Regex-Core-ul.50 > > Fixes an erroring test of RxMatcher by replacing a copy with a > veryDeepCopy to sustain the integrity of the RxmLink tree. > > =============== Diff against Regex-Core-ul.50 =============== > > Item was changed: > ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') > ----- > makeQuantified: anRxmLink min: min max: max > "Perform recursive poor-man's transformation of the {,} > quantifiers." > | aMatcher | > > "{,} ==> ({1,})?" > min = 0 ifTrue: [ > ^ self makeOptional: (self makeQuantified: anRxmLink min: > 1 max: max) ]. > > "{,} ==> {-1, -1}+" > max ifNil: [ > + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) > pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. > - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) > pointTailTo: (self makePlus: anRxmLink copy) ]. > > "{,} ==> ... " > min = max > ifTrue: [ > + aMatcher := anRxmLink veryDeepCopy. > + (min-1) timesRepeat: [ aMatcher pointTailTo: > anRxmLink veryDeepCopy ]. > - aMatcher := anRxmLink copy. > - (min-1) timesRepeat: [ aMatcher pointTailTo: > anRxmLink copy ]. > ^ aMatcher ]. > > "{,} ==> {,}({1,-1})?" > + aMatcher := self makeOptional: anRxmLink veryDeepCopy. > - aMatcher := self makeOptional: anRxmLink copy. > (max - min - 1) timesRepeat: [ > + aMatcher := self makeOptional: (anRxmLink veryDeepCopy > pointTailTo: aMatcher) ]. > - aMatcher := self makeOptional: (anRxmLink copy > pointTailTo: aMatcher) ]. > ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: > aMatcher! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160519/968dcbdf/attachment.htm From Patrick.Rein at hpi.de Thu May 19 21:21:25 2016 From: Patrick.Rein at hpi.de (Rein, Patrick) Date: Thu May 19 21:21:31 2016 Subject: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz In-Reply-To: References: <573e0ab2.43c28c0a.df44d.09cbSMTPIN_ADDED_MISSING@mx.google.com>, Message-ID: <1463692886799.6093@hpi.de> Hi Nicolas, thanks for looking into this, as this is kind of tricky to get right on my own without any discussions. What I did is to look into the value of anRmxLink in #makeQuantified:min:max: before and after a copy. What happens is that the backward references in RxmBranch nodes back to other RxmLink nodes break as the references get only copied separately and result in two different objects. As a result the copied structure does not include any back references. The postCopy callbacks do not solve that issue but do, to my understanding at that point, only implement the recursion of the copying. veryDeepCopy however produces the same node structure which is what is actually needed for the quantified structures. This way the termiateWith: method works correctly and the generating of broken matcher structures is fixed. However, it changes the behavior slightly (as in the Regex-Tests-Core commit in the inbox) so I am not yet sure whether this is only a technical fix or also a correct fix of the behavior. Does that sound somewhat reasonable? :) Bests Patrick ________________________________ From: squeak-dev-bounces@lists.squeakfoundation.org on behalf of Nicolas Cellier Sent: Thursday, May 19, 2016 22:18 To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz Hi Patrick, IMO copy should copy deep enough without the need to invoke veryDeepCopy. Wouldn't it be a missing postCopy in RxmLookahead? postCopy super postCopy. lookahead := lookahead copy 2016-05-19 20:49 GMT+02:00 >: Patrick Rein uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-pre.51.mcz ==================== Summary ==================== Name: Regex-Core-pre.51 Author: pre Time: 19 May 2016, 8:49:05.994548 pm UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca Ancestors: Regex-Core-ul.50 Fixes an erroring test of RxMatcher by replacing a copy with a veryDeepCopy to sustain the integrity of the RxmLink tree. =============== Diff against Regex-Core-ul.50 =============== Item was changed: ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') ----- makeQuantified: anRxmLink min: min max: max "Perform recursive poor-man's transformation of the {,} quantifiers." | aMatcher | "{,} ==> ({1,})?" min = 0 ifTrue: [ ^ self makeOptional: (self makeQuantified: anRxmLink min: 1 max: max) ]. "{,} ==> {-1, -1}+" max ifNil: [ + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink copy) ]. "{,} ==> ... " min = max ifTrue: [ + aMatcher := anRxmLink veryDeepCopy. + (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink veryDeepCopy ]. - aMatcher := anRxmLink copy. - (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink copy ]. ^ aMatcher ]. "{,} ==> {,}({1,-1})?" + aMatcher := self makeOptional: anRxmLink veryDeepCopy. - aMatcher := self makeOptional: anRxmLink copy. (max - min - 1) timesRepeat: [ + aMatcher := self makeOptional: (anRxmLink veryDeepCopy pointTailTo: aMatcher) ]. - aMatcher := self makeOptional: (anRxmLink copy pointTailTo: aMatcher) ]. ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: aMatcher! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160519/539541fc/attachment-0001.htm From commits at source.squeak.org Thu May 19 21:58:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 21:58:05 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160519215803.8626.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068125.html Name: System-ul.831 Ancestors: System-mt.830 - use #adoptInstance: instead of copying the ByteArray into a new LargeInteger in SecureHashAlgorithm >> #finalHash. This should be somewhat quicker and it should also avoid running the fallback code of LargePositiveInteger >> #replaceFrom:to:with:startingAt: with a ByteArray argument, which wouldn't work. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068126.html Name: ST80Tests-pre.4 Ancestors: ST80Tests-ul.3 Fixes a test for the ST80 package which asserts the packages the ST80 package depends on. Adds Monticello to the list as it is now needed for the unloading capabilities ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068127.html Name: Multilingual-pre.212 Ancestors: Multilingual-ul.211 Fixes broken TestIndenting as StrikeFontSet did not fullfill the interface required for a Font although it is a subclass of AbstractFont ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068128.html Name: ToolsTests-pre.77 Ancestors: ToolsTests-nice.76 Fixes a test for the FileList class. The itemsForFile: method requires a fully qualified path which is stated in the method and also provided by internal methods of FileList. The test however used a relative path. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068129.html Name: Tests-pre.342 Ancestors: Tests-pre.341 As discussed several times on the mailing list the ExceptionTests>>testHandlerFromAction test is a feature request test and should be regarded as an expectedFailure. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068130.html Name: Tests-pre.343 Ancestors: Tests-pre.342 Reverts accidential change to the PackageDependencyTest which actually resides in the inbox ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068131.html Name: Regex-Core-pre.51 Ancestors: Regex-Core-ul.50 Fixes an erroring test of RxMatcher by replacing a copy with a veryDeepCopy to sustain the integrity of the RxmLink tree. ============================================= From leves at caesar.elte.hu Thu May 19 22:01:34 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 22:01:37 2016 Subject: [squeak-dev] The Inbox: Regex-Tests-Core-pre.6.mcz In-Reply-To: <1463684122383.1242@hpi.de> References: <20160519185108.27D7F6066D@mail2.hpi.uni-potsdam.de> <1463684122383.1242@hpi.de> Message-ID: Hi Patrick, This test has never passed before. I wrote it to document a bug I had found in the matcher creation. It used to crash the VM, but I fixed that part earlier. Now that you made the matcher work, it's clear that the test case has a bug as well. The last line should read 'baaa' true (1 'aaa' 2 'a')) because the test checks all listed subexpressions, and there's no reason for us not to list all. The first subexpression is by default the whole match, which is expected to be 'aaa'. The second subexpression is the last match of the part between the parenthesis, which is just 'a', as you suggested. Levente On Thu, 19 May 2016, Rein, Patrick wrote: > I would like to comment further on these changes as they change the expected Regex engine behavior. The behavior, that matching groups in a multiple quantifier return the last match of the group is consistent with for example the Ruby regex engine: > > http://rubular.com/r/kxoreyPolG > > The issue is also decribed here: http://www.regular-expressions.info/captureall.html > > However, I am not sure what the intended behavior for RxMatcher is. Has this ever been working and what was the intended behavior? > > Bests > Patrick > ________________________________________ > From: squeak-dev-bounces@lists.squeakfoundation.org on behalf of commits@source.squeak.org > Sent: Thursday, May 19, 2016 13:50 > To: squeak-dev@lists.squeakfoundation.org > Subject: [squeak-dev] The Inbox: Regex-Tests-Core-pre.6.mcz > > Patrick Rein uploaded a new version of Regex-Tests-Core to project The Inbox: > http://source.squeak.org/inbox/Regex-Tests-Core-pre.6.mcz > > ==================== Summary ==================== > > Name: Regex-Tests-Core-pre.6 > Author: pre > Time: 19 May 2016, 8:50:59.559548 pm > UUID: e1cbdf20-9ce2-4e4a-b1d8-574186c2e746 > Ancestors: Regex-Tests-Core-ul.5 > > Adjustments to the Regex tests for optional subexpressions in multiple quantifiers. These tests demonstrate the different behavior when nesting subexpressions in quantifiers and the other way round. > > =============== Diff against Regex-Tests-Core-ul.5 =============== > > Item was added: > + ----- Method: RxMatcherTest>>testOptionalMultipleQuantifiedSubexpression (in category 'testing') ----- > + testOptionalMultipleQuantifiedSubexpression > + > + > + self runRegex: #('((aa?){2})' > + '' false nil > + 'a' false nil > + 'aa' true (1 'aa') > + 'baaa' true (2 'aaa'))! > > Item was changed: > ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- > testOptionalNestedIntoMultipleQuantified > > > self runRegex: #('(aa?){2}' > '' false nil > 'a' false nil > 'aa' true (1 'aa') > + 'baaa' true (2 'a'))! > - 'baaa' true (2 'aaa'))! > From leves at caesar.elte.hu Thu May 19 22:35:41 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Thu May 19 22:35:45 2016 Subject: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz In-Reply-To: <1463692886799.6093@hpi.de> References: <573e0ab2.43c28c0a.df44d.09cbSMTPIN_ADDED_MISSING@mx.google.com>, <1463692886799.6093@hpi.de> Message-ID: Hi All, The reason why #veryDeepCopy works, and #copy doesn't (besides some missing #postCopy methods) is that some nodes in the matcher graph are referenced from more than one place, so #copy will create two copies of these, while #veryDeepCopy will only create one. Still, #veryDeepCopy does make unnecessary object duplications, so we should find a way to work this around. One example for a double reference is in RxMatcher >> #makeOptional:, where the dummy link is added to the branch and the end of the matcher chain as well. Levente On Thu, 19 May 2016, Rein, Patrick wrote: > > Hi Nicolas, > > > thanks for looking into this, as this is kind of tricky to get right on my own without any discussions. What I did is to look into the value of > anRmxLink in #makeQuantified:min:max:?before and after a copy. What happens is that the backward references in RxmBranch nodes back to other > RxmLink nodes break as the references get only?copied separately and result in two different objects. As a result the copied structure does not > include any back references.?The postCopy callbacks do not solve that issue but do, to my understanding at that point, only implement the > recursion of the copying.?veryDeepCopy however produces the same node structure?which is what is actually needed for the quantified structures. > This way the termiateWith: method works correctly and the generating of broken matcher structures is fixed.?However, it changes the behavior > slightly (as in the Regex-Tests-Core commit in the inbox) so I am not yet sure whether this is only a technical fix or also a correct fix of the > behavior. > > > Does that sound somewhat?reasonable? :) > > > Bests > > Patrick > > > > __________________________________________________________________________________________________________________________________________________ > From: squeak-dev-bounces@lists.squeakfoundation.org on behalf of Nicolas Cellier > > Sent: Thursday, May 19, 2016 22:18 > To: The general-purpose Squeak developers list > Subject: Re: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz ? > Hi Patrick, > IMO copy should copy deep enough without the need to invoke veryDeepCopy. > Wouldn't it be a missing postCopy in RxmLookahead? > > postCopy > ??? super postCopy. > ??? lookahead := lookahead copy > > 2016-05-19 20:49 GMT+02:00 : > Patrick Rein uploaded a new version of Regex-Core to project The Trunk: > http://source.squeak.org/trunk/Regex-Core-pre.51.mcz > > ==================== Summary ==================== > > Name: Regex-Core-pre.51 > Author: pre > Time: 19 May 2016, 8:49:05.994548 pm > UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca > Ancestors: Regex-Core-ul.50 > > Fixes an erroring test of RxMatcher by replacing a copy with a veryDeepCopy to sustain the integrity of the RxmLink tree. > > =============== Diff against Regex-Core-ul.50 =============== > > Item was changed: > ? ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') ----- > ? makeQuantified: anRxmLink min: min max: max > ? ? ? ? "Perform recursive poor-man's transformation of the {,} quantifiers." > ? ? ? ? | aMatcher | > > ? ? ? ? "{,}? ? ? ?==>? ({1,})?" > ? ? ? ? min = 0 ifTrue: [ > ? ? ? ? ? ? ? ? ^ self makeOptional: (self makeQuantified: anRxmLink min: 1 max: max) ]. > > ? ? ? ? "{,}? ? ? ?==>? {-1, -1}+" > ? ? ? ? max ifNil: [ > +? ? ? ? ? ? ? ?^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. > -? ? ? ? ? ? ? ?^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink copy) ]. > > ? ? ? ? "{,}? ==>? ... " > ? ? ? ? min = max > ? ? ? ? ? ? ? ? ifTrue: [ > +? ? ? ? ? ? ? ? ? ? ? ?aMatcher := anRxmLink veryDeepCopy. > +? ? ? ? ? ? ? ? ? ? ? ?(min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink veryDeepCopy ]. > -? ? ? ? ? ? ? ? ? ? ? ?aMatcher := anRxmLink copy. > -? ? ? ? ? ? ? ? ? ? ? ?(min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink copy ]. > ? ? ? ? ? ? ? ? ? ? ? ? ^ aMatcher ]. > > ? ? ? ? "{,}? ==>? {,}({1,-1})?" > +? ? ? ?aMatcher := self makeOptional: anRxmLink veryDeepCopy. > -? ? ? ?aMatcher := self makeOptional: anRxmLink copy. > ? ? ? ? (max - min - 1) timesRepeat: [ > +? ? ? ? ? ? ? ? aMatcher := self makeOptional: (anRxmLink veryDeepCopy pointTailTo: aMatcher) ]. > -? ? ? ? ? ? ? ? aMatcher := self makeOptional: (anRxmLink copy pointTailTo: aMatcher) ]. > ? ? ? ? ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: aMatcher! > > > > > From commits at source.squeak.org Thu May 19 23:03:25 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 23:04:04 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.52.mcz Message-ID: Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Core-ul.52.mcz ==================== Summary ==================== Name: Regex-Core-ul.52 Author: ul Time: 20 May 2016, 1:02:48.025069 am UUID: 25d06172-cbd2-4454-a5e7-0dcfc27525b4 Ancestors: Regex-Core-pre.51 RxmLink changes: - implemented #copyChain, #copyUsing: and #postCopyUsing: to create a copy of the matcher chain without creating duplicates of links being referenced from more than one place - implemented missing #postCopy methods - removed unused variables from subclasses - use #copyChain instead of #veryDeepCopy in RxMatcher >> #makeQuantified:min:max: to avoid unnecessary duplication of non-link objects =============== Diff against Regex-Core-pre.51 =============== Item was changed: ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') ----- makeQuantified: anRxmLink min: min max: max "Perform recursive poor-man's transformation of the {,} quantifiers." | aMatcher | "{,} ==> ({1,})?" min = 0 ifTrue: [ ^ self makeOptional: (self makeQuantified: anRxmLink min: 1 max: max) ]. "{,} ==> {-1, -1}+" max ifNil: [ + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink copyChain) ]. - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. "{,} ==> ... " min = max ifTrue: [ + aMatcher := anRxmLink copyChain. + (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink copyChain ]. - aMatcher := anRxmLink veryDeepCopy. - (min-1) timesRepeat: [ aMatcher pointTailTo: anRxmLink veryDeepCopy ]. ^ aMatcher ]. "{,} ==> {,}({1,-1})?" + aMatcher := self makeOptional: anRxmLink copyChain. - aMatcher := self makeOptional: anRxmLink veryDeepCopy. (max - min - 1) timesRepeat: [ + aMatcher := self makeOptional: (anRxmLink copyChain pointTailTo: aMatcher) ]. - aMatcher := self makeOptional: (anRxmLink veryDeepCopy pointTailTo: aMatcher) ]. ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: aMatcher! Item was added: + ----- Method: RxmBranch>>postCopyUsing: (in category 'copying') ----- + postCopyUsing: anIdentityDictionary + + super postCopyUsing: anIdentityDictionary. + alternative ifNotNil: [ + alternative := alternative copyUsing: anIdentityDictionary ]! Item was added: + ----- Method: RxmLink>>copyChain (in category 'copying') ----- + copyChain + "Create a full copy of all the links in this chain, including branches, while letting them share and reuse non-link objects as much as possible." + + ^self copyUsing: IdentityDictionary new! Item was added: + ----- Method: RxmLink>>copyUsing: (in category 'copying') ----- + copyUsing: anIdentityDictionary + "Copy the receiver if it's not present in the argument dictionary, or just return the previously made copy. The rest of the object graph will be copied by #postCopyUsing:." + + ^anIdentityDictionary + at: self + ifAbsent: [ + "It may be tempting to use #at:ifAbsentPut: instead, but the argument block must not modify the receiver, so that wouldn't work." + anIdentityDictionary + at: self + put: (self shallowCopy + postCopyUsing: anIdentityDictionary; + yourself) ]! Item was added: + ----- Method: RxmLink>>postCopyUsing: (in category 'copying') ----- + postCopyUsing: anIdentityDictionary + "Copy the rest of the chain the same way as it's done in #copyUsing:." + + next ifNotNil: [ + next := next copyUsing: anIdentityDictionary ]! Item was changed: RxmLink subclass: #RxmLookahead + instanceVariableNames: 'lookahead' - instanceVariableNames: 'lookahead positive' classVariableNames: '' poolDictionaries: '' category: 'Regex-Core'! !RxmLookahead commentStamp: '' prior: 0! Instance holds onto a lookead which matches but does not consume anything. Instance variables: predicate ! Item was removed: - ----- Method: RxmLookahead>>initialize (in category 'initialization') ----- - initialize - super initialize. - positive := true.! Item was added: + ----- Method: RxmLookahead>>postCopy (in category 'copying') ----- + postCopy + + super postCopy. + lookahead := lookahead copy! Item was added: + ----- Method: RxmLookahead>>postCopyUsing: (in category 'copying') ----- + postCopyUsing: anIdentityDictionary + + super postCopyUsing: anIdentityDictionary. + lookahead := lookahead copyUsing: anIdentityDictionary! Item was changed: RxmLink subclass: #RxmSubstring + instanceVariableNames: 'sampleStream ignoreCase' - instanceVariableNames: 'sampleStream caseSensitive ignoreCase' classVariableNames: '' poolDictionaries: '' category: 'Regex-Core'! !RxmSubstring commentStamp: 'Tbn 11/12/2010 23:14' prior: 0! -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov -- Instance holds onto a string and matches exactly this string, and exactly once. Instance variables: string ! Item was added: + ----- Method: RxmSubstring>>postCopy (in category 'copying') ----- + postCopy + + super postCopy. + sampleStream := sampleStream copy! Item was added: + ----- Method: RxmSubstring>>postCopyUsing: (in category 'copying') ----- + postCopyUsing: anIdentityDictionary + + super postCopyUsing: anIdentityDictionary. + sampleStream := sampleStream copy! From commits at source.squeak.org Thu May 19 23:19:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu May 19 23:20:29 2016 Subject: [squeak-dev] The Trunk: Kernel-ul.1024.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.1024.mcz ==================== Summary ==================== Name: Kernel-ul.1024 Author: ul Time: 20 May 2016, 1:19:14.472859 am UUID: 68c736cc-d98c-4303-a68e-312488b5c51a Ancestors: Kernel-eem.1023 Copied the fallback code of LargePositiveInteger >> #replaceFrom:to:with:startingAt: from its parent class and extended it to make it compatible with the primitive as well. =============== Diff against Kernel-eem.1023 =============== Item was changed: ----- Method: LargePositiveInteger>>replaceFrom:to:with:startingAt: (in category 'system primitives') ----- replaceFrom: start to: stop with: replacement startingAt: repStart "Primitive. This destructively replaces elements from start to stop in the receiver starting at index, repStart, in the collection, replacement. Answer the receiver. Range checks are performed in the primitive only. Optional. See Object documentation whatIsAPrimitive." + + | index replacementIndex | + replacementIndex := repStart. + index := start. + replacement isInteger ifTrue: [ + "This branch is only here to accept SmallInteger replacements not handled by the primitive." + [ index <= stop ] whileTrue: [ + self digitAt: index put: (replacement digitAt: replacementIndex). + index := index + 1. + replacementIndex := replacementIndex + 1 ]. + ^self ]. + "Primitive compatible variant which doesn't support SmallInteger replacements." + [ index <= stop ] whileTrue: [ + self basicAt: index put: (replacement basicAt: replacementIndex). + index := index + 1. + replacementIndex := replacementIndex + 1 ]! - ^ super replaceFrom: start to: stop with: replacement startingAt: repStart! From lewis at mail.msen.com Fri May 20 01:12:54 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 20 01:12:58 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160519024408.GA27465@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> Message-ID: <20160520011254.GA13712@shell.msen.com> I really must apologize, I see that I attached the wrong file to my original post. Attached here is the oscog version that needs testing. I am looking to confirm that the resulting Cog or Spur VM performs the HostWindowPlugin function to resize the display window: saveExtent := Display width @ Display height. DisplayScreen hostWindowExtent: 500@100. (Delay forSeconds: 4) wait. DisplayScreen hostWindowExtent: saveExtent. If someone can confirm this, I would be grateful. (Yes I know, we need to get GitHub and Travis CI going for the VM so that people will not need to ask silly questions like this). Thanks, Dave On Wed, May 18, 2016 at 10:44:08PM -0400, David T. Lewis wrote: > On Mon, May 16, 2016 at 09:30:02AM -0700, Yoshiki Ohshima wrote: > > At Sun, 15 May 2016 22:27:13 -0400, > > David T. Lewis wrote: > > > > > > - Test the VM. Tim, I need help on this. I do not currently have a working > > > Cog build environment (Unbuntu/autotools/gcc version issues). Can you > > > apply the patch from Yoshiki's email and see if your resulting Cog VM > > > continues to work for you as expected on Pi with Scratch? > > > > And more testing would be nice. > > > > Tim, > > The attached sqUnixX11.c should get the HostWindowPlugin functions > working on Cog/Spur. If that is confirmed, I will commit to SVN oscog > branch and then we can follow up with the ImmX11 updates. > > When you get a chance, can you please compile a VM with the attached > sqUnixX11.c and let me know if the following works on Squeak trunk > and Raspberry Pi: > > saveExtent := Display width @ Display height. > DisplayScreen hostWindowExtent: 500@100. > (Delay forSeconds: 4) wait. > DisplayScreen hostWindowExtent: saveExtent. > > Thanks, > Dave > -------------- next part -------------- A non-text attachment was scrubbed... Name: sqUnixX11.c.gz Type: application/octet-stream Size: 57019 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160519/664a28c6/sqUnixX11.c-0001.obj From nicolas.cellier.aka.nice at gmail.com Fri May 20 06:41:32 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri May 20 06:41:35 2016 Subject: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz In-Reply-To: <1463692886799.6093@hpi.de> References: <573e0ab2.43c28c0a.df44d.09cbSMTPIN_ADDED_MISSING@mx.google.com> <1463692886799.6093@hpi.de> Message-ID: 2016-05-19 23:21 GMT+02:00 Rein, Patrick : > Hi Nicolas, > > > thanks for looking into this, as this is kind of tricky to get right on my > own without any discussions. What I did is to look into the value of > anRmxLink in #makeQuantified:min:max: before and after a copy. What happens > is that the backward references in RxmBranch nodes back to other RxmLink > nodes break as the references get only copied separately and result in two > different objects. As a result the copied structure does not include any > back references. The postCopy callbacks do not solve that issue but do, to > my understanding at that point, only implement the recursion of the > copying. veryDeepCopy however produces the same node structure which is > what is actually needed for the quantified structures. This way the > termiateWith: method works correctly and the generating of broken matcher > structures is fixed. However, it changes the behavior slightly (as in the > Regex-Tests-Core commit in the inbox) so I am not yet sure whether this is > only a technical fix or also a correct fix of the behavior. > > > Does that sound somewhat reasonable? :) > > > Bests > > Patrick > > > Perfectly, i missed that point, thanks for explanations. Still, copy should do something correct and i prefer the solution posted by Levente, even if it may sound more heavy than a clever veryDeepCopy. > > ------------------------------ > *From:* squeak-dev-bounces@lists.squeakfoundation.org < > squeak-dev-bounces@lists.squeakfoundation.org> on behalf of Nicolas > Cellier > *Sent:* Thursday, May 19, 2016 22:18 > *To:* The general-purpose Squeak developers list > *Subject:* Re: [squeak-dev] The Trunk: Regex-Core-pre.51.mcz > > Hi Patrick, > IMO copy should copy deep enough without the need to invoke veryDeepCopy. > Wouldn't it be a missing postCopy in RxmLookahead? > > postCopy > super postCopy. > lookahead := lookahead copy > > 2016-05-19 20:49 GMT+02:00 : > >> Patrick Rein uploaded a new version of Regex-Core to project The Trunk: >> http://source.squeak.org/trunk/Regex-Core-pre.51.mcz >> >> ==================== Summary ==================== >> >> Name: Regex-Core-pre.51 >> Author: pre >> Time: 19 May 2016, 8:49:05.994548 pm >> UUID: 49e3e29a-cf96-4f42-a8f1-4af75dbb9bca >> Ancestors: Regex-Core-ul.50 >> >> Fixes an erroring test of RxMatcher by replacing a copy with a >> veryDeepCopy to sustain the integrity of the RxmLink tree. >> >> =============== Diff against Regex-Core-ul.50 =============== >> >> Item was changed: >> ----- Method: RxMatcher>>makeQuantified:min:max: (in category >> 'private') ----- >> makeQuantified: anRxmLink min: min max: max >> "Perform recursive poor-man's transformation of the {,} >> quantifiers." >> | aMatcher | >> >> "{,} ==> ({1,})?" >> min = 0 ifTrue: [ >> ^ self makeOptional: (self makeQuantified: anRxmLink min: >> 1 max: max) ]. >> >> "{,} ==> {-1, -1}+" >> max ifNil: [ >> + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) >> pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. >> - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) >> pointTailTo: (self makePlus: anRxmLink copy) ]. >> >> "{,} ==> ... " >> min = max >> ifTrue: [ >> + aMatcher := anRxmLink veryDeepCopy. >> + (min-1) timesRepeat: [ aMatcher pointTailTo: >> anRxmLink veryDeepCopy ]. >> - aMatcher := anRxmLink copy. >> - (min-1) timesRepeat: [ aMatcher pointTailTo: >> anRxmLink copy ]. >> ^ aMatcher ]. >> >> "{,} ==> >> {,}({1,-1})?" >> + aMatcher := self makeOptional: anRxmLink veryDeepCopy. >> - aMatcher := self makeOptional: anRxmLink copy. >> (max - min - 1) timesRepeat: [ >> + aMatcher := self makeOptional: (anRxmLink veryDeepCopy >> pointTailTo: aMatcher) ]. >> - aMatcher := self makeOptional: (anRxmLink copy >> pointTailTo: aMatcher) ]. >> ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: >> aMatcher! >> >> >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160520/fc42f165/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri May 20 07:24:03 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri May 20 07:24:06 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.52.mcz In-Reply-To: <573e4642.812a8d0a.930e5.ffff80cdSMTPIN_ADDED_MISSING@mx.google.com> References: <573e4642.812a8d0a.930e5.ffff80cdSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: +1 I presume copyChain is a bit more expensive than copy (I didn?t measure it though). More expensive but allways correct. If the inexpensive copy is used extensively, and my suggestion is a performance killer, then let?s keep current solution: cleverly use expensive copy exactly where we now we are going to need it. Otherwise, I suggest renaming copyChain into copy, and hence have something much more robust. 2016-05-20 1:03 GMT+02:00 : > Levente Uzonyi uploaded a new version of Regex-Core to project The Trunk: > http://source.squeak.org/trunk/Regex-Core-ul.52.mcz > > ==================== Summary ==================== > > Name: Regex-Core-ul.52 > Author: ul > Time: 20 May 2016, 1:02:48.025069 am > UUID: 25d06172-cbd2-4454-a5e7-0dcfc27525b4 > Ancestors: Regex-Core-pre.51 > > RxmLink changes: > - implemented #copyChain, #copyUsing: and #postCopyUsing: to create a copy > of the matcher chain without creating duplicates of links being referenced > from more than one place > - implemented missing #postCopy methods > - removed unused variables from subclasses > > - use #copyChain instead of #veryDeepCopy in RxMatcher >> > #makeQuantified:min:max: to avoid unnecessary duplication of non-link > objects > > =============== Diff against Regex-Core-pre.51 =============== > > Item was changed: > ----- Method: RxMatcher>>makeQuantified:min:max: (in category 'private') > ----- > makeQuantified: anRxmLink min: min max: max > "Perform recursive poor-man's transformation of the {,} > quantifiers." > | aMatcher | > > "{,} ==> ({1,})?" > min = 0 ifTrue: [ > ^ self makeOptional: (self makeQuantified: anRxmLink min: > 1 max: max) ]. > > "{,} ==> {-1, -1}+" > max ifNil: [ > + ^ (self makeQuantified: anRxmLink min: 1 max: min-1) > pointTailTo: (self makePlus: anRxmLink copyChain) ]. > - ^ (self makeQuantified: anRxmLink min: 1 max: min-1) > pointTailTo: (self makePlus: anRxmLink veryDeepCopy) ]. > > "{,} ==> ... " > min = max > ifTrue: [ > + aMatcher := anRxmLink copyChain. > + (min-1) timesRepeat: [ aMatcher pointTailTo: > anRxmLink copyChain ]. > - aMatcher := anRxmLink veryDeepCopy. > - (min-1) timesRepeat: [ aMatcher pointTailTo: > anRxmLink veryDeepCopy ]. > ^ aMatcher ]. > > "{,} ==> {,}({1,-1})?" > + aMatcher := self makeOptional: anRxmLink copyChain. > - aMatcher := self makeOptional: anRxmLink veryDeepCopy. > (max - min - 1) timesRepeat: [ > + aMatcher := self makeOptional: (anRxmLink copyChain > pointTailTo: aMatcher) ]. > - aMatcher := self makeOptional: (anRxmLink veryDeepCopy > pointTailTo: aMatcher) ]. > ^ (self makeQuantified: anRxmLink min: min max: min) pointTailTo: > aMatcher! > > Item was added: > + ----- Method: RxmBranch>>postCopyUsing: (in category 'copying') ----- > + postCopyUsing: anIdentityDictionary > + > + super postCopyUsing: anIdentityDictionary. > + alternative ifNotNil: [ > + alternative := alternative copyUsing: anIdentityDictionary > ]! > > Item was added: > + ----- Method: RxmLink>>copyChain (in category 'copying') ----- > + copyChain > + "Create a full copy of all the links in this chain, including > branches, while letting them share and reuse non-link objects as much as > possible." > + > + ^self copyUsing: IdentityDictionary new! > > Item was added: > + ----- Method: RxmLink>>copyUsing: (in category 'copying') ----- > + copyUsing: anIdentityDictionary > + "Copy the receiver if it's not present in the argument dictionary, > or just return the previously made copy. The rest of the object graph will > be copied by #postCopyUsing:." > + > + ^anIdentityDictionary > + at: self > + ifAbsent: [ > + "It may be tempting to use #at:ifAbsentPut: > instead, but the argument block must not modify the receiver, so that > wouldn't work." > + anIdentityDictionary > + at: self > + put: (self shallowCopy > + postCopyUsing: > anIdentityDictionary; > + yourself) ]! > > Item was added: > + ----- Method: RxmLink>>postCopyUsing: (in category 'copying') ----- > + postCopyUsing: anIdentityDictionary > + "Copy the rest of the chain the same way as it's done in > #copyUsing:." > + > + next ifNotNil: [ > + next := next copyUsing: anIdentityDictionary ]! > > Item was changed: > RxmLink subclass: #RxmLookahead > + instanceVariableNames: 'lookahead' > - instanceVariableNames: 'lookahead positive' > classVariableNames: '' > poolDictionaries: '' > category: 'Regex-Core'! > > !RxmLookahead commentStamp: '' prior: 0! > Instance holds onto a lookead which matches but does not consume > anything. > > Instance variables: > predicate ! > > Item was removed: > - ----- Method: RxmLookahead>>initialize (in category 'initialization') > ----- > - initialize > - super initialize. > - positive := true.! > > Item was added: > + ----- Method: RxmLookahead>>postCopy (in category 'copying') ----- > + postCopy > + > + super postCopy. > + lookahead := lookahead copy! > > Item was added: > + ----- Method: RxmLookahead>>postCopyUsing: (in category 'copying') ----- > + postCopyUsing: anIdentityDictionary > + > + super postCopyUsing: anIdentityDictionary. > + lookahead := lookahead copyUsing: anIdentityDictionary! > > Item was changed: > RxmLink subclass: #RxmSubstring > + instanceVariableNames: 'sampleStream ignoreCase' > - instanceVariableNames: 'sampleStream caseSensitive ignoreCase' > classVariableNames: '' > poolDictionaries: '' > category: 'Regex-Core'! > > !RxmSubstring commentStamp: 'Tbn 11/12/2010 23:14' prior: 0! > -- Regular Expression Matcher v 1.1 (C) 1996, 1999 Vassili Bykov > -- > Instance holds onto a string and matches exactly this string, and > exactly once. > > Instance variables: > string ! > > Item was added: > + ----- Method: RxmSubstring>>postCopy (in category 'copying') ----- > + postCopy > + > + super postCopy. > + sampleStream := sampleStream copy! > > Item was added: > + ----- Method: RxmSubstring>>postCopyUsing: (in category 'copying') ----- > + postCopyUsing: anIdentityDictionary > + > + super postCopyUsing: anIdentityDictionary. > + sampleStream := sampleStream copy! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160520/2045ff3f/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri May 20 07:24:48 2016 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri May 20 07:24:51 2016 Subject: [squeak-dev] The Trunk: Regex-Core-ul.52.mcz In-Reply-To: References: <573e4642.812a8d0a.930e5.ffff80cdSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2016-05-20 9:24 GMT+02:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > +1 > > I presume copyChain is a bit more expensive than copy (I didn?t measure it > though). More expensive but allways correct. > > > If the inexpensive copy is used extensively, and my suggestion is a > performance killer, then let?s keep current solution: cleverly use > expensive copy exactly where we now we are going to need it. Otherwise, I > suggest renaming copyChain into copy, and hence have something much more > robust. > > where we know... Gah -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160520/6624d4aa/attachment.htm From commits at source.squeak.org Fri May 20 07:36:44 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 07:37:34 2016 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-pre.6.mcz Message-ID: Patrick Rein uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-pre.6.mcz ==================== Summary ==================== Name: Regex-Tests-Core-pre.6 Author: pre Time: 19 May 2016, 8:50:59.559548 pm UUID: e1cbdf20-9ce2-4e4a-b1d8-574186c2e746 Ancestors: Regex-Tests-Core-ul.5 Adjustments to the Regex tests for optional subexpressions in multiple quantifiers. These tests demonstrate the different behavior when nesting subexpressions in quantifiers and the other way round. =============== Diff against Regex-Tests-Core-ul.5 =============== Item was added: + ----- Method: RxMatcherTest>>testOptionalMultipleQuantifiedSubexpression (in category 'testing') ----- + testOptionalMultipleQuantifiedSubexpression + + + self runRegex: #('((aa?){2})' + '' false nil + 'a' false nil + 'aa' true (1 'aa') + 'baaa' true (2 'aaa'))! Item was changed: ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- testOptionalNestedIntoMultipleQuantified self runRegex: #('(aa?){2}' '' false nil 'a' false nil 'aa' true (1 'aa') + 'baaa' true (2 'a'))! - 'baaa' true (2 'aaa'))! From commits at source.squeak.org Fri May 20 07:38:02 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 07:38:45 2016 Subject: [squeak-dev] The Trunk: Regex-Tests-Core-pre.7.mcz Message-ID: Patrick Rein uploaded a new version of Regex-Tests-Core to project The Trunk: http://source.squeak.org/trunk/Regex-Tests-Core-pre.7.mcz ==================== Summary ==================== Name: Regex-Tests-Core-pre.7 Author: pre Time: 20 May 2016, 9:37:58.012592 am UUID: 6c249d10-f0eb-43b9-90af-38cab9d42f51 Ancestors: Regex-Tests-Core-pre.6 Extends the rxmatcher optional and quantified expressions tests according to Leventes suggestion to include all subexpressions matched =============== Diff against Regex-Tests-Core-pre.6 =============== Item was changed: ----- Method: RxMatcherTest>>testOptionalMultipleQuantifiedSubexpression (in category 'testing') ----- testOptionalMultipleQuantifiedSubexpression self runRegex: #('((aa?){2})' '' false nil 'a' false nil 'aa' true (1 'aa') + 'baaa' true (1 'aaa' 2 'aaa'))! - 'baaa' true (2 'aaa'))! Item was changed: ----- Method: RxMatcherTest>>testOptionalNestedIntoMultipleQuantified (in category 'testing') ----- testOptionalNestedIntoMultipleQuantified self runRegex: #('(aa?){2}' '' false nil 'a' false nil 'aa' true (1 'aa') + 'baaa' true (1 'aaa' 2 'a'))! - 'baaa' true (2 'a'))! From commits at source.squeak.org Fri May 20 08:11:00 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 08:11:03 2016 Subject: [squeak-dev] The Trunk: Tests-pre.344.mcz Message-ID: Patrick Rein uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-pre.344.mcz ==================== Summary ==================== Name: Tests-pre.344 Author: pre Time: 20 May 2016, 10:10:49.235592 am UUID: d144be16-8a8e-49d2-9bf8-9bf4304cb55d Ancestors: Tests-pre.343 Adds the ToolBuilder dependency to the PreferenceBrowser dependency test. As a temporary measure during the move to a ToolBuilder-based implementation it points directly to ToolBuilder-Morphic =============== Diff against Tests-pre.343 =============== Item was changed: ----- Method: PackageDependencyTest>>testPreferenceBrowser (in category 'tests') ----- testPreferenceBrowser self testPackage: #PreferenceBrowser dependsExactlyOn: #( #'Chronology-Core' Collections Graphics Kernel Morphic MorphicExtras System Tools + #'ToolBuilder-Morphic' "Work in progress. Should become ToolBuilder --pre" ).! From commits at source.squeak.org Fri May 20 08:12:23 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 08:12:25 2016 Subject: [squeak-dev] The Trunk: PreferenceBrowser-pre.60.mcz Message-ID: Patrick Rein uploaded a new version of PreferenceBrowser to project The Trunk: http://source.squeak.org/trunk/PreferenceBrowser-pre.60.mcz ==================== Summary ==================== Name: PreferenceBrowser-pre.60 Author: pre Time: 20 May 2016, 10:12:16.873592 am UUID: b7bf981d-b37d-4f6a-a298-921f729da05d Ancestors: PreferenceBrowser-kfr.59 Removes the unused useGradientFill method and thereby also the PreferenceBrowser dependency on the Balloon package =============== Diff against PreferenceBrowser-kfr.59 =============== Item was removed: - ----- Method: PBColorPreferenceView>>useGradientFill (in category 'user interface') ----- - useGradientFill - - "Make receiver use a solid fill style (e.g., a simple color)" - - - | color1 color2 fill | - self preference preferenceValue isGradientFill ifTrue:[^self]. "Already done" - color1 := Color white darker. - color2 := self preference preferenceValue asColor. - fill := GradientFillStyle ramp: {0.0 -> color1. 1.0 -> color2}. - fill origin: ActiveWorld topLeft. - fill direction: 0 @ ActiveWorld bounds extent y. - fill normal: ActiveWorld bounds extent x @ 0. - fill radial: false. - self preference preferenceValue: fill. - button label: self preference preferenceValue asString; - color: self preference preferenceValue! From commits at source.squeak.org Fri May 20 08:17:36 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 08:17:37 2016 Subject: [squeak-dev] The Trunk: EToys-pre.137.mcz Message-ID: Patrick Rein uploaded a new version of EToys to project The Trunk: http://source.squeak.org/trunk/EToys-pre.137.mcz ==================== Summary ==================== Name: EToys-pre.137 Author: pre Time: 20 May 2016, 10:17:16.147592 am UUID: f4fdcfc9-f4e7-431b-84bc-41ba3fec9f27 Ancestors: EToys-mt.136 Moves UpdatingRectangleMorph to MorphicExtras =============== Diff against EToys-mt.136 =============== Item was removed: - RectangleMorph subclass: #UpdatingRectangleMorph - instanceVariableNames: 'target lastValue getSelector putSelector contents' - classVariableNames: '' - poolDictionaries: '' - category: 'Etoys-Scripting Support'! - - !UpdatingRectangleMorph commentStamp: '' prior: 0! - Intended for use as a color swatch coupled to a color obtained from the target, but made just slightly more general than that.! Item was removed: - ----- Method: UpdatingRectangleMorph>>contents (in category 'accessing') ----- - contents - ^ contents! Item was removed: - ----- Method: UpdatingRectangleMorph>>contents: (in category 'accessing') ----- - contents: c - contents := c! Item was removed: - ----- Method: UpdatingRectangleMorph>>defaultBorderColor (in category 'initialization') ----- - defaultBorderColor - "answer the default border color/fill style for the receiver" - ^ Color lightGray lighter! Item was removed: - ----- Method: UpdatingRectangleMorph>>getSelector (in category 'accessing') ----- - getSelector - "Answer the getSelector" - - ^ getSelector! Item was removed: - ----- Method: UpdatingRectangleMorph>>getSelector: (in category 'accessing') ----- - getSelector: aSymbol - - getSelector := aSymbol. - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>handlesMouseDown: (in category 'event handling') ----- - handlesMouseDown: evt - ^putSelector notNil! Item was removed: - ----- Method: UpdatingRectangleMorph>>isEtoyReadout (in category 'accessing') ----- - isEtoyReadout - "Answer whether the receiver can serve as an etoy readout" - - ^ true! Item was removed: - ----- Method: UpdatingRectangleMorph>>mouseUp: (in category 'event handling') ----- - mouseUp: evt - - self changeColorTarget: self selector: #setTargetColor: originalColor: color hand: evt hand.! Item was removed: - ----- Method: UpdatingRectangleMorph>>putSelector (in category 'accessing') ----- - putSelector - ^ putSelector! Item was removed: - ----- Method: UpdatingRectangleMorph>>putSelector: (in category 'accessing') ----- - putSelector: aSymbol - putSelector := aSymbol! Item was removed: - ----- Method: UpdatingRectangleMorph>>readFromTarget (in category 'target access') ----- - readFromTarget - "Read the color value from my target" - - | v | - (target isNil or: [getSelector isNil]) ifTrue: [^contents]. - target isMorph ifTrue: [target isInWorld ifFalse: [^contents]]. - v := self valueProvider perform: getSelector. - lastValue := v. - ^v! Item was removed: - ----- Method: UpdatingRectangleMorph>>setTargetColor: (in category 'setting') ----- - setTargetColor: aColor - "Set my target's color as indicated" - - putSelector ifNotNil: - [self color: aColor. - contents := aColor. - self valueProvider perform: self putSelector withArguments: (Array with: aColor)] - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>step (in category 'stepping and presenter') ----- - step - | s | - super step. - s := self readFromTarget. - s = contents ifFalse: - [self contents: s. - self color: s] - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>stepTime (in category 'testing') ----- - stepTime - - ^ 50! Item was removed: - ----- Method: UpdatingRectangleMorph>>target (in category 'accessing') ----- - target - - ^ target - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>target: (in category 'accessing') ----- - target: anObject - - target := anObject. - ! Item was removed: - ----- Method: UpdatingRectangleMorph>>userEditsAllowed (in category 'accessing') ----- - userEditsAllowed - "Answer whether it is suitable for a user to change the value represented by this readout" - - ^ putSelector notNil! Item was removed: - ----- Method: UpdatingRectangleMorph>>valueProvider (in category 'setting') ----- - valueProvider - "Answer the object to which my get/set messages should be sent. This is inefficient and contorted in order to support grandfathered content for an earlier design" - - ^ target isMorph - ifTrue: - [target topRendererOrSelf player ifNil: [target]] - ifFalse: - [target]! Item was removed: - ----- Method: UpdatingRectangleMorph>>veryDeepFixupWith: (in category 'copying') ----- - veryDeepFixupWith: deepCopier - "If target and arguments fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals!!!!" - - super veryDeepFixupWith: deepCopier. - target := deepCopier references at: target ifAbsent: [target].! Item was removed: - ----- Method: UpdatingRectangleMorph>>veryDeepInner: (in category 'copying') ----- - veryDeepInner: deepCopier - "Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!!!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment." - - super veryDeepInner: deepCopier. - "target := target. Weakly copied" - lastValue := lastValue veryDeepCopyWith: deepCopier. - "getSelector := getSelector. a Symbol" - "putSelector := putSelector. a Symbol" - contents := contents veryDeepCopyWith: deepCopier.! From commits at source.squeak.org Fri May 20 08:18:31 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 08:19:23 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-pre.175.mcz Message-ID: Patrick Rein uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-pre.175.mcz ==================== Summary ==================== Name: MorphicExtras-pre.175 Author: pre Time: 20 May 2016, 10:18:14.376592 am UUID: 895e188c-ca42-4f48-9817-4d69b567dbc0 Ancestors: MorphicExtras-mt.174 Moves UpdatingRectangleMorph from EToys =============== Diff against MorphicExtras-mt.174 =============== Item was added: + RectangleMorph subclass: #UpdatingRectangleMorph + instanceVariableNames: 'target lastValue getSelector putSelector contents' + classVariableNames: '' + poolDictionaries: '' + category: 'MorphicExtras-Support'! + + !UpdatingRectangleMorph commentStamp: '' prior: 0! + Intended for use as a color swatch coupled to a color obtained from the target, but made just slightly more general than that.! Item was added: + ----- Method: UpdatingRectangleMorph>>contents (in category 'accessing') ----- + contents + ^ contents! Item was added: + ----- Method: UpdatingRectangleMorph>>contents: (in category 'accessing') ----- + contents: c + contents := c! Item was added: + ----- Method: UpdatingRectangleMorph>>defaultBorderColor (in category 'initialization') ----- + defaultBorderColor + "answer the default border color/fill style for the receiver" + ^ Color lightGray lighter! Item was added: + ----- Method: UpdatingRectangleMorph>>getSelector (in category 'accessing') ----- + getSelector + "Answer the getSelector" + + ^ getSelector! Item was added: + ----- Method: UpdatingRectangleMorph>>getSelector: (in category 'accessing') ----- + getSelector: aSymbol + + getSelector := aSymbol. + ! Item was added: + ----- Method: UpdatingRectangleMorph>>handlesMouseDown: (in category 'event handling') ----- + handlesMouseDown: evt + ^putSelector notNil! Item was added: + ----- Method: UpdatingRectangleMorph>>isEtoyReadout (in category 'accessing') ----- + isEtoyReadout + "Answer whether the receiver can serve as an etoy readout" + + ^ true! Item was added: + ----- Method: UpdatingRectangleMorph>>mouseUp: (in category 'event handling') ----- + mouseUp: evt + + self changeColorTarget: self selector: #setTargetColor: originalColor: color hand: evt hand.! Item was added: + ----- Method: UpdatingRectangleMorph>>putSelector (in category 'accessing') ----- + putSelector + ^ putSelector! Item was added: + ----- Method: UpdatingRectangleMorph>>putSelector: (in category 'accessing') ----- + putSelector: aSymbol + putSelector := aSymbol! Item was added: + ----- Method: UpdatingRectangleMorph>>readFromTarget (in category 'target access') ----- + readFromTarget + "Read the color value from my target" + + | v | + (target isNil or: [getSelector isNil]) ifTrue: [^contents]. + target isMorph ifTrue: [target isInWorld ifFalse: [^contents]]. + v := self valueProvider perform: getSelector. + lastValue := v. + ^v! Item was added: + ----- Method: UpdatingRectangleMorph>>setTargetColor: (in category 'setting') ----- + setTargetColor: aColor + "Set my target's color as indicated" + + putSelector ifNotNil: + [self color: aColor. + contents := aColor. + self valueProvider perform: self putSelector withArguments: (Array with: aColor)] + ! Item was added: + ----- Method: UpdatingRectangleMorph>>step (in category 'stepping and presenter') ----- + step + | s | + super step. + s := self readFromTarget. + s = contents ifFalse: + [self contents: s. + self color: s] + ! Item was added: + ----- Method: UpdatingRectangleMorph>>stepTime (in category 'testing') ----- + stepTime + + ^ 50! Item was added: + ----- Method: UpdatingRectangleMorph>>target (in category 'accessing') ----- + target + + ^ target + ! Item was added: + ----- Method: UpdatingRectangleMorph>>target: (in category 'accessing') ----- + target: anObject + + target := anObject. + ! Item was added: + ----- Method: UpdatingRectangleMorph>>userEditsAllowed (in category 'accessing') ----- + userEditsAllowed + "Answer whether it is suitable for a user to change the value represented by this readout" + + ^ putSelector notNil! Item was added: + ----- Method: UpdatingRectangleMorph>>valueProvider (in category 'setting') ----- + valueProvider + "Answer the object to which my get/set messages should be sent. This is inefficient and contorted in order to support grandfathered content for an earlier design" + + ^ target isMorph + ifTrue: + [target topRendererOrSelf player ifNil: [target]] + ifFalse: + [target]! Item was added: + ----- Method: UpdatingRectangleMorph>>veryDeepFixupWith: (in category 'copying') ----- + veryDeepFixupWith: deepCopier + "If target and arguments fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals!!!!" + + super veryDeepFixupWith: deepCopier. + target := deepCopier references at: target ifAbsent: [target].! Item was added: + ----- Method: UpdatingRectangleMorph>>veryDeepInner: (in category 'copying') ----- + veryDeepInner: deepCopier + "Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!!!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment." + + super veryDeepInner: deepCopier. + "target := target. Weakly copied" + lastValue := lastValue veryDeepCopyWith: deepCopier. + "getSelector := getSelector. a Symbol" + "putSelector := putSelector. a Symbol" + contents := contents veryDeepCopyWith: deepCopier.! From commits at source.squeak.org Fri May 20 08:20:17 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 08:20:19 2016 Subject: [squeak-dev] The Trunk: Morphic-pre.1149.mcz Message-ID: Patrick Rein uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-pre.1149.mcz ==================== Summary ==================== Name: Morphic-pre.1149 Author: pre Time: 20 May 2016, 10:19:40.525592 am UUID: 4cbea756-e549-4b75-b6ec-9182c9f9364d Ancestors: Morphic-mt.1148 Removes unused method of BracketSliderMorph =============== Diff against Morphic-mt.1148 =============== Item was removed: - ----- Method: BracketSliderMorph>>borderStyleToUse (in category 'accessing - ui') ----- - borderStyleToUse - "Answer the borderStyle that should be used for the receiver." - - ^self enabled - ifTrue: [self theme sliderNormalBorderStyleFor: self] - ifFalse: [self theme sliderDisabledBorderStyleFor: self]! From commits at source.squeak.org Fri May 20 09:39:49 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:39:51 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1150.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1150.mcz ==================== Summary ==================== Name: Morphic-mt.1150 Author: mt Time: 20 May 2016, 11:39:09.641411 am UUID: 8a07253b-8809-3842-80be-d1b520c4ff6c Ancestors: Morphic-pre.1149 Refactors system windows wrt. having active background windows as introduced in October 2015. Two preferences control this: Windows Active On First Click Windows Active Only On Top See their preference descriptions for details. Note that #activeOnlyOnTop used to be a regular message in system windows but was changed into a system-wide preference. Thanks to Chris for continuous feedback on this! =============== Diff against Morphic-pre.1149 =============== Item was added: + ----- Method: BorderedMorph>>grips (in category 'resize handling') ----- + grips + + ^ self submorphsSatisfying: [:each | each isKindOf: CornerGripMorph]! Item was removed: - ----- Method: CornerGripMorph>>mouseDown: (in category 'as yet unclassified') ----- - mouseDown: aMouseButtonEvent - target isSystemWindow ifTrue: - [ target == SystemWindow topWindow ifFalse: [ target activate ] ]. - super mouseDown: aMouseButtonEvent! Item was removed: - ----- Method: HandMorph>>windowUnderneath (in category 'accessing') ----- - windowUnderneath - ActiveWorld submorphsDo: - [ : each | (each isSystemWindow and: [ each containsPoint: self position ]) ifTrue: [ ^ each ] ]. - ^ nil! Item was changed: + ----- Method: Morph>>containingWindow (in category 'structure') ----- - ----- Method: Morph>>containingWindow (in category 'e-toy support') ----- containingWindow + "Answer a window that contains the receiver. Try to use the model to find the right window. If I do not have a model, use the model of one of my owners. We could also just use #isSystemWindow. This, however, gives system windows the chance to refrain from taking ownership of this morph." - "Answer a window or window-with-mvc that contains the receiver" | component | component := self. component model isNil ifTrue: [component := self firstOwnerSuchThat: [:m| m model notNil]]. ^(component isNil or: [component isWindowForModel: component model]) ifTrue: [component] ifFalse: [component firstOwnerSuchThat:[:m| m isWindowForModel: component model]]! Item was changed: ----- Method: Morph>>embedInWindow (in category 'e-toy support') ----- embedInWindow | window worldToUse | worldToUse := self world. "I'm assuming we are already in a world" window := (SystemWindow labelled: self defaultLabelForInspector) model: nil. window bounds: ((self position - ((0@window labelHeight) + window borderWidth)) corner: self bottomRight + window borderWidth). window addMorph: self frame: (0@0 extent: 1@1). window updatePaneColors. worldToUse addMorph: window. + window beKeyWindow.! - window activate! Item was changed: ----- Method: Morph>>handleMouseDown: (in category 'events-processing') ----- handleMouseDown: anEvent "System level event handling." anEvent wasHandled ifTrue:[^self]. "not interested" anEvent hand removePendingBalloonFor: self. anEvent hand removePendingHaloFor: self. anEvent wasHandled: true. (anEvent controlKeyPressed and: [anEvent blueButtonChanged not and: [Preferences cmdGesturesEnabled]]) ifTrue: [^ self invokeMetaMenu: anEvent]. "Make me modal during mouse transitions" anEvent hand newMouseFocus: self event: anEvent. (anEvent blueButtonChanged and:[Preferences cmdGesturesEnabled]) ifTrue:[^self blueButtonDown: anEvent]. "this mouse down could be the start of a gesture, or the end of a gesture focus" (self isGestureStart: anEvent) ifTrue: [^ self gestureStart: anEvent]. + self mouseDown: anEvent. - "Filter events sent to the subwidgets of non-MorphicModels in inactive windows, if they are not supposed to receive them due to windowActiveOnFirstClick being set to false. I don't like having this check for owningWindow here, is there another way?" - SystemWindow allWindowsAcceptInput - ifTrue: - [ self owningWindow - ifNil: [ self mouseDown: anEvent ] - ifNotNil: - [ : owningWindow | - (owningWindow canProcessMouseDown: anEvent) - ifTrue: [ self mouseDown: anEvent ] - ifFalse: [ owningWindow activate ] ] ] - ifFalse: [ self mouseDown: anEvent ]. Preferences maintainHalos ifFalse:[ anEvent hand removeHaloFromClick: anEvent on: self ]. (self handlesMouseStillDown: anEvent) ifTrue:[ self startStepping: #handleMouseStillDown: at: Time millisecondClockValue + self mouseStillDownThreshold arguments: {anEvent copy resetHandlerFields} stepTime: self mouseStillDownStepRate ]. ! Item was changed: ----- Method: Morph>>keyboardFocusChange: (in category 'event handling') ----- + keyboardFocusChange: aBoolean - keyboardFocusChange: aBoolean "The message is sent to a morph when its keyboard focus change. The given argument indicates that the receiver is gaining keyboard focus (versus losing) the keyboard focus. Morphs that accept keystrokes should change their appearance in some way when they are the current keyboard focus." + + self eventHandler + ifNotNil: [:h | h keyboardFocusChange: aBoolean fromMorph: self]. + + self indicateKeyboardFocus + ifTrue: [self changed].! - self eventHandler ifNotNil: - [ : h | h - keyboardFocusChange: aBoolean - fromMorph: self ]. - "Support for 'Focus Follows Mouse'. Want the window to maintain focus even after the pointer moves into its title bar." - self owningWindow ifNotNil: [ : window | window lookFocused: (aBoolean or: [ window containsPoint: ActiveHand position]) ]. - self indicateKeyboardFocus ifTrue: [ self changed ]! Item was changed: ----- Method: Morph>>openInWindowLabeled:inWorld: (in category 'initialization') ----- openInWindowLabeled: aString inWorld: aWorld | window extent | window := (SystemWindow labelled: aString) model: nil. window " guess at initial extent" bounds: (RealEstateAgent initialFrameFor: window initialExtent: self fullBounds extent world: aWorld); addMorph: self frame: (0@0 extent: 1@1); updatePaneColors. " calculate extent after adding in case any size related attributes were changed. Use fullBounds in order to trigger re-layout of layout morphs" extent := self fullBounds extent + (window borderWidth@window labelHeight) + window borderWidth. window extent: extent. aWorld addMorph: window. + window beKeyWindow. - window activate. aWorld startSteppingSubmorphsOf: window. ^window ! Item was removed: - ----- Method: Morph>>owningWindow (in category 'private') ----- - owningWindow - self withAllOwnersDo: [ : each | each isSystemWindow ifTrue: [ ^ each ] ]. - ^ nil! Item was changed: ----- Method: Morph>>undoMove:redo:owner:bounds:predecessor: (in category 'undo') ----- undoMove: cmd redo: redo owner: formerOwner bounds: formerBounds predecessor: formerPredecessor "Handle undo and redo of move commands in morphic" self owner ifNil: [^Beeper beep]. redo ifFalse: ["undo sets up the redo state first" cmd redoTarget: self selector: #undoMove:redo:owner:bounds:predecessor: arguments: { cmd. true. owner. bounds. owner morphPreceding: self}]. formerOwner ifNotNil: [formerPredecessor ifNil: [formerOwner addMorphFront: self] ifNotNil: [formerOwner addMorph: self after: formerPredecessor]]. self bounds: formerBounds. + (self isSystemWindow) ifTrue: [self beKeyWindow]! - (self isSystemWindow) ifTrue: [self activate]! Item was removed: - ----- Method: MorphicModel>>handleMouseDown: (in category 'events-processing') ----- - handleMouseDown: aMouseEvent - SystemWindow allWindowsAcceptInput ifTrue: - [ "This override is needed so that, when 'Window Active On First Click' is false, clicking on a PluggableListMorph of an inactive window will, correctly, NOT update the selection in the list; it will only activate the window." - aMouseEvent blueButtonChanged ifFalse: - [ self owningWindow ifNotNil: - [ : window | (window canProcessMouseDown: aMouseEvent) ifFalse: [ ^ window activate ]. - Model windowActiveOnFirstClick ifTrue: [ window activate ] ] ] ]. - super handleMouseDown: aMouseEvent! Item was changed: ----- Method: PasteUpMorph>>findAWindowSatisfying:orMakeOneUsing: (in category 'world menu') ----- findAWindowSatisfying: qualifyingBlock orMakeOneUsing: makeBlock "Locate a window satisfying a block, open it, and bring it to the front. Create one if necessary, by using the makeBlock" submorphs do: [:aMorph | | aWindow | (((aWindow := aMorph renderedMorph) isSystemWindow) and: [qualifyingBlock value: aWindow]) ifTrue: [aWindow isCollapsed ifTrue: [aWindow expand]. self addMorphFront: aWindow. + aWindow beKeyWindow. - aWindow activateAndForceLabelToShow. ^self]]. "None found, so create one" makeBlock value! Item was changed: ----- Method: PasteUpMorph>>findDirtyBrowsers: (in category 'world menu') ----- findDirtyBrowsers: evt "Present a menu of window titles for browsers with changes, and activate the one that gets chosen." | menu | menu := MenuMorph new. (SystemWindow windowsIn: self satisfying: [:w | (w model isKindOf: Browser) and: [w model canDiscardEdits not]]) do: [:w | menu add: w label target: w + action: #beKeyWindow]. - action: #activate]. menu submorphs notEmpty ifTrue: [menu popUpEvent: evt in: self]! Item was changed: ----- Method: PasteUpMorph>>findDirtyWindows: (in category 'world menu') ----- findDirtyWindows: evt "Present a menu of window titles for all windows with changes, and activate the one that gets chosen." | menu | menu := MenuMorph new. (SystemWindow windowsIn: self satisfying: [:w | w model canDiscardEdits not]) do: [:w | menu add: w label target: w + action: #beKeyWindow]. - action: #activate]. menu submorphs notEmpty ifTrue: [menu popUpEvent: evt in: self]! Item was changed: ----- Method: PasteUpMorph>>findWindow: (in category 'world menu') ----- findWindow: evt "Present a menu names of windows and naked morphs, and activate the one that gets chosen. Collapsed windows appear below line, expand if chosen; naked morphs appear below second line; if any of them has been given an explicit name, that is what's shown, else the class-name of the morph shows; if a naked morph is chosen, bring it to front and have it don a halo." | menu expanded collapsed nakedMorphs | menu := MenuMorph new. expanded := SystemWindow windowsIn: self satisfying: [:w | w isCollapsed not]. collapsed := SystemWindow windowsIn: self satisfying: [:w | w isCollapsed]. nakedMorphs := self submorphsSatisfying: [:m | (m isSystemWindow not and: [(m isStickySketchMorph) not]) and: [(m isFlapTab) not]]. (expanded isEmpty & (collapsed isEmpty & nakedMorphs isEmpty)) ifTrue: [^ Beeper beep]. (expanded asSortedCollection: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do: + [:w | menu add: w label target: w action: #beKeyWindow. - [:w | menu add: w label target: w action: #activateAndForceLabelToShow. w model canDiscardEdits ifFalse: [menu lastItem color: Color red]]. (expanded isEmpty | (collapsed isEmpty & nakedMorphs isEmpty)) ifFalse: [menu addLine]. (collapsed asSortedCollection: [:w1 :w2 | w1 label caseInsensitiveLessOrEqual: w2 label]) do: [:w | menu add: w label target: w action: #collapseOrExpand. w model canDiscardEdits ifFalse: [menu lastItem color: Color red]]. nakedMorphs isEmpty ifFalse: [menu addLine]. (nakedMorphs asSortedCollection: [:w1 :w2 | w1 nameForFindWindowFeature caseInsensitiveLessOrEqual: w2 nameForFindWindowFeature]) do: [:w | menu add: w nameForFindWindowFeature target: w action: #comeToFrontAndAddHalo]. menu addTitle: 'find window' translated. menu popUpEvent: evt in: self.! Item was changed: ----- Method: PluggableListMorph>>mouseEnter: (in category 'events') ----- + mouseEnter: event + - mouseEnter: event super mouseEnter: event. + Preferences mouseOverForKeyboardFocus + ifTrue: [event hand newKeyboardFocus: self].! - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand newKeyboardFocus: self ]! Item was changed: ----- Method: PluggableListMorph>>mouseLeave: (in category 'events') ----- mouseLeave: event + - "The mouse has left the bounds of the receiver" super mouseLeave: event. self hoverRow: nil. + + Preferences mouseOverForKeyboardFocus + ifTrue: [event hand releaseKeyboardFocus: self].! - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ event hand releaseKeyboardFocus: self ]! Item was changed: ----- Method: PluggableTextMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: event + "Restore the selection in the text morph if there was a selection." + super mouseEnter: event. + + selectionInterval ifNotNil: [:interval | + textMorph editor + selectInterval: selectionInterval; + setEmphasisHere]. + + Preferences mouseOverForKeyboardFocus + ifTrue:[event hand newKeyboardFocus: self]! - selectionInterval ifNotNil: - [textMorph editor selectInterval: selectionInterval; setEmphasisHere]. - textMorph selectionChanged. - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[ - event hand newKeyboardFocus: self]! Item was changed: ----- Method: PluggableTextMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + "Save the selection interval for later." + + selectionInterval := textMorph editor selectionInterval. + - "The mouse has left the bounds of the receiver" - textMorph ifNotNil: [selectionInterval := textMorph editor selectionInterval]. super mouseLeave: event. + + Preferences mouseOverForKeyboardFocus + ifTrue: [event hand releaseKeyboardFocus: self]! - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: - [event hand releaseKeyboardFocus: self]! Item was changed: ----- Method: ProportionalSplitterMorph>>mouseDown: (in category 'events') ----- mouseDown: anEvent "If the user manually drags me, don't override him with auto positioning." + - self owningWindow ifNotNil: [ : systemWindow | systemWindow == SystemWindow topWindow ifFalse: [ systemWindow activate ]]. anEvent redButtonChanged ifTrue: [ self withSiblingSplittersDo: [ : each | each stopStepping ] ] ifFalse: [ anEvent shiftPressed ifTrue: [ self startStepping ] ifFalse: [ self startStepping. self withSiblingSplittersDo: [ : each | each startStepping ] ] ]. (self class showSplitterHandles not and: [ self bounds containsPoint: anEvent cursorPoint ]) ifTrue: [ oldColor := self color. self color: Color black ]. ^ super mouseDown: anEvent! Item was changed: ----- Method: ProportionalSplitterMorph>>proposedCorrectionWouldCauseFocusChange: (in category 'layout') ----- proposedCorrectionWouldCauseFocusChange: correction + ^ Preferences mouseOverForKeyboardFocus and: - ^ (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) and: [ | edge | splitsTopAndBottom ifTrue: [ edge := correction positive ifTrue: [ self bottom + 3 ] ifFalse: [ self top - 3 ]. + self activeHand position y - ActiveHand position y inRangeOf: edge and: edge + correction ] ifFalse: [ edge := correction positive ifTrue: [ self right ] ifFalse: [ self left ]. + self activeHand position x - ActiveHand position x inRangeOf: edge and: edge + correction ] ]! Item was changed: ----- Method: ScrollPane>>mouseEnter: (in category 'event handling') ----- mouseEnter: event + Preferences mouseOverForKeyboardFocus ifTrue: [hasFocus := true]. + owner isSystemWindow ifTrue: [owner paneTransition: event]. + retractableScrollBar ifTrue: [self hideOrShowScrollBars].! - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := true]. - (owner isSystemWindow) ifTrue: [owner paneTransition: event]. - retractableScrollBar ifTrue:[ self hideOrShowScrollBars ]. - ! Item was changed: ----- Method: ScrollPane>>mouseLeave: (in category 'event handling') ----- mouseLeave: event + Preferences mouseOverForKeyboardFocus ifTrue: [hasFocus := false]. - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue:[hasFocus := false]. retractableScrollBar ifTrue: [self hideScrollBars]. + owner isSystemWindow ifTrue: [owner paneTransition: event].! - (owner isSystemWindow) ifTrue: [owner paneTransition: event] - ! Item was changed: ----- Method: SelectionMorph>>undoMove:redo:owner:bounds:predecessor: (in category 'undo') ----- undoMove: cmd redo: redo owner: oldOwners bounds: oldBoundses predecessor: oldPredecessors "Handle undo and redo of move commands in morphic" | item | redo ifFalse: ["undo sets up the redo state first" cmd redoTarget: self selector: #undoMove:redo:owner:bounds:predecessor: arguments: { cmd. true. selectedItems collect: [:m | m owner]. selectedItems collect: [:m | m bounds]. selectedItems collect: [:m | m owner morphPreceding: m]}]. 1 to: selectedItems size do: [:i | item := selectedItems at: i. (oldOwners at: i) ifNotNil: [(oldPredecessors at: i) ifNil: [(oldOwners at: i) addMorphFront: item] ifNotNil: [(oldOwners at: i) addMorph: item after: (oldPredecessors at: i)]]. item bounds: (oldBoundses at: i). + item isSystemWindow ifTrue: [item beKeyWindow]]! - item isSystemWindow ifTrue: [item activate]]! Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseEnter: (in category 'event handling') ----- mouseEnter: event super mouseEnter: event. + Preferences mouseOverForKeyboardFocus - (SystemWindow allWindowsAcceptInput or: [Preferences mouseOverForKeyboardFocus]) ifTrue: [event hand newKeyboardFocus: self].! Item was changed: ----- Method: SimpleHierarchicalListMorph>>mouseLeave: (in category 'event handling') ----- mouseLeave: aMouseEvent + super mouseLeave: aMouseEvent. self hoveredMorph: nil. + + Preferences mouseOverForKeyboardFocus + ifTrue: [aMouseEvent hand releaseKeyboardFocus: self].! - (SystemWindow allWindowsAcceptInput or: [ Preferences mouseOverForKeyboardFocus ]) ifTrue: [ aMouseEvent hand releaseKeyboardFocus: self ]! Item was changed: MorphicModel subclass: #SystemWindow + instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' + classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowsActiveOnlyOnTop' - instanceVariableNames: 'labelString stripes label closeBox collapseBox activeOnlyOnTop paneMorphs paneRects collapsedFrame fullFrame isCollapsed menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowsRaiseOnClick' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '' 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 removed: - ----- Method: SystemWindow class>>allWindowsAcceptInput (in category 'private') ----- - allWindowsAcceptInput - "With either of these two preferences settings, inactive windows will not have their widgets locked. All windows accept input as if they were active." - ^ self focusFollowsMouse or: [ self windowsRaiseOnClick not ]! Item was removed: - ----- Method: SystemWindow class>>focusFollowsMouse (in category 'preferences') ----- - focusFollowsMouse - - ^ FocusFollowsMouse ifNil: [ false ]! Item was removed: - ----- Method: SystemWindow class>>focusFollowsMouse: (in category 'preferences') ----- - focusFollowsMouse: aBoolean - (FocusFollowsMouse := aBoolean) == true. - self reconfigureWindowsForFocus! Item was added: + ----- Method: SystemWindow class>>keyWindow (in category 'top window') ----- + keyWindow + "Multiple windows may appear to be on top, especially on large screens. Only one window, however, can be the key window, which gets the programmers primary attention." + + ^ TopWindow! Item was changed: ----- Method: SystemWindow class>>noteTopWindowIn: (in category 'top window') ----- noteTopWindowIn: aWorld + "Look for a new top window in the given world. We have to reset the former top window because this is global state shared between all worlds." + + | newTopWindow | - | newTop | - "TopWindow must be nil or point to the top window in this project." TopWindow := nil. + newTopWindow := nil. + aWorld ifNil: [^ self]. + + aWorld submorphsDo: [:m | + (m isSystemWindow and: [newTopWindow isNil]) + ifTrue: [newTopWindow := m]. + + self flag: #refactor. "This really belongs in a special ProjWindow class" + (m model isKindOf: Project) + ifTrue: [m label ~= m model name ifTrue: [m setLabel: m model name]]]. + + newTopWindow ifNotNil: [newTopWindow beKeyWindow].! - newTop := nil. - aWorld submorphsDo: - [:m | (m isSystemWindow) ifTrue: - [(newTop == nil and: [m activeOnlyOnTop]) - ifTrue: [newTop := m]. - (m model isKindOf: Project) - ifTrue: ["This really belongs in a special ProjWindow class" - m label ~= m model name ifTrue: [m setLabel: m model name]]]]. - newTop == nil ifFalse: [newTop activate]! Item was changed: + ----- Method: SystemWindow class>>rebuildAllWindowLabels (in category 'private') ----- - ----- Method: SystemWindow class>>rebuildAllWindowLabels (in category 'preferences') ----- rebuildAllWindowLabels self withAllSubclasses do: [:c | c allInstances do: [:w | w replaceBoxes]].! Item was changed: ----- Method: SystemWindow class>>reconfigureWindowsForFocus (in category 'private') ----- reconfigureWindowsForFocus + + self allSubInstancesDo: [:window | + window + passivate; + activate; + unlockWindowDecorations; + passivateIfNeeded]. + self topWindow activate.! - self withAllSubclasses do: - [ : eachSubclass | eachSubclass allInstances do: - [ : eachInstance | eachInstance configureFocus ] ]! Item was added: + ----- Method: SystemWindow class>>topWindow (in category 'top window') ----- + topWindow + ^ TopWindow! Item was added: + ----- Method: SystemWindow class>>windowsActiveOnlyOnTop (in category 'preferences') ----- + windowsActiveOnlyOnTop + + ^ WindowsActiveOnlyOnTop ifNil: [ true ]! Item was added: + ----- Method: SystemWindow class>>windowsActiveOnlyOnTop: (in category 'preferences') ----- + windowsActiveOnlyOnTop: aBoolean + + aBoolean = WindowsActiveOnlyOnTop ifTrue: [^ self]. + WindowsActiveOnlyOnTop := aBoolean. + self reconfigureWindowsForFocus.! Item was added: + ----- Method: SystemWindow class>>windowsIn: (in category 'top window') ----- + windowsIn: aWorld + + ^ self windowsIn: aWorld satisfying: [:window | true].! Item was removed: - ----- Method: SystemWindow class>>windowsRaiseOnClick (in category 'preferences') ----- - windowsRaiseOnClick - - ^ WindowsRaiseOnClick ifNil: [ true ]! Item was removed: - ----- Method: SystemWindow class>>windowsRaiseOnClick: (in category 'preferences') ----- - windowsRaiseOnClick: aBoolean - (WindowsRaiseOnClick := aBoolean == true). - self reconfigureWindowsForFocus! Item was changed: + ----- Method: SystemWindow>>activate (in category 'focus') ----- - ----- Method: SystemWindow>>activate (in category 'top window') ----- activate + "Bring the receiver to the top. If I am modal, bring along my modal owning window and my model child as well." + + self isActive ifTrue: [self lookFocused. ^ self]. + self topRendererOrSelf owner ifNil: [^ self "avoid spurious activate when drop in trash"]. + + self isActive: true. + + "Special handling for expanded windows." + self isCollapsed ifFalse: [ + model modelWakeUpIn: self. + self positionSubmorphs]. + + self submorphsDo: [:each | each unlock]. + + self + lookFocused; + updateFocusLookAtHand.! - "Bring the receiver to the top. If I am modal, bring along my owning window as well." - | modalOwner | - self modalChild ifNotNil: - [ : modalChild | modalChild owner ifNotNil: - [ modalChild activate. - ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. - (isCollapsed not and: - [ self paneMorphs size > 1 and: [ self splitters isEmpty ] ]) ifTrue: [ self addPaneSplitters ]. - self activateWindow. - PasteUpMorph globalCommandKeysEnabled ifTrue: [self activeHand addKeyboardListener: self]. - modalOwner := self modalOwner. - (modalOwner notNil and: [ modalOwner isSystemWindow ]) ifTrue: [ modalOwner bringBehind: self ]! Item was removed: - ----- Method: SystemWindow>>activateAndForceLabelToShow (in category 'top window') ----- - activateAndForceLabelToShow - self activate. - bounds top < 0 ifTrue: - [self position: (self position x @ 0)]! Item was removed: - ----- Method: SystemWindow>>activateWindow (in category 'top window') ----- - activateWindow - "Bring me to the front and make me able to respond to mouse and keyboard. - Was #activate (sw 5/18/2001 23:20)" - | oldTop outerMorph sketchEditor pal windowUnderneath | - outerMorph := self topRendererOrSelf. - outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"]. - self hasDropShadow: Preferences menuAppearance3d. - oldTop := TopWindow. - oldTop = self ifTrue: [^self]. - TopWindow := self. - oldTop ifNotNil: [oldTop passivate]. - outerMorph owner firstSubmorph == outerMorph - ifFalse: ["Bring me (with any flex) to the top if not already" - outerMorph owner addMorphFront: outerMorph]. - self configureFocus. - self isCollapsed ifFalse: - [model modelWakeUpIn: self. - self positionSubmorphs. - labelArea ifNil: [self adjustBorderUponActivationWhenLabeless]]. - (sketchEditor := self extantSketchEditor) ifNotNil: - [sketchEditor comeToFront. - (pal := self world findA: PaintBoxMorph) ifNotNil: - [pal comeToFront]]. - self updatePaneColors. - "Newly spawned windows are normally active, but if focusFollowsMouse is set, then the focused window can only be the one under the hand." - (self class allWindowsAcceptInput not or: [ (windowUnderneath := ActiveHand windowUnderneath) isNil or: [ windowUnderneath == self ] ]) - ifTrue: [ self lookFocused ] - ifFalse: [ self lookUnfocused ]! Item was removed: - ----- Method: SystemWindow>>activeOnlyOnTop (in category 'top window') ----- - activeOnlyOnTop - ^ activeOnlyOnTop ifNil: [false]! Item was removed: - ----- Method: SystemWindow>>activeOnlyOnTop: (in category 'top window') ----- - activeOnlyOnTop: trueOrFalse - activeOnlyOnTop := trueOrFalse! Item was removed: - ----- Method: SystemWindow>>adjustBorderUponActivationWhenLabeless (in category 'top window') ----- - adjustBorderUponActivationWhenLabeless - "Adjust the border upon, um, activation when, um, labelless" - - | aWidth | - (aWidth := self valueOfProperty: #borderWidthWhenActive) ifNotNil: - [self acquireBorderWidth: aWidth]! Item was removed: - ----- Method: SystemWindow>>adjustBorderUponDeactivationWhenLabeless (in category 'top window') ----- - adjustBorderUponDeactivationWhenLabeless - "Adjust the border upon deactivation when, labelless" - - | aWidth | - (aWidth := self valueOfProperty: #borderWidthWhenInactive) ifNotNil: - [self acquireBorderWidth: aWidth]! Item was changed: + ----- Method: SystemWindow>>adoptPaneColor: (in category 'colors') ----- - ----- Method: SystemWindow>>adoptPaneColor: (in category 'colors handling') ----- adoptPaneColor: aPaneColor super adoptPaneColor: (self class gradientWindow ifTrue: [aPaneColor ifNotNil: [:c | c duller]] ifFalse: [aPaneColor]).! Item was added: + ----- Method: SystemWindow>>assureLabelAreaVisible (in category 'layout') ----- + assureLabelAreaVisible + "Label should be visible to interact with." + + (RealEstateAgent maximumUsableAreaInWorld: self world) in: [:rect | + self innerBounds top < rect top ifTrue: [self top: rect top]].! Item was added: + ----- Method: SystemWindow>>beKeyWindow (in category 'top window') ----- + beKeyWindow + "Let me be the most important window on the screen. I am at the top and I can have a shadow to get more attention by the user. I am the window that is responsible for window keyboard shortcuts." + + | oldKeyWindow | + self isKeyWindow ifTrue: [^ self]. + + oldKeyWindow := TopWindow. + TopWindow := self. + + PasteUpMorph globalCommandKeysEnabled ifTrue: + [ self activeHand addKeyboardListener: self ]. + + self + unlockWindowDecorations; "here, because all windows might be active anyway" + activate; "if not already active, activate now" + comeToFront. "key windows are on top" + + "Change appearance to get noticed." + self hasDropShadow: Preferences menuAppearance3d. + (self valueOfProperty: #borderWidthWhenActive) + ifNotNil: [:bw | self acquireBorderWidth: bw]. + + oldKeyWindow ifNotNil: [:wnd | + wnd passivateIfNeeded. + + self activeHand removeKeyboardListener: oldKeyWindow. + + "Change appearance to not look prettier than the new key window." + wnd hasDropShadow: false. + (wnd valueOfProperty: #borderWidthWhenInactive) + ifNotNil: [:bw | wnd acquireBorderWidth: bw]].! Item was removed: - ----- Method: SystemWindow>>bringBehind: (in category 'polymorph') ----- - bringBehind: aMorph - "Make the receiver be directly behind the given morph. - Take into account any modal owner and propagate." - - |outerMorph| - outerMorph := self topRendererOrSelf. - outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"]. - outerMorph owner addMorph: outerMorph after: aMorph topRendererOrSelf. - self modalOwner ifNotNil: [:mo | mo bringBehind: self]! Item was removed: - ----- Method: SystemWindow>>canProcessMouseDown: (in category 'top window') ----- - canProcessMouseDown: anEvent - "In case 'Focus Follows Mouse' is set, then there are two possibilities for mouse input on a background window: if 'Window Active On First Click' is set, it must be honored and the window must be activated. If it is not set, then the behavior depends on 'Windows Raise On Click' setting. If its true, then just activate the window and DON'T process aMouseEvent. If false, then process the event in any case." - ^ self isActive or: [ Model windowActiveOnFirstClick or: [ SystemWindow windowsRaiseOnClick not ] ]! Item was changed: ----- Method: SystemWindow>>collapseOrExpand (in category 'resize/collapse') ----- collapseOrExpand "Collapse or expand the window, depending on existing state" | cf | isCollapsed ifTrue: ["Expand -- restore panes to morphics structure" isCollapsed := false. + self beKeyWindow. "Bring to frint first" - self activate. "Bring to frint first" Preferences collapseWindowsInPlace ifTrue: [fullFrame := fullFrame align: fullFrame topLeft with: self getBoundsWithFlex topLeft] ifFalse: [collapsedFrame := self getBoundsWithFlex]. collapseBox ifNotNil: [collapseBox setBalloonText: 'collapse this window' translated]. self setBoundsWithFlex: fullFrame. paneMorphs reverseDo: [:m | self addMorph: m unlock. self world startSteppingSubmorphsOf: m]. self addPaneSplitters] ifFalse: ["Collapse -- remove panes from morphics structure" isCollapsed := true. fullFrame := self getBoundsWithFlex. "First save latest fullFrame" paneMorphs do: [:m | m delete; releaseCachedState]. self removePaneSplitters. self removeCornerGrips. model modelSleep. cf := self getCollapsedFrame. (collapsedFrame isNil and: [Preferences collapseWindowsInPlace not]) ifTrue: [collapsedFrame := cf]. self setBoundsWithFlex: cf. collapseBox ifNotNil: [collapseBox setBalloonText: 'expand this window' translated ]. expandBox ifNotNil: [expandBox setBalloonText: 'expand this window' translated ]. self sendToBack]. self layoutChanged! Item was added: + ----- Method: SystemWindow>>comeToFront (in category 'top window') ----- + comeToFront + "If I am modal, bring along my modal owning window and my model child as well. Ensure that my label is visible." + + "Model window: Bring up my modal owner behind me." + self modalOwner ifNotNil: + [ : mo | mo isSystemWindow ifTrue: + [ mo comeToFront ] ]. + + "Now show me." + super comeToFront. + + "Modal window: Bring up my modal children in front of me." + self modalChild ifNotNil: + [ : modalChild | modalChild owner ifNotNil: + [ modalChild comeToFront. + ^ modalChild modalChild ifNil: [ modalChild flash ] ] ]. + + "Label should be visible to interact with." + self assureLabelAreaVisible. + + "Handle historic companions. May be removed in the future." + self extantSketchEditor ifNotNil: [:sketchEditor | + sketchEditor comeToFront. + (self world findA: PaintBoxMorph) ifNotNil: [:pal | pal comeToFront]].! Item was removed: - ----- Method: SystemWindow>>configureFocus (in category 'top window') ----- - configureFocus - "Make me unable to respond to mouse and keyboard unless allWindowsAcceptInput is set or 'Window Active On First Click' is unset. Otherwise, the classic Squeak behavior of Control boxes remaining active, except in novice mode." - self submorphsDo: - [ : each | each lock: - (self isActive not and: - [ each == labelArea - ifTrue: [ self class windowsRaiseOnClick not ] - ifFalse: [ self class allWindowsAcceptInput not ] ]) ]. - labelArea - ifNil: [ "i.e. label area is nil, so we're titleless" - self adjustBorderUponDeactivationWhenLabeless ] - ifNotNil: - [ labelArea submorphsDo: - [ : each | | classicSqueakBehavior | - classicSqueakBehavior := self class allWindowsAcceptInput not. - each lock: - (classicSqueakBehavior - ifTrue: - [ self isActive not and: - [ Preferences noviceMode or: - [ each ~~ closeBox and: [ each ~~ collapseBox ] ] ] ] - ifFalse: - [ self isActive not and: [ Model windowActiveOnFirstClick not ] ]) ] ]! Item was changed: ----- Method: SystemWindow>>delete (in category 'open/close') ----- delete | thisWorld sketchEditor aPaintBox | self mustNotClose ifTrue: [^self]. model okToClose ifFalse: [^self]. thisWorld := self world. sketchEditor := self extantSketchEditor. + + self activeHand removeKeyboardListener: self. + self isFlexed ifTrue: [owner delete] ifFalse: [super delete]. model windowIsClosing; release. model := nil. sketchEditor ifNotNil: [sketchEditor deleteSelfAndSubordinates. (thisWorld notNil and: [(aPaintBox := thisWorld paintBoxOrNil) notNil]) ifTrue: [aPaintBox delete]]. SystemWindow noteTopWindowIn: thisWorld! Item was changed: ----- Method: SystemWindow>>dimWindowButtons (in category 'top window') ----- dimWindowButtons + {closeBox. collapseBox. menuBox. expandBox} + do: [:b | b ifNotNil: [b dim]]! - self == TopWindow ifFalse: [ - {closeBox. collapseBox. menuBox. expandBox} - do: [:b | b ifNotNil: [b dim]]]! Item was changed: + ----- Method: SystemWindow>>existingPaneColor (in category 'colors') ----- - ----- Method: SystemWindow>>existingPaneColor (in category 'colors handling') ----- existingPaneColor "Answer the existing pane color for the window, obtaining it from the first paneMorph if any, and fall back on using the second stripe color if necessary." | aColor | aColor := self valueOfProperty: #paneColor. aColor ifNil: [self setProperty: #paneColor toValue: (aColor := self paneColor)]. ^aColor.! Item was changed: + ----- Method: SystemWindow>>gradientWithColor: (in category 'colors') ----- - ----- Method: SystemWindow>>gradientWithColor: (in category 'colors handling') ----- gradientWithColor: aColor | gradient | gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.2 -> (aColor duller mixed: 0.5 with: (Color gray: 0.9)) lighter. 1.0 -> aColor duller. }. gradient origin: self topLeft. gradient direction: 0 @ self labelHeight. ^gradient! Item was changed: ----- Method: SystemWindow>>handleListenEvent: (in category 'events') ----- handleListenEvent: aUserInputEvent + + "1) Handle keyboard shortcuts" aUserInputEvent type = #keystroke ifTrue: [ aUserInputEvent commandKeyPressed ifTrue: [ aUserInputEvent keyValue = $\ asciiValue ifTrue: [ self class sendTopWindowToBack ]. "Command+Escape" aUserInputEvent keyValue = 27 ifTrue: [ aUserInputEvent wasHandled: true. - ActiveHand removeKeyboardListener: self. self delete ] ]. aUserInputEvent controlKeyPressed ifTrue: + [ aUserInputEvent keyValue = 27 ifTrue: [ self world findWindow: aUserInputEvent ] ] ]. + + "2) 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 keyValue = 27 ifTrue: [ World findWindow: aUserInputEvent ] ] ]. - aUserInputEvent isMouse ifFalse: [ ^ self ]. - "Still dragging?" - aUserInputEvent hand hasSubmorphs ifTrue: [ ^ self ]. - "Make sure we lock our contents after drag-and-drop has finished." - (self isActive and: [ self class allWindowsAcceptInput not ]) ifFalse: [ self configureFocus ]. - aUserInputEvent hand removeMouseListener: self! Item was changed: ----- Method: SystemWindow>>initialize (in category 'initialization') ----- initialize "Initialize a system window. Add label, stripes, etc., if desired" super initialize. self layoutPolicy: ProportionalLayout new. self wantsPaneSplitters: true. self layoutInset: ProportionalSplitterMorph gripThickness. self cellInset: ProportionalSplitterMorph gripThickness. self initializeLabelArea. self addCornerGrips. self setDefaultParameters. allowReframeHandles := true. isCollapsed := false. - activeOnlyOnTop := true. paneMorphs := Array new. mustNotClose := false. updatablePanes := Array new.! Item was changed: + ----- Method: SystemWindow>>isActive (in category 'focus') ----- - ----- Method: SystemWindow>>isActive (in category 'top window') ----- isActive + + ^ isActive ifNil: [false]! - self activeOnlyOnTop ifTrue: [^ self == TopWindow]. - ^ true! Item was added: + ----- Method: SystemWindow>>isActive: (in category 'focus') ----- + isActive: aBoolean + + isActive := aBoolean.! Item was added: + ----- Method: SystemWindow>>isKeyWindow (in category 'top window') ----- + isKeyWindow + "The key window is the window with the user's main attention. It usually has a shadow or other visual hints to separate it from other windows. Usually, the key window is at the top of the screen. On large screens, however, many windows may appear at the top." + + ^ self == self class keyWindow! Item was changed: ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') ----- justDroppedInto: aMorph event: anEvent (ToolBuilder openToolsAttachedToMouseCursor and: (self hasProperty: #initialDrop)) ifTrue: [ self removeProperty: #initialDrop. (self submorphs detect: [:m | m isKindOf: BottomRightGripMorph] ifNone: []) ifNotNil: [:grip | grip referencePoint: anEvent position. anEvent hand newMouseFocus: grip]]. + self hasDropShadow: (self isKeyWindow and: [Preferences menuAppearance3d]). - self hasDropShadow: (self isActive and: [Preferences menuAppearance3d]). isCollapsed ifTrue: [self position: ((self position max: 0@0) grid: 8@8). collapsedFrame := self bounds] ifFalse: [fullFrame := self bounds. + self beKeyWindow]. + + aMorph == self world ifTrue: [self assureLabelAreaVisible]. + - TopWindow ~~ self ifTrue: [self activate]]. ^super justDroppedInto: aMorph event: anEvent! Item was added: + ----- Method: SystemWindow>>lockWindowDecorations (in category 'focus') ----- + lockWindowDecorations + "Lock all window decrations, that is grips, splitters, and title bar." + + self submorphsDo: [:m | + (self paneMorphs includes: m) + ifFalse: [m lock]].! Item was changed: + ----- Method: SystemWindow>>lookFocused (in category 'focus') ----- - ----- Method: SystemWindow>>lookFocused (in category 'top window') ----- lookFocused label ifNotNil: [ label color: Color black ]. + + (self isKeyWindow or: [model windowActiveOnFirstClick]) + ifTrue: [self undimWindowButtons]. + + self paneColorToUse in: [ : col | + self + setStripeColorsFrom: col ; + adoptPaneColor: col].! - (self isActive or: [Model windowActiveOnFirstClick]) ifTrue: [ self undimWindowButtons ]. - self - updatePaneColors ; - adoptPaneColor: self paneColorToUse! Item was removed: - ----- Method: SystemWindow>>lookFocused: (in category 'top window') ----- - lookFocused: aBoolean - aBoolean - ifTrue: [ self lookFocused ] - ifFalse: [ self lookUnfocused ]! Item was changed: + ----- Method: SystemWindow>>lookUnfocused (in category 'focus') ----- - ----- Method: SystemWindow>>lookUnfocused (in category 'top window') ----- lookUnfocused label ifNotNil: [ label color: Color darkGray ]. self dimWindowButtons. + self paneColorToUseWhenNotActive in: [ : col | + self - self paneColorToUseWhenNotActive in: - [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col ]! Item was changed: ----- Method: SystemWindow>>makeSecondTopmost (in category 'menu') ----- makeSecondTopmost + | aWorld nextWindow | aWorld := self world. nextWindow := aWorld submorphs detect: [:m | (m isSystemWindow) and: [m ~~ self]] ifNone: [^self]. + + self comeToFront. + nextWindow beKeyWindow.! - nextWindow activate. - aWorld addMorph: self behind: nextWindow! Item was changed: ----- Method: SystemWindow>>modalUnlockFrom: (in category 'polymorph') ----- modalUnlockFrom: aSystemWindow "Unlock the receiver as a modal owner of the given window." aSystemWindow removeProperty: #modalOwner. self removeProperty: #modalChild. + self beKeyWindow.! - self activate! Item was changed: ----- Method: SystemWindow>>mouseDown: (in category 'events') ----- mouseDown: evt + | wasKeyWindow | + (wasKeyWindow := self isKeyWindow) ifFalse: [ - | wasActive | - (wasActive := self isActive) ifFalse: [ evt hand releaseKeyboardFocus. + self beKeyWindow]. - self activate]. + "If the window was locked, we did unlock it by now. If the user does not want to invest an additional click to interact with an actual widget, re-process the event." + (wasKeyWindow not and: [model windowActiveOnFirstClick]) - wasActive - ifFalse: [ - "the window was locked, thus we got the event. - re-send it now that the window is unlocked again" - evt wasHandled: false. - model windowActiveOnFirstClick - ifTrue: [self processEvent: evt] "re-dispatch to any submorphs" - ifFalse: [label processEvent: evt]. "dispatch to label so dragging works" - ] ifTrue: [ + evt wasHandled: false. + ^ self processEvent: evt]. + + evt hand + waitForClicksOrDrag: self + event: evt + selectors: { nil. nil. nil. #startDragFromLabel: } + threshold: HandMorph dragThreshold.! - evt hand - waitForClicksOrDrag: self - event: evt - selectors: { nil. nil. nil. #startDragFromLabel: } - threshold: HandMorph dragThreshold. - ]. - evt wasHandled: true.! Item was changed: ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- mouseEnter: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseEnter: anEvent. + + self isActive + ifTrue: [self lookFocused] + ifFalse: [model windowActiveOnFirstClick + ifTrue: [self undimWindowButtons]].! - self class allWindowsAcceptInput ifTrue: [ self lookFocused ]! Item was changed: ----- Method: SystemWindow>>mouseEnterDragging: (in category 'events') ----- mouseEnterDragging: evt "unlock children for drop operations" + + self flag: #performance. "mt: There may be no need to change appearance if no widget wants the drop." + self isActive + ifTrue: [self lookFocused] + ifFalse: [model windowActiveOnFirstClick + ifTrue: [self undimWindowButtons]]. + + (self isActive not and: [evt hand hasSubmorphs]) ifTrue: [ + self activate. "unlock contents for drop" - (self ~~ TopWindow and:[evt hand hasSubmorphs]) ifTrue:[ - self submorphsDo:[:m| m unlock]. evt hand addMouseListener: self. "for drop completion on submorph" ].! Item was changed: ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- mouseLeave: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseLeave: anEvent. + + (self isActive and: [self class windowsActiveOnlyOnTop not]) + ifTrue: [self lookUnfocused] + ifFalse: [self isKeyWindow + ifFalse: [self dimWindowButtons]].! - self class allWindowsAcceptInput ifTrue: [ self lookUnfocused ]! Item was changed: ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: evt + "Passivate after drop operations if needed." + + (self isActive and: [self class windowsActiveOnlyOnTop not]) + ifTrue: [self lookUnfocused] + ifFalse: [self isKeyWindow + ifFalse: [self dimWindowButtons]]. + + (self isKeyWindow not and: [evt hand hasSubmorphs]) ifTrue:[ + self passivateIfNeeded. + evt hand removeMouseListener: self. "no more drop completion possible on submorph" - "lock children after drop operations" - (self isActive and:[evt hand hasSubmorphs and: [self class allWindowsAcceptInput not]]) ifTrue:[ - self configureFocus. - evt hand removeMouseListener: self. ].! Item was removed: - ----- Method: SystemWindow>>mouseUp: (in category 'events') ----- - mouseUp: evt - | cp | - model windowActiveOnFirstClick ifTrue: - ["Normally window takes control on first click. - Need explicit transmission for first-click activity." - cp := evt cursorPoint. - submorphs do: [:m | (m containsPoint: cp) ifTrue: [m mouseUp: evt]]]! Item was changed: ----- Method: SystemWindow>>openAsIsIn: (in category 'open/close') ----- openAsIsIn: aWorld "This msg and its callees result in the window being activeOnlyOnTop" aWorld addMorph: self. + self beKeyWindow. - self activate. aWorld startSteppingSubmorphsOf: self. self activeHand releaseKeyboardFocus; releaseMouseFocus.! Item was changed: ----- Method: SystemWindow>>openInWorld: (in category 'open/close') ----- openInWorld: aWorld "This msg and its callees result in the window being activeOnlyOnTop" [^ self anyOpenWindowLikeMe ifEmpty: [ self bounds: (RealEstateAgent initialFrameFor: self world: aWorld) ; openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; + beKeyWindow ; - activate ; postAcceptBrowseFor: self ]. ] ensure: [ self activeHand releaseKeyboardFocus; releaseMouseFocus. ]! Item was changed: ----- Method: SystemWindow>>openInWorld:extent: (in category 'open/close') ----- openInWorld: aWorld extent: extent "This msg and its callees result in the window being activeOnlyOnTop" [^ self anyOpenWindowLikeMe ifEmpty: [ self position: (RealEstateAgent initialFrameFor: self initialExtent: extent world: aWorld) topLeft ; extent: extent. self openAsIsIn: aWorld ] ifNotEmptyDo: [ : windows | windows anyOne expand ; + beKeyWindow ; - activate ; postAcceptBrowseFor: self ]. ] ensure: [ self activeHand releaseKeyboardFocus; releaseMouseFocus. ]! Item was changed: + ----- Method: SystemWindow>>paneColor (in category 'colors') ----- - ----- Method: SystemWindow>>paneColor (in category 'colors handling') ----- paneColor | cc | (cc := self valueOfProperty: #paneColor) ifNotNil: [^cc]. Display depth > 2 ifTrue: [model ifNotNil: [model isInMemory ifTrue: [cc := Color colorFrom: model defaultBackgroundColor]]. cc ifNil: [cc := paneMorphs isEmptyOrNil ifFalse: [paneMorphs first color]]]. cc ifNil: [cc := self defaultBackgroundColor]. self paneColor: cc. ^cc! Item was changed: + ----- Method: SystemWindow>>paneColor: (in category 'colors') ----- - ----- Method: SystemWindow>>paneColor: (in category 'colors handling') ----- paneColor: aColor self setProperty: #paneColor toValue: aColor. self adoptPaneColor: aColor.! Item was changed: + ----- Method: SystemWindow>>paneColorToUse (in category 'colors') ----- - ----- Method: SystemWindow>>paneColorToUse (in category 'colors handling') ----- paneColorToUse ^ Display depth <= 2 ifTrue: [Color white] ifFalse: [self paneColor]! Item was changed: + ----- Method: SystemWindow>>paneColorToUseWhenNotActive (in category 'colors') ----- - ----- Method: SystemWindow>>paneColorToUseWhenNotActive (in category 'colors handling') ----- paneColorToUseWhenNotActive ^ self paneColorToUse darker! Item was changed: ----- Method: SystemWindow>>paneMorphs (in category 'geometry') ----- paneMorphs "Nominally private but a need for obtaining this from the outside arose" + ^ paneMorphs! - ^ paneMorphs copy! Item was changed: + ----- Method: SystemWindow>>passivate (in category 'focus') ----- - ----- Method: SystemWindow>>passivate (in category 'top window') ----- passivate + "Reconfigure my focus according to preferences." + + self isActive ifFalse: [^ self]. + self isActive: false. + + self isCollapsed ifFalse: [model modelSleep]. + + self submorphsDo: [:each | each lock]. + + self lookUnfocused.! - "Lose my drop shadlow and reconfigure my focus according to preferences." - self - hasDropShadow: false ; - configureFocus ; - lookUnfocused. - ActiveHand removeKeyboardListener: self. - model modelSleep! Item was added: + ----- Method: SystemWindow>>passivateIfNeeded (in category 'focus') ----- + passivateIfNeeded + + self class windowsActiveOnlyOnTop + ifTrue: [self passivate] + ifFalse: [self lockWindowDecorations; lookUnfocused].! Item was removed: - ----- Method: SystemWindow>>positionSubmorphs (in category 'open/close') ----- - positionSubmorphs - "Feels like overkill, but effect needed" - super positionSubmorphs. - self submorphsDo: - [:aMorph | aMorph positionSubmorphs]! Item was changed: + ----- Method: SystemWindow>>raisedColor (in category 'colors') ----- - ----- Method: SystemWindow>>raisedColor (in category 'colors handling') ----- raisedColor ^self paneColor raisedColor! Item was changed: + ----- Method: SystemWindow>>refreshWindowColor (in category 'colors') ----- - ----- Method: SystemWindow>>refreshWindowColor (in category 'colors handling') ----- refreshWindowColor "For changing the underlying model's default window color" self setProperty: #paneColor toValue: nil. self setWindowColor: self paneColor. "Reset colors if we are not active." + self isKeyWindow ifFalse: [ - self isActive ifFalse: [ self paneColorToUseWhenNotActive in: [:c | self setStripeColorsFrom: c; adoptPaneColor: c]].! Item was changed: ----- Method: SystemWindow>>replaceBoxes (in category 'initialization') ----- replaceBoxes "Rebuild the various boxes." self setLabelWidgetAllowance. label ifNotNil: [label delete]. labelArea ifNotNil: [labelArea delete]. self initializeLabelArea. self setFramesForLabelArea. self setWindowColor: self paneColor. + self isActive + ifTrue: [self passivate; activate] + ifFalse: [self activate; passivate].! - self isActive ifFalse: [self passivate].! Item was changed: + ----- Method: SystemWindow>>restoreDefaultPaneColor (in category 'colors') ----- - ----- Method: SystemWindow>>restoreDefaultPaneColor (in category 'colors handling') ----- restoreDefaultPaneColor "Useful when changing from monochrome to color display" self setStripeColorsFrom: self paneColor.! Item was changed: ----- Method: SystemWindow>>sendToBack (in category 'menu') ----- sendToBack | aWorld nextWindow | aWorld := self world. nextWindow := aWorld submorphs detect: [:m | (m isSystemWindow) and: [m ~~ self]] ifNone: [^self]. + nextWindow beKeyWindow. - nextWindow activate. aWorld addMorphNearBack: self! Item was changed: ----- Method: SystemWindow>>setDefaultParameters (in category 'initialization') ----- setDefaultParameters Preferences menuAppearance3d ifTrue: [ + self hasDropShadow: self isKeyWindow. - self hasDropShadow: self isActive. self useSoftDropShadow ifTrue: [ self shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.01); shadowOffset: (10@8 corner: 10@12)] ifFalse: [ self shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.333); shadowOffset: 1@1] ]. self changed.! Item was changed: + ----- Method: SystemWindow>>setStripeColorsFrom: (in category 'colors') ----- - ----- Method: SystemWindow>>setStripeColorsFrom: (in category 'colors handling') ----- setStripeColorsFrom: paneColor "Set the stripe color based on the given paneColor" labelArea ifNotNil: [labelArea color: Color transparent]. self updateBoxesColor: paneColor. stripes ifNil: [^self]. self borderColor: (paneColor adjustBrightness: -0.3). self class gradientWindow ifTrue: [self fillStyle: (self gradientWithColor: paneColor)] ifFalse: [self color: paneColor].! Item was changed: + ----- Method: SystemWindow>>setWindowColor: (in category 'colors') ----- - ----- Method: SystemWindow>>setWindowColor: (in category 'colors handling') ----- setWindowColor: incomingColor | existingColor aColor | incomingColor ifNil: [^ self]. "it happens" aColor := incomingColor. (aColor = ColorPickerMorph perniciousBorderColor or: [aColor = Color black]) ifTrue: [^ self]. existingColor := self paneColorToUse. existingColor ifNil: [^ Beeper beep]. self paneColor: aColor. self setStripeColorsFrom: aColor. self changed.! Item was added: + ----- Method: SystemWindow>>unlockWindowDecorations (in category 'focus') ----- + unlockWindowDecorations + "Unlock all window decrations, that is grips, splitters, and title bar." + + self submorphsDo: [:m | + (self paneMorphs includes: m) + ifFalse: [m unlock]]. + + + "Migrate old window instances." + labelArea ifNotNil: [:m | m submorphsDo: [:sm | sm unlock]].! Item was added: + ----- Method: SystemWindow>>updateFocusLookAtHand (in category 'focus') ----- + updateFocusLookAtHand + "If there is more than one active window, look for the mouse cursor and update the window focus look accordingly. This method is not on the class-side because we need our world and some active hand." + + self class windowsActiveOnlyOnTop ifTrue: [^ self]. + + ((self class windowsIn: self world) + do: [:window | window lookUnfocused]; + select: [:window | window bounds containsPoint: self activeHand position]) + ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"]. + + self class keyWindow lookFocused.! Item was changed: + ----- Method: SystemWindow>>updatePaneColors (in category 'colors') ----- - ----- Method: SystemWindow>>updatePaneColors (in category 'colors handling') ----- updatePaneColors "Useful when changing from monochrome to color display" self setStripeColorsFrom: self paneColorToUse.! Item was changed: ----- Method: SystemWindowButton>>mouseEnter: (in category 'visual properties') ----- + mouseEnter: evt + + self highlight. + ! - mouseEnter: evt - | classicSqueakBehavior | - classicSqueakBehavior := SystemWindow allWindowsAcceptInput not. - classicSqueakBehavior - ifTrue: [ self highlight ] - ifFalse: - [ self owningWindow ifNotNil: - [ : window | (window isActive or: [ Model windowActiveOnFirstClick ]) ifTrue: [ self highlight ] ] ]! Item was changed: ----- Method: TextMorphForEditView>>mouseUp: (in category 'event handling') ----- mouseUp: evt super mouseUp: evt. self stopSteppingSelector: #autoScrollView:. + editView scrollSelectionIntoView: evt. + - SystemWindow allWindowsAcceptInput ifFalse: [editView scrollSelectionIntoView: evt]. self setCompositionWindow. ! Item was changed: ----- Method: TheWorldMainDockingBar>>listWindowsOn: (in category 'submenu - windows') ----- listWindowsOn: menu | windows | windows := SortedCollection sortBlock: [:winA :winB | winA model name = winB model name ifTrue: [winA label < winB label] ifFalse: [winA model name < winB model name]]. windows addAll: self allVisibleWindows. windows ifEmpty: [ menu addItem: [ :item | item contents: 'No Windows' translated; isEnabled: false ] ]. windows do: [ :each | menu addItem: [ :item | item contents: (self windowMenuItemLabelFor: each); icon: (self colorIcon: each model defaultBackgroundColor); target: each; selector: #comeToFront; subMenuUpdater: self selector: #windowMenuFor:on: arguments: { each }; + action: [ each beKeyWindow; expand ] ] ]. - action: [ each activateAndForceLabelToShow; expand ] ] ]. menu addLine; add: 'Close all windows' target: self selector: #closeAllWindowsUnsafe; addItem: [:item | item contents: 'Close all windows without changes'; target: self; icon: MenuIcons smallBroomIcon; selector: #closeAllWindows]; add: 'Close all windows but workspaces' target: self selector: #closeAllWindowsButWorkspaces.! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'SystemWindow reconfigureWindowsForFocus.'! - (PackageInfo named: 'Morphic') postscript: 'SimpleBorder allSubInstancesDo: [ :each | - (each instVarNamed: #width) ifNil: [ each instVarNamed: #width put: 0 ]. - (each instVarNamed: #color) ifNil: [ each instVarNamed: #color put: Color transparent ]. - (each instVarNamed: #baseColor) ifNil: [ each instVarNamed: #baseColor put: Color transparent ] ].'! From commits at source.squeak.org Fri May 20 09:41:03 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:42:13 2016 Subject: [squeak-dev] The Trunk: Kernel-mt.1025.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.1025.mcz ==================== Summary ==================== Name: Kernel-mt.1025 Author: mt Time: 20 May 2016, 11:40:09.017411 am UUID: ddb8d59c-0fd5-4c4e-a0f9-6c4c98fc9e3b Ancestors: Kernel-ul.1024 Appendix to Morphic-mt.1150. =============== Diff against Kernel-ul.1024 =============== Item was changed: ----- Method: Model class>>windowActiveOnFirstClick (in category 'preferences') ----- windowActiveOnFirstClick + + ^ WindowActiveOnFirstClick ifNil: [ false ]! From commits at source.squeak.org Fri May 20 09:42:19 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:43:26 2016 Subject: [squeak-dev] The Trunk: System-mt.832.mcz Message-ID: Marcel Taeumel uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-mt.832.mcz ==================== Summary ==================== Name: System-mt.832 Author: mt Time: 20 May 2016, 11:41:09.861411 am UUID: 3b5a40f8-c4a5-c645-bc2e-9bc5ca7efbe8 Ancestors: System-ul.831 Appendix to Morphic-mt.1150. =============== Diff against System-ul.831 =============== Item was changed: ----- Method: Preferences class>>editAnnotations (in category 'support - misc') ----- editAnnotations "Put up a window that allows the user to edit annotation specifications" | aWindow | self currentWorld addMorphCentered: (aWindow := self annotationEditingWindow). + aWindow beKeyWindow. - aWindow activateAndForceLabelToShow "Preferences editAnnotations" ! From commits at source.squeak.org Fri May 20 09:42:59 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:43:28 2016 Subject: [squeak-dev] The Trunk: Services-Base-mt.58.mcz Message-ID: Marcel Taeumel uploaded a new version of Services-Base to project The Trunk: http://source.squeak.org/trunk/Services-Base-mt.58.mcz ==================== Summary ==================== Name: Services-Base-mt.58 Author: mt Time: 20 May 2016, 11:42:24.934411 am UUID: f545ee83-1f58-df44-8f6b-292a3a239443 Ancestors: Services-Base-mt.57 Appendix to Morphic-mt.1150. =============== Diff against Services-Base-mt.57 =============== Item was removed: - ----- Method: SystemWindow class>>topWindow (in category '*services-base') ----- - topWindow - ^ TopWindow! From commits at source.squeak.org Fri May 20 09:43:45 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:44:18 2016 Subject: [squeak-dev] The Trunk: 51Deprecated-mt.29.mcz Message-ID: Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk: http://source.squeak.org/trunk/51Deprecated-mt.29.mcz ==================== Summary ==================== Name: 51Deprecated-mt.29 Author: mt Time: 20 May 2016, 11:43:34.671411 am UUID: dd938ba1-6eda-894c-92d7-83a3e075e04e Ancestors: 51Deprecated-mt.28 Appendix to Morphic-mt.1150. =============== Diff against 51Deprecated-mt.28 =============== Item was added: + ----- Method: SystemWindow>>activateAndForceLabelToShow (in category '*51Deprecated') ----- + activateAndForceLabelToShow + + self deprecated. + self beKeyWindow. + ! Item was added: + ----- Method: SystemWindow>>activateWindow (in category '*51Deprecated') ----- + activateWindow + + self deprecated: 'Override #activate if needed'.! Item was added: + ----- Method: SystemWindow>>activeOnlyOnTop (in category '*51Deprecated') ----- + activeOnlyOnTop + + self deprecated: 'Being active is a synonym for being the top window. If you want to accept input in background windows, check the preference #allWindowsAcceptInput..'. + ^ true! Item was added: + ----- Method: SystemWindow>>activeOnlyOnTop: (in category '*51Deprecated') ----- + activeOnlyOnTop: trueOrFalse + + self deprecated: 'Being active is a synonym for being the top window. If you want to accept input in background windows, use the preference "All windows accept input".'.! Item was added: + ----- Method: SystemWindow>>adjustBorderUponActivationWhenLabeless (in category '*51Deprecated') ----- + adjustBorderUponActivationWhenLabeless + "Adjust the border upon, um, activation when, um, labelless" + + | aWidth | + self deprecated: 'See #beKeyWindow'. + (aWidth := self valueOfProperty: #borderWidthWhenActive) ifNotNil: + [self acquireBorderWidth: aWidth]! Item was added: + ----- Method: SystemWindow>>adjustBorderUponDeactivationWhenLabeless (in category '*51Deprecated') ----- + adjustBorderUponDeactivationWhenLabeless + "Adjust the border upon deactivation when, labelless" + + | aWidth | + self deprecated: 'See #beKeyWindow'. + (aWidth := self valueOfProperty: #borderWidthWhenInactive) ifNotNil: + [self acquireBorderWidth: aWidth]! Item was added: + ----- Method: SystemWindow>>bringBehind: (in category '*51Deprecated') ----- + bringBehind: aMorph + "Make the receiver be directly behind the given morph. + Take into account any modal owner and propagate." + + |outerMorph| + self deprecated: 'Just use #comeToFront on model windows.'. + outerMorph := self topRendererOrSelf. + outerMorph owner ifNil: [^ self "avoid spurious activate when drop in trash"]. + outerMorph owner addMorph: outerMorph after: aMorph topRendererOrSelf. + self modalOwner ifNotNil: [:mo | mo bringBehind: self]! From commits at source.squeak.org Fri May 20 09:45:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 09:45:55 2016 Subject: [squeak-dev] The Trunk: ReleaseBuilder-mt.135.mcz Message-ID: Marcel Taeumel uploaded a new version of ReleaseBuilder to project The Trunk: http://source.squeak.org/trunk/ReleaseBuilder-mt.135.mcz ==================== Summary ==================== Name: ReleaseBuilder-mt.135 Author: mt Time: 20 May 2016, 11:45:00.675411 am UUID: 06a1b417-86fd-8d4e-8757-2009a408eee4 Ancestors: ReleaseBuilder-mt.134 Appendix to Morphic-mt.1150. =============== Diff against ReleaseBuilder-mt.134 =============== Item was changed: ----- Method: ReleaseBuilder class>>setPreferences (in category 'scripts') ----- setPreferences "Preferences class defaultValueTableForCurrentRelease" " Preferences outOfTheBox." "<-- uncomment after #defaultValueTableForCurrentRelease is fixed up." "General User interaction" Preferences enable: #generalizedYellowButtonMenu ; + enable: #swapMouseButtons; + disable: #mouseOverForKeyboardFocus. - disable: #mouseOverForKeyboardFocus ; - enable: #swapMouseButtons. Morph indicateKeyboardFocus: true. ToolBuilder openToolsAttachedToMouseCursor: false. SearchBar useScratchPad: false. "Text input." TextEditor autoEnclose: true ; autoIndent: true ; destructiveBackWord: false ; blinkingCursor: true ; dumbbellCursor: false. Preferences insertionPointColor: Color red. PluggableTextMorph simpleFrameAdornments: false. "Windows" Preferences installUniformWindowColors. SystemWindow reuseWindows: false. + SystemWindow windowsActiveOnlyOnTop: true. Model windowActiveOnFirstClick: false. "Not good for 800x600" + Preferences disable: #showSplitterHandles; enable: #fastDragWindowForMorphic. CornerGripMorph drawCornerResizeHandles: false. ProportionalSplitterMorph smartHorizontalSplitters: false ; smartVerticalSplitters: false. "Scroll bars." Preferences enable: #scrollBarsNarrow; enable: #scrollBarsOnRight; disable: #alwaysHideHScrollbar; disable: #alwaysShowHScrollbar; disable: #alwaysShowVScrollbar. ScrollBar scrollBarsWithoutArrowButtons: true; scrollBarsWithoutMenuButton: true. ScrollPane useRetractableScrollBars: false. "Rounded corners." Morph preferredCornerRadius: 6. Preferences disable: #roundedWindowCorners. PluggableButtonMorph roundedButtonCorners: false. FillInTheBlankMorph roundedDialogCorners: false. MenuMorph roundedMenuCorners: false. ScrollBar roundedScrollBarLook: false. "Gradients." Preferences disable: #gradientScrollBars. SystemWindow gradientWindow: false. MenuMorph gradientMenu: false. PluggableButtonMorph gradientButton: false. "Shadows" Preferences enable: #menuAppearance3d. MenuMorph menuBorderWidth: 1; menuBorderColor: Color lightGray; menuLineColor: Color lightGray. Morph useSoftDropShadow: true.. "Lists and Trees" PluggableListMorph filterableLists: true; clearFilterAutomatically: false; highlightHoveredRow: true; menuRequestUpdatesSelection: true. PluggableTreeMorph filterByLabelsOnly: false; maximumSearchDepth: 1. LazyListMorph listSelectionTextColor: Color black; listSelectionColor: (Color r: 0.72 g: 0.72 b: 0.9). "Standard Tools" BalloonMorph balloonColor: (Color r: 0.92 g: 0.92 b: 0.706). Workspace shouldStyle: false. Browser listClassesHierarchically: true; showClassIcons: true; showMessageIcons: true; sortMessageCategoriesAlphabetically: true. Preferences enable: #annotationPanes; enable: #optionalButtons; enable: #diffsWithPrettyPrint; enable: #traceMessages; enable: #alternativeBrowseIt; enable: #menuWithIcons; enable: #visualExplorer. SystemNavigation thoroughSenders: true. Preferences disable: #debugLogTimestamp. "Halo" Preferences enable: #showBoundsInHalo ; disable: #alternateHandlesLook. "System" NetNameResolver enableIPv6: false. Scanner allowUnderscoreAsAssignment: true; prefAllowUnderscoreSelectors: true. "that's all, folks"! From eliot.miranda at gmail.com Fri May 20 13:48:06 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri May 20 13:48:12 2016 Subject: [squeak-dev] The Trunk: SqueakSSL-Core-ul.31.mcz In-Reply-To: <5738ebb5.c52c8d0a.b5c41.ffff9e67SMTPIN_ADDED_MISSING@mx.google.com> References: <5738ebb5.c52c8d0a.b5c41.ffff9e67SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <6AA7889F-F6AE-4D70-98AF-9DAFC274B0B2@gmail.com> Nice! _,,,^..^,,,_ (phone) > On May 15, 2016, at 3:52 PM, commits@source.squeak.org wrote: > > Levente Uzonyi uploaded a new version of SqueakSSL-Core to project The Trunk: > http://source.squeak.org/trunk/SqueakSSL-Core-ul.31.mcz > > ==================== Summary ==================== > > Name: SqueakSSL-Core-ul.31 > Author: ul > Time: 15 May 2016, 11:21:55.817852 pm > UUID: c4ddb187-9880-4b51-9774-b6e2402ed5d4 > Ancestors: SqueakSSL-Core-eem.30 > > - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections > > =============== Diff against SqueakSSL-Core-eem.30 =============== > > Item was changed: > ----- Method: SecureSocketStream>>ascii (in category 'accessing') ----- > ascii > "Switch to ASCII" > > super ascii. > + ByteString adoptInstance: decoded originalContents! > - decoded := (ReadStream > - on: decoded originalContents asString > - from: 1 to: decoded size) > - position: decoded position; > - yourself. > - ! > > Item was changed: > ----- Method: SecureSocketStream>>binary (in category 'accessing') ----- > binary > "Switch to binary" > > super binary. > + ByteArray adoptInstance: decoded originalContents! > - decoded := (ReadStream > - on: decoded originalContents asByteArray > - from: 1 to: decoded size) > - position: decoded position; > - yourself. > - ! > > From Marcel.Taeumel at hpi.de Fri May 20 13:19:40 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 20 13:56:00 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> Message-ID: <1463750380043-4896366.post@n4.nabble.com> tim Rowledge wrote >> On 18-05-2016, at 9:25 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: > >> The idea of using event filters to actually transform events is >> interesting. > > Filters can often be useful. We have, for example, the various canvases > and scroll-wrapping morphs which filter how input and output is seen by > the wrapped bitmaps etc. An obvious event filter (and maybe a stupid one > in the real world) would be one that centralises the mouse button > swapping; if button swapping is turned on it, err, swaps the button value > around. Right now we have a centralised place in > EventSensor>processEvent: for something that global (and seriously - for a > mouse type event we check the platform name every time?) but having a type > of filter involved at lower levels would allow some morphs to *not* get > swapped buttons. I dunno, maybe useful for testing how the UI behaves on a > different GUI? > > If you pass your events *through* a filter instead of just having them on > the side then you can do much more. > >> >> How would a fake event filter be triggered if not by real events? > > If some morph/app has a suitable event filter then clearly we can > transform any incoming event into any other kind of event (as long as it > is one that the morph will not raise an error for) as they are sent by the > whole Hand/PasteUp complex. To trigger a faking-filter I guess the best > thing would be to throw a FakeEvent at the event handling code at whatever > level you need (anywhere from the local world PasteUpMorph on down to your > local morph of interest) and let you filter convert that to whatever it > wants. Why not simply make the ?actual? event type and pass that in? You > might have a variety of faking-filters doing different things and want to > test them, maybe you want the FakeEvents to be easily assembled by parsing > a socket stream or file, I don?t know. It just needs you to bypass the > eventsensor and push an event. > > I honestly don?t know if it?s an actually useful idea. > > tim > -- > tim Rowledge; > tim@ > ; http://www.rowledge.org/tim > Asking whether machines can think is like asking whether submarines can > swim. Hi, there! Here is another update: event-filters.cs The filters should work now as expected. The change set includes a refactoring of MorphicEventDispatcher and HandMorph >> #handleEvent:. Be sure to update the trunk to the latest version before filing-in the change set. Then you can do things like "if you type a y, make a z out of it and vice versa": filter := PluggableEventFilter on: [:evt :target | (evt isKeyboard and: [evt keyCharacter = $z]) ifTrue: [evt instVarNamed: #keyValue put: $y asInteger] ifFalse: [(evt isKeyboard and: [evt keyCharacter = $y]) ifTrue: [evt instVarNamed: #keyValue put: $z asInteger]]. evt]. ActiveHand addEventFilter: filter. ActiveHand removeEventFilter: filter. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4896366.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Yoshiki.Ohshima at acm.org Fri May 20 16:23:43 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri May 20 16:23:47 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160520011254.GA13712@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> <20160520011254.GA13712@shell.msen.com> Message-ID: Hi, Dave, Thank you for taking care of this! This sqUnixX11.c does display things on Raspberry Pi for me. On Thu, May 19, 2016 at 6:12 PM, David T. Lewis wrote: > I really must apologize, I see that I attached the wrong file to my > original post. Attached here is the oscog version that needs testing. > > I am looking to confirm that the resulting Cog or Spur VM performs the > HostWindowPlugin function to resize the display window: > > saveExtent := Display width @ Display height. > DisplayScreen hostWindowExtent: 500@100. > (Delay forSeconds: 4) wait. > DisplayScreen hostWindowExtent: saveExtent. > > If someone can confirm this, I would be grateful. > > (Yes I know, we need to get GitHub and Travis CI going for the VM so that > people will not need to ask silly questions like this). > > Thanks, > Dave > > > On Wed, May 18, 2016 at 10:44:08PM -0400, David T. Lewis wrote: >> On Mon, May 16, 2016 at 09:30:02AM -0700, Yoshiki Ohshima wrote: >> > At Sun, 15 May 2016 22:27:13 -0400, >> > David T. Lewis wrote: >> > > >> > > - Test the VM. Tim, I need help on this. I do not currently have a working >> > > Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> > > apply the patch from Yoshiki's email and see if your resulting Cog VM >> > > continues to work for you as expected on Pi with Scratch? >> > >> > And more testing would be nice. >> > >> >> Tim, >> >> The attached sqUnixX11.c should get the HostWindowPlugin functions >> working on Cog/Spur. If that is confirmed, I will commit to SVN oscog >> branch and then we can follow up with the ImmX11 updates. >> >> When you get a chance, can you please compile a VM with the attached >> sqUnixX11.c and let me know if the following works on Squeak trunk >> and Raspberry Pi: >> >> saveExtent := Display width @ Display height. >> DisplayScreen hostWindowExtent: 500@100. >> (Delay forSeconds: 4) wait. >> DisplayScreen hostWindowExtent: saveExtent. >> >> Thanks, >> Dave >> > > > > > -- -- Yoshiki From eliot.miranda at gmail.com Fri May 20 17:28:49 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri May 20 17:28:53 2016 Subject: [squeak-dev] Minutes of the Meeting to Discuss Moving Cog to Github Message-ID: Hi All, here are the minutes of, and action items arising from, the meeting on Wednesday 18th of May to discuss moving the Cog svn repository to Github. Please read if you're interested and discuss on vm-dev. The major decision for the community to participate in is when to make the change, which we hope will happen in the next few weeks. Thanks to all who attended the meeting and to all who have helped in making this a reality. This is exciting! VM Move to Github Meeting Notes The name of the organisation and repository was agreed to be, and has been created as Organisation name: OpenSmalltalk Repository name: vm URL: github.com/OpenSmalltalk/vm Administration duties: - Tim Felgentreff, David Lewis, Esteban Lorenzano, Eliot Miranda We decided to have everyone who currently has access to SVN also get write access to the new repository. There will be a master branch that is stable and from which releases are made using tags. Only administrators integrate into that branch. Ongoing development will be on a ?dev? branch. This should also be kept stable for collaboration purposes, but breakage can happen occasionally. Contributors working on larger changes will do so on separate branches to avoid conflicts/breaking other people?s code. Every commit will be tested by Travis (and Appveyor for Windows). Builds and tests will be run for Windows, Linux, and OS X, both on 32-bit, 64-bit, and ARM (as applicable). The master will only ever be merged with green commits. The dev branch should be green, and if something breaks, but the committer has no access or no time to fix it, we agreed that any administrator may roll back the breaking change using git revert. This way, the breaking change is preserved in the history, but the current HEAD is green. We will also disable ?force-pushing? to the repository to ensure that no commit history can be tampered with. In case of any disagreements about reverting other people?s code, we declared Eliot (*) to be the arbiter. Release tags on the master will trigger Travis to build release artifacts, including debian packages. To have incremental monotonic, human-readable version identifiers, we decided to use timestamps in the form YYYYMMDDHHmm in UTC. In order to ensure these timestamps are included in the sources, we will have a commit script in the repository that any contributor must use to update the dev and master branches (**). The checkout command for any version then becomes ?git checkout branch@{timestamp}?. Both the built VMs via a -version flag, and sources via a header file, will be marked with these timestamps. It was decided to leave the build system as-is using GNU Makefiles where available with a commitment to move to GNU Makefiles on Linux. We will use CMake to produce per-platform config files that identify platform facilities (such as epoll(2) vs kqueue(2) vs poll(s) vs select(3)). We discussed ethics, which derive from the ?if you break it, you fix it? philosophy and distilled it into the ?administrators may revert? policy above. We don?t want to prevent breakages, nor make people afraid of breaking things. We merely want to prevent other people being affected by breakages, especially those that may be operating under production or time constraints. We will integrate the Github commit notifications with a Codespeed instance that will test commits for performance regressions. Action Items - Write the commit script - Set a date for the move (sooner rather than later) - Move the repository - Enable automatic builds for all the platforms - Write GNU makefiles for unix/linux - Make WebHooks for Commit Notifications available to anyone who wants them. - Write CMake code to generate per-platform headers (***) _,,,^..^,,,_ best, Eliot (*) under protest (**) use whatever versioning you want on your own versions, but the versions in OpenSmalltalk/vm will use this convention exclusively (***) which will /not/ be called "config.h", but e.g. "ostvmConfig.h", so as to avoid conflicts with other packages using autoconf and CMake -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160520/0af8706d/attachment.htm From tonyg at ccs.neu.edu Fri May 20 17:49:52 2016 From: tonyg at ccs.neu.edu (Tony Garnock-Jones) Date: Fri May 20 17:50:05 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463750380043-4896366.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> Message-ID: <573F4E40.9090106@ccs.neu.edu> On 2016-05-20 9:19 AM, marcel.taeumel wrote: > Then you can do things like "if you type a y, make a z out of it and vice > versa": [...] Would it be possible to have "if you type y, pretend you typed abcde"? That is, instead of having the filter yield zero or one events (for refiltering??), could it yield zero or more events? Tony From Marcel.Taeumel at hpi.de Fri May 20 19:33:40 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 20 20:10:01 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <573F4E40.9090106@ccs.neu.edu> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> Message-ID: <1463772820184-4896440.post@n4.nabble.com> Tony Garnock-Jones-3 wrote > On 2016-05-20 9:19 AM, marcel.taeumel wrote: >> Then you can do things like "if you type a y, make a z out of it and vice >> versa": [...] > > Would it be possible to have "if you type y, pretend you typed abcde"? > > That is, instead of having the filter yield zero or one events (for > refiltering??), could it yield zero or more events? > > Tony Hi Tony, yes, I think so. You event create code is kind of awkward but I would work like this: ... [:event :target | ... event hand handleEvent: ((KeyboardEvent newFrom: event) stroke: $a); handleEvent: ((KeyboardEvent newFrom: event) stroke: $b); handleEvent: ((KeyboardEvent newFrom: event) stroke: $c); handleEvent: ((KeyboardEvent newFrom: event) stroke: $d); handleEvent: ((KeyboardEvent newFrom: event) stroke: $e). event wasIgnored: true. event]. Note that this API "(KeyboardEvent newFrom: event) stroke: $a" does not exist at the moment. It is not that convenient to generate new events but "event hand handleEvent: ..." should work. I have not tried this yet, however, the event dispatching and handling code should be reentrant. I think that I should separate upstream and downstream event filters. When calling "ActiveHand addEventFilter: ..." it is only downstream because this is where event processing starts. When calling "someMorphInTheWorld addEventFilter: ..." this is rather upstream because it starts at Morph >> #handleEvent:. Hmm... downstream event filters for any morph would be possible in Morph >> #processEvent:using:. Still ... I am struggling with the concept of keyboard focus and mouse focus. There, you directly call Morph >> #handleFocusEvent:, which calls Morph >> #handleEvent:. No bubbling up, no bubbling down. If focused morphs want to bubble down, they have to call Morph >> #processEvent: and watch for the #rejected pattern. See UserDialogBoxMorph >> #handleFocusEvent: for an example. I now that this is a performance thing. If you type in a text field, you do not want to bubble all the way down from the world. Again and again. And again. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4896440.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri May 20 20:30:01 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 20:30:42 2016 Subject: [squeak-dev] The Trunk: Files-cmm.155.mcz Message-ID: Chris Muller uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-cmm.155.mcz ==================== Summary ==================== Name: Files-cmm.155 Author: cmm Time: 20 May 2016, 3:29:53.0841 pm UUID: 2d1395ee-9f47-47f6-91f5-dbd18af891e7 Ancestors: Files-ul.154 Fix ability to load OSProcess after recent mode-conversion changes. =============== Diff against Files-ul.154 =============== Item was changed: ----- Method: StandardFileStream>>ascii (in category 'properties-setting') ----- ascii + "Read and/or write in ASCII mode." + buffer1 + ifNil: [ buffer1 := ByteString new: 1 ] + ifNotNil: [ ByteString adoptInstance: buffer1 ]. - "opposite of binary" - - ByteString adoptInstance: buffer1. collection ifNotNil: [ ByteString adoptInstance: collection ]. + lastWritten ifNotNil: + [ lastWritten isInteger ifTrue: [ lastWritten := lastWritten asCharacter ] ]! - lastWritten ifNotNil: [lastWritten isInteger ifTrue: [lastWritten := lastWritten asCharacter]]! Item was changed: ----- Method: StandardFileStream>>binary (in category 'properties-setting') ----- binary + "Read and/or write in binary mode." + buffer1 + ifNil: [ buffer1 := ByteArray new: 1 ] + ifNotNil: [ ByteArray adoptInstance: buffer1 ]. - - ByteArray adoptInstance: buffer1. collection ifNotNil: [ ByteArray adoptInstance: collection ]. + lastWritten ifNotNil: + [ lastWritten isCharacter ifTrue: [ lastWritten := lastWritten asInteger ] ]! - lastWritten ifNotNil: [lastWritten isCharacter ifTrue: [lastWritten := lastWritten asInteger]]! From lewis at mail.msen.com Fri May 20 20:52:48 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 20 20:52:51 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> <20160520011254.GA13712@shell.msen.com> Message-ID: <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> Thank you Yoshiki, I will commit the update to the oscog branch tonight when I get home. The next thing to try is your Imm patch for sqUnixX11.c Dave > Hi, Dave, > > Thank you for taking care of this! This sqUnixX11.c does display > things on Raspberry Pi for me. > > On Thu, May 19, 2016 at 6:12 PM, David T. Lewis > wrote: >> I really must apologize, I see that I attached the wrong file to my >> original post. Attached here is the oscog version that needs testing. >> >> I am looking to confirm that the resulting Cog or Spur VM performs the >> HostWindowPlugin function to resize the display window: >> >> saveExtent := Display width @ Display height. >> DisplayScreen hostWindowExtent: 500@100. >> (Delay forSeconds: 4) wait. >> DisplayScreen hostWindowExtent: saveExtent. >> >> If someone can confirm this, I would be grateful. >> >> (Yes I know, we need to get GitHub and Travis CI going for the VM so >> that >> people will not need to ask silly questions like this). >> >> Thanks, >> Dave >> >> >> On Wed, May 18, 2016 at 10:44:08PM -0400, David T. Lewis wrote: >>> On Mon, May 16, 2016 at 09:30:02AM -0700, Yoshiki Ohshima wrote: >>> > At Sun, 15 May 2016 22:27:13 -0400, >>> > David T. Lewis wrote: >>> > > >>> > > - Test the VM. Tim, I need help on this. I do not currently have a >>> working >>> > > Cog build environment (Unbuntu/autotools/gcc version issues). >>> Can you >>> > > apply the patch from Yoshiki's email and see if your resulting >>> Cog VM >>> > > continues to work for you as expected on Pi with Scratch? >>> > >>> > And more testing would be nice. >>> > >>> >>> Tim, >>> >>> The attached sqUnixX11.c should get the HostWindowPlugin functions >>> working on Cog/Spur. If that is confirmed, I will commit to SVN oscog >>> branch and then we can follow up with the ImmX11 updates. >>> >>> When you get a chance, can you please compile a VM with the attached >>> sqUnixX11.c and let me know if the following works on Squeak trunk >>> and Raspberry Pi: >>> >>> saveExtent := Display width @ Display height. >>> DisplayScreen hostWindowExtent: 500@100. >>> (Delay forSeconds: 4) wait. >>> DisplayScreen hostWindowExtent: saveExtent. >>> >>> Thanks, >>> Dave >>> >> >> >> >> >> > > > > -- > -- Yoshiki > From Yoshiki.Ohshima at acm.org Fri May 20 21:00:27 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri May 20 21:00:29 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> <20160520011254.GA13712@shell.msen.com> <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> Message-ID: Thank you! On Fri, May 20, 2016 at 1:52 PM, David T. Lewis wrote: > Thank you Yoshiki, I will commit the update to the oscog branch tonight > when I get home. > > The next thing to try is your Imm patch for sqUnixX11.c > > Dave > >> Hi, Dave, >> >> Thank you for taking care of this! This sqUnixX11.c does display >> things on Raspberry Pi for me. >> >> On Thu, May 19, 2016 at 6:12 PM, David T. Lewis >> wrote: >>> I really must apologize, I see that I attached the wrong file to my >>> original post. Attached here is the oscog version that needs testing. >>> >>> I am looking to confirm that the resulting Cog or Spur VM performs the >>> HostWindowPlugin function to resize the display window: >>> >>> saveExtent := Display width @ Display height. >>> DisplayScreen hostWindowExtent: 500@100. >>> (Delay forSeconds: 4) wait. >>> DisplayScreen hostWindowExtent: saveExtent. >>> >>> If someone can confirm this, I would be grateful. >>> >>> (Yes I know, we need to get GitHub and Travis CI going for the VM so >>> that >>> people will not need to ask silly questions like this). >>> >>> Thanks, >>> Dave >>> >>> >>> On Wed, May 18, 2016 at 10:44:08PM -0400, David T. Lewis wrote: >>>> On Mon, May 16, 2016 at 09:30:02AM -0700, Yoshiki Ohshima wrote: >>>> > At Sun, 15 May 2016 22:27:13 -0400, >>>> > David T. Lewis wrote: >>>> > > >>>> > > - Test the VM. Tim, I need help on this. I do not currently have a >>>> working >>>> > > Cog build environment (Unbuntu/autotools/gcc version issues). >>>> Can you >>>> > > apply the patch from Yoshiki's email and see if your resulting >>>> Cog VM >>>> > > continues to work for you as expected on Pi with Scratch? >>>> > >>>> > And more testing would be nice. >>>> > >>>> >>>> Tim, >>>> >>>> The attached sqUnixX11.c should get the HostWindowPlugin functions >>>> working on Cog/Spur. If that is confirmed, I will commit to SVN oscog >>>> branch and then we can follow up with the ImmX11 updates. >>>> >>>> When you get a chance, can you please compile a VM with the attached >>>> sqUnixX11.c and let me know if the following works on Squeak trunk >>>> and Raspberry Pi: >>>> >>>> saveExtent := Display width @ Display height. >>>> DisplayScreen hostWindowExtent: 500@100. >>>> (Delay forSeconds: 4) wait. >>>> DisplayScreen hostWindowExtent: saveExtent. >>>> >>>> Thanks, >>>> Dave >>>> >>> >>> >>> >>> >>> >> >> >> >> -- >> -- Yoshiki >> > > > -- -- Yoshiki From eliot.miranda at gmail.com Fri May 20 21:49:12 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri May 20 21:49:16 2016 Subject: [squeak-dev] Re: [Vm-dev] Minutes of the Meeting to Discuss Moving Cog to Github In-Reply-To: <573F6C25.5000601@zoho.com> References: <573F6C25.5000601@zoho.com> Message-ID: Hi Juan, On Fri, May 20, 2016 at 12:57 PM, Juan Vuletich wrote: > Hi Folks, > > This is just great! > > I assume builds will include: > - V3, Cog, 32bitBinaries > - Spur32, Cog, 32bitBinaries > - Spur64, Cog, 64bitBinaries > Yes. > > Would it also be possible to include: > - V3, Stack, 32bitBinaries > - Spur32, Stack, 32bitBinaries > - Spur64, Stack, 64bitBinaries > ? > I think so. Tim F tells me that Github support for open source projects is free, including disk space, so there's nothing to stop us including a comprehensive suite of VMs. > I think that having the non-Cog builds always green could benefit those > platforms where code generation is not possible, and might ease porting to > new platforms. Especially for Spur64. > Indeed, I hope that with the new repository it will be much easier for the people who got the VM working on iPad to integrate their changes. It should also be possible to have Linux ARM v6 (Pi) and Linux ARM v7 (Android) VMs. > > Thanks you all! > Juan Vuletich > > > On 5/20/2016 2:28 PM, Eliot Miranda wrote: > > > > Hi All, > > here are the minutes of, and action items arising from, the meeting on > Wednesday 18th of May to discuss moving the Cog svn repository to Github. > Please read if you're interested and discuss on vm-dev. The major decision > for the community to participate in is when to make the change, which we > hope will happen in the next few weeks. Thanks to all who attended the > meeting and to all who have helped in making this a reality. This is > exciting! > > VM Move to Github Meeting Notes > > The name of the organisation and repository was agreed to be, and has been > created as > > Organisation name: OpenSmalltalk > > Repository name: vm > > URL: github.com/OpenSmalltalk/vm > > Administration duties: > > - > > Tim Felgentreff, David Lewis, Esteban Lorenzano, Eliot Miranda > > > We decided to have everyone who currently has access to SVN also get write > access to the new repository. > > There will be a master branch that is stable and from which releases are > made using tags. Only administrators integrate into that branch. Ongoing > development will be on a ?dev? branch. This should also be kept stable for > collaboration purposes, but breakage can happen occasionally. Contributors > working on larger changes will do so on separate branches to avoid > conflicts/breaking other people?s code. > > Every commit will be tested by Travis (and Appveyor for Windows). Builds > and tests will be run for Windows, Linux, and OS X, both on 32-bit, 64-bit, > and ARM (as applicable). The master will only ever be merged with green > commits. The dev branch should be green, and if something breaks, but the > committer has no access or no time to fix it, we agreed that any > administrator may roll back the breaking change using git revert. This way, > the breaking change is preserved in the history, but the current HEAD is > green. We will also disable ?force-pushing? to the repository to ensure > that no commit history can be tampered with. > > In case of any disagreements about reverting other people?s code, we > declared Eliot (*) to be the arbiter. > > Release tags on the master will trigger Travis to build release artifacts, > including debian packages. > > To have incremental monotonic, human-readable version identifiers, we > decided to use timestamps in the form YYYYMMDDHHmm in UTC. In order to > ensure these timestamps are included in the sources, we will have a commit > script in the repository that any contributor must use to update the dev > and master branches (**). The checkout command for any version then becomes > ?git checkout branch@{timestamp}?. Both the built VMs via a -version > flag, and sources via a header file, will be marked with these timestamps. > > It was decided to leave the build system as-is using GNU Makefiles where > available with a commitment to move to GNU Makefiles on Linux. We will use > CMake to produce per-platform config files that identify platform > facilities (such as epoll(2) vs kqueue(2) vs poll(s) vs select(3)). > > We discussed ethics, which derive from the ?if you break it, you fix it? > philosophy and distilled it into the ?administrators may revert? policy > above. We don?t want to prevent breakages, nor make people afraid of > breaking things. We merely want to prevent other people being affected by > breakages, especially those that may be operating under production or time > constraints. > > We will integrate the Github commit notifications with a Codespeed > instance that will test commits for performance regressions. > > Action Items > > > - > > Write the commit script > - > > Set a date for the move (sooner rather than later) > - > > Move the repository > - > > Enable automatic builds for all the platforms > - > > Write GNU makefiles for unix/linux > - Make WebHooks for Commit Notifications available to anyone who wants > them. > - Write CMake code to generate per-platform headers (***) > > > > _,,,^..^,,,_ > best, Eliot > > (*) under protest > (**) use whatever versioning you want on your own versions, but the > versions in OpenSmalltalk/vm will use this convention exclusively > (***) which will /not/ be called "config.h", but e.g. "ostvmConfig.h", so > as to avoid conflicts with other packages using autoconf and CMake > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160520/f1a10853/attachment.htm From commits at source.squeak.org Fri May 20 21:58:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 20 21:58:12 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160520215808.28634.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068132.html Name: Regex-Core-ul.52 Ancestors: Regex-Core-pre.51 RxmLink changes: - implemented #copyChain, #copyUsing: and #postCopyUsing: to create a copy of the matcher chain without creating duplicates of links being referenced from more than one place - implemented missing #postCopy methods - removed unused variables from subclasses - use #copyChain instead of #veryDeepCopy in RxMatcher >> #makeQuantified:min:max: to avoid unnecessary duplication of non-link objects ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068133.html Name: Kernel-ul.1024 Ancestors: Kernel-eem.1023 Copied the fallback code of LargePositiveInteger >> #replaceFrom:to:with:startingAt: from its parent class and extended it to make it compatible with the primitive as well. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068134.html Name: Regex-Tests-Core-pre.6 Ancestors: Regex-Tests-Core-ul.5 Adjustments to the Regex tests for optional subexpressions in multiple quantifiers. These tests demonstrate the different behavior when nesting subexpressions in quantifiers and the other way round. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068135.html Name: Regex-Tests-Core-pre.7 Ancestors: Regex-Tests-Core-pre.6 Extends the rxmatcher optional and quantified expressions tests according to Leventes suggestion to include all subexpressions matched ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068136.html Name: Tests-pre.344 Ancestors: Tests-pre.343 Adds the ToolBuilder dependency to the PreferenceBrowser dependency test. As a temporary measure during the move to a ToolBuilder-based implementation it points directly to ToolBuilder-Morphic ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068137.html Name: PreferenceBrowser-pre.60 Ancestors: PreferenceBrowser-kfr.59 Removes the unused useGradientFill method and thereby also the PreferenceBrowser dependency on the Balloon package ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068138.html Name: EToys-pre.137 Ancestors: EToys-mt.136 Moves UpdatingRectangleMorph to MorphicExtras ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068139.html Name: MorphicExtras-pre.175 Ancestors: MorphicExtras-mt.174 Moves UpdatingRectangleMorph from EToys ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068140.html Name: Morphic-pre.1149 Ancestors: Morphic-mt.1148 Removes unused method of BracketSliderMorph ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068141.html Name: Morphic-mt.1150 Ancestors: Morphic-pre.1149 Refactors system windows wrt. having active background windows as introduced in October 2015. Two preferences control this: Windows Active On First Click Windows Active Only On Top See their preference descriptions for details. Note that #activeOnlyOnTop used to be a regular message in system windows but was changed into a system-wide preference. Thanks to Chris for continuous feedback on this! ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068142.html Name: Kernel-mt.1025 Ancestors: Kernel-ul.1024 Appendix to Morphic-mt.1150. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068143.html Name: System-mt.832 Ancestors: System-ul.831 Appendix to Morphic-mt.1150. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068144.html Name: Services-Base-mt.58 Ancestors: Services-Base-mt.57 Appendix to Morphic-mt.1150. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068145.html Name: 51Deprecated-mt.29 Ancestors: 51Deprecated-mt.28 Appendix to Morphic-mt.1150. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068146.html Name: ReleaseBuilder-mt.135 Ancestors: ReleaseBuilder-mt.134 Appendix to Morphic-mt.1150. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068147.html Name: Files-cmm.155 Ancestors: Files-ul.154 Fix ability to load OSProcess after recent mode-conversion changes. ============================================= From tim at rowledge.org Fri May 20 23:08:26 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri May 20 23:08:27 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463772820184-4896440.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> Message-ID: <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> > On 20-05-2016, at 12:33 PM, marcel.taeumel wrote: > yes, I think so. You event create code is kind of awkward but I would work > like this: > > ... > [:event :target | > ... > event hand > handleEvent: ((KeyboardEvent newFrom: event) stroke: $a); > handleEvent: ((KeyboardEvent newFrom: event) stroke: $b); > handleEvent: ((KeyboardEvent newFrom: event) stroke: $c); > handleEvent: ((KeyboardEvent newFrom: event) stroke: $d); > handleEvent: ((KeyboardEvent newFrom: event) stroke: $e). > event wasIgnored: true. > event]. You?d need to be *very* careful here; catching a keyboard event and then sending more keyboard events via the same route? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Abdicate (v.), to give up all hope of ever having a flat stomach. From tim at rowledge.org Fri May 20 23:10:28 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri May 20 23:10:29 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> <20160520011254.GA13712@shell.msen.com> <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> Message-ID: <2D259DA9-D57C-4B13-A362-A6580BA29C20@rowledge.org> > On 20-05-2016, at 1:52 PM, David T. Lewis wrote: > > Thank you Yoshiki, I will commit the update to the oscog branch tonight > when I get home. > > The next thing to try is your Imm patch for sqUnixX11.c I will get around to trying this out on my Pi?s, honest. Stuck in floating point emulation/simulation right now, after the ?fun? of fixing serial port + scratchboard code. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Oxymorons: Almost exactly From lewis at mail.msen.com Fri May 20 23:39:33 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Fri May 20 23:39:35 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <2D259DA9-D57C-4B13-A362-A6580BA29C20@rowledge.org> References: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160519024408.GA27465@shell.msen.com> <20160520011254.GA13712@shell.msen.com> <35095.136.1.1.107.1463777568.squirrel@webmail.msen.com> <2D259DA9-D57C-4B13-A362-A6580BA29C20@rowledge.org> Message-ID: <20160520233933.GA38745@shell.msen.com> On Fri, May 20, 2016 at 04:10:28PM -0700, tim Rowledge wrote: > > > On 20-05-2016, at 1:52 PM, David T. Lewis wrote: > > > > Thank you Yoshiki, I will commit the update to the oscog branch tonight > > when I get home. > > > > The next thing to try is your Imm patch for sqUnixX11.c > > I will get around to trying this out on my Pi???s, honest. Stuck in floating point emulation/simulation right now, after the ???fun??? of fixing serial port + scratchboard code. > I just committed the update to make HostWindowPlugin work for resizing the main window on Cog/Spur. If something breaks in the VM builds, blame me. Dave From lewis at mail.msen.com Sat May 21 01:07:14 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 21 01:07:17 2016 Subject: [squeak-dev] The Trunk: Files-cmm.155.mcz In-Reply-To: <201605202030.u4KKU4js098668@shell.msen.com> References: <201605202030.u4KKU4js098668@shell.msen.com> Message-ID: <20160521010714.GA53707@shell.msen.com> On Fri, May 20, 2016 at 08:29:55PM +0000, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Files to project The Trunk: > http://source.squeak.org/trunk/Files-cmm.155.mcz > > ==================== Summary ==================== > > Name: Files-cmm.155 > Author: cmm > Time: 20 May 2016, 3:29:53.0841 pm > UUID: 2d1395ee-9f47-47f6-91f5-dbd18af891e7 > Ancestors: Files-ul.154 > > Fix ability to load OSProcess after recent mode-conversion changes. > Thank you Chris! Dave From Marcel.Taeumel at hpi.de Sat May 21 05:56:10 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 21 06:32:35 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> Message-ID: <1463810170875-4896472.post@n4.nabble.com> tim Rowledge wrote >> On 20-05-2016, at 12:33 PM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> yes, I think so. You event create code is kind of awkward but I would >> work >> like this: >> >> ... >> [:event :target | >> ... >> event hand >> handleEvent: ((KeyboardEvent newFrom: event) stroke: $a); >> handleEvent: ((KeyboardEvent newFrom: event) stroke: $b); >> handleEvent: ((KeyboardEvent newFrom: event) stroke: $c); >> handleEvent: ((KeyboardEvent newFrom: event) stroke: $d); >> handleEvent: ((KeyboardEvent newFrom: event) stroke: $e). >> event wasIgnored: true. >> event]. > > You?d need to be *very* careful here; catching a keyboard event and then > sending more keyboard events via the same route? > > tim > -- > tim Rowledge; > tim@ > ; http://www.rowledge.org/tim > Abdicate (v.), to give up all hope of ever having a flat stomach. Hi Tim, it wouldn't be the same route. Calling HandMorph >> #processEvent: means a fresh start for processing the event argument. With all its glory. :-) Shared state in HandMorph is an issue though: - keyboard focus - mouse focus - mouse click state - mouse over handler - event listeners (- event filters) (- event stats) However, you actually can send multiple events along the "same route" if you mean the same target: [:event :target | ... target "<--- do NOT start event processing over again but use same target" handleEvent: ((KeyboardEvent newFrom: event) stroke: $a); handleEvent: ((KeyboardEvent newFrom: event) stroke: $b); handleEvent: ((KeyboardEvent newFrom: event) stroke: $c); handleEvent: ((KeyboardEvent newFrom: event) stroke: $d); handleEvent: ((KeyboardEvent newFrom: event) stroke: $e). event wasIgnored: true. event]. Given that there is a double-dispatch pattern in UserInputEvent >> #sentTo: and a event type discrimination in MorphicEventDispatcher >> #dispatchEvent:with:, we are fine, even with changing event types and not just multiplicity in a filter. The return value in an event filter, however, should always be a single event. Ignored if not needed. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4896472.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From estebanlm at gmail.com Sat May 21 07:52:34 2016 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Sat May 21 07:52:38 2016 Subject: [squeak-dev] Re: [Vm-dev] Minutes of the Meeting to Discuss Moving Cog to Github In-Reply-To: References: <573F6C25.5000601@zoho.com> Message-ID: <9F75F314-13A7-4CCA-8921-0DC5701F6CBB@gmail.com> > On 20 May 2016, at 23:49, Eliot Miranda wrote: > > Indeed, I hope that with the new repository it will be much easier for the people who got the VM working on iPad to integrate their changes. It should also be possible to have Linux ARM v6 (Pi) and Linux ARM v7 (Android) VMs. For iPad, sources were working a couple of years ago and we never comeback? make it work should be not hard but once integrated with John?s work on cocoa we'll need to have a new look? Esteban -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160521/58ae0dd3/attachment.htm From Marcel.Taeumel at hpi.de Sat May 21 07:40:33 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 21 08:16:58 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463810170875-4896472.post@n4.nabble.com> References: <1463516913916-4895521.post@n4.nabble.com> <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> Message-ID: <1463816433367-4896486.post@n4.nabble.com> Hi, there. Here is a new version of event filters with support for separating capturing filters from bubbling filters. https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-bubbling Here is the change set: event-filters.cs Note that you should either use a fresh trunk image with the latest updates OR unload all the changes from my previous change set because I cleaned up this one. So, there will be some "method removed" calls missing. Anyway, with support for capturing filters, you can also filter, for example, mouse events for system windows that are always active (see preference "Windows Active Only On Top" disabled). wnd := ActiveWorld submorphs fourth. mouseFilter := PluggableEventFilter on: [:evt :target | evt ignore]. wnd addMouseCaptureFilter: mouseFilter. wnd removeMouseCaptureFilter: mouseFilter. See how the behavior is different when you use the filter for the bubbling phase: wnd addMouseBubbleFilter: mouseFilter. wnd removeMouseBubbleFilter: mouseFilter. Note that event bubbling is implemented in MorphicEventDispatcher. If there would be no bubbling, those filters would be meaningless. However, I am not aware of an alternative event dispatcher for Squeak's Morphic. What other dispatch patterns are out there? :-) Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4896486.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Sat May 21 16:50:16 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat May 21 16:50:16 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? Message-ID: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> We have an interesting problem in Pi-land where many teachers report kids losing their Scratch work (and other, but I don?t get to fix that) because of pulling the power before fully shutting down etc. This tends to put them off trying again, apparently. We already close files properly after writing out files but it seems that dear ol?unix likes to save actual writing for later, perhaps when it has time for a relaxing latt? or whatever. It has been suggested that using fsync() might force the lazy writer to actually do its job properly, which seems reasonable. In thinking about where to add this I see a couple of obvious possibilities a) a new primitive b) add fsync() (suitably wrapped in case of non-availability) to the end of the sqFileFlush() called in primitiveFileFlush() code. I think I prefer b) personally but I?m happy to be educated. Possible probles insclude some OS? not having a fsync option; so far as I can see Windows already uses a totally disjoint set of code. Can anyone think of bad things happening if I do this? Think of the children?. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: JSP: Jump on Sexy Programmer From eliot.miranda at gmail.com Sat May 21 17:12:34 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 21 17:12:36 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> Message-ID: Hi Tim, On Sat, May 21, 2016 at 9:50 AM, tim Rowledge wrote: > We have an interesting problem in Pi-land where many teachers report kids > losing their Scratch work (and other, but I don?t get to fix that) because > of pulling the power before fully shutting down etc. This tends to put them > off trying again, apparently. > > We already close files properly after writing out files but it seems that > dear ol?unix likes to save actual writing for later, perhaps when it has > time for a relaxing latt? or whatever. It has been suggested that using > fsync() might force the lazy writer to actually do its job properly, which > seems reasonable. In thinking about where to add this I see a couple of > obvious possibilities > a) a new primitive > b) add fsync() (suitably wrapped in case of non-availability) to the end > of the sqFileFlush() called in primitiveFileFlush() code. > It could be optional so that either c) its only done on ARM linux builds (via e.g. -DFlushAlsoFsyncs=1), or d) a command-line flag to the VM (e.g. -fsynconflush) which can be set by default in the squeak or scratch startup script on rpi. This seems to me more appropriate. I think d) is worth the effort, but c) would be very simple. Any other suggestions? > > I think I prefer b) personally but I?m happy to be educated. Possible > probles insclude some OS? not having a fsync option; so far as I can see > Windows already uses a totally disjoint set of code. > > Can anyone think of bad things happening if I do this? Think of the > children?. > Your consequent popularity could go to your head...? > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: JSP: Jump on Sexy Programmer > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160521/b0fc1312/attachment.htm From lewis at mail.msen.com Sat May 21 17:15:24 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sat May 21 17:15:28 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> Message-ID: <20160521171524.GA35694@shell.msen.com> On Sat, May 21, 2016 at 09:50:16AM -0700, tim Rowledge wrote: > We have an interesting problem in Pi-land where many teachers report kids losing their Scratch work (and other, but I don???t get to fix that) because of pulling the power before fully shutting down etc. This tends to put them off trying again, apparently. > > We already close files properly after writing out files but it seems that dear ol???unix likes to save actual writing for later, perhaps when it has time for a relaxing latt?? or whatever. It has been suggested that using fsync() might force the lazy writer to actually do its job properly, which seems reasonable. In thinking about where to add this I see a couple of obvious possibilities > a) a new primitive > b) add fsync() (suitably wrapped in case of non-availability) to the end of the sqFileFlush() called in primitiveFileFlush() code. > > I think I prefer b) personally but I???m happy to be educated. Possible probles insclude some OS??? not having a fsync option; so far as I can see Windows already uses a totally disjoint set of code. > > Can anyone think of bad things happening if I do this? Think of the children???. > I suspect that the problem lies elsewhere. The difference between fsync() and fflush() is basically that fflush() functions at the higher level stdio (C runtime lib) level, and fsync() is a system call at a lower level that operates directly on the file descriptor. The unix file functions are written to the stdio level, so the existing call to fflush() is the right thing to do. I do not know if mixing a lower level call in with this would hurt anything, but it will not help anything either and it does not seem like a good thing to do. My guess would be that there is some path through the code in the image where you might be able to add a #flush to address the issue. This can have performance tradeoffs, but reliable would be better than fast in a case like this. Dave From eliot.miranda at gmail.com Sat May 21 17:22:15 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 21 17:22:18 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20160521171524.GA35694@shell.msen.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> Message-ID: Hi David, On Sat, May 21, 2016 at 10:15 AM, David T. Lewis wrote: > On Sat, May 21, 2016 at 09:50:16AM -0700, tim Rowledge wrote: > > We have an interesting problem in Pi-land where many teachers report > kids losing their Scratch work (and other, but I don???t get to fix that) > because of pulling the power before fully shutting down etc. This tends to > put them off trying again, apparently. > > > > We already close files properly after writing out files but it seems > that dear ol???unix likes to save actual writing for later, perhaps when it > has time for a relaxing latt?? or whatever. It has been suggested that > using fsync() might force the lazy writer to actually do its job properly, > which seems reasonable. In thinking about where to add this I see a couple > of obvious possibilities > > a) a new primitive > > b) add fsync() (suitably wrapped in case of non-availability) to the end > of the sqFileFlush() called in primitiveFileFlush() code. > > > > I think I prefer b) personally but I???m happy to be educated. Possible > probles insclude some OS??? not having a fsync option; so far as I can see > Windows already uses a totally disjoint set of code. > > > > Can anyone think of bad things happening if I do this? Think of the > children???. > > > > I suspect that the problem lies elsewhere. The difference between fsync() > and fflush() is basically that fflush() functions at the higher level stdio > (C runtime lib) level, and fsync() is a system call at a lower level that > operates directly on the file descriptor. > fflush and fsync are different. fflush merely ensures that the stdio buffers in the process are flushed to the kernel file state via write calls. sync however ensures that kernel state for that file descriptor is written to disc. sync does this for all kernel file state. I think Tim's diagnosis and solution are correct. > The unix file functions are written to the stdio level, so the existing > call > to fflush() is the right thing to do. I do not know if mixing a lower level > call in with this would hurt anything, but it will not help anything either > and it does not seem like a good thing to do. > > My guess would be that there is some path through the code in the image > where > you might be able to add a #flush to address the issue. This can have > performance > tradeoffs, but reliable would be better than fast in a case like this. > > Dave > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160521/ac0f614d/attachment.htm From Marcel.Taeumel at hpi.de Sat May 21 16:47:07 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sat May 21 17:23:35 2016 Subject: [squeak-dev] Re: Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> Message-ID: <1463849227747-4896545.post@n4.nabble.com> Hi Tim, in Windows, this is called FlushFileBuffers, I guess: https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx MSDN also suggests to use unbuffered I/O instead of calling such a flush function too often. What are our options to control buffered vs. unbuffered from Squeak land? https://support.microsoft.com/en-us/kb/99794 https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950%28v=vs.85%29.aspx On what media is the data stored? I think that you cannot be 100% sure to have all data written after some function call returns because some details are out of reach for user applications. Think of some USB driver that needs just two more cycles to finish writing... I am no expert there but it seems tricky to find the correct point in time to turn the power off. Regular OS shutdown seems more appropriate... Best, Marcel -- View this message in context: http://forum.world.st/Adding-fsync-call-to-the-primitiveFileFlush-prim-tp4896538p4896545.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Sat May 21 17:49:24 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat May 21 17:49:24 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> Message-ID: <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don?t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don?t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. An interesting thing is that I ?remembered? that we flush files when closing them but in fact we don?t. The file flush primitive is barely used, so far as I can only really for stdio flushing. So adding a fsync call to the flush primitive would barely affect anything and I?d have to amend the Scratch file writing code to use it. Is anyone using code that regularly flushes filestreams and might have a performance issue if an fsync were added? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: BOMB: Burn Out Memory Banks From eliot.miranda at gmail.com Sat May 21 18:02:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 21 18:02:54 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> Message-ID: Hi Tim, On Sat, May 21, 2016 at 10:49 AM, tim Rowledge wrote: > The issue here is that the PI - especially when used in schools - is > storing everything on a micro-SD card. Being surrounded by kids is a scary > thing for a computer. They don?t necessarily bother to do a nice system > shutdown or even exit Scratch before yanking the power. Teachers don?t > necessarily know to tell them to; lots of people doing their best with > insufficient knowledge. > > An interesting thing is that I ?remembered? that we flush files when > closing them but in fact we don?t. The file flush primitive is barely used, > so far as I can only really for stdio flushing. So adding a fsync call to > the flush primitive would barely affect anything and I?d have to amend the > Scratch file writing code to use it. > > Is anyone using code that regularly flushes filestreams and might have a > performance issue if an fsync were added? > Well, the case is that it /is/ a performance issue. Writing to disc is way more expensive than flushing to kernel buffers. How about saying what you think about my c) and d) options? That's a way of avoiding the performance issue and solving the kids-are-humans issue. tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Strange OpCodes: BOMB: Burn Out Memory Banks > _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160521/808c25fb/attachment.htm From tim at rowledge.org Sat May 21 18:44:29 2016 From: tim at rowledge.org (tim Rowledge) Date: Sat May 21 18:44:29 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> Message-ID: <96FFF594-235E-43E1-B900-229E9B12492B@rowledge.org> > On 21-05-2016, at 11:02 AM, Eliot Miranda wrote: > Well, the case is that it /is/ a performance issue. Writing to disc is way more expensive than flushing to kernel buffers. How about saying what you think about my c) and d) options? That's a way of avoiding the performance issue and solving the kids-are-humans issue. Either would be just fine by me, no problem. Adding a new prim might be even better since it would defer control up to the image, which always seems the best option to me. However, opening the can of rancid worms that is the file system interface doesn?t appeal too much right now. I think for simplicity and testing I?ll stick with a #define and we can revisit it later if it seems to solve any realworld problems. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Got into the gene pool while the lifeguard wasn't watching. From lewis at mail.msen.com Sun May 22 04:45:58 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 22 04:46:02 2016 Subject: [squeak-dev] Re: Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <1463849227747-4896545.post@n4.nabble.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <1463849227747-4896545.post@n4.nabble.com> Message-ID: <20160522044558.GA74432@shell.msen.com> On Sat, May 21, 2016 at 09:47:07AM -0700, marcel.taeumel wrote: > Hi Tim, > > in Windows, this is called FlushFileBuffers, I guess: > https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx Slightly off topic, but worth mentioning: The implementation of FilePlugin for Windows operates on HANDLE references to files, which I believe are roughly equivalent to file descriptors on Unix. Thus the Unix VMs are written to the higher level stdio interface, and the Windows VM uses a more direct lower level IO strategy. I have always wondered which of the two approaches (low level HANDLE/descriptor versus higher level buffered stdio) produces better overall performance for Squeak. One way to answer the question would be to implement a FilePlugin for Unix VMs with all of the IO done at the descriptor level. Specifically, a SQFile->file would be a reference to an integer file descriptor (similar to a Windows HANDLE), and the platform support code would operate against file descriptors rather than (FILE *) references. Doing a reimplementation of FilePlugin for Unix is probably not a huge project, but I have never gotten around to trying it. Has anyone else wondered about this? Which is better, the Windows VM file strategy, or the Unix VM file strategy? Dave > > MSDN also suggests to use unbuffered I/O instead of calling such a flush > function too often. What are our options to control buffered vs. unbuffered > from Squeak land? > > https://support.microsoft.com/en-us/kb/99794 > https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950%28v=vs.85%29.aspx > > On what media is the data stored? I think that you cannot be 100% sure to > have all data written after some function call returns because some details > are out of reach for user applications. Think of some USB driver that needs > just two more cycles to finish writing... I am no expert there but it seems > tricky to find the correct point in time to turn the power off. Regular OS > shutdown seems more appropriate... > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Adding-fsync-call-to-the-primitiveFileFlush-prim-tp4896538p4896545.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Sun May 22 05:07:45 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Sun May 22 05:07:47 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> Message-ID: <20160522050745.GA79741@shell.msen.com> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: > The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. > D'oh, now I get it. I was not thinking of the case of yanking the power cord. I can well imagine that this might be a bit disruptive for normal process exit cleanups that are supposed to ensure that fflushed buffers actually make it to the disk-like media. > An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. In a perfect world you do not need to flush a file when closing it, because closing it implies a flush (e.g. fclose performs an fflush). That said, yanking the power cord might introduce some imperfections. Dave From smalltalker2 at mac.com Sun May 22 05:36:38 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Sun May 22 05:36:41 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20160522050745.GA79741@shell.msen.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <20160522050745.GA79741@shell.msen.com> Message-ID: <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> Sent from my iPad > On May 21, 2016, at 22:07, David T. Lewis wrote: > >> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. > > D'oh, now I get it. I was not thinking of the case of yanking the power cord. > I can well imagine that this might be a bit disruptive for normal process exit > cleanups that are supposed to ensure that fflushed buffers actually make it > to the disk-like media. > >> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. > > In a perfect world you do not need to flush a file when closing it, because > closing it implies a flush (e.g. fclose performs an fflush). That said, > yanking the power cord might introduce some imperfections. > > Dave > > And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. From herbertkoenig at gmx.net Sun May 22 08:40:55 2016 From: herbertkoenig at gmx.net (=?ISO-8859-1?Q?Herbert_K=F6nig?=) Date: Sun May 22 08:41:24 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? Message-ID: Hi John, Guess it's a matter of time. Last time I looked we used punched cards, now we just close the lid of our laptop and expect it to do the right things. Give me one serious reason why yanking the power cord _should_ punish the user. That it still does is just another incovenience. It's sooo backwards. Cheers,? Herbert.
-------- Urspr?ngliche Nachricht --------
Von: John Pfersich
Datum:22.05.2016 07:36 (GMT+01:00)
An: The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ?
Sent from my iPad > On May 21, 2016, at 22:07, David T. Lewis wrote: > >> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. > > D'oh, now I get it. I was not thinking of the case of yanking the power cord. > I can well imagine that this might be a bit disruptive for normal process exit > cleanups that are supposed to ensure that fflushed buffers actually make it > to the disk-like media. > >> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. > > In a perfect world you do not need to flush a file when closing it, because > closing it implies a flush (e.g. fclose performs an fflush). That said, > yanking the power cord might introduce some imperfections. > > Dave > > And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160522/ae3d0b90/attachment.htm From btc at openinworld.com Sun May 22 12:52:52 2016 From: btc at openinworld.com (Ben Coman) Date: Sun May 22 12:53:16 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: On Sun, May 22, 2016 at 4:40 PM, Herbert K?nig wrote: > Hi John, > > Guess it's a matter of time. Last time I looked we used punched cards, now > we just close the lid of our laptop and expect it to do the right things. Closing the lid doesn't yank the power. The battery is still there and the system takes a few moments to cleanly put itself to sleep. > Give me one serious reason why yanking the power cord _should_ punish the > user. > > That it still does is just another incovenience. It's sooo backwards. > > Cheers, > > Herbert. > > > -------- Urspr?ngliche Nachricht -------- > Von: John Pfersich > Datum:22.05.2016 07:36 (GMT+01:00) > An: The general-purpose Squeak developers list > Betreff: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim > ? > > > > > Sent from my iPad >> On May 21, 2016, at 22:07, David T. Lewis wrote: >> >>> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >>> The issue here is that the PI - especially when used in schools - is >>> storing everything on a micro-SD card. Being surrounded by kids is a scary >>> thing for a computer. They don???t necessarily bother to do a nice system >>> shutdown or even exit Scratch before yanking the power. Teachers don???t >>> necessarily know to tell them to; lots of people doing their best with >>> insufficient knowledge. >> >> D'oh, now I get it. I was not thinking of the case of yanking the power >> cord. >> I can well imagine that this might be a bit disruptive for normal process >> exit >> cleanups that are supposed to ensure that fflushed buffers actually make >> it >> to the disk-like media. >> >>> An interesting thing is that I ???remembered??? that we flush files when >>> closing them but in fact we don???t. >> >> In a perfect world you do not need to flush a file when closing it, >> because >> closing it implies a flush (e.g. fclose performs an fflush). That said, >> yanking the power cord might introduce some imperfections. >> >> Dave >> >> > And I don't think that people that yank the power cord should be catered to. > If you do stupid things, you should pay the consequences. A computer isn't a > toaster. And teachers should convey that to their students. > > > From eliot.miranda at gmail.com Sun May 22 15:26:41 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 22 15:26:49 2016 Subject: [squeak-dev] Re: [Pharo-dev] From a mooc user: method source with it' take so long in Pharo 5 In-Reply-To: References: <6f61161e-a659-1ade-1520-e589bfb1888c@free.fr> Message-ID: <2E8774A6-3A6C-4695-928D-7964ECEC56A2@gmail.com> Hi Henrik, cc'ing squeak-dev cuz this is relevant to both communities (if and until Pharo takes the unwise decision to double the size of the image by keeping sources in the image). > On May 22, 2016, at 5:01 AM, Henrik Nergaard wrote: > > There is a method in SourceFileArray #localProcessReadStreamAtFileIndex:atPosition:ifPresent:ifAbsent: which uses a ProccessLocalVariable called ProccessAndSessionLocalSourcesFileArray (see #localProcessReadOnlyCopy). Changing the last line in #readStreamAt:ifPresent:ifAbsent: to use this local process one makes the time to run this snippet: > > [ 1 systemNavigation browseMethodsWithSourceString: 'Morph' matchCase: false ] timeProfile > > From ~ 10 seconds to ~ 3 seconds (Windows). > > However I cannot see that the file handles created by this processLocalVariable to ever be closed, so I suspect those are leaked? In that case there might be the need to implement some ?clean up? mechanism for ProccessLocalVariables before they are changed/nilled when a process changes. > > Another approach could be to not use a ProccessLocalVariabe at all, but extend the SourceFilesArray class to also hold one read only handle for each of its files, and use these in readStreamAtFileIndex:::? . I guess that it is also necessary then to have semaphore protecting the two last lines such that setting the position in the stream and reading from it cannot be changed by other threads. I like this approach, but it has a fatal flaw. If one is debugging file access, then as the debugger causes the source of methods to be fetched as the debugger displays them, so the file pointer in the read-only file the access of which one is trying to debug will change under one's feet, and the results will be completely wrong. An approach which uses a special copy for the debugger doesn't work; one can't debug access to that file for the same reason. An approach that /should/ work is for the debugger to install its own copy around file-access. This should be recursive. So around every file access in the debugger there would need to be something like SourceFiles substituteFreshReadOnlyCopiesDuring: [...file access...] which would remember the current read-only files, evaluate the block using ensure: and have the ensure: block reinstall the previous file. Does this make sense? > > readStreamAtFileIndex: index atPosition: position ifPresent: presentBlock ifAbsent: absentBlock > > | stream result| > stream := self readOnlyFileAt: index. > stream ifNil: [ ^ absentBlock value ]. "sources file not available" > > position > stream size ifTrue: [ ^ absentBlock value ]. > > readSema critical: [ > stream position: position. > result := presentBlock value: stream > ]. > > ^ result > > > Best regards, > Henrik > > > From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org] On Behalf Of Nicolai Hess > Sent: Thursday, May 19, 2016 9:31 AM > To: Pharo Development List > Subject: Re: [Pharo-dev] From a mooc user: method source with it' take so long in Pharo 5 > > Squeak caches the opened readonly file(handle). It does not have to reopen the file on every call for reading (readonly). > > 2016-05-18 19:12 GMT+02:00 stepharo : > I am wondering why does the search 'method source with it' take so long in Pharo 5? On my PC, When I select the text 'menu' and search for all 'method source with it', in Squeak 5 it takes 3 seconds. In Pharo 5 it takes 21 seconds. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160522/f00c935e/attachment-0001.htm From eliot.miranda at gmail.com Sun May 22 15:34:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 22 15:34:57 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <20160522050745.GA79741@shell.msen.com> <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> Message-ID: <4ECD568E-22AD-43E2-9501-39A76F88EE18@gmail.com> _,,,^..^,,,_ (phone) > On May 21, 2016, at 10:36 PM, John Pfersich wrote: > > > > > Sent from my iPad >>> On May 21, 2016, at 22:07, David T. Lewis wrote: >>> >>> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >>> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. >> >> D'oh, now I get it. I was not thinking of the case of yanking the power cord. >> I can well imagine that this might be a bit disruptive for normal process exit >> cleanups that are supposed to ensure that fflushed buffers actually make it >> to the disk-like media. >> >>> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. >> >> In a perfect world you do not need to flush a file when closing it, because >> closing it implies a flush (e.g. fclose performs an fflush). That said, >> yanking the power cord might introduce some imperfections. >> >> Dave > And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. Are you a parent? Children are human beings. I remember when I first joined ParcPlace talking with Phil Yelland who was in charge of the native GUI project that was killed by the DarkPlace-Dodgytalk merger. He told of a situation where a Windows machine told him he didn't have permission to shut the machine down. "Really?", he thought. "Well then you shouldn't leave the power cord unprotected.", and yanked the power cord. Come on man, be human. Machines are supposed to serve us, especially itty nutty $35 machines. Of course youngsters will turn them off (I do by mistake), and of course teachers can't be expected to be systems programmers and be able to explain their consequent insights to very young children. So yes, the system should use fsync when appropriate, to serve the users, not the inanimate or the partially omniscient. From estebanlm at gmail.com Sun May 22 15:49:04 2016 From: estebanlm at gmail.com (Esteban Lorenzano) Date: Sun May 22 15:49:10 2016 Subject: [squeak-dev] Re: [Pharo-dev] From a mooc user: method source with it' take so long in Pharo 5 In-Reply-To: <2E8774A6-3A6C-4695-928D-7964ECEC56A2@gmail.com> References: <6f61161e-a659-1ade-1520-e589bfb1888c@free.fr> <2E8774A6-3A6C-4695-928D-7964ECEC56A2@gmail.com> Message-ID: > On 22 May 2016, at 17:26, Eliot Miranda wrote: > > Hi Henrik, > > cc'ing squeak-dev cuz this is relevant to both communities (if and until Pharo takes the unwise decision to double the size of the image by keeping sources in the image). this will not happen :) yes, we have played with the idea, but at the end we have some good reasons to not do it? but by the way, it was not ?doubling? because what we were keeping was a compressed version. What we?ll probably do is to change the file format to a real hash database for sources (like CDB, or something) and to epicea for changes (because epicea can store full refactor histories, etc?)? but this format migration is still very green, we need first to extract the functionality and decouple it (because now read/write is scattered all over the image). > > On May 22, 2016, at 5:01 AM, Henrik Nergaard > wrote: > >> There is a method in SourceFileArray #localProcessReadStreamAtFileIndex:atPosition:ifPresent:ifAbsent: which uses a ProccessLocalVariable called ProccessAndSessionLocalSourcesFileArray (see #localProcessReadOnlyCopy). Changing the last line in #readStreamAt:ifPresent:ifAbsent: to use this local process one makes the time to run this snippet: >> >> [ 1 systemNavigation browseMethodsWithSourceString: 'Morph' matchCase: false ] timeProfile >> >> From ~ 10 seconds to ~ 3 seconds (Windows). >> >> However I cannot see that the file handles created by this processLocalVariable to ever be closed, so I suspect those are leaked? In that case there might be the need to implement some ?clean up? mechanism for ProccessLocalVariables before they are changed/nilled when a process changes. >> >> Another approach could be to not use a ProccessLocalVariabe at all, but extend the SourceFilesArray class to also hold one read only handle for each of its files, and use these in readStreamAtFileIndex:::? . I guess that it is also necessary then to have semaphore protecting the two last lines such that setting the position in the stream and reading from it cannot be changed by other threads. > > I like this approach, but it has a fatal flaw. If one is debugging file access, then as the debugger causes the source of methods to be fetched as the debugger displays them, so the file pointer in the read-only file the access of which one is trying to debug will change under one's feet, and the results will be completely wrong. > > An approach which uses a special copy for the debugger doesn't work; one can't debug access to that file for the same reason. > > An approach that /should/ work is for the debugger to install its own copy around file-access. This should be recursive. So around every file access in the debugger there would need to be something like > > SourceFiles substituteFreshReadOnlyCopiesDuring: [...file access...] > > which would remember the current read-only files, evaluate the block using ensure: and have the ensure: block reinstall the previous file. > > Does this make sense? > >> >> readStreamAtFileIndex: index atPosition: position ifPresent: presentBlock ifAbsent: absentBlock >> >> | stream result| >> stream := self readOnlyFileAt: index. >> stream ifNil: [ ^ absentBlock value ]. "sources file not available" >> >> position > stream size ifTrue: [ ^ absentBlock value ]. >> >> readSema critical: [ >> stream position: position. >> result := presentBlock value: stream >> ]. >> >> ^ result >> >> >> Best regards, >> Henrik >> >> >> From: Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org ] On Behalf Of Nicolai Hess >> Sent: Thursday, May 19, 2016 9:31 AM >> To: Pharo Development List > >> Subject: Re: [Pharo-dev] From a mooc user: method source with it' take so long in Pharo 5 >> >> Squeak caches the opened readonly file(handle). It does not have to reopen the file on every call for reading (readonly). >> >> 2016-05-18 19:12 GMT+02:00 stepharo >: >> I am wondering why does the search 'method source with it' take so long in Pharo 5? On my PC, When I select the text 'menu' and search for all 'method source with it', in Squeak 5 it takes 3 seconds. In Pharo 5 it takes 21 seconds. >> -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160522/30e9f381/attachment.htm From tim at rowledge.org Sun May 22 17:16:41 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun May 22 17:16:45 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <4ECD568E-22AD-43E2-9501-39A76F88EE18@gmail.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <20160522050745.GA79741@shell.msen.com> <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> <4ECD568E-22AD-43E2-9501-39A76F88EE18@gmail.com> Message-ID: <7E4784FF-520C-4DF6-AA8B-F1CBAA44F9B0@rowledge.org> > >> And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. > > Are you a parent? Children are human beings. > Well I?m not a parent (that I know of) and I?m not *entirely* sure children are human beings, but when they?re my customers and get all teary after losing their painstakingly put together scripts, then I get irritated by the system being less helpful than it could be. Besides, in a busy classroom (have you ever been a room full of excited 6 year olds) things get tripped over, snagged on waving arms, knocked over in the sheer drama of *making an LED flash!!!!* and so on. So yeah, we should flush everything possible when writing out a script. In fact I should probably see about making autosave of some form now I think of it. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Two wrongs are only the beginning. From eliot.miranda at gmail.com Sun May 22 19:16:51 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 22 19:16:55 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <7E4784FF-520C-4DF6-AA8B-F1CBAA44F9B0@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <20160522050745.GA79741@shell.msen.com> <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> <4ECD568E-22AD-43E2-9501-39A76F88EE18@gmail.com> <7E4784FF-520C-4DF6-AA8B-F1CBAA44F9B0@rowledge.org> Message-ID: <7FF12A3E-1118-484E-B2E9-00C4D20F05E2@gmail.com> On May 22, 2016, at 10:16 AM, tim Rowledge wrote: >> >>> And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. >> >> Are you a parent? Children are human beings. > Well I?m not a parent (that I know of) and I?m not *entirely* sure children are human beings, but when they?re my customers and get all teary after losing their painstakingly put together scripts, then I get irritated by the system being less helpful than it could be. > > Besides, in a busy classroom (have you ever been a room full of excited 6 year olds) things get tripped over, snagged on waving arms, knocked over in the sheer drama of *making an LED flash!!!!* and so on. So yeah, we should flush everything possible when writing out a script. In fact I should probably see about making autosave of some form now I think of it. Make sure it makes backup copies that don't trash the existing backup copies, before it saves over the image. The plug could get pulled at any point. Only rename is quick enough and repairable enough to consider atomic. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Two wrongs are only the beginning. > > > From eliot.miranda at gmail.com Sun May 22 19:25:49 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 22 19:25:55 2016 Subject: [squeak-dev] Re: Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20160522044558.GA74432@shell.msen.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <1463849227747-4896545.post@n4.nabble.com> <20160522044558.GA74432@shell.msen.com> Message-ID: Hi David, > On May 21, 2016, at 9:45 PM, David T. Lewis wrote: > >> On Sat, May 21, 2016 at 09:47:07AM -0700, marcel.taeumel wrote: >> Hi Tim, >> >> in Windows, this is called FlushFileBuffers, I guess: >> https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx > > Slightly off topic, but worth mentioning: The implementation of FilePlugin > for Windows operates on HANDLE references to files, which I believe are roughly > equivalent to file descriptors on Unix. Thus the Unix VMs are written to the > higher level stdio interface, and the Windows VM uses a more direct lower level > IO strategy. I have always wondered which of the two approaches (low level > HANDLE/descriptor versus higher level buffered stdio) produces better overall > performance for Squeak. > > One way to answer the question would be to implement a FilePlugin for Unix > VMs with all of the IO done at the descriptor level. Specifically, a > SQFile->file would be a reference to an integer file descriptor (similar to > a Windows HANDLE), and the platform support code would operate against > file descriptors rather than (FILE *) references. IME this depends on two things, whether the in-image implementation (StandardFileStream et al) is buffered or not, and whether the system provides proper finalization or simply post-mortem finalization. Both interact. If the image level implement ration is not buffered then the VM needs to provide it. This is essentially our case; the problem being that external calls are relatively slow. If buffered, then if finalization is performed on a post-mortem copy, close via finalization cannot flush unless the post-mortem copy is updated after every write, cuz it will flush stake data. So the design we want, that we should aim towards - does all buffering in the image -uses ephemerons to finalize the actual file so that valid data is written in close via finalization. With this approach the "FilePlugin" provides only the slimmest of interfaces to the OS's open, close, read, write and seek primitives, and as Tim has pointed out there are advantages in it providing single calls that combine seek;read and seek;write, eg see the current conversation about read-only file copies and the debugger (although I think my suggestion of substituteReadOnlyCopyWhile: is better). > > Doing a reimplementation of FilePlugin for Unix is probably not a huge > project, but I have never gotten around to trying it. > > Has anyone else wondered about this? Which is better, the Windows VM file > strategy, or the Unix VM file strategy? > > Dave > >> >> MSDN also suggests to use unbuffered I/O instead of calling such a flush >> function too often. What are our options to control buffered vs. unbuffered >> from Squeak land? >> >> https://support.microsoft.com/en-us/kb/99794 >> https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950%28v=vs.85%29.aspx >> >> On what media is the data stored? I think that you cannot be 100% sure to >> have all data written after some function call returns because some details >> are out of reach for user applications. Think of some USB driver that needs >> just two more cycles to finish writing... I am no expert there but it seems >> tricky to find the correct point in time to turn the power off. Regular OS >> shutdown seems more appropriate... >> >> Best, >> Marcel _,,,^..^,,,_ (phone) From tim at rowledge.org Sun May 22 23:08:33 2016 From: tim at rowledge.org (tim Rowledge) Date: Sun May 22 23:08:35 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <7FF12A3E-1118-484E-B2E9-00C4D20F05E2@gmail.com> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <20160522050745.GA79741@shell.msen.com> <4889D882-2595-4397-82C4-276BD7D6B0B0@mac.com> <4ECD568E-22AD-43E2-9501-39A76F88EE18@gmail.com> <7E4784FF-520C-4DF6-AA8B-F1CBAA44F9B0@rowledge.org> <7FF12A3E-1118-484E-B2E9-00C4D20F05E2@gmail.com> Message-ID: <811C3649-2571-48ED-8C97-334A14E155AD@rowledge.org> > On 22-05-2016, at 12:16 PM, Eliot Miranda wrote: > > Make sure it makes backup copies that don't trash the existing backup copies, before it saves over the image. The plug could get pulled at any point. Only rename is quick enough and repairable enough to consider atomic. The good news is that it?s not the image that needs to be saved since that is kept prisitine, but the project file(s) which are much, much smaller. So I should be able to keep a simple backup directory, save there occasionally and then.. well I dunno. If a user does a ?normal save? then I suppose one should delete the backups to avoid confusion in the future. I guess checking that directory on startup and telling the user that there are possible projects copies? Choosing when to do a backup save is an interesting question too; clearly not when the code is being run since the interruption would be most unwelcome in a Pacman tournament. One could go for the total save-on-every action saving of Pages etc but seems like it might cause too much delays. I?ll have to try measuring it I suppose. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim If the code and the comments disagree, then both are probably wrong From lewis at mail.msen.com Mon May 23 00:03:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 23 00:03:45 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160516022713.GA45004@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> Message-ID: <20160523000344.GA88439@shell.msen.com> On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: > > If I understand correctly, here is what we need to do: > > 1) Apply the changes of Mr Hachisuka to the VM. > - The diff is in the earlier email from Yoshiki: > http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html > http://www2.asu.ac.jp/hachi/v3/scratch14ime.html > - Test updated VM to make sure the changes do not cause problems. Make sure > it works without problems for Squeak trunk and for Scratch. > - Apply the update in SVN for both oscog and trunk. I can help here. > - Test the VM. Tim, I need help on this. I do not currently have a working > Cog build environment (Unbuntu/autotools/gcc version issues). Can you > apply the patch from Yoshiki's email and see if your resulting Cog VM > continues to work for you as expected on Pi with Scratch? > - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can > you please give his full name for the commit notice? I assume the patch > is MIT licensed. > Hi Yoshiki, I think that I now understand the VM changes for sqUnixX11.c, and I have applied the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter VM. If these changes are correct, then I will also make a patch and commit them to the oscog branch for Cog/Spur VMs. I arranged the code such that the multibyte recordPendingKeys() logic is used if and only if the -compositioninput option is set on the command line or the equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that this is the intended usage, but please let me know if I did not understand. If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), then please let me know if these changes work as you expect. If you cannot easily make an interpreter VM, then I can commit the changes to the Cog/Spur branch, but I would prefer to test them first if possible. I also found that many of the module command line options are not being passed correctly from the VM to the modules. The -compositionsinput option was one of these, so I fixed it in this update (and I will check if for Cog/Spur when we apply the patch there). But there are others that do not work, so if you find other VM options for multilingual support that do not work as expected, this may be the reason. Dave From lewis at mail.msen.com Mon May 23 00:24:18 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 23 00:24:21 2016 Subject: [squeak-dev] FilePlugin IO performance stdio versus HANDLE (was: Adding fsync() call to the primitiveFileFlush prim ?) In-Reply-To: References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <1463849227747-4896545.post@n4.nabble.com> <20160522044558.GA74432@shell.msen.com> Message-ID: <20160523002418.GA94145@shell.msen.com> I think this is what I meant to suggest: Somebody (tm) should try a new implementation of FilePlugin for the Unix VM, and implement all of the IO in terms of e.g. read() and write() rather than fread() and fwrite(). Then see which one works better in terms of real world performance. This new plugin would be conceptually similar to Andreas' Windows plugin, which operates on a Windows HANDLE, similar to a Unix file descriptor. In general, we can compare the Windows and Unix VMs to see which has the better real-world file IO performance. But those VMs are different in many other ways, so if we just want to know the difference between file IO written to the stdio level versus file IO written to the descriptor/HANDLE level, then a good way to do it would be to write such a plugin for the Unix VM and see if it is better or worse than the current stdio implementation. This might be a good student project, or maybe a hobby project for a Sunday Squeaker with more free Sundays than I have at the moment. Dave On Sun, May 22, 2016 at 12:25:49PM -0700, Eliot Miranda wrote: > Hi David, > > > On May 21, 2016, at 9:45 PM, David T. Lewis wrote: > > > >> On Sat, May 21, 2016 at 09:47:07AM -0700, marcel.taeumel wrote: > >> Hi Tim, > >> > >> in Windows, this is called FlushFileBuffers, I guess: > >> https://msdn.microsoft.com/en-us/library/windows/desktop/aa364439%28v=vs.85%29.aspx > > > > Slightly off topic, but worth mentioning: The implementation of FilePlugin > > for Windows operates on HANDLE references to files, which I believe are roughly > > equivalent to file descriptors on Unix. Thus the Unix VMs are written to the > > higher level stdio interface, and the Windows VM uses a more direct lower level > > IO strategy. I have always wondered which of the two approaches (low level > > HANDLE/descriptor versus higher level buffered stdio) produces better overall > > performance for Squeak. > > > > One way to answer the question would be to implement a FilePlugin for Unix > > VMs with all of the IO done at the descriptor level. Specifically, a > > SQFile->file would be a reference to an integer file descriptor (similar to > > a Windows HANDLE), and the platform support code would operate against > > file descriptors rather than (FILE *) references. > > IME this depends on two things, whether the in-image implementation (StandardFileStream et al) is buffered or not, and whether the system provides proper finalization or simply post-mortem finalization. Both interact. > > If the image level implement ration is not buffered then the VM needs to provide it. This is essentially our case; the problem being that external calls are relatively slow. If buffered, then if finalization is performed on a post-mortem copy, close via finalization cannot flush unless the post-mortem copy is updated after every write, cuz it will flush stake data. > > So the design we want, that we should aim towards > - does all buffering in the image > -uses ephemerons to finalize the actual file so that valid data is written in close via finalization. > > With this approach the "FilePlugin" provides only the slimmest of interfaces to the OS's open, close, read, write and seek primitives, and as Tim has pointed out there are advantages in it providing single calls that combine seek;read and seek;write, eg see the current conversation about read-only file copies and the debugger (although I think my suggestion of substituteReadOnlyCopyWhile: is better). > > > > > Doing a reimplementation of FilePlugin for Unix is probably not a huge > > project, but I have never gotten around to trying it. > > > > Has anyone else wondered about this? Which is better, the Windows VM file > > strategy, or the Unix VM file strategy? > > > > Dave > > > >> > >> MSDN also suggests to use unbuffered I/O instead of calling such a flush > >> function too often. What are our options to control buffered vs. unbuffered > >> from Squeak land? > >> > >> https://support.microsoft.com/en-us/kb/99794 > >> https://msdn.microsoft.com/en-us/library/windows/desktop/cc644950%28v=vs.85%29.aspx > >> > >> On what media is the data stored? I think that you cannot be 100% sure to > >> have all data written after some function call returns because some details > >> are out of reach for user applications. Think of some USB driver that needs > >> just two more cycles to finish writing... I am no expert there but it seems > >> tricky to find the correct point in time to turn the power off. Regular OS > >> shutdown seems more appropriate... > >> > >> Best, > >> Marcel > > _,,,^..^,,,_ (phone) From eliot.miranda at gmail.com Mon May 23 01:20:00 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon May 23 01:20:03 2016 Subject: [squeak-dev] Saving a project's windows Message-ID: Hi All, I'd love to be able to save just the windows form a project. Ideally I'd save also the changes from dirty packages, but that's basically all. I'm trying the PUBLISH items in the Project (preview) window, and it either tries to create a huge word segment (the first PUBLISH option) or tries to compute a relevant compactClassesArray (the second option), which should be empty and if I make it empty, it looks like the Vm locks up in computing the segment. Has anyone had any success saving projects with Spur? Has anyone by some miracle done just the saving of project windows? Any hints on avoiding the size explosion with the first PUBLISH option? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160522/a0c3c4b4/attachment.htm From smalltalker2 at mac.com Mon May 23 05:33:18 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Mon May 23 05:33:25 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $35 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The rest of the OS isn't as forgiving. I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosaves can be deadly to productivity, especially on a computer as slow as the Pi. I haven't used Squeak on a Pi, but on my MacBook, a save takes a few seconds, and I've got better things to do than stop working while the save takes place. And the save itself might leave the image in an unstable state. Sent from my iPhone > On May 22, 2016, at 01:40, Herbert K?nig wrote: > > Hi John, > > Guess it's a matter of time. Last time I looked we used punched cards, now we just close the lid of our laptop and expect it to do the right things. Give me one serious reason why yanking the power cord _should_ punish the user. > > That it still does is just another incovenience. It's sooo backwards. > > Cheers, > > Herbert. > > > -------- Urspr?ngliche Nachricht -------- > Von: John Pfersich > Datum:22.05.2016 07:36 (GMT+01:00) > An: The general-purpose Squeak developers list > Betreff: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? > > > > > Sent from my iPad > > On May 21, 2016, at 22:07, David T. Lewis wrote: > > > >> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: > >> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. > > > > D'oh, now I get it. I was not thinking of the case of yanking the power cord. > > I can well imagine that this might be a bit disruptive for normal process exit > > cleanups that are supposed to ensure that fflushed buffers actually make it > > to the disk-like media. > > > >> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. > > > > In a perfect world you do not need to flush a file when closing it, because > > closing it implies a flush (e.g. fclose performs an fflush). That said, > > yanking the power cord might introduce some imperfections. > > > > Dave > > > > > And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. > From tinchodias at gmail.com Mon May 23 06:58:56 2016 From: tinchodias at gmail.com (Martin Dias) Date: Mon May 23 06:59:18 2016 Subject: [squeak-dev] Re: [Pharo-dev] From a mooc user: method source with it' take so long in Pharo 5 In-Reply-To: <2E8774A6-3A6C-4695-928D-7964ECEC56A2@gmail.com> References: <6f61161e-a659-1ade-1520-e589bfb1888c@free.fr> <2E8774A6-3A6C-4695-928D-7964ECEC56A2@gmail.com> Message-ID: Hi all, On Sun, May 22, 2016 at 12:26 PM, Eliot Miranda wrote: > Hi Henrik, > > cc'ing squeak-dev cuz this is relevant to both communities (if and > until Pharo takes the unwise decision to double the size of the image by > keeping sources in the image). > > On May 22, 2016, at 5:01 AM, Henrik Nergaard > wrote: > > There is a method in SourceFileArray > #localProcessReadStreamAtFileIndex:atPosition:ifPresent:ifAbsent: which > uses a ProccessLocalVariable called ProccessAndSessionLocalSourcesFileArray > (see #localProcessReadOnlyCopy). Changing the last line in > #readStreamAt:ifPresent:ifAbsent: to use this local process one makes the > time to run this snippet: > > > > [ 1 systemNavigation browseMethodsWithSourceString: 'Morph' matchCase: > false ] timeProfile > > > > From ~ 10 seconds to ~ 3 seconds (Windows). > > > > However I cannot see that the file handles created by this > processLocalVariable to ever be closed, so I suspect those are leaked? In > that case there might be the need to implement some ?clean up? mechanism > for ProccessLocalVariables before they are changed/nilled when a process > changes. > > > > Another approach could be to not use a ProccessLocalVariabe at all, but > extend the SourceFilesArray class to also hold one read only handle for > each of its files, and use these in readStreamAtFileIndex:::? . I guess > that it is also necessary then to have semaphore protecting the two last > lines such that setting the position in the stream and reading from it > cannot be changed by other threads. > > > I like this approach, but it has a fatal flaw. If one is debugging file > access, then as the debugger causes the source of methods to be fetched as > the debugger displays them, so the file pointer in the read-only file the > access of which one is trying to debug will change under one's feet, and > the results will be completely wrong. > > An approach which uses a special copy for the debugger doesn't work; one > can't debug access to that file for the same reason. > > An approach that /should/ work is for the debugger to install its own copy > around file-access. This should be recursive. So around every file access > in the debugger there would need to be something like > > SourceFiles substituteFreshReadOnlyCopiesDuring: [...file access...] > > which would remember the current read-only files, evaluate the block using > ensure: and have the ensure: block reinstall the previous file. > > Does this make sense? > > Interesting discussion. We could give a new try on the "local process read-only copy". It was me who started with it last year in a Pharo sprint, but disabled it due to some errors... and didn't spend more time on it afterwards. it was reported here: https://pharo.fogbugz.com/f/cases/15782 the reason to disable it: https://pharo.fogbugz.com/f/cases/15781/ none of them is very clear as documentation of the problem. > > readStreamAtFileIndex: index atPosition: position ifPresent: presentBlock > ifAbsent: absentBlock > > > > | stream result| > > stream := self readOnlyFileAt: index. > > stream ifNil: [ ^ absentBlock value ]. "sources file > not available" > > > > position > stream size ifTrue: [ ^ absentBlock value ]. > > > > readSema critical: [ > > stream position: position. > > result := presentBlock value: stream > > ]. > > > > ^ result > > > > > > Best regards, > > Henrik > > > > > > *From:* Pharo-dev [mailto:pharo-dev-bounces@lists.pharo.org > ] *On Behalf Of *Nicolai Hess > *Sent:* Thursday, May 19, 2016 9:31 AM > *To:* Pharo Development List > *Subject:* Re: [Pharo-dev] From a mooc user: method source with it' take > so long in Pharo 5 > > > > Squeak caches the opened readonly file(handle). It does not have to reopen > the file on every call for reading (readonly). > > > > 2016-05-18 19:12 GMT+02:00 stepharo : > > I am wondering why does the search 'method source with it' take so long in > Pharo 5? On my PC, When I select the text 'menu' and search for all 'method > source with it', in Squeak 5 it takes 3 seconds. In Pharo 5 it takes 21 > seconds. > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/ea42f6b2/attachment.htm From gettimothy at zoho.com Mon May 23 10:07:13 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 23 10:07:47 2016 Subject: [squeak-dev] Saving a project's windows In-Reply-To: References: Message-ID: <154dd152f73.b16d74a471148.7354249081103953376@zoho.com> I have been using Squeak since the 3.x days and have never successfully saved a project. Back then a 'grid' would mask the World and then nothing would happen for hours..... ---- On Sun, 22 May 2016 21:20:00 -0400 Eliot Miranda <eliot.miranda@gmail.com> wrote ---- Hi All, I'd love to be able to save just the windows form a project. Ideally I'd save also the changes from dirty packages, but that's basically all. I'm trying the PUBLISH items in the Project (preview) window, and it either tries to create a huge word segment (the first PUBLISH option) or tries to compute a relevant compactClassesArray (the second option), which should be empty and if I make it empty, it looks like the Vm locks up in computing the segment. Has anyone had any success saving projects with Spur? Has anyone by some miracle done just the saving of project windows? Any hints on avoiding the size explosion with the first PUBLISH option? _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/e1fd815c/attachment-0001.htm From btc at openinworld.com Mon May 23 12:06:21 2016 From: btc at openinworld.com (Ben Coman) Date: Mon May 23 12:06:45 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: On Mon, May 23, 2016 at 1:33 PM, John Pfersich wrote: > On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $35 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The rest of the OS isn't as forgiving. > > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosaves can be deadly to productivity, Since IIUC Linux's fork() is copy-on-write, maybe the VM can fork() a process to perform the autosave. That might help avoid an obvious pause, however I have no clue how overall performance might be affected by the read-only-page-faults that copy the individual pages that the ongoing processes write to. cheers -ben > especially on a computer as slow as the Pi. I haven't used Squeak on a Pi, but on my MacBook, a save takes a few seconds, and I've got better things to do than stop working while the save takes place. And the save itself might leave the image in an unstable state. > > Sent from my iPhone > >> On May 22, 2016, at 01:40, Herbert K?nig wrote: >> >> Hi John, >> >> Guess it's a matter of time. Last time I looked we used punched cards, now we just close the lid of our laptop and expect it to do the right things. Give me one serious reason why yanking the power cord _should_ punish the user. >> >> That it still does is just another incovenience. It's sooo backwards. >> >> Cheers, >> >> Herbert. >> >> >> -------- Urspr?ngliche Nachricht -------- >> Von: John Pfersich >> Datum:22.05.2016 07:36 (GMT+01:00) >> An: The general-purpose Squeak developers list >> Betreff: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? >> >> >> >> >> Sent from my iPad >> > On May 21, 2016, at 22:07, David T. Lewis wrote: >> > >> >> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >> >> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. >> > >> > D'oh, now I get it. I was not thinking of the case of yanking the power cord. >> > I can well imagine that this might be a bit disruptive for normal process exit >> > cleanups that are supposed to ensure that fflushed buffers actually make it >> > to the disk-like media. >> > >> >> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. >> > >> > In a perfect world you do not need to flush a file when closing it, because >> > closing it implies a flush (e.g. fclose performs an fflush). That said, >> > yanking the power cord might introduce some imperfections. >> > >> > Dave >> > >> > >> And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. >> > From lewis at mail.msen.com Mon May 23 13:35:50 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 23 13:35:53 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: <20160523133550.GA56287@shell.msen.com> On Mon, May 23, 2016 at 08:06:21PM +0800, Ben Coman wrote: > On Mon, May 23, 2016 at 1:33 PM, John Pfersich wrote: > > On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $3 5 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The r est of the OS isn't as forgiving. > > > > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosa ves can be deadly to productivity, > > Since IIUC Linux's fork() is copy-on-write, maybe the VM can fork() a > process to perform the autosave. That might help avoid an obvious > pause, however I have no clue how overall performance might be > affected by the read-only-page-faults that copy the individual pages > that the ongoing processes write to. > > cheers -ben Do you mean like this? UnixProcess class>>saveImageInBackgroundNicely "Save image in a background OS process with lowered scheduling priority." "UnixProcess saveImageInBackgroundNicely" ^ self saveImageInBackground: self uniqueNameForSavedImage nice: true This has been available for over 10 years, but AFAIK nobody uses it. That leads me to suspect that aformentioned "deadly threat to productivity" may not really be as horrible as previously believed ;-) Dave From btc at openinworld.com Mon May 23 13:56:32 2016 From: btc at openinworld.com (Ben Coman) Date: Mon May 23 13:56:55 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <20160523133550.GA56287@shell.msen.com> References: <20160523133550.GA56287@shell.msen.com> Message-ID: On Mon, May 23, 2016 at 9:35 PM, David T. Lewis wrote: > On Mon, May 23, 2016 at 08:06:21PM +0800, Ben Coman wrote: >> On Mon, May 23, 2016 at 1:33 PM, John Pfersich wrote: >> > On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The > Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $3 > 5 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The r > est of the OS isn't as forgiving. >> > >> > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosa > ves can be deadly to productivity, >> >> Since IIUC Linux's fork() is copy-on-write, maybe the VM can fork() a >> process to perform the autosave. That might help avoid an obvious >> pause, however I have no clue how overall performance might be >> affected by the read-only-page-faults that copy the individual pages >> that the ongoing processes write to. >> >> cheers -ben > > > > Do you mean like this? > > UnixProcess class>>saveImageInBackgroundNicely > "Save image in a background OS process with lowered scheduling priority." > > "UnixProcess saveImageInBackgroundNicely" > > ^ self saveImageInBackground: self uniqueNameForSavedImage nice: true > > > This has been available for over 10 years, but AFAIK nobody uses it. That > leads me to suspect that aformentioned "deadly threat to productivity" > may not really be as horrible as previously believed ;-) > > Dave > > I didn't know of that. But that seems essentially what I meant. cheers -ben From bert at freudenbergs.de Mon May 23 16:02:18 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon May 23 16:02:24 2016 Subject: [squeak-dev] Saving a project's windows In-Reply-To: References: Message-ID: <757999C2-F19C-42FB-B884-B7A4D15115F8@freudenbergs.de> On 23.05.2016, at 03:20, Eliot Miranda wrote: > > Hi All, > > I'd love to be able to save just the windows form a project. Ideally I'd save also the changes from dirty packages, but that's basically all. I'm trying the PUBLISH items in the Project (preview) window, and it either tries to create a huge word segment (the first PUBLISH option) or tries to compute a relevant compactClassesArray (the second option), which should be empty and if I make it empty, it looks like the Vm locks up in computing the segment. I?d use the ?Save Project? menu item from the ?Projects? menu in the menu bar. (not sure where you see the ?publish? option) But I get a fatal error ... > Has anyone had any success saving projects with Spur? Has anyone by some miracle done just the saving of project windows? Any hints on avoiding the size explosion with the first PUBLISH option? The size shouldn?t explode: in an Etoys, image, when I save a project with just a system browser and a workspace, it?s coming out as 66 KB, which seems reasonable. In Trunk we have neglected project import/export for a long time. It shouldn?t be that hard to fix, but getting the details right is somewhat finicky. We might ask Ted for help, he?d be the one who could most easily fix it. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/b30a29e4/smime.bin From karlramberg at gmail.com Mon May 23 16:04:58 2016 From: karlramberg at gmail.com (karl ramberg) Date: Mon May 23 16:05:02 2016 Subject: [squeak-dev] Saving a project's windows In-Reply-To: <757999C2-F19C-42FB-B884-B7A4D15115F8@freudenbergs.de> References: <757999C2-F19C-42FB-B884-B7A4D15115F8@freudenbergs.de> Message-ID: Projects broke with Environments. It got a fix but I don't know how well it is working Karl On Mon, May 23, 2016 at 6:02 PM, Bert Freudenberg wrote: > On 23.05.2016, at 03:20, Eliot Miranda wrote: > > > > Hi All, > > > > I'd love to be able to save just the windows form a project. Ideally > I'd save also the changes from dirty packages, but that's basically all. > I'm trying the PUBLISH items in the Project (preview) window, and it either > tries to create a huge word segment (the first PUBLISH option) or tries to > compute a relevant compactClassesArray (the second option), which should be > empty and if I make it empty, it looks like the Vm locks up in computing > the segment. > > I?d use the ?Save Project? menu item from the ?Projects? menu in the menu > bar. (not sure where you see the ?publish? option) > > But I get a fatal error ... > > > Has anyone had any success saving projects with Spur? Has anyone by > some miracle done just the saving of project windows? Any hints on > avoiding the size explosion with the first PUBLISH option? > > > The size shouldn?t explode: in an Etoys, image, when I save a project with > just a system browser and a workspace, it?s coming out as 66 KB, which > seems reasonable. > > In Trunk we have neglected project import/export for a long time. It > shouldn?t be that hard to fix, but getting the details right is somewhat > finicky. > > We might ask Ted for help, he?d be the one who could most easily fix it. > > - Bert - > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/eb84c6d9/attachment.htm From asqueaker at gmail.com Mon May 23 16:07:53 2016 From: asqueaker at gmail.com (Chris Muller) Date: Mon May 23 16:08:35 2016 Subject: [squeak-dev] Saving a project's windows In-Reply-To: <154dd152f73.b16d74a471148.7354249081103953376@zoho.com> References: <154dd152f73.b16d74a471148.7354249081103953376@zoho.com> Message-ID: Hi Eliot, the Ma Serializer has been able to serialize Squeak projects since the 3.x days. Load the (head) version of "MaBase" from SqueakMap. Then: MaObjectSerializer new fileOut: yourProject toFileNamed: fileNameString in: someFileDirectory You can then file it in using: MaObjectSerializer fileIn: (someFileDirectory entryAt: fileNameString) If you look at MaObjectSerializer>>#setUpPreAndPostProcessing, you can see I have pre/post hooks for saving instances of Projects. I have not tested it in a while, but I know it DID work... HTH. On Mon, May 23, 2016 at 5:07 AM, gettimothy wrote: > I have been using Squeak since the 3.x days and have never successfully > saved a project. Back then a 'grid' would mask the World and then nothing > would happen for hours..... > > ---- On Sun, 22 May 2016 21:20:00 -0400 Eliot Miranda > wrote ---- > > Hi All, > > I'd love to be able to save just the windows form a project. Ideally I'd > save also the changes from dirty packages, but that's basically all. I'm > trying the PUBLISH items in the Project (preview) window, and it either > tries to create a huge word segment (the first PUBLISH option) or tries to > compute a relevant compactClassesArray (the second option), which should be > empty and if I make it empty, it looks like the Vm locks up in computing the > segment. Has anyone had any success saving projects with Spur? Has anyone > by some miracle done just the saving of project windows? Any hints on > avoiding the size explosion with the first PUBLISH option? > > _,,,^..^,,,_ > best, Eliot > > > > > > From karlramberg at gmail.com Mon May 23 16:11:22 2016 From: karlramberg at gmail.com (karl ramberg) Date: Mon May 23 16:11:27 2016 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.174.mcz In-Reply-To: <573b0ca4.8550370a.bf209.ffffd8feSMTPIN_ADDED_MISSING@mx.google.com> References: <573b0ca4.8550370a.bf209.ffffd8feSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Updating a image that was a few weeks behind broke because it loaded the sender of this message before this :-( Best, Karl On Tue, May 17, 2016 at 2:20 PM, wrote: > Marcel Taeumel uploaded a new version of MorphicExtras to project The > Trunk: > http://source.squeak.org/trunk/MorphicExtras-mt.174.mcz > > ==================== Summary ==================== > > Name: MorphicExtras-mt.174 > Author: mt > Time: 17 May 2016, 2:20:29.347089 pm > UUID: b22e6fc2-bfaf-de4f-930c-c192fc6dacd0 > Ancestors: MorphicExtras-mt.173 > > Add a simple check whether there are flaps visible in a world. > > =============== Diff against MorphicExtras-mt.173 =============== > > Item was added: > + ----- Method: Flaps class>>anyFlapsVisibleIn: (in category 'testing') > ----- > + anyFlapsVisibleIn: aWorld > + > + aWorld submorphsDo: [:m | > + (m isKindOf: FlapTab) ifTrue: [^ true]]. > + > + ^ false! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/b1133a2d/attachment.htm From karlramberg at gmail.com Mon May 23 16:32:28 2016 From: karlramberg at gmail.com (karl ramberg) Date: Mon May 23 16:32:31 2016 Subject: [squeak-dev] Problems updating, canvas being nil Message-ID: I was updating and had to change this method to use 'self assuredCanvas' because canvas instance variable was nil WorldState>>displayWorld: aWorld submorphs: submorphs "Update this world's display." | deferredUpdateMode handsToDraw allDamage handDamageRects worldDamageRects | submorphs do: [:m | m fullBounds]. "force re-layout if needed" self checkIfUpdateNeeded ifFalse: [^ self]. "display is already up-to-date" deferredUpdateMode := self doDeferredUpdatingFor: aWorld. deferredUpdateMode ifFalse: [self assuredCanvas]. worldDamageRects := self drawWorld: aWorld submorphs: submorphs invalidAreasOn: *self assuredCanvas*. "repair world's damage on canvas" "self handsDo:[:h| h noticeDamageRects: worldDamageRects]." handsToDraw := self selectHandsToDrawForDamage: worldDamageRects. handDamageRects := handsToDraw collect: [:h | h savePatchFrom: canvas]. allDamage := worldDamageRects, handDamageRects. handsToDraw reverseDo: [:h | canvas fullDrawMorph: h]. "draw hands onto world canvas" "*make this true to flash damaged areas for testing*" Preferences debugShowDamage ifTrue: [aWorld flashRects: allDamage color: Color black]. canvas finish: allDamage. "quickly copy altered rects of canvas to Display:" deferredUpdateMode ifTrue: [self forceDamageToScreen: allDamage] ifFalse: [canvas showAt: aWorld viewBox origin invalidRects: allDamage]. handsToDraw do: [:h | h restoreSavedPatchOn: canvas]. "restore world canvas under hands" Display deferUpdates: false; forceDisplayUpdate. Best, Karl -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/5e76ebfa/attachment.htm From tim at rowledge.org Mon May 23 16:55:58 2016 From: tim at rowledge.org (tim Rowledge) Date: Mon May 23 16:56:00 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: > On 22-05-2016, at 10:33 PM, John Pfersich wrote: > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosaves can be deadly to productivity, especially on a computer as slow as the Pi. I haven't used Squeak on a Pi, but on my MacBook, a save takes a few seconds, and I've got better things to do than stop working while the save takes place. And the save itself might leave the image in an unstable state. You seem to have missed the rather important point that the thing to save is not the entire image but the current Scratch script that the pupil is working on. And really, no sympathy at all for 6-10 year old children? Harsh, d00d, harsh. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Proof that evolution CAN go in reverse. From eliot.miranda at gmail.com Mon May 23 17:37:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon May 23 17:37:49 2016 Subject: [squeak-dev] microsecondClockValue Message-ID: Hi All, I see that access to the microsecond clock is called "microsecondClockValue". This name is wrong. It derives from millisecondClockValue which was indeed a value. The millisecond clock started from zero on every image startup and wrapped around every 45 days or so. The microsecond clock is quite different; it is an absolute clock whose zero is midnight on January 1st 1901, the start of the 20th century (damn those monks). So "Value" should be omitted from the selector. In Squeak we provide both Time utcMicrosecondClock and Time localMicrosecondClock which provide the number of microseconds since the start of 1/1/1901 in utc and local time zones respectively. It wraps round no sooner than 24/4/20168 (/not/ 2168). Time millisecondClockValue is provided for backward compatibility. _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/dc65adb2/attachment.htm From Das.Linux at gmx.de Mon May 23 18:58:52 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon May 23 18:59:08 2016 Subject: [squeak-dev] microsecondClockValue In-Reply-To: References: Message-ID: On 23.05.2016, at 19:37, Eliot Miranda wrote: > Hi All, > > I see that access to the microsecond clock is called "microsecondClockValue". This name is wrong. It derives from millisecondClockValue which was indeed a value. The millisecond clock started from zero on every image startup and wrapped around every 45 days or so. The microsecond clock is quite different; it is an absolute clock whose zero is midnight on January 1st 1901, the start of the 20th century (damn those monks). So "Value" should be omitted from the selector. Isn't it still a value? I frankly do not understand the distinction here.. Even more, "microsecondClock" doesn't hand me a "clock" object? :) Best regards -Tobias > In Squeak we provide both Time utcMicrosecondClock and Time localMicrosecondClock which provide the number of microseconds since the start of 1/1/1901 in utc and local time zones respectively. It wraps round no sooner than 24/4/20168 (/not/ 2168). Time millisecondClockValue is provided for backward compatibility. > > _,,,^..^,,,_ > best, Eliot From eliot.miranda at gmail.com Mon May 23 19:43:23 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon May 23 19:43:26 2016 Subject: [squeak-dev] microsecondClockValue In-Reply-To: References: Message-ID: Hi Tobias, On Mon, May 23, 2016 at 11:58 AM, Tobias Pape wrote: > > On 23.05.2016, at 19:37, Eliot Miranda wrote: > > > Hi All, > > > > I see that access to the microsecond clock is called > "microsecondClockValue". This name is wrong. It derives from > millisecondClockValue which was indeed a value. The millisecond clock > started from zero on every image startup and wrapped around every 45 days > or so. The microsecond clock is quite different; it is an absolute clock > whose zero is midnight on January 1st 1901, the start of the 20th century > (damn those monks). So "Value" should be omitted from the selector. > > Isn't it still a value? I frankly do not understand the distinction here.. > Even more, "microsecondClock" doesn't hand me a "clock" object? :) > The Smalltalk-80 code has always maintained the distinction: Time secondClock Time millisecondClockValue The former is a clock, measuring time from a fixed point in history. the latter is a counter starting from an arbitrary point. I find it a very useful distinction. Our current microsecond time is a clock, not a value. > Best regards > -Tobias > > > > In Squeak we provide both Time utcMicrosecondClock and Time > localMicrosecondClock which provide the number of microseconds since the > start of 1/1/1901 in utc and local time zones respectively. It wraps round > no sooner than 24/4/20168 (/not/ 2168). Time millisecondClockValue is > provided for backward compatibility. > > > > _,,,^..^,,,_ > > best, Eliot > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/26d9cf35/attachment.htm From Das.Linux at gmx.de Mon May 23 19:55:00 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon May 23 19:55:05 2016 Subject: [squeak-dev] microsecondClockValue In-Reply-To: References: Message-ID: <39E18233-D789-4486-A053-0BFE0F94A861@gmx.de> On 23.05.2016, at 21:43, Eliot Miranda wrote: > Hi Tobias, > > On Mon, May 23, 2016 at 11:58 AM, Tobias Pape wrote: > > On 23.05.2016, at 19:37, Eliot Miranda wrote: > > > Hi All, > > > > I see that access to the microsecond clock is called "microsecondClockValue". This name is wrong. It derives from millisecondClockValue which was indeed a value. The millisecond clock started from zero on every image startup and wrapped around every 45 days or so. The microsecond clock is quite different; it is an absolute clock whose zero is midnight on January 1st 1901, the start of the 20th century (damn those monks). So "Value" should be omitted from the selector. > > Isn't it still a value? I frankly do not understand the distinction here.. > Even more, "microsecondClock" doesn't hand me a "clock" object? :) > > The Smalltalk-80 code has always maintained the distinction: > > Time secondClock > Time millisecondClockValue > > The former is a clock, measuring time from a fixed point in history. the latter is a counter starting from an arbitrary point. I find it a very useful distinction. Our current microsecond time is a clock, not a value. > This may be due to English not being my native language, but "clock" for me has always the "feel" of a thing/device/object, not a number/value I could read off that thing. So asking for Time microsecondClock sounds to me like "give me that clock thing that counts in microseconds". I might ask that to halt, rewind, or tell me its value?. But if the value-able interpretation is more common than I had though, why not? :) Best regards -Tobias From Yoshiki.Ohshima at acm.org Mon May 23 21:28:09 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 23 21:28:13 2016 Subject: AW: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: And Scratch 2.0 on the web does do auto saving. Partly it may be because a session is typically on a faster computer but then I usually don't see any problem with auto saving there. So as long as it is asynchronous and happens during the block editing time, I don't think autosaving would degrade the productivity. On Sun, May 22, 2016 at 10:33 PM, John Pfersich wrote: > On a Raspberry Pi, which is what we're talking about, yanking the power unceremoniously crashes the system. The Pi doesn't even have a power switch. You can shut down the OS before you power it down, but we're talking about a $35 computer with virtually no bells and whistles. A kid that yanks the power cord deserves what he or she gets. The rest of the OS isn't as forgiving. > > I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosaves can be deadly to productivity, especially on a computer as slow as the Pi. I haven't used Squeak on a Pi, but on my MacBook, a save takes a few seconds, and I've got better things to do than stop working while the save takes place. And the save itself might leave the image in an unstable state. > > Sent from my iPhone > >> On May 22, 2016, at 01:40, Herbert K?nig wrote: >> >> Hi John, >> >> Guess it's a matter of time. Last time I looked we used punched cards, now we just close the lid of our laptop and expect it to do the right things. Give me one serious reason why yanking the power cord _should_ punish the user. >> >> That it still does is just another incovenience. It's sooo backwards. >> >> Cheers, >> >> Herbert. >> >> >> -------- Urspr?ngliche Nachricht -------- >> Von: John Pfersich >> Datum:22.05.2016 07:36 (GMT+01:00) >> An: The general-purpose Squeak developers list >> Betreff: Re: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? >> >> >> >> >> Sent from my iPad >> > On May 21, 2016, at 22:07, David T. Lewis wrote: >> > >> >> On Sat, May 21, 2016 at 10:49:24AM -0700, tim Rowledge wrote: >> >> The issue here is that the PI - especially when used in schools - is storing everything on a micro-SD card. Being surrounded by kids is a scary thing for a computer. They don???t necessarily bother to do a nice system shutdown or even exit Scratch before yanking the power. Teachers don???t necessarily know to tell them to; lots of people doing their best with insufficient knowledge. >> > >> > D'oh, now I get it. I was not thinking of the case of yanking the power cord. >> > I can well imagine that this might be a bit disruptive for normal process exit >> > cleanups that are supposed to ensure that fflushed buffers actually make it >> > to the disk-like media. >> > >> >> An interesting thing is that I ???remembered??? that we flush files when closing them but in fact we don???t. >> > >> > In a perfect world you do not need to flush a file when closing it, because >> > closing it implies a flush (e.g. fclose performs an fflush). That said, >> > yanking the power cord might introduce some imperfections. >> > >> > Dave >> > >> > >> And I don't think that people that yank the power cord should be catered to. If you do stupid things, you should pay the consequences. A computer isn't a toaster. And teachers should convey that to their students. >> > -- -- Yoshiki From Yoshiki.Ohshima at acm.org Mon May 23 22:29:53 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 23 22:29:57 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160523000344.GA88439@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> Message-ID: I'll try to do that. I haven't looked at the code but do you handle the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP) etc? On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: >> >> If I understand correctly, here is what we need to do: >> >> 1) Apply the changes of Mr Hachisuka to the VM. >> - The diff is in the earlier email from Yoshiki: >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html >> - Test updated VM to make sure the changes do not cause problems. Make sure >> it works without problems for Squeak trunk and for Scratch. >> - Apply the update in SVN for both oscog and trunk. I can help here. >> - Test the VM. Tim, I need help on this. I do not currently have a working >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> apply the patch from Yoshiki's email and see if your resulting Cog VM >> continues to work for you as expected on Pi with Scratch? >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> you please give his full name for the commit notice? I assume the patch >> is MIT licensed. >> > > Hi Yoshiki, > > I think that I now understand the VM changes for sqUnixX11.c, and I have applied > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter > VM. If these changes are correct, then I will also make a patch and commit them > to the oscog branch for Cog/Spur VMs. > > I arranged the code such that the multibyte recordPendingKeys() logic is used > if and only if the -compositioninput option is set on the command line or the > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that > this is the intended usage, but please let me know if I did not understand. > > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), > then please let me know if these changes work as you expect. If you cannot easily > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, > but I would prefer to test them first if possible. > > I also found that many of the module command line options are not being passed > correctly from the VM to the modules. The -compositionsinput option was one > of these, so I fixed it in this update (and I will check if for Cog/Spur when > we apply the patch there). But there are others that do not work, so if you > find other VM options for multilingual support that do not work as expected, > this may be the reason. > > Dave > > -- -- Yoshiki From lewis at mail.msen.com Mon May 23 23:09:51 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 23 23:09:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> Message-ID: <20160523230951.GA66400@shell.msen.com> On Mon, May 23, 2016 at 03:29:53PM -0700, Yoshiki Ohshima wrote: > I'll try to do that. I haven't looked at the code but do you handle > the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP) > etc? No, I made no changes to the logic except that it is conditional based on the value of the compositionInput variable. I do not know if this is the correct approach. I also found that the -compositioninput flag was not working (it is supposed to set the compositionInput variable), so I fixed that in sqUnixMain.c. I am attaching a copy of the updated function so you can see it more easily. Dave > > On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: > > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: > >> > >> If I understand correctly, here is what we need to do: > >> > >> 1) Apply the changes of Mr Hachisuka to the VM. > >> - The diff is in the earlier email from Yoshiki: > >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html > >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html > >> - Test updated VM to make sure the changes do not cause problems. Make sure > >> it works without problems for Squeak trunk and for Scratch. > >> - Apply the update in SVN for both oscog and trunk. I can help here. > >> - Test the VM. Tim, I need help on this. I do not currently have a working > >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you > >> apply the patch from Yoshiki's email and see if your resulting Cog VM > >> continues to work for you as expected on Pi with Scratch? > >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can > >> you please give his full name for the commit notice? I assume the patch > >> is MIT licensed. > >> > > > > Hi Yoshiki, > > > > I think that I now understand the VM changes for sqUnixX11.c, and I have applied > > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter > > VM. If these changes are correct, then I will also make a patch and commit them > > to the oscog branch for Cog/Spur VMs. > > > > I arranged the code such that the multibyte recordPendingKeys() logic is used > > if and only if the -compositioninput option is set on the command line or the > > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that > > this is the intended usage, but please let me know if I did not understand. > > > > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), > > then please let me know if these changes work as you expect. If you cannot easily > > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, > > but I would prefer to test them first if possible. > > > > I also found that many of the module command line options are not being passed > > correctly from the VM to the modules. The -compositionsinput option was one > > of these, so I fixed it in this update (and I will check if for Cog/Spur when > > we apply the patch there). But there are others that do not work, so if you > > find other VM options for multilingual support that do not work as expected, > > this may be the reason. > > > > Dave > > > > > > > > -- > -- Yoshiki -------------- next part -------------- A non-text attachment was scrubbed... Name: recordPendingKeys.c Type: text/x-csrc Size: 2909 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/904acbb3/recordPendingKeys-0001.c From Yoshiki.Ohshima at acm.org Mon May 23 23:47:03 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Mon May 23 23:47:07 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160523230951.GA66400@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160523230951.GA66400@shell.msen.com> Message-ID: Ok. (Still have not looked into it yet) but in regards to handling different encodings, I think handling UTF-8 is at least an improvement over the current status so that is fine. The compositioninput was an option to the vm module but if the main module handles that, that is fine, too. On Mon, May 23, 2016 at 4:09 PM, David T. Lewis wrote: > On Mon, May 23, 2016 at 03:29:53PM -0700, Yoshiki Ohshima wrote: >> I'll try to do that. I haven't looked at the code but do you handle >> the case where the locale encoding is not UTF8 (e.g., ja_JP.EUC-JP) >> etc? > > No, I made no changes to the logic except that it is conditional based > on the value of the compositionInput variable. I do not know if this is > the correct approach. I also found that the -compositioninput flag was > not working (it is supposed to set the compositionInput variable), so > I fixed that in sqUnixMain.c. > > I am attaching a copy of the updated function so you can see it more > easily. > > Dave > > >> >> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: >> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: >> >> >> >> If I understand correctly, here is what we need to do: >> >> >> >> 1) Apply the changes of Mr Hachisuka to the VM. >> >> - The diff is in the earlier email from Yoshiki: >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html >> >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html >> >> - Test updated VM to make sure the changes do not cause problems. Make sure >> >> it works without problems for Squeak trunk and for Scratch. >> >> - Apply the update in SVN for both oscog and trunk. I can help here. >> >> - Test the VM. Tim, I need help on this. I do not currently have a working >> >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> >> apply the patch from Yoshiki's email and see if your resulting Cog VM >> >> continues to work for you as expected on Pi with Scratch? >> >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> >> you please give his full name for the commit notice? I assume the patch >> >> is MIT licensed. >> >> >> > >> > Hi Yoshiki, >> > >> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied >> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter >> > VM. If these changes are correct, then I will also make a patch and commit them >> > to the oscog branch for Cog/Spur VMs. >> > >> > I arranged the code such that the multibyte recordPendingKeys() logic is used >> > if and only if the -compositioninput option is set on the command line or the >> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that >> > this is the intended usage, but please let me know if I did not understand. >> > >> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), >> > then please let me know if these changes work as you expect. If you cannot easily >> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, >> > but I would prefer to test them first if possible. >> > >> > I also found that many of the module command line options are not being passed >> > correctly from the VM to the modules. The -compositionsinput option was one >> > of these, so I fixed it in this update (and I will check if for Cog/Spur when >> > we apply the patch there). But there are others that do not work, so if you >> > find other VM options for multilingual support that do not work as expected, >> > this may be the reason. >> > >> > Dave >> > >> > >> >> >> >> -- >> -- Yoshiki > > > -- -- Yoshiki From eliot.miranda at gmail.com Mon May 23 23:55:22 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon May 23 23:55:26 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: <96FFF594-235E-43E1-B900-229E9B12492B@rowledge.org> References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <96FFF594-235E-43E1-B900-229E9B12492B@rowledge.org> Message-ID: Hi Tim, Hi Tim, TIM R, I finally looked at the plugin code and the primitive has been there since it was contributed by "monty" in September of 2015. It's called primitiveFileSync; use as you would for primitiveFileFlush. So no need to change the VM, but it would be easy to implement such that a command line argument made sqFileFlush call swFileSync. Tim F, I note that in platforms/win32/plugins/FilePlugin/sqWin32FilePrims.c sqFileFlush is already implemented as sqFileSync. Isn't this an error? Shouldn't we remove the call and simply make sqFileFlush empty on win32? On Sat, May 21, 2016 at 11:44 AM, tim Rowledge wrote: > > > On 21-05-2016, at 11:02 AM, Eliot Miranda > wrote: > > Well, the case is that it /is/ a performance issue. Writing to disc is > way more expensive than flushing to kernel buffers. How about saying what > you think about my c) and d) options? That's a way of avoiding the > performance issue and solving the kids-are-humans issue. > > Either would be just fine by me, no problem. Adding a new prim might be > even better since it would defer control up to the image, which always > seems the best option to me. However, opening the can of rancid worms that > is the file system interface doesn?t appeal too much right now. I think for > simplicity and testing I?ll stick with a #define and we can revisit it > later if it seems to solve any realworld problems. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Got into the gene pool while the lifeguard wasn't > watching. > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160523/3e0b00b0/attachment.htm From tim at rowledge.org Tue May 24 00:01:03 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue May 24 00:01:05 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: <20F56304-A38A-476A-994F-581711273E51@rowledge.org> <20160521171524.GA35694@shell.msen.com> <485B3581-AA06-4CDF-B480-849D64BA4D9A@rowledge.org> <96FFF594-235E-43E1-B900-229E9B12492B@rowledge.org> Message-ID: <8EBD3B5A-CC93-4DB9-8A4C-1B9C8E23977A@rowledge.org> > On 23-05-2016, at 4:55 PM, Eliot Miranda wrote: > > Hi Tim, Hi Tim, > > TIM R, I finally looked at the plugin code and the primitive has been there since it was contributed by "monty" in September of 2015. Well blow me. So it is. That whole "wood for the trees" thing really does mess us up, right? I had the file open right in front of me as I looked at the flush prim to see if it did a sync etc and simply didn?t see an actual sync prim. That makes life simpler for me :-) tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Performance is easier to add than clarity. From Marcel.Taeumel at hpi.de Tue May 24 11:41:17 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 24 12:18:05 2016 Subject: [squeak-dev] Re: The Trunk: MorphicExtras-mt.174.mcz In-Reply-To: References: Message-ID: <1464090077048-4897032.post@n4.nabble.com> Hi Karl, which package was it? It's difficult to find the correct load order in an update map. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-MorphicExtras-mt-174-mcz-tp4895366p4897032.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 24 11:43:45 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 24 12:20:34 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: Message-ID: <1464090225698-4897033.post@n4.nabble.com> Hi Karl, the full call stack would be more helpful. :-) Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897033.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Tue May 24 11:45:27 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 24 12:22:15 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: Message-ID: <1464090327158-4897035.post@n4.nabble.com> Hi Karl, can you share the problematic image? Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Tue May 24 12:31:42 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 12:31:46 2016 Subject: [squeak-dev] Re: The Trunk: MorphicExtras-mt.174.mcz In-Reply-To: <1464090077048-4897032.post@n4.nabble.com> References: <1464090077048-4897032.post@n4.nabble.com> Message-ID: System-mt.830 loaded before MorphicExtras-mt.174.mcz That was a call from RealEstateAgent class>>maximumUsableAreaInWorld: (in category 'accessing') ----- maximumUsableAreaInWorld: aWorldOrNil Best, Karl On Tue, May 24, 2016 at 1:41 PM, marcel.taeumel wrote: > Hi Karl, > > which package was it? It's difficult to find the correct load order in an > update map. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-MorphicExtras-mt-174-mcz-tp4895366p4897032.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/c4e15449/attachment.htm From karlramberg at gmail.com Tue May 24 12:36:01 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 12:36:05 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: <1464090327158-4897035.post@n4.nabble.com> References: <1464090327158-4897035.post@n4.nabble.com> Message-ID: I changed the method as described and updated the image... No saved copy or call stack saved Best, Karl On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel wrote: > Hi Karl, > > can you share the problematic image? > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/d7f94822/attachment.htm From karlramberg at gmail.com Tue May 24 15:17:25 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 15:17:28 2016 Subject: [squeak-dev] Fix for MergeBrowser Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: MCMethodDefinition.kfr.1.cs Type: application/octet-stream Size: 201 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/80e23375/MCMethodDefinition.kfr.1.obj From bert at freudenbergs.de Tue May 24 15:56:06 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 24 15:56:11 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: Message-ID: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> On 24.05.2016, at 17:17, karl ramberg wrote: > > I'm pretty sure this is a proper fix so the MCMergeBrowser can open a browser from the context menu: This appears to work fine for me even without that change. > MCMethodDefinition>>packageInfo > > ^ self workingCopy! ! ? and a WorkingCopy most definitely is not the same as a PackageInfo ;) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/85fcb2a2/smime.bin From karlramberg at gmail.com Tue May 24 16:27:11 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 16:27:14 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: I know packageInfo is not the same as workingCopy but I'm not sure how to reference it from the merge browser. How can this be working in your image ? packageInfo is not implemented for MCMethodDefinition... It's called from MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference ^ aClassOrMethodReference mcModel ifNil: [ | pkgName rep | (UIManager confirm: 'Okay to add historical repository ' , (rep := MCHttpRepository trunkBackup) description , ' to ' , (pkgName := aClassOrMethodReference packageInfo packageName) , '?') ifTrue: [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup addRepository: rep. aClassOrMethodReference mcModel ] ] Best, Karl On Tue, May 24, 2016 at 5:56 PM, Bert Freudenberg wrote: > On 24.05.2016, at 17:17, karl ramberg wrote: > > > > I'm pretty sure this is a proper fix so the MCMergeBrowser can open a > browser from the context menu: > > This appears to work fine for me even without that change. > > > MCMethodDefinition>>packageInfo > > > > ^ self workingCopy! ! > > ? and a WorkingCopy most definitely is not the same as a PackageInfo ;) > > - Bert - > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/8c526354/attachment.htm From bert at freudenbergs.de Tue May 24 16:33:48 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 24 16:33:52 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/49c389de/smime.bin From karlramberg at gmail.com Tue May 24 16:41:46 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 16:41:49 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Hm, weird. I removed the fix I did and now it works... Not sure what was going on Best, Karl On Tue, May 24, 2016 at 6:33 PM, Bert Freudenberg wrote: > Which menu item are you trying? You wrote ?can open a browser from the > context menu? and for me both cmd-b and the context menu work for opening a > System Browser. > > - Bert - > > > On 24.05.2016, at 18:27, karl ramberg wrote: > > > I know packageInfo is not the same as workingCopy but I'm not sure how to > reference it from the merge browser. > > How can this be working in your image ? packageInfo is not implemented for > MCMethodDefinition... > > > It's called from > MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference > ^ aClassOrMethodReference mcModel ifNil: > [ | pkgName rep | (UIManager confirm: 'Okay to add historical repository ' > , (rep := MCHttpRepository trunkBackup) description , ' to ' , (pkgName := > aClassOrMethodReference packageInfo packageName) , '?') ifTrue: > [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup addRepository: > rep. > aClassOrMethodReference mcModel ] ] > > Best, > Karl > > On Tue, May 24, 2016 at 5:56 PM, Bert Freudenberg > wrote: > >> On 24.05.2016, at 17:17, karl ramberg wrote: >> > >> > I'm pretty sure this is a proper fix so the MCMergeBrowser can open a >> browser from the context menu: >> >> This appears to work fine for me even without that change. >> >> > MCMethodDefinition>>packageInfo >> > >> > ^ self workingCopy! ! >> >> ? and a WorkingCopy most definitely is not the same as a PackageInfo ;) >> >> - Bert - >> >> >> >> >> >> >> > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/6adee43c/attachment.htm From Yoshiki.Ohshima at acm.org Tue May 24 16:50:45 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 24 16:50:49 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160523000344.GA88439@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> Message-ID: It On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: >> >> If I understand correctly, here is what we need to do: >> >> 1) Apply the changes of Mr Hachisuka to the VM. >> - The diff is in the earlier email from Yoshiki: >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html >> - Test updated VM to make sure the changes do not cause problems. Make sure >> it works without problems for Squeak trunk and for Scratch. >> - Apply the update in SVN for both oscog and trunk. I can help here. >> - Test the VM. Tim, I need help on this. I do not currently have a working >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> apply the patch from Yoshiki's email and see if your resulting Cog VM >> continues to work for you as expected on Pi with Scratch? >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> you please give his full name for the commit notice? I assume the patch >> is MIT licensed. >> > > Hi Yoshiki, > > I think that I now understand the VM changes for sqUnixX11.c, and I have applied > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter > VM. If these changes are correct, then I will also make a patch and commit them > to the oscog branch for Cog/Spur VMs. > > I arranged the code such that the multibyte recordPendingKeys() logic is used > if and only if the -compositioninput option is set on the command line or the > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that > this is the intended usage, but please let me know if I did not understand. > > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), > then please let me know if these changes work as you expect. If you cannot easily > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, > but I would prefer to test them first if possible. It does buiid. Yay. The build directory structure seems to be different from Cog, though. How do I test a VM that is just generated? Do people set different install directory someways? -- -- Yoshiki From commits at source.squeak.org Tue May 24 17:02:41 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 24 17:03:23 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz Message-ID: tim Rowledge uploaded a new version of Files to project The Trunk: http://source.squeak.org/trunk/Files-tpr.156.mcz ==================== Summary ==================== Name: Files-tpr.156 Author: tpr Time: 24 May 2016, 10:00:21.788027 am UUID: a9fad8c9-8c36-480a-8c66-1521c4e1bf16 Ancestors: Files-cmm.155 Add call to the fsync file flushing/synchronising primitive, plus a #sync method to use it. =============== Diff against Files-cmm.155 =============== Item was added: + ----- Method: FileStream>>sync (in category 'file open/close') ----- + sync + "sync the current buffer out to disk." + + self subclassResponsibility + ! Item was added: + ----- Method: StandardFileStream>>primSync: (in category 'primitives') ----- + primSync: id + "Call fsync to really, really, flush pending changes to the disk" + | p | + + "In some OS's seeking to 0 and back will do a flush. Maybe that will help if we dont have the primitives" + p := self position. + self position: 0; position: p! Item was added: + ----- Method: StandardFileStream>>sync (in category 'read, write, position') ----- + sync + "Really, really, flush pending changes" + ^self primSync: fileID! From karlramberg at gmail.com Tue May 24 17:31:49 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 24 17:31:52 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Ok, it only fails if MCMethodDefinition>>mcModel is nil in MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference Once you have the MCMethodDefinition>>mcModel installed it will work the next time, so my fix is still necessary Best, Karl On Tue, May 24, 2016 at 6:41 PM, karl ramberg wrote: > Hm, weird. > I removed the fix I did and now it works... > > Not sure what was going on > > Best, > Karl > > On Tue, May 24, 2016 at 6:33 PM, Bert Freudenberg > wrote: > >> Which menu item are you trying? You wrote ?can open a browser from the >> context menu? and for me both cmd-b and the context menu work for opening a >> System Browser. >> >> - Bert - >> >> >> On 24.05.2016, at 18:27, karl ramberg wrote: >> >> >> I know packageInfo is not the same as workingCopy but I'm not sure how to >> reference it from the merge browser. >> >> How can this be working in your image ? packageInfo is not implemented >> for MCMethodDefinition... >> >> >> It's called from >> MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference >> ^ aClassOrMethodReference mcModel ifNil: >> [ | pkgName rep | (UIManager confirm: 'Okay to add historical repository >> ' , (rep := MCHttpRepository trunkBackup) description , ' to ' , (pkgName >> := aClassOrMethodReference packageInfo packageName) , '?') ifTrue: >> [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup addRepository: >> rep. >> aClassOrMethodReference mcModel ] ] >> >> Best, >> Karl >> >> On Tue, May 24, 2016 at 5:56 PM, Bert Freudenberg >> wrote: >> >>> On 24.05.2016, at 17:17, karl ramberg wrote: >>> > >>> > I'm pretty sure this is a proper fix so the MCMergeBrowser can open a >>> browser from the context menu: >>> >>> This appears to work fine for me even without that change. >>> >>> > MCMethodDefinition>>packageInfo >>> > >>> > ^ self workingCopy! ! >>> >>> ? and a WorkingCopy most definitely is not the same as a PackageInfo ;) >>> >>> - Bert - >>> >>> >>> >>> >>> >>> >>> >> >> >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/6d8f80f2/attachment.htm From bert at freudenbergs.de Tue May 24 19:05:58 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue May 24 19:06:02 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160524/61e30b47/smime-0001.bin From asqueaker at gmail.com Tue May 24 19:27:31 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 24 19:28:13 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Hi Karl, mcModel is for the history function, the code shouldn't be getting there for a regular browse class. Are you sure you didn't select "browse mc history" or "browse mc origin"? PS -- I still plan to try to fix the mc history function again.. On Tue, May 24, 2016 at 12:31 PM, karl ramberg wrote: > Ok, it only fails if MCMethodDefinition>>mcModel is nil in > MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference > > Once you have the MCMethodDefinition>>mcModel installed it will work the > next time, so my fix is still necessary > > > > Best, > Karl > > On Tue, May 24, 2016 at 6:41 PM, karl ramberg wrote: >> >> Hm, weird. >> I removed the fix I did and now it works... >> >> Not sure what was going on >> >> Best, >> Karl >> >> On Tue, May 24, 2016 at 6:33 PM, Bert Freudenberg >> wrote: >>> >>> Which menu item are you trying? You wrote ?can open a browser from the >>> context menu? and for me both cmd-b and the context menu work for opening a >>> System Browser. >>> >>> - Bert - >>> >>> >>> On 24.05.2016, at 18:27, karl ramberg wrote: >>> >>> >>> I know packageInfo is not the same as workingCopy but I'm not sure how to >>> reference it from the merge browser. >>> >>> How can this be working in your image ? packageInfo is not implemented >>> for MCMethodDefinition... >>> >>> >>> It's called from >>> MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference >>> ^ aClassOrMethodReference mcModel ifNil: >>> [ | pkgName rep | (UIManager confirm: 'Okay to add historical repository >>> ' , (rep := MCHttpRepository trunkBackup) description , ' to ' , (pkgName := >>> aClassOrMethodReference packageInfo packageName) , '?') ifTrue: >>> [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup addRepository: >>> rep. >>> aClassOrMethodReference mcModel ] ] >>> >>> Best, >>> Karl >>> >>> On Tue, May 24, 2016 at 5:56 PM, Bert Freudenberg >>> wrote: >>>> >>>> On 24.05.2016, at 17:17, karl ramberg wrote: >>>> > >>>> > I'm pretty sure this is a proper fix so the MCMergeBrowser can open a >>>> > browser from the context menu: >>>> >>>> This appears to work fine for me even without that change. >>>> >>>> > MCMethodDefinition>>packageInfo >>>> > >>>> > ^ self workingCopy! ! >>>> >>>> ? and a WorkingCopy most definitely is not the same as a PackageInfo ;) >>>> >>>> - Bert - >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >>> >>> >>> >>> >> > > > > From leves at caesar.elte.hu Tue May 24 19:32:47 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue May 24 19:32:52 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz In-Reply-To: References: Message-ID: I suppose #sync should do nothing when the FileStream is not writable. Levente On Tue, 24 May 2016, commits@source.squeak.org wrote: > tim Rowledge uploaded a new version of Files to project The Trunk: > http://source.squeak.org/trunk/Files-tpr.156.mcz > > ==================== Summary ==================== > > Name: Files-tpr.156 > Author: tpr > Time: 24 May 2016, 10:00:21.788027 am > UUID: a9fad8c9-8c36-480a-8c66-1521c4e1bf16 > Ancestors: Files-cmm.155 > > Add call to the fsync file flushing/synchronising primitive, plus a #sync method to use it. > > =============== Diff against Files-cmm.155 =============== > > Item was added: > + ----- Method: FileStream>>sync (in category 'file open/close') ----- > + sync > + "sync the current buffer out to disk." > + > + self subclassResponsibility > + ! > > Item was added: > + ----- Method: StandardFileStream>>primSync: (in category 'primitives') ----- > + primSync: id > + "Call fsync to really, really, flush pending changes to the disk" > + | p | > + > + "In some OS's seeking to 0 and back will do a flush. Maybe that will help if we dont have the primitives" > + p := self position. > + self position: 0; position: p! > > Item was added: > + ----- Method: StandardFileStream>>sync (in category 'read, write, position') ----- > + sync > + "Really, really, flush pending changes" > + ^self primSync: fileID! > > > From asqueaker at gmail.com Tue May 24 19:32:55 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 24 19:33:38 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz In-Reply-To: <57448936.775b8c0a.165ef.ffffb84dSMTPIN_ADDED_MISSING@mx.google.com> References: <57448936.775b8c0a.165ef.ffffb84dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Since I'm not a systems programmer, I wasn't really following the other discussion. But this does interest me since Magma employs a complex logging / playback mechanism which does depend on the idea that returning from #flush assures all my puts on that Filestreams are truly written to the disk. Should I be using #sync, instead of #flush? Could you succinctly summarize the difference between the two for a lay-person like myself? On Tue, May 24, 2016 at 12:02 PM, wrote: > tim Rowledge uploaded a new version of Files to project The Trunk: > http://source.squeak.org/trunk/Files-tpr.156.mcz > > ==================== Summary ==================== > > Name: Files-tpr.156 > Author: tpr > Time: 24 May 2016, 10:00:21.788027 am > UUID: a9fad8c9-8c36-480a-8c66-1521c4e1bf16 > Ancestors: Files-cmm.155 > > Add call to the fsync file flushing/synchronising primitive, plus a #sync method to use it. > > =============== Diff against Files-cmm.155 =============== > > Item was added: > + ----- Method: FileStream>>sync (in category 'file open/close') ----- > + sync > + "sync the current buffer out to disk." > + > + self subclassResponsibility > + ! > > Item was added: > + ----- Method: StandardFileStream>>primSync: (in category 'primitives') ----- > + primSync: id > + "Call fsync to really, really, flush pending changes to the disk" > + | p | > + > + "In some OS's seeking to 0 and back will do a flush. Maybe that will help if we dont have the primitives" > + p := self position. > + self position: 0; position: p! > > Item was added: > + ----- Method: StandardFileStream>>sync (in category 'read, write, position') ----- > + sync > + "Really, really, flush pending changes" > + ^self primSync: fileID! > > From tim at rowledge.org Tue May 24 19:45:19 2016 From: tim at rowledge.org (tim Rowledge) Date: Tue May 24 19:45:21 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz In-Reply-To: References: <57448936.775b8c0a.165ef.ffffb84dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > On 24-05-2016, at 12:32 PM, Chris Muller wrote: > > Since I'm not a systems programmer, I wasn't really following the > other discussion. But this does interest me since Magma employs a > complex logging / playback mechanism which does depend on the idea > that returning from #flush assures all my puts on that Filestreams are > truly written to the disk. > > Should I be using #sync, instead of #flush? Could you succinctly > summarize the difference between the two for a lay-person like myself? My level of understanding of this is roughly that flush is spelt f-l-u-s-h and sync is spelt s-y-n-c. I don?t understand why a system would ever let things get so out of sync that you would ever need to think of it. When you close a file it seems to me that everything should be cleaned up. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Hypnotized as a child and couldn't be woken. From asqueaker at gmail.com Tue May 24 20:49:29 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 24 20:50:11 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz In-Reply-To: References: <57448936.775b8c0a.165ef.ffffb84dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: A little research suggests #sync is a blocking operation, whereas #flush is non-blocking. So I should probably change Magma's atomic-writing to use #sync.. On Tue, May 24, 2016 at 2:45 PM, tim Rowledge wrote: > >> On 24-05-2016, at 12:32 PM, Chris Muller wrote: >> >> Since I'm not a systems programmer, I wasn't really following the >> other discussion. But this does interest me since Magma employs a >> complex logging / playback mechanism which does depend on the idea >> that returning from #flush assures all my puts on that Filestreams are >> truly written to the disk. >> >> Should I be using #sync, instead of #flush? Could you succinctly >> summarize the difference between the two for a lay-person like myself? > > My level of understanding of this is roughly that flush is spelt f-l-u-s-h and sync is spelt s-y-n-c. I don?t understand why a system would ever let things get so out of sync that you would ever need to think of it. When you close a file it seems to me that everything should be cleaned up. > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Hypnotized as a child and couldn't be woken. > > > From commits at source.squeak.org Tue May 24 21:58:09 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 24 21:58:11 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160524215809.21463.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068148.html Name: Files-tpr.156 Ancestors: Files-cmm.155 Add call to the fsync file flushing/synchronising primitive, plus a #sync method to use it. ============================================= From lewis at mail.msen.com Wed May 25 03:20:34 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Wed May 25 03:20:36 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> Message-ID: <20160525032034.GB84033@shell.msen.com> On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote: > > On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: > > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: > >> > >> If I understand correctly, here is what we need to do: > >> > >> 1) Apply the changes of Mr Hachisuka to the VM. > >> - The diff is in the earlier email from Yoshiki: > >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html > >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html > >> - Test updated VM to make sure the changes do not cause problems. Make sure > >> it works without problems for Squeak trunk and for Scratch. > >> - Apply the update in SVN for both oscog and trunk. I can help here. > >> - Test the VM. Tim, I need help on this. I do not currently have a working > >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you > >> apply the patch from Yoshiki's email and see if your resulting Cog VM > >> continues to work for you as expected on Pi with Scratch? > >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can > >> you please give his full name for the commit notice? I assume the patch > >> is MIT licensed. > >> > > > > Hi Yoshiki, > > > > I think that I now understand the VM changes for sqUnixX11.c, and I have applied > > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter > > VM. If these changes are correct, then I will also make a patch and commit them > > to the oscog branch for Cog/Spur VMs. > > > > I arranged the code such that the multibyte recordPendingKeys() logic is used > > if and only if the -compositioninput option is set on the command line or the > > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that > > this is the intended usage, but please let me know if I did not understand. > > > > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), > > then please let me know if these changes work as you expect. If you cannot easily > > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, > > but I would prefer to test them first if possible. > > It does buiid. Yay. The build directory structure seems to be > different from Cog, though. How do I test a VM that is just > generated? Do people set different install directory someways? > I do not think that there is any standard approach for this, but here is what I do for my own use: - Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog. This is the 32-bit JIT VM for Squeak V3 images. - Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur. This is the 32-bit JIT Spur VM for Spur images. - Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64. This is the 64-bit JIT Spur VM for 64 bit Spur images. - Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image. With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For either 32-bit or 64-bit V3 images, I type "squeak". I also have a script of my own making installed as /usr/local/bin/vmrun that selects an appropriate VM based on the image format, but I no longer use it because I usually know which VM I want anyway, so it is better for me to just use "cog", "spur", "spur64", or "squeak" directly. Yoshiki, I should mention that since my last email, I have also updated the SVN oscog branch so that the -compositionInput option will work on Cog and Spur. This means that we can apply the sqUnixX11.c patch for Cog and Spur also, and it should now work the same as for the interpreter VM. But I appreciate very much if you can first confirm that the patch works as you expect on interpreter VM. Then we can apply the update for Cog/Spur so that it can be used for Scratch on Raspberry Pi. I am sorry if I am moving too slowly here, but I do not understand how multibyte character composition should work, so I am trying to be careful with the changes. Dave From smalltalker2 at mac.com Wed May 25 07:22:46 2016 From: smalltalker2 at mac.com (John Pfersich) Date: Wed May 25 07:22:50 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: > On May 23, 2016, at 09:55, tim Rowledge wrote: > > >> On 22-05-2016, at 10:33 PM, John Pfersich wrote: >> I hope that this saving the user from himself doesn't degrade to auto saving because the pauses caused by autosaves can be deadly to productivity, especially on a computer as slow as the Pi. I haven't used Squeak on a Pi, but on my MacBook, a save takes a few seconds, and I've got better things to do than stop working while the save takes place. And the save itself might leave the image in an unstable state. > > You seem to have missed the rather important point that the thing to save is not the entire image but the current Scratch script that the pupil is working on. And really, no sympathy at all for 6-10 year old children? Harsh, d00d, harsh. Well, computers are pretty harsh machines, they only do what you tell them to do, at for the past 44 years I've been using them. And they don't cater to people without a lot of patience. I've never seen a computer that takes into account people with ADHD, even mild cases. > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Proof that evolution CAN go in reverse. > > > From karlramberg at gmail.com Wed May 25 07:54:05 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed May 25 07:54:08 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: <1464090327158-4897035.post@n4.nabble.com> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: SqueakDebug.log Type: application/octet-stream Size: 12347 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160525/986b6c47/SqueakDebug.obj From commits at source.squeak.org Wed May 25 08:26:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 25 08:26:05 2016 Subject: [squeak-dev] The Trunk: Kernel-pre.1026.mcz Message-ID: Patrick Rein uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-pre.1026.mcz ==================== Summary ==================== Name: Kernel-pre.1026 Author: pre Time: 25 May 2016, 10:25:41.183733 am UUID: 389c2806-d933-41e0-9dd0-4f4035f3455c Ancestors: Kernel-mt.1025 Improves argument naming in exception handling methods to make discovery of ExceptionSet easier. =============== Diff against Kernel-mt.1025 =============== Item was changed: ----- Method: BlockClosure>>on:do: (in category 'exceptions') ----- + on: exceptionOrExceptionSet do: handlerAction - on: exception do: handlerAction "Evaluate the receiver in the scope of an exception handler." | handlerActive | "just a marker, fail and execute the following" handlerActive := true. ^ self value! Item was changed: ----- Method: BlockClosure>>on:do:on:do: (in category 'exceptions') ----- + on: exception1 do: block1 on: exception2 do: block2 - on: exc1 do: block1 on: exc2 do: block2 ^[ self + on: exception1 - on: exc1 do: block1 ] + on: exception2 - on: exc2 do: block2! Item was changed: ----- Method: BlockClosure>>on:do:on:do:on:do: (in category 'exceptions') ----- + on: exception1 do: block1 on: exception2 do: block2 on: exception3 do: block3 - on: exc1 do: block1 on: exc2 do: block2 on: exc3 do: block3 ^[ self + on: exception1 - on: exc1 do: block1 ] + on: exception2 - on: exc2 do: block2 + on: exception3 - on: exc3 do: block3! Item was changed: ----- Method: BlockContext>>on:do: (in category 'exceptions') ----- + on: exceptionOrExceptionSet do: handlerAction - on: exception do: handlerAction "Evaluate the receiver in the scope of an exception handler." | handlerActive | handlerActive := true. ^self value! Item was changed: ----- Method: BlockContext>>on:do:on:do: (in category 'exceptions') ----- + on: exception1 do: block1 on: exception2 do: block2 - on: exc1 do: block1 on: exc2 do: block2 ^[ self + on: exception1 - on: exc1 do: block1 ] + on: exception2 - on: exc2 do: block2! Item was changed: ----- Method: BlockContext>>on:do:on:do:on:do: (in category 'exceptions') ----- + on: exception1 do: block1 on: exception2 do: block2 on: exception3 do: block3 - on: exc1 do: block1 on: exc2 do: block2 on: exc3 do: block3 ^[ self + on: exception1 - on: exc1 do: block1 ] + on: exception2 - on: exc2 do: block2 + on: exception3 - on: exc3 do: block3! From commits at source.squeak.org Wed May 25 08:31:52 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 25 08:32:39 2016 Subject: [squeak-dev] The Trunk: Help-Squeak-TerseGuide-pre.6.mcz Message-ID: Patrick Rein uploaded a new version of Help-Squeak-TerseGuide to project The Trunk: http://source.squeak.org/trunk/Help-Squeak-TerseGuide-pre.6.mcz ==================== Summary ==================== Name: Help-Squeak-TerseGuide-pre.6 Author: pre Time: 25 May 2016, 10:31:44.454733 am UUID: d0c651c0-c1cb-46c8-982a-ea2ec9f08c60 Ancestors: Help-Squeak-TerseGuide-kfr.5 Added a section on exception handling =============== Diff against Help-Squeak-TerseGuide-kfr.5 =============== Item was added: + ----- Method: TerseGuideHelp class>>exceptionHandling (in category 'pages') ----- + exceptionHandling + + ^HelpTopic + title: 'Exception Handling' + contents: + + '"************************************************************************ + * Exceptions: * + ************************************************************************" + | x | + x := Object new. + x error: ''Throwing an error''. + + NotFound signal. "simply throwing a specific exception" + NotFound signal: ''Throwing with a message''. "throwing an exception with a custom text" + + x := [ 5 / 0 ] "simple exception handler" + on: ZeroDivide do: [ 10 ]. + x := [ 5 / 0 ] "processing the exception in an exception handler" + on: Error do: [:e | Transcript showln: e printString ]. + x := [ 5 / 0 ] "different exception handlers for the same block" + on: ZeroDivide do: [ 10 ] + on: MessageNotUnderstood do: [ 20 ]. + x := [ 5 / 0 ] "one exception handler for two different exceptions" + on: ZeroDivide , ArithmeticError do: [ 10 ]. + + + '! Item was changed: ----- Method: TerseGuideHelp class>>pages (in category 'accessing') ----- pages ^ #( introduction transcript assignment constants boolean arithmetic + bitwise conversion block exceptionHandling methodCall conditionalStatement - bitwise conversion block methodCall conditionalStatement iterationStatement character symbol string array orderedCollection sortedCollection bag set interval association dictionary internalStream fileStream date time point rectangle pen dynamic metaclass debugging misc )! From karlramberg at gmail.com Wed May 25 08:55:24 2016 From: karlramberg at gmail.com (karl ramberg) Date: Wed May 25 08:55:27 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Thanks, Chris and Bert. I think I found the reason I had problems. If you change instance variables but not any methods you get the methodListMenu: from MCOperationsBrowser but not the one from MCCodeTool. There is only 'browse origins' in the MCOperationsBrowser>>methodListMenu: So the fix must be to fix MCCodeTool>>methodListMenu: to at least give option to 'browse full' so one can get to the class. Best, Karl On Tue, May 24, 2016 at 9:27 PM, Chris Muller wrote: > Hi Karl, mcModel is for the history function, the code shouldn't be > getting there for a regular browse class. Are you sure you didn't > select "browse mc history" or "browse mc origin"? > > PS -- I still plan to try to fix the mc history function again.. > > On Tue, May 24, 2016 at 12:31 PM, karl ramberg > wrote: > > Ok, it only fails if MCMethodDefinition>>mcModel is nil in > > MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference > > > > Once you have the MCMethodDefinition>>mcModel installed it will work the > > next time, so my fix is still necessary > > > > > > > > Best, > > Karl > > > > On Tue, May 24, 2016 at 6:41 PM, karl ramberg > wrote: > >> > >> Hm, weird. > >> I removed the fix I did and now it works... > >> > >> Not sure what was going on > >> > >> Best, > >> Karl > >> > >> On Tue, May 24, 2016 at 6:33 PM, Bert Freudenberg > > >> wrote: > >>> > >>> Which menu item are you trying? You wrote ?can open a browser from the > >>> context menu? and for me both cmd-b and the context menu work for > opening a > >>> System Browser. > >>> > >>> - Bert - > >>> > >>> > >>> On 24.05.2016, at 18:27, karl ramberg wrote: > >>> > >>> > >>> I know packageInfo is not the same as workingCopy but I'm not sure how > to > >>> reference it from the merge browser. > >>> > >>> How can this be working in your image ? packageInfo is not implemented > >>> for MCMethodDefinition... > >>> > >>> > >>> It's called from > >>> MCWorkingCopyBrowser>>mcModelFor: aClassOrMethodReference > >>> ^ aClassOrMethodReference mcModel ifNil: > >>> [ | pkgName rep | (UIManager confirm: 'Okay to add historical > repository > >>> ' , (rep := MCHttpRepository trunkBackup) description , ' to ' , > (pkgName := > >>> aClassOrMethodReference packageInfo packageName) , '?') ifTrue: > >>> [ (MCWorkingCopy forPackageNamed: pkgName) repositoryGroup > addRepository: > >>> rep. > >>> aClassOrMethodReference mcModel ] ] > >>> > >>> Best, > >>> Karl > >>> > >>> On Tue, May 24, 2016 at 5:56 PM, Bert Freudenberg < > bert@freudenbergs.de> > >>> wrote: > >>>> > >>>> On 24.05.2016, at 17:17, karl ramberg wrote: > >>>> > > >>>> > I'm pretty sure this is a proper fix so the MCMergeBrowser can open > a > >>>> > browser from the context menu: > >>>> > >>>> This appears to work fine for me even without that change. > >>>> > >>>> > MCMethodDefinition>>packageInfo > >>>> > > >>>> > ^ self workingCopy! ! > >>>> > >>>> ? and a WorkingCopy most definitely is not the same as a PackageInfo > ;) > >>>> > >>>> - Bert - > >>>> > >>>> > >>>> > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>> > >>> > >>> > >> > > > > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160525/35db96da/attachment.htm From gettimothy at zoho.com Wed May 25 09:43:54 2016 From: gettimothy at zoho.com (gettimothy) Date: Wed May 25 09:43:58 2016 Subject: [squeak-dev] Thank you Patrick Rein for the exception handling addition to the terse guide Message-ID: <154e74c8f3c.c44ed15169778.3179590383081593963@zoho.com> very informative,thx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160525/0214e34b/attachment.htm From commits at source.squeak.org Wed May 25 13:31:28 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 25 13:31:29 2016 Subject: [squeak-dev] The Trunk: Graphics-bf.339.mcz Message-ID: Bert Freudenberg uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-bf.339.mcz ==================== Summary ==================== Name: Graphics-bf.339 Author: bf Time: 25 May 2016, 3:31:08.816172 pm UUID: 8ff86a2f-2422-4873-b7b2-63870f187c28 Ancestors: Graphics-bf.338 PNG: stop processing after IEND chunk =============== Diff against Graphics-bf.338 =============== Item was changed: ----- Method: PNGReadWriter>>processNextChunk (in category 'chunks') ----- processNextChunk | length chunkType crc chunkCrc | length := self nextLong. chunkType := (self next: 4) asString. (chunk isNil or: [ chunk size ~= length ]) ifTrue: [ chunk := self next: length ] ifFalse: [ stream next: length into: chunk startingAt: 1 ]. chunkCrc := self nextLong bitXor: 16rFFFFFFFF. crc := self updateCrc: 16rFFFFFFFF from: 1 to: 4 in: chunkType. crc := self updateCrc: crc from: 1 to: length in: chunk. crc = chunkCrc ifFalse:[ self error: 'PNGReadWriter crc error in chunk ', chunkType. ]. + chunkType = 'IEND' ifTrue: [stream setToEnd. ^self "*should* be the last chunk"]. - chunkType = 'IEND' ifTrue: [^self "*should* be the last chunk"]. chunkType = 'sBIT' ifTrue: [^self processSBITChunk "could indicate unusual sample depth in original"]. chunkType = 'gAMA' ifTrue: [^self "indicates gamma correction value"]. chunkType = 'bKGD' ifTrue: [^self processBackgroundChunk]. chunkType = 'pHYs' ifTrue: [^self processPhysicalPixelChunk]. chunkType = 'tRNS' ifTrue: [^self processTransparencyChunk]. chunkType = 'IHDR' ifTrue: [^self processIHDRChunk]. chunkType = 'PLTE' ifTrue: [^self processPLTEChunk]. chunkType = 'IDAT' ifTrue: [ "---since the compressed data can span multiple chunks, stitch them all together first. later, if memory is an issue, we need to figure out how to do this on the fly---" idatChunkStream ifNil: [ idatChunkStream := WriteStream with: chunk copy ] ifNotNil: [ idatChunkStream nextPutAll: chunk ]. ^self ]. unknownChunks add: chunkType. ! From Yoshiki.Ohshima at acm.org Wed May 25 16:51:09 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 16:51:12 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160525032034.GB84033@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: I'd rather avoid touching existing files. But once I figure out how to pass --prefix for configure under the cmake regime, I am happy to go forward from there. (No, Dave, you are moving very fast and prompt! Thank you!) But then I'll try the oscog branch and makes a cleaner now. On Tue, May 24, 2016 at 8:20 PM, David T. Lewis wrote: > On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote: >> >> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: >> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: >> >> >> >> If I understand correctly, here is what we need to do: >> >> >> >> 1) Apply the changes of Mr Hachisuka to the VM. >> >> - The diff is in the earlier email from Yoshiki: >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html >> >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html >> >> - Test updated VM to make sure the changes do not cause problems. Make sure >> >> it works without problems for Squeak trunk and for Scratch. >> >> - Apply the update in SVN for both oscog and trunk. I can help here. >> >> - Test the VM. Tim, I need help on this. I do not currently have a working >> >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> >> apply the patch from Yoshiki's email and see if your resulting Cog VM >> >> continues to work for you as expected on Pi with Scratch? >> >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> >> you please give his full name for the commit notice? I assume the patch >> >> is MIT licensed. >> >> >> > >> > Hi Yoshiki, >> > >> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied >> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter >> > VM. If these changes are correct, then I will also make a patch and commit them >> > to the oscog branch for Cog/Spur VMs. >> > >> > I arranged the code such that the multibyte recordPendingKeys() logic is used >> > if and only if the -compositioninput option is set on the command line or the >> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that >> > this is the intended usage, but please let me know if I did not understand. >> > >> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), >> > then please let me know if these changes work as you expect. If you cannot easily >> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, >> > but I would prefer to test them first if possible. >> >> It does buiid. Yay. The build directory structure seems to be >> different from Cog, though. How do I test a VM that is just >> generated? Do people set different install directory someways? >> > > I do not think that there is any standard approach for this, but here is > what I do for my own use: > > - Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog. > This is the 32-bit JIT VM for Squeak V3 images. > > - Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur. > This is the 32-bit JIT Spur VM for Spur images. > > - Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64. > This is the 64-bit JIT Spur VM for 64 bit Spur images. > > - Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak > file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image. > > With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I > want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For > either 32-bit or 64-bit V3 images, I type "squeak". > > I also have a script of my own making installed as /usr/local/bin/vmrun > that selects an appropriate VM based on the image format, but I no longer > use it because I usually know which VM I want anyway, so it is better for > me to just use "cog", "spur", "spur64", or "squeak" directly. > > Yoshiki, I should mention that since my last email, I have also updated > the SVN oscog branch so that the -compositionInput option will work on Cog > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and > Spur also, and it should now work the same as for the interpreter VM. But > I appreciate very much if you can first confirm that the patch works as > you expect on interpreter VM. Then we can apply the update for Cog/Spur > so that it can be used for Scratch on Raspberry Pi. > > I am sorry if I am moving too slowly here, but I do not understand how > multibyte character composition should work, so I am trying to be careful > with the changes. > > Dave > > -- -- Yoshiki From tim at rowledge.org Wed May 25 17:02:33 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed May 25 17:02:33 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ?products? directory. For example on a Pi you build in ???./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ???../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar. So far as I can work out the Mac vms don?t get moved to products. And I have no idea about Windows vms. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Not an idiot, but plays one in his life. From tim at rowledge.org Wed May 25 17:05:12 2016 From: tim at rowledge.org (tim Rowledge) Date: Wed May 25 17:05:13 2016 Subject: [squeak-dev] Adding fsync() call to the primitiveFileFlush prim ? In-Reply-To: References: Message-ID: <8DEEF00C-DE5D-42BA-9950-44CFF4967564@rowledge.org> > On 25-05-2016, at 12:22 AM, John Pfersich wrote: > > Well, computers are pretty harsh machines, they only do what you tell them to do, at for the past 44 years I've been using them. And they don't cater to people without a lot of patience. I've never seen a computer that takes into account people with ADHD, even mild cases. Then it?s about time we improved on that. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- "Body by Fisher -- brains by Mattel." From Yoshiki.Ohshima at acm.org Wed May 25 18:31:02 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 18:31:11 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160525032034.GB84033@shell.msen.com> References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: On Tue, May 24, 2016 at 8:20 PM, David T. Lewis wrote: > On Tue, May 24, 2016 at 09:50:45AM -0700, Yoshiki Ohshima wrote: >> >> On Sun, May 22, 2016 at 5:03 PM, David T. Lewis wrote: >> > On Sun, May 15, 2016 at 10:27:13PM -0400, David T. Lewis wrote: >> >> >> >> If I understand correctly, here is what we need to do: >> >> >> >> 1) Apply the changes of Mr Hachisuka to the VM. >> >> - The diff is in the earlier email from Yoshiki: >> >> http://lists.squeakfoundation.org/pipermail/squeak-dev/2016-May/189599.html >> >> http://www2.asu.ac.jp/hachi/v3/scratch14ime.html >> >> - Test updated VM to make sure the changes do not cause problems. Make sure >> >> it works without problems for Squeak trunk and for Scratch. >> >> - Apply the update in SVN for both oscog and trunk. I can help here. >> >> - Test the VM. Tim, I need help on this. I do not currently have a working >> >> Cog build environment (Unbuntu/autotools/gcc version issues). Can you >> >> apply the patch from Yoshiki's email and see if your resulting Cog VM >> >> continues to work for you as expected on Pi with Scratch? >> >> - Yoshiki, we should give credit to Mr Hachisuka for his contribution. Can >> >> you please give his full name for the commit notice? I assume the patch >> >> is MIT licensed. >> >> >> > >> > Hi Yoshiki, >> > >> > I think that I now understand the VM changes for sqUnixX11.c, and I have applied >> > the changes of Mr Hachisuka and committed them to the SVN trunk for interpreter >> > VM. If these changes are correct, then I will also make a patch and commit them >> > to the oscog branch for Cog/Spur VMs. >> > >> > I arranged the code such that the multibyte recordPendingKeys() logic is used >> > if and only if the -compositioninput option is set on the command line or the >> > equivalent SQUEAK_COMPOSITIONINPUT environment variable is set. I believe that >> > this is the intended usage, but please let me know if I did not understand. >> > >> > If you are able to compile an interpreter VM (http://wiki.squeak.org/squeak/6354), >> > then please let me know if these changes work as you expect. If you cannot easily >> > make an interpreter VM, then I can commit the changes to the Cog/Spur branch, >> > but I would prefer to test them first if possible. >> >> It does buiid. Yay. The build directory structure seems to be >> different from Cog, though. How do I test a VM that is just >> generated? Do people set different install directory someways? >> > > I do not think that there is any standard approach for this, but here is > what I do for my own use: > > - Install a Cog VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/cog. > This is the 32-bit JIT VM for Squeak V3 images. > > - Install a Spur VM. Rename /usr/local/bin/squeak file to /usr/local/bin/spur. > This is the 32-bit JIT Spur VM for Spur images. > > - Install Spur 64 bit VM. Rename the /usr/local/bin/squeak file to /usr/local/bin/spur64. > This is the 64-bit JIT Spur VM for 64 bit Spur images. > > - Compile and install trunk interpreter VM. Do not rename the /usr/local/bin/squeak > file. These are the 64-bit VMs for both 32-bit V3 image and 64-bit V3 image. > > With this arrangement, I type "cog" when I want to run a Cog VM, "spur" when I > want to run a Spur VM, and "spur64" when I want to run a 64-bit Spur. For > either 32-bit or 64-bit V3 images, I type "squeak". > > I also have a script of my own making installed as /usr/local/bin/vmrun > that selects an appropriate VM based on the image format, but I no longer > use it because I usually know which VM I want anyway, so it is better for > me to just use "cog", "spur", "spur64", or "squeak" directly. > > Yoshiki, I should mention that since my last email, I have also updated > the SVN oscog branch so that the -compositionInput option will work on Cog > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and > Spur also, and it should now work the same as for the interpreter VM. But > I appreciate very much if you can first confirm that the patch works as > you expect on interpreter VM. Then we can apply the update for Cog/Spur > so that it can be used for Scratch on Raspberry Pi. In any case, I built an interpreter VM (of trunk, rev. 3730). But I get an error: This interpreter (vers. 0) cannot read image file (vers. 6521) Any thoughts? -- -- Yoshiki From Yoshiki.Ohshima at acm.org Wed May 25 18:52:48 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 18:52:53 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: On Wed, May 25, 2016 at 10:02 AM, tim Rowledge wrote: > It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ?products? directory. For example on a Pi you build in ???./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ???../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar. Right. The modified version of scratch script I made can take the --vm option that works so I can run the one in the products directory. For the interpreter VM, I just edited Makefile and pass --prefix=/home/pi/usr to configure. -- -- Yoshiki From Yoshiki.Ohshima at acm.org Wed May 25 19:13:57 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 19:14:01 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima wrote: > I'd rather avoid touching existing files. But once I figure out how > to pass --prefix for configure under the cmake regime, I am happy to > go forward from there. (No, Dave, you are moving very fast and prompt! > Thank you!) > > But then I'll try the oscog branch and makes a cleaner now. I've been assuming that the "oscog" branch is "svn/branches/Cog", and I can confirm that the -compositioninput flag provided to the main VM binary is passed to the X11 driver, and other things seem to work. (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has not been added to plugins.ext so the actual Japanese input still does not work, but it seems close.) -- -- Yoshiki From commits at source.squeak.org Wed May 25 21:57:57 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed May 25 21:57:59 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160525215757.22935.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068149.html Name: Kernel-pre.1026 Ancestors: Kernel-mt.1025 Improves argument naming in exception handling methods to make discovery of ExceptionSet easier. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068150.html Name: Help-Squeak-TerseGuide-pre.6 Ancestors: Help-Squeak-TerseGuide-kfr.5 Added a section on exception handling ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068151.html Name: Graphics-bf.339 Ancestors: Graphics-bf.338 PNG: stop processing after IEND chunk ============================================= From Yoshiki.Ohshima at acm.org Wed May 25 22:42:45 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 22:43:54 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: In any case, I just copy and pasted the implementation of recordPendingKeys() from trunk to the Cog branch and it works as expected in an UTF8 environment. On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima wrote: > On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima > wrote: >> I'd rather avoid touching existing files. But once I figure out how >> to pass --prefix for configure under the cmake regime, I am happy to >> go forward from there. (No, Dave, you are moving very fast and prompt! >> Thank you!) >> >> But then I'll try the oscog branch and makes a cleaner now. > > I've been assuming that the "oscog" branch is "svn/branches/Cog", and > I can confirm that the -compositioninput flag provided to the main VM > binary is passed to the X11 driver, and other things seem to work. > (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has > not been added to plugins.ext so the actual Japanese input still does > not work, but it seems close.) > -- > -- Yoshiki -- -- Yoshiki From Yoshiki.Ohshima at acm.org Wed May 25 22:58:04 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Wed May 25 22:58:49 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: On Wed, May 25, 2016 at 11:52 AM, Yoshiki Ohshima wrote: > On Wed, May 25, 2016 at 10:02 AM, tim Rowledge wrote: >> It may have already been mentioned but just in case - on the unix builds (at least for Cog) the built vm is moved to the ?products? directory. For example on a Pi you build in ???./Cog/build.linux32ARM/squeak.cog.spur and find the completed (hopefully!) vm in ???../Cog/products/cogspurlinuxhtARM which you then copy to your Pi working directory (say, /home/pi/Scratch) and run with ./cogspurlinuxhtARM/squeak -vm-sound-demented my.image or similar. > > Right. The modified version of scratch script I made can take the > --vm option that works so I can run the one in the products directory. In any case, this is the current scratch script that works with the new scheme of passing -compositioninput flag without needing the display module spec. -- -- Yoshiki -------------- next part -------------- *** /usr/bin/scratch 2016-05-02 18:38:55.000000000 +0000 --- scratch 2016-05-25 22:50:37.614585930 +0000 *************** *** 5,11 **** # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM="/usr/bin/squeak" IMAGE="/usr/share/scratch/NuScratch02052016.image" IMOPTIONS="" DOCUMENT="" --- 5,11 ---- # Adapted by: Miriam Ruiz, Alex Bradbury, tim@Rowledge.org # tim - trying to simplify a bit but good grief, shell script is incomprehensible ! VM=`echo /usr/lib/squeak/5.0-*/squeak|sort -r | head -1` IMAGE="/usr/share/scratch/NuScratch02052016.image" IMOPTIONS="" DOCUMENT="" *************** *** 26,32 **** { echo "Usage: scratch [--param value] [-vmopt value] [arg value]" echo " where --param is --vm, --image, or --document;" - echo " -vmopt is an option passed to the Squeak VM;" echo " and args are passed to the Squeak image." } --- 26,31 ---- *************** *** 56,62 **** *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in --- 55,61 ---- *) DOCUMENT="$PWD/$2" ;; esac ! shift ;; --image) case "$2" in *************** *** 65,71 **** *) IMAGE="$PWD/$2" ;; esac ! shift ;; --vm) case "$2" in --- 64,74 ---- *) IMAGE="$PWD/$2" ;; esac ! shift ! ;; ! -vmopt) ! VMOPTIONS="$VMOPTIONS $2" ! shift ;; --vm) case "$2" in *************** *** 76,84 **** esac shift ;; - -*) VMOPTIONS="$VMOPTIONS $1 $2" - shift - ;; *) IMOPTIONS="$IMOPTIONS $1 $2" shift ;; --- 79,84 ---- *************** *** 101,112 **** PIGPIOD_ACTIVE=$? sudo systemctl start pigpiod # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS ! $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS if [ $PIGPIOD_ACTIVE -ne 0 ]; then sudo systemctl stop pigpiod fi - --- 101,139 ---- PIGPIOD_ACTIVE=$? sudo systemctl start pigpiod + + BIN=`/usr/bin/dirname $VM` + # At least on linux LD_LIBRARY_PATH's components must be absolute path names + case "$BIN" in + /*) PLUGINS="$BIN";; + *) PLUGINS="`pwd`/$BIN" + esac + + # On some linuxes there multiple versions of the C library. If the image uses + # libc (e.g. through the FFI) then it must use the same version that the VM uses + # and so it should take precedence over /lib libc. This is done by setting + # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM. + LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`" + case "$LIBC_SO" in + /lib/arm-linux-gnueabihf/libc*) \ + SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";; + "") case `/bin/uname -m || /usr/bin/uname -m` in + *) echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2 + esac + exit 1;; + *) echo "Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for $LIBC_SO to $0. Please report your edit to squeak vm-dev." 1>&2 + exit 1 + esac + + if echo $XMODIFIERS | grep '@im=' > /dev/null; then + VMOPTIONS="$VMOPTIONS -compositioninput" + fi + # VM, Image, and Document are non-optional # Document has to be present even if empty for IMOPTIONS to work ! echo Executing: env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER $VM $VMOPTIONS $IMAGE $DOCUMENT $IMOPTIONS ! env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER "$VM" $VMOPTIONS "$IMAGE" "$DOCUMENT" $IMOPTIONS if [ $PIGPIOD_ACTIVE -ne 0 ]; then sudo systemctl stop pigpiod fi From lewis at mail.msen.com Thu May 26 00:09:44 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 26 00:09:46 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: <20160526000944.GA63335@shell.msen.com> On Wed, May 25, 2016 at 03:42:45PM -0700, Yoshiki Ohshima wrote: > > On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima > wrote: > > On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima > > wrote: > >> I'd rather avoid touching existing files. But once I figure out how > >> to pass --prefix for configure under the cmake regime, I am happy to > >> go forward from there. (No, Dave, you are moving very fast and prompt! > >> Thank you!) > >> > >> But then I'll try the oscog branch and makes a cleaner now. > > > > I've been assuming that the "oscog" branch is "svn/branches/Cog", and > > I can confirm that the -compositioninput flag provided to the main VM > > binary is passed to the X11 driver, and other things seem to work. > > (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has > > not been added to plugins.ext so the actual Japanese input still does > > not work, but it seems close.) > > In any case, I just copy and pasted the implementation of > recordPendingKeys() from trunk to the Cog branch and it works as > expected in an UTF8 environment. Excellent, thank you for confirming. Yes when I said "oscog branch" I should have said "svn/branches/Cog", sorry. I just committed the update to SVN branches/Cog so that all of the Cog, Spur, and interpreter VMs will have the new recordPendingKeys() function, and command line parameters will be passed correctly to the X11 display module. Dave From lewis at mail.msen.com Thu May 26 00:48:06 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 26 00:48:08 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> Message-ID: <20160526004806.GC63335@shell.msen.com> On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote: > On Tue, May 24, 2016 at 8:20 PM, David T. Lewis wrote: > > > > Yoshiki, I should mention that since my last email, I have also updated > > the SVN oscog branch so that the -compositionInput option will work on Cog > > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and > > Spur also, and it should now work the same as for the interpreter VM. But > > I appreciate very much if you can first confirm that the patch works as > > you expect on interpreter VM. Then we can apply the update for Cog/Spur > > so that it can be used for Scratch on Raspberry Pi. > > In any case, I built an interpreter VM (of trunk, rev. 3730). But I > get an error: > > This interpreter (vers. 0) cannot read image file (vers. 6521) > > Any thoughts? > Image format 6521 is the 32-bit Spur image format used in Squeak 5.0. A Spur VM is required to run this image. Tim's latest Scratch work is updated to the 6521 Spur image format, so an interpreter VM can no longer be used to run these images. Squeak 4.6 and earlier will work with the interpreter VM, and I expect that an older Scratch image should work also, although I do not know exactly when Scratch moved to Spur 6521. Dave From tim at rowledge.org Thu May 26 01:22:49 2016 From: tim at rowledge.org (tim Rowledge) Date: Thu May 26 01:22:52 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160526004806.GC63335@shell.msen.com> References: <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> <20160526004806.GC63335@shell.msen.com> Message-ID: <956272FA-321F-4769-A2F4-19CC247F541B@rowledge.org> > On 25-05-2016, at 5:48 PM, David T. Lewis wrote: > > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that > an older Scratch image should work also, although I do not know exactly when > Scratch moved to Spur 6521. Around last August? Basically as soon as we had Cog working. We didn?t really put any effort into making an V3 Cog and in fact so far as I recall it may not be doable without some hassles because we couldn?t make a method entry block that would conform to the alignment parameters Eliot uses to discriminate between something and something else. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: CEQ: Corrupt and Erase Queue From lewis at mail.msen.com Thu May 26 02:09:50 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 26 02:09:52 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <956272FA-321F-4769-A2F4-19CC247F541B@rowledge.org> References: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> <20160526004806.GC63335@shell.msen.com> <956272FA-321F-4769-A2F4-19CC247F541B@rowledge.org> Message-ID: <20160526020950.GA95791@shell.msen.com> On Wed, May 25, 2016 at 06:22:49PM -0700, tim Rowledge wrote: > > > On 25-05-2016, at 5:48 PM, David T. Lewis wrote: > > > > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that > > an older Scratch image should work also, although I do not know exactly when > > Scratch moved to Spur 6521. > > Around last August? Basically as soon as we had Cog working. We didn???t really put any effort into making an V3 Cog and in fact so far as I recall it may not be doable without some hassles because we couldn???t make a method entry block that would conform to the alignment parameters Eliot uses to discriminate between something and something else. > Cog VMs for V3 images built from the latest sources work fine, yes? The pre-built VMs have been updated quite recently at http://www.mirandabanda.org/files/Cog/VM/VM.r3692/ So for an image in Spur 6521 format, you need a Spur VM. For images in the earlier V3 format, any Cog or interpreter VM should work. The Scratch image was moved to Spur 6521 format approximately last August, so these recent Scratch images require a Spur VM. The necessary platforms source updates (Cog/Spur/Interpreter) are now in sync for the X11 display. We do still need to make sure that ImmX11Plugin is included in the VM for Scratch on Raspbian (and maybe we need to do some updates to the plugin, I am not sure), but otherwise we should now be close to having Scratch character input working for Japanese users. Dave From robert.w.withers at gmail.com Thu May 26 02:10:05 2016 From: robert.w.withers at gmail.com (Robert Withers) Date: Thu May 26 02:10:09 2016 Subject: [squeak-dev] v 2.0 SecureSession spec Message-ID: <57465AFD.8070700@gmail.com> Here's a link to the version 2.0 spec I've put together. It includes v2.0 start-up messages for dataEncoder negotiation (used by presentation layer) and corrections to MessageType assigned numbers for data headers, so impl and spec match. Unfortunately the impl still has a few v2.0 issues, but v1.0 and vintage are still working and will not change in the future, tough perhaps deprecated. I'd welcome any feedback on content or accuracy, if anyone had a few cycles to spare ;) Thank you for your consideration, Robert http://jmp.sh/zASyHlK From Yoshiki.Ohshima at acm.org Thu May 26 03:10:25 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Thu May 26 03:10:29 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160526004806.GC63335@shell.msen.com> References: <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> <20160526004806.GC63335@shell.msen.com> Message-ID: Thanks for clarification. I wasn't quite sure that the image in the All in One was a Spur image, and also the error message (vers. 0) made me think that the VM was properly built. On Wed, May 25, 2016 at 5:48 PM, David T. Lewis wrote: > On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote: >> On Tue, May 24, 2016 at 8:20 PM, David T. Lewis wrote: >> > >> > Yoshiki, I should mention that since my last email, I have also updated >> > the SVN oscog branch so that the -compositionInput option will work on Cog >> > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and >> > Spur also, and it should now work the same as for the interpreter VM. But >> > I appreciate very much if you can first confirm that the patch works as >> > you expect on interpreter VM. Then we can apply the update for Cog/Spur >> > so that it can be used for Scratch on Raspberry Pi. >> >> In any case, I built an interpreter VM (of trunk, rev. 3730). But I >> get an error: >> >> This interpreter (vers. 0) cannot read image file (vers. 6521) >> >> Any thoughts? >> > > Image format 6521 is the 32-bit Spur image format used in Squeak 5.0. > A Spur VM is required to run this image. Tim's latest Scratch work is > updated to the 6521 Spur image format, so an interpreter VM can no longer > be used to run these images. > > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that > an older Scratch image should work also, although I do not know exactly when > Scratch moved to Spur 6521. > > Dave > > -- -- Yoshiki From lewis at mail.msen.com Thu May 26 04:43:36 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Thu May 26 04:43:38 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> <20160526004806.GC63335@shell.msen.com> Message-ID: <20160526044336.GA52850@shell.msen.com> The error message "vers. 0" is a bug. It is supposed to give a meaningful version number for the VM. Funny but I never noticed this before. Maybe the message should be revised anyway, because one version of the interpreter can read more than one image format. An interpreter for 32-bit object memory can support image formats 6502, 6504, and 6505. An interpreter for 64-bit V3 images supports image formats 68000, 68002, and 68003. Dave On Wed, May 25, 2016 at 08:10:25PM -0700, Yoshiki Ohshima wrote: > Thanks for clarification. I wasn't quite sure that the image in the > All in One was a Spur image, and also the error message (vers. 0) made > me think that the VM was properly built. > > On Wed, May 25, 2016 at 5:48 PM, David T. Lewis wrote: > > On Wed, May 25, 2016 at 11:31:02AM -0700, Yoshiki Ohshima wrote: > >> On Tue, May 24, 2016 at 8:20 PM, David T. Lewis wrote: > >> > > >> > Yoshiki, I should mention that since my last email, I have also updated > >> > the SVN oscog branch so that the -compositionInput option will work on Cog > >> > and Spur. This means that we can apply the sqUnixX11.c patch for Cog and > >> > Spur also, and it should now work the same as for the interpreter VM. But > >> > I appreciate very much if you can first confirm that the patch works as > >> > you expect on interpreter VM. Then we can apply the update for Cog/Spur > >> > so that it can be used for Scratch on Raspberry Pi. > >> > >> In any case, I built an interpreter VM (of trunk, rev. 3730). But I > >> get an error: > >> > >> This interpreter (vers. 0) cannot read image file (vers. 6521) > >> > >> Any thoughts? > >> > > > > Image format 6521 is the 32-bit Spur image format used in Squeak 5.0. > > A Spur VM is required to run this image. Tim's latest Scratch work is > > updated to the 6521 Spur image format, so an interpreter VM can no longer > > be used to run these images. > > > > Squeak 4.6 and earlier will work with the interpreter VM, and I expect that > > an older Scratch image should work also, although I do not know exactly when > > Scratch moved to Spur 6521. > > > > Dave > > > > > > > > -- > -- Yoshiki From Marcel.Taeumel at hpi.de Thu May 26 13:16:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Thu May 26 13:53:02 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: <1464090327158-4897035.post@n4.nabble.com> Message-ID: <1464268561035-4897537.post@n4.nabble.com> Karl Ramberg wrote > I updated another image and ran into the same problem: > > Best, > Karl > > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < > karlramberg@ > > wrote: > >> I changed the method as described and updated the image... No saved copy >> or call stack saved >> >> Best, >> Karl >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < > Marcel.Taeumel@ > > >> wrote: >> >>> Hi Karl, >>> >>> can you share the problematic image? >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >>> >>> >> > > > > > SqueakDebug.log (16K) > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> Hi Karl, I just updated an older image from #15844 to #15987 with many tools open and I did not run into your problem. It seems strange that your image has a world without a canvas. Even if so, there are measures to take care of it just 2-3 lines above your fix. :-/ Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Thu May 26 14:00:02 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu May 26 14:00:05 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: <1464268561035-4897537.post@n4.nabble.com> References: <1464090327158-4897035.post@n4.nabble.com> <1464268561035-4897537.post@n4.nabble.com> Message-ID: My images usually have several projects. Could that be part of the problem? Best, Karl On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel wrote: > Karl Ramberg wrote > > I updated another image and ran into the same problem: > > > > Best, > > Karl > > > > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < > > > karlramberg@ > > > > wrote: > > > >> I changed the method as described and updated the image... No saved copy > >> or call stack saved > >> > >> Best, > >> Karl > >> > >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < > > > Marcel.Taeumel@ > > > > > >> wrote: > >> > >>> Hi Karl, > >>> > >>> can you share the problematic image? > >>> > >>> Best, > >>> Marcel > >>> > >>> > >>> > >>> -- > >>> View this message in context: > >>> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html > >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >>> > >>> > >> > > > > > > > > > > SqueakDebug.log (16K) > > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> > > Hi Karl, > > I just updated an older image from #15844 to #15987 with many tools open > and > I did not run into your problem. It seems strange that your image has a > world without a canvas. Even if so, there are measures to take care of it > just 2-3 lines above your fix. > > :-/ > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160526/7612f6b1/attachment.htm From karlramberg at gmail.com Thu May 26 14:03:17 2016 From: karlramberg at gmail.com (karl ramberg) Date: Thu May 26 14:03:20 2016 Subject: [squeak-dev] Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: MCCodeTool.kfr.1.cs Type: application/octet-stream Size: 1665 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160526/f14a4d01/MCCodeTool.kfr.1.obj From tom.b.rushworth at gmail.com Fri May 27 00:19:17 2016 From: tom.b.rushworth at gmail.com (Tom Rushworth) Date: Fri May 27 00:16:49 2016 Subject: [squeak-dev] The Trunk: Files-tpr.156.mcz In-Reply-To: References: <57448936.775b8c0a.165ef.ffffb84dSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <57479285.6090709@gmail.com> flush makes sure the information has gone from application memory to OS RAM cache. It can still be lost if the power is abruptly shut off, but is safe from application crashes. sync makes sure the information has gone to disk. It takes longer, and may involve writing stuff from other apps to disk as well. Your info is usually safe, but the disk may have an internal cache of its own :(. If you want it on disk and can afford the time delay, use sync. On 16-05-24 13:49 , Chris Muller wrote: > A little research suggests #sync is a blocking operation, whereas > #flush is non-blocking. > > So I should probably change Magma's atomic-writing to use #sync.. > > > On Tue, May 24, 2016 at 2:45 PM, tim Rowledge wrote: >> >>> On 24-05-2016, at 12:32 PM, Chris Muller wrote: >>> >>> Since I'm not a systems programmer, I wasn't really following the >>> other discussion. But this does interest me since Magma employs a >>> complex logging / playback mechanism which does depend on the idea >>> that returning from #flush assures all my puts on that Filestreams are >>> truly written to the disk. >>> >>> Should I be using #sync, instead of #flush? Could you succinctly >>> summarize the difference between the two for a lay-person like myself? >> >> My level of understanding of this is roughly that flush is spelt f-l-u-s-h and sync is spelt s-y-n-c. I don?t understand why a system would ever let things get so out of sync that you would ever need to think of it. When you close a file it seems to me that everything should be cleaned up. >> >> >> tim >> -- >> tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim >> Useful random insult:- Hypnotized as a child and couldn't be woken. >> >> >> > > -- Tom Rushworth From eliot.miranda at gmail.com Fri May 27 03:25:21 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri May 27 03:25:27 2016 Subject: [squeak-dev] New Cog VMs available Message-ID: ... at http://www.mirandabanda.org/files/Cog/VM/VM.r3732 CogVM binaries as per VMMaker.oscog-eem.1873/r3732 General: Make primitiveDoPrimitiveWithArgs usable as a mirror primitive, such that no message needs to be sent to the receiver to evaluate a primitive on it. This would make possible Context>>receiver: obj tryPrimitive: idx withArgs: args. Spur: Fix ephemerons (at least for Gule's test case). The mournQueue is of course a root for the scavenger and so must be visited at the start of a scavenge. Fix bug in markAllUnscannedEphemerons, enumerating correctly. Both fireEphemeronsInRememberedSet and fireEphemeronsOnEphemeronList must check for an ephemeron being fireable. An as-yet-firable ephemeron might get added to the ephemeron list and later its key may get tenured, rendering the ephemeron unfirable in that cycle. Fix marking of obj stack contents (markAndTraceObjStack:andContents:). Again tenuring could cause contents to be forwarded and hence read barrier is needed. Fix two bugs in ephemerons (found by Gille Polito - thanks!). 1. obj stack extension must happen with marking set to true if new pages aren't to be GC'ed. So move the assignments to marking out into markObjects: where they can surround nilUnmarkedWeaklingSlots. 2. fireAllUnscannedEphemerons needs to enumerate the unscannedEphemerons set properly, an oop at a time. Fix asserts that check for ephemerons so that the change in an ephemeron's format once it gets added to the mournQueue doesn't break the asserts; isMaybeFiredEphemeron[Format]: answer true for ephemerons and ephemerons in the mournQueue. Fix the Spur implementation of becomeForward:copyHash: for becomming immediates with copyHash false. Fix the scavenger's referenceCountRememberedReferents: for forwarding to immediates, and add a printRememberedSet convenience. Make pushLiteralVariable: store unfollowed literals back into the literal frame. Do so in a function off to the side, not inlined into the interpreter loop. With the above ephemeron changes Guille's test case passes: | e | Smalltalk supportsQueueingFinalization: true. e := (1 to: 200000) collect: [:i| Ephemeron key: (ObjectFinalizer receiver: 'test', 'asd' selector: #logCr) value: Object new]. Smalltalk garbageCollect! Plugins: Simplify the arg validation in FloatArrayPrims>>prmNormalize & primLength. Fix the configuration of the gdb-7.x support for for the GdbARMPlugin (COG=1). Put #if COG around a couple of changes to the gdb-7.10 code. Allow assert to be used in the plugin on MacOS X (-undefined dynamic_lookup) _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160526/0e422d0c/attachment-0001.htm From Marcel.Taeumel at hpi.de Fri May 27 13:40:01 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 14:17:11 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1463816433367-4896486.post@n4.nabble.com> References: <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> <1463816433367-4896486.post@n4.nabble.com> Message-ID: <1464356401742-4897830.post@n4.nabble.com> marcel.taeumel wrote > Hi, there. > > Here is a new version of event filters with support for separating > capturing filters from bubbling filters. > https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture > https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-bubbling > > Here is the change set: > event-filters.cs > > Note that you should either use a fresh trunk image with the latest > updates OR unload all the changes from my previous change set because I > cleaned up this one. So, there will be some "method removed" calls > missing. > > Anyway, with support for capturing filters, you can also filter, for > example, mouse events for system windows that are always active (see > preference "Windows Active Only On Top" disabled). > > wnd := ActiveWorld submorphs fourth. > mouseFilter := PluggableEventFilter on: [:evt :target | evt ignore]. > wnd addMouseCaptureFilter: mouseFilter. > wnd removeMouseCaptureFilter: mouseFilter. > > See how the behavior is different when you use the filter for the bubbling > phase: > > wnd addMouseBubbleFilter: mouseFilter. > wnd removeMouseBubbleFilter: mouseFilter. > > Note that event bubbling is implemented in MorphicEventDispatcher. If > there would be no bubbling, those filters would be meaningless. However, I > am not aware of an alternative event dispatcher for Squeak's Morphic. > > What other dispatch patterns are out there? :-) > > Best, > Marcel Hi, there. I benched the event filters mechanism without having any active filters to reveal the impact of my changes. Here is the benchmark: 0) Close all windows. 1) Open a system browser and position it in the upper-left corner right below the world main docking bar. 2) Open a workspace, not covering the system browser. 3) Execute some code: event := MouseButtonEvent new setType: #mouseDown position: 100@100 which: 2r000 "no change" buttons: 2r100 "red/left pressed" hand: ActiveHand stamp: 0. "not needed" [ event resetHandlerFields. event hand sendMouseEvent: event. ] bench. On my Windows 10 machine (MS Surface Pro 3, Core i7 mobile) with Cog/Spur #3663 and Squeak #15987 I got: Before: 3.73 microseconds per run After: 4.5 microseconds per run This tests a mouse-down event because it involves full dispatching (resp. capturing) and handling (resp. bubbling) without taking the shortcut via mouse focus (or keyboard focus). This benchmark combined with MessageTally class >> #spyOn: provided interesting insights about expensive calls. About 5.9 percent are spend for sending generic and mouse bubble filters. Note that 4.1 percent are spend for accessing the Morph's properties to find out that there are no filters at the moment. This could be optimized by adding instance variables to MorphExtension. (Interestingly, about 11 percent (before: 12.7 percent) are spent in Morph >> #handleMouseDown: to call HandMorph >> #removePendingBalloonFor:.) (On a side note, the current way to provide global keyboard shortcuts eats up 47.1 percent (before: 48.4 precent) for this mouse down handling because of installing/removing event listeners in PasteUpMorph >> #becomeActiveDuring:. But this will be optimized on a few days.) The following questions remain: - Can I put this in trunk and use it to improve the implementation of global keyboard shortcuts? - Should I add instance variables in MorphExtension to speed-up the look-up? Note that I already did add instance variables to HandMorph to speed-up the look-up of global event capturing filters. - Is it conceptually good to re-evaluate the filters if one of them changes the kind of an event? This affects only mouse event filters and keyboard event filters that convert between mouse and keyboard. Note that an endless loop is possible if such filters do not converge. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4897830.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Fri May 27 14:35:24 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri May 27 14:35:30 2016 Subject: [squeak-dev] FYI Squeak5.0 latest update: #15987 Message-ID: <154f2a42638.105d1cdba2806.4239698955046131711@zoho.com> FYI Just upgraded to check out Patrick Rein's Terse Guide addition. Squeak5.0 latest update: #15987 After upgrade, opening the Help kicked in that "CR to enter an emergency evaluator" window. The DNU exception was thrown in SimpleHierarchicalListMorph >> drawLinesOn: aCanvas ..... ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor]]] submorph in this case was an instance of IndentingListItemMorph where In that class I added the missing method that invokes an existing and similar method with a default value of 1. drawLinesOn: aCanvas lineColor: lineColor self drawLinesOn: aCanvas lineColor: lineColor indentThreshold: 1. Help browser now opens with no errors. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/65e758b8/attachment.htm From Marcel.Taeumel at hpi.de Fri May 27 14:12:12 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 14:49:23 2016 Subject: [squeak-dev] Re: FYI Squeak5.0 latest update: #15987 In-Reply-To: <154f2a42638.105d1cdba2806.4239698955046131711@zoho.com> References: <154f2a42638.105d1cdba2806.4239698955046131711@zoho.com> Message-ID: <1464358332770-4897849.post@n4.nabble.com> Hi Timothy, which time stamp does SimpleHierarchicalListMorph >> drawLinesOn: have in your image? It seems rather old to me. The current version is mt 4/22/2016 10:52 : SimpleHierarchicalListMorph >> drawLinesOn: aCanvas | lColor | lColor := self lineColor. aCanvas transformBy: scroller transform clippingTo: scroller innerBounds during:[:clippedCanvas | scroller submorphsDo: [ :submorph | (submorph visible and: [(submorph isExpanded or: [clippedCanvas isVisible: submorph fullBounds] ) or: [ submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling fullBounds]]]) ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor indentThreshold: 0] ] ] smoothing: scroller smoothing. Best, Marcel -- View this message in context: http://forum.world.st/FYI-Squeak5-0-latest-update-15987-tp4897845p4897849.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From karlramberg at gmail.com Fri May 27 14:53:22 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri May 27 14:53:25 2016 Subject: [squeak-dev] VM crash with unhelpful debug log Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: crash.dmp Type: application/octet-stream Size: 7218 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/0a7d7f91/crash.obj From Marcel.Taeumel at hpi.de Fri May 27 14:26:54 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 15:04:04 2016 Subject: [squeak-dev] Re: Fix for MergeBrowser In-Reply-To: References: <3014E593-D4A2-4351-9C7A-933E175927D6@freudenbergs.de> Message-ID: <1464359214872-4897853.post@n4.nabble.com> Hi Karl, after a quick look in the DNU I always get when "browse origin" of a method change, I see that MCWorkingCopyBrowser class >> #mcModelFor: seems to be not prepared to process an mc definition. Yes, MCDefinition does implement #mcModel but the code in #mcModelFor: suggests that the author expected classes or method references only. :-) So, the call in MCOperationsBrowser >> #browseSelectorOrigin seems to misuse #mcModelFor: at the moment. Anyway, I wonder why MCWorkingCopyBrowser class >> #mcModelFor: does exist at all because it bypasses the idea of polymorphism, which actually is employed in #mcModel being implemented in Class, MethodReference, MCHttpRepository, and MCRepository. My suggestion for anybody who is willing to fix this is to move the code from #mcModelFor: into those implementors of #mcModel, who need it. Otherwise, it seems *really* difficult to understand this additional dispatch -- and when to use it -- in the future for other developers. Best, Marcel -- View this message in context: http://forum.world.st/Fix-for-MergeBrowser-tp4897113p4897853.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Fri May 27 14:32:47 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 15:09:55 2016 Subject: [squeak-dev] Re: VM crash with unhelpful debug log In-Reply-To: References: Message-ID: <1464359567538-4897856.post@n4.nabble.com> Hi Karl, it seems to be a Windows machine. I have these crashes from time to time, but they are rare. Primitive 117 is an external call and my guess is that it is related to file access. In the case of a Monticello commit it could the the MCZ that is going to be stored in the local package cache. If I had such crashes, a Windows reboot did solve it. Thus, I suspect from broken file handles or caches or whatever. It is quite annoying because it is not reproducible. Best, Marcel -- View this message in context: http://forum.world.st/VM-crash-with-unhelpful-debug-log-tp4897850p4897856.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at caesar.elte.hu Fri May 27 15:20:54 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Fri May 27 15:20:59 2016 Subject: [squeak-dev] Re: VM crash with unhelpful debug log In-Reply-To: <1464359567538-4897856.post@n4.nabble.com> References: <1464359567538-4897856.post@n4.nabble.com> Message-ID: It's very likely that the UUIDPlugin is responible for the crash[1]. It has been changed recently and is compiled as an external plugin on Windows. If it won't crash with 3643[2], then it's definitely the UUIDPlugin on Windows. Someone with a Windows machine and a debugger should find the cause and try to fix it. If you want to work around the issue on your system, then you can either rename/move the UUIDPlugin.dll or revert #makeUUID to its previous version. Levente [1] http://forum.world.st/VM-Crash-LocaleTest-gt-gt-beginning-with-Cog-Spur-16-13-on-Windows-td4896004.html [2] http://www.mirandabanda.org/files/Cog/VM/VM.r3643/ On Fri, 27 May 2016, marcel.taeumel wrote: > Hi Karl, > > it seems to be a Windows machine. I have these crashes from time to time, > but they are rare. Primitive 117 is an external call and my guess is that it > is related to file access. In the case of a Monticello commit it could the > the MCZ that is going to be stored in the local package cache. > > If I had such crashes, a Windows reboot did solve it. Thus, I suspect from > broken file handles or caches or whatever. > > It is quite annoying because it is not reproducible. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/VM-crash-with-unhelpful-debug-log-tp4897850p4897856.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From Marcel.Taeumel at hpi.de Fri May 27 14:51:30 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 15:28:38 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: <1464090327158-4897035.post@n4.nabble.com> <1464268561035-4897537.post@n4.nabble.com> Message-ID: <1464360690096-4897866.post@n4.nabble.com> Karl Ramberg wrote > My images usually have several projects. Could that be part of the > problem? > > Best, > Karl > > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel < > Marcel.Taeumel@ > > > wrote: > >> Karl Ramberg wrote >> > I updated another image and ran into the same problem: >> > >> > Best, >> > Karl >> > >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < >> >> > karlramberg@ >> >> > > wrote: >> > >> >> I changed the method as described and updated the image... No saved >> copy >> >> or call stack saved >> >> >> >> Best, >> >> Karl >> >> >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < >> >> > Marcel.Taeumel@ >> >> > > >> >> wrote: >> >> >> >>> Hi Karl, >> >>> >> >>> can you share the problematic image? >> >>> >> >>> Best, >> >>> Marcel >> >>> >> >>> >> >>> >> >>> -- >> >>> View this message in context: >> >>> >> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >>> >> >>> >> >> >> > >> > >> > >> > >> > SqueakDebug.log (16K) >> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> >> >> Hi Karl, >> >> I just updated an older image from #15844 to #15987 with many tools open >> and >> I did not run into your problem. It seems strange that your image has a >> world without a canvas. Even if so, there are measures to take care of it >> just 2-3 lines above your fix. >> >> :-/ >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> Hi Karl, maybe. If you had multiple projects open when I made the project refactorings, some existing world may have gotten into an invalid state. However, the bug should have occured ealier? Which version did you try to update from? Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri May 27 15:36:04 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 27 15:36:44 2016 Subject: [squeak-dev] The Trunk: Monticello-kfr.633.mcz Message-ID: Karl Ramberg uploaded a new version of Monticello to project The Trunk: http://source.squeak.org/trunk/Monticello-kfr.633.mcz ==================== Summary ==================== Name: Monticello-kfr.633 Author: kfr Time: 27 May 2016, 5:35:08.132864 pm UUID: faacff6a-dfd6-45ef-98a1-b9a4796cd757 Ancestors: Monticello-mt.632 When a class only has instance variable changes MCMergeBrowser does not offer a menu option to access a browser =============== Diff against Monticello-mt.632 =============== Item was changed: ----- Method: MCCodeTool>>methodListMenu: (in category 'menus') ----- methodListMenu: aMenu "Build the menu for the selected method, if any." self selectedMessageName ifNil: [items notEmpty ifTrue: + [aMenu addList:#( + ('browse full (b)' browseMethodFull) + ('fileOut (o)' fileOutMessage))]] - [aMenu addList:#(('fileOut (o)' fileOutMessage))]] ifNotNil: [ aMenu addList:#( ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' classHierarchy) ('browse protocol (p)' browseFullProtocol) - ('fileOut (o)' fileOutMessage) ('printOut' printOutMessage) ('copy selector (c)' copySelector) ('copy reference (C)' copyReference)). aMenu addList: #( - ('browse senders (n)' browseSendersOfMessages) ('browse implementors (m)' browseMessages) ('inheritance (i)' methodHierarchy) ('versions (v)' browseVersions) ('change sets with this method' findMethodInChangeSets) " ('x revert to previous version' revertToPreviousVersion)" ('remove from current change set' removeFromCurrentChanges) " ('x revert & remove from changes' revertAndForget)" ('add to current change set' adoptMessageInCurrentChangeset) " ('x copy up or copy down...' copyUpOrCopyDown)" " ('x remove method (x)' removeMessage)" "-" ). ]. " aMenu addList: #( ('x inst var refs...' browseInstVarRefs) ('x inst var defs...' browseInstVarDefs) ('x class var refs...' browseClassVarRefs) ('x class variables' browseClassVariables) ('x class refs (N)' browseClassRefs) ). " ^ aMenu ! From karlramberg at gmail.com Fri May 27 15:37:07 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri May 27 15:37:11 2016 Subject: [squeak-dev] Re: VM crash with unhelpful debug log In-Reply-To: References: <1464359567538-4897856.post@n4.nabble.com> Message-ID: Hi, thanks Levente. I reverted makeUUID and it works again. Best, Karl On Fri, May 27, 2016 at 5:20 PM, Levente Uzonyi wrote: > It's very likely that the UUIDPlugin is responible for the crash[1]. > It has been changed recently and is compiled as an external plugin on > Windows. > If it won't crash with 3643[2], then it's definitely the UUIDPlugin on > Windows. Someone with a Windows machine and a debugger should find the > cause and try to fix it. > > If you want to work around the issue on your system, then you can either > rename/move the UUIDPlugin.dll or revert #makeUUID to its previous version. > > Levente > > [1] > http://forum.world.st/VM-Crash-LocaleTest-gt-gt-beginning-with-Cog-Spur-16-13-on-Windows-td4896004.html > [2] http://www.mirandabanda.org/files/Cog/VM/VM.r3643/ > > > On Fri, 27 May 2016, marcel.taeumel wrote: > > Hi Karl, >> >> it seems to be a Windows machine. I have these crashes from time to time, >> but they are rare. Primitive 117 is an external call and my guess is that >> it >> is related to file access. In the case of a Monticello commit it could the >> the MCZ that is going to be stored in the local package cache. >> >> If I had such crashes, a Windows reboot did solve it. Thus, I suspect from >> broken file handles or caches or whatever. >> >> It is quite annoying because it is not reproducible. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/VM-crash-with-unhelpful-debug-log-tp4897850p4897856.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/62757ab0/attachment.htm From karlramberg at gmail.com Fri May 27 15:48:28 2016 From: karlramberg at gmail.com (karl ramberg) Date: Fri May 27 15:48:31 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: <1464360690096-4897866.post@n4.nabble.com> References: <1464090327158-4897035.post@n4.nabble.com> <1464268561035-4897537.post@n4.nabble.com> <1464360690096-4897866.post@n4.nabble.com> Message-ID: Both images were quite old and with several projects open. The hack I did brought the past the update process Best, Karl On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel wrote: > Karl Ramberg wrote > > My images usually have several projects. Could that be part of the > > problem? > > > > Best, > > Karl > > > > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel < > > > Marcel.Taeumel@ > > > > > > wrote: > > > >> Karl Ramberg wrote > >> > I updated another image and ran into the same problem: > >> > > >> > Best, > >> > Karl > >> > > >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < > >> > >> > karlramberg@ > >> > >> > > wrote: > >> > > >> >> I changed the method as described and updated the image... No saved > >> copy > >> >> or call stack saved > >> >> > >> >> Best, > >> >> Karl > >> >> > >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < > >> > >> > Marcel.Taeumel@ > >> > >> > > > >> >> wrote: > >> >> > >> >>> Hi Karl, > >> >>> > >> >>> can you share the problematic image? > >> >>> > >> >>> Best, > >> >>> Marcel > >> >>> > >> >>> > >> >>> > >> >>> -- > >> >>> View this message in context: > >> >>> > >> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html > >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> >>> > >> >>> > >> >> > >> > > >> > > >> > > >> > > >> > SqueakDebug.log (16K) > >> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> > >> > >> Hi Karl, > >> > >> I just updated an older image from #15844 to #15987 with many tools open > >> and > >> I did not run into your problem. It seems strange that your image has a > >> world without a canvas. Even if so, there are measures to take care of > it > >> just 2-3 lines above your fix. > >> > >> :-/ > >> > >> Best, > >> Marcel > >> > >> > >> > >> -- > >> View this message in context: > >> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > >> > > Hi Karl, > > maybe. If you had multiple projects open when I made the project > refactorings, some existing world may have gotten into an invalid state. > However, the bug should have occured ealier? Which version did you try to > update from? > > Best, > Marcel > > > > > -- > View this message in context: > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/b24514a6/attachment.htm From Marcel.Taeumel at hpi.de Fri May 27 15:22:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Fri May 27 15:59:34 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: References: <1464090327158-4897035.post@n4.nabble.com> <1464268561035-4897537.post@n4.nabble.com> <1464360690096-4897866.post@n4.nabble.com> Message-ID: <1464362545334-4897881.post@n4.nabble.com> Karl Ramberg wrote > Both images were quite old and with several projects open. > > The hack I did brought the past the update process > > Best, > Karl > > On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel < > Marcel.Taeumel@ > > > wrote: > >> Karl Ramberg wrote >> > My images usually have several projects. Could that be part of the >> > problem? >> > >> > Best, >> > Karl >> > >> > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel < >> >> > Marcel.Taeumel@ >> >> > > >> > wrote: >> > >> >> Karl Ramberg wrote >> >> > I updated another image and ran into the same problem: >> >> > >> >> > Best, >> >> > Karl >> >> > >> >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < >> >> >> >> > karlramberg@ >> >> >> >> > > wrote: >> >> > >> >> >> I changed the method as described and updated the image... No saved >> >> copy >> >> >> or call stack saved >> >> >> >> >> >> Best, >> >> >> Karl >> >> >> >> >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < >> >> >> >> > Marcel.Taeumel@ >> >> >> >> > > >> >> >> wrote: >> >> >> >> >> >>> Hi Karl, >> >> >>> >> >> >>> can you share the problematic image? >> >> >>> >> >> >>> Best, >> >> >>> Marcel >> >> >>> >> >> >>> >> >> >>> >> >> >>> -- >> >> >>> View this message in context: >> >> >>> >> >> >> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html >> >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >>> >> >> >>> >> >> >> >> >> > >> >> > >> >> > >> >> > >> >> > SqueakDebug.log (16K) >> >> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> >> >> >> >> Hi Karl, >> >> >> >> I just updated an older image from #15844 to #15987 with many tools >> open >> >> and >> >> I did not run into your problem. It seems strange that your image has >> a >> >> world without a canvas. Even if so, there are measures to take care of >> it >> >> just 2-3 lines above your fix. >> >> >> >> :-/ >> >> >> >> Best, >> >> Marcel >> >> >> >> >> >> >> >> -- >> >> View this message in context: >> >> >> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html >> >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> >> >> >> >> Hi Karl, >> >> maybe. If you had multiple projects open when I made the project >> refactorings, some existing world may have gotten into an invalid state. >> However, the bug should have occured ealier? Which version did you try to >> update from? >> >> Best, >> Marcel >> >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> >> Hi Karl, can you revert the hack now? Best, Marcel -- View this message in context: http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897881.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Fri May 27 16:10:08 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri May 27 16:10:20 2016 Subject: [squeak-dev] VM crash with unhelpful debug log In-Reply-To: References: Message-ID: <7C6513E5-5F2F-4086-B2F3-9F2D4022C081@gmx.de> Hi Karl, On 27.05.2016, at 16:53, karl ramberg wrote: > I have a updated image that crash if I try to save from Monticello. Not sure why... > > Saving otherwise from the image is fine > > Crash log is very terse and does not show what goes wrong Is it reproducible? if so, could you comment out the primitive in primMakeUUID in UUID and see whether the crash goes away? Best regards -Tobias From Das.Linux at gmx.de Fri May 27 17:00:28 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri May 27 17:00:41 2016 Subject: [squeak-dev] VM crash with unhelpful debug log In-Reply-To: <7C6513E5-5F2F-4086-B2F3-9F2D4022C081@gmx.de> References: <7C6513E5-5F2F-4086-B2F3-9F2D4022C081@gmx.de> Message-ID: <528BF6C0-A60B-4FA4-A596-175899FBC810@gmx.de> On 27.05.2016, at 18:10, Tobias Pape wrote: > Hi Karl, > > On 27.05.2016, at 16:53, karl ramberg wrote: > >> I have a updated image that crash if I try to save from Monticello. Not sure why... >> >> Saving otherwise from the image is fine >> >> Crash log is very terse and does not show what goes wrong > > Is it reproducible? if so, could you comment out the primitive in primMakeUUID in UUID and > see whether the crash goes away? Nevermind, my mail was slow? From squeaklist at gmail.com Fri May 27 17:42:10 2016 From: squeaklist at gmail.com (Kjell Godo) Date: Fri May 27 17:42:13 2016 Subject: [squeak-dev] The Object>>recurse: Method Message-ID: Object>>recurse: aZeroInputValuable"ThatReturnsATwoInputValuable" ^( aZeroInputValuable value ) value:( self )value:[ :anObject | anObject recurse: aZeroInputValuable ] "Object>>recurse: does for recursion what >>do: does for iteration it enables any Object O to do recursion Without writing a new recursive method in the Class of O It does this even if the BlockClosures in this version of Smalltalk being used Can only do tail recursion accurately Like in Dolphin Smalltalk 6 You call it like ( anObject recurse:[[ :anobject :recurse | ( anobject someChildren collect:[ :child | ( something something ). ( ( recurse value:( child something ) ) something ) ] ) asSomeObjectSomething ]] ) ok So i haven't actually tried it yet so i do not actually know if it actually works so it's too hot off the presses for that because I'm more into a math major than physics i guess i always like math way better and so i have a tendency to say that has already been shown but i can't see how it can fail So i am putting it out there right now without testing it first each recursion creates a new twoInputValuable and the >>recurse: method keeps getting called from inside of itself so i think it works but i guess you have to try it to find out if you can figure an easier way or why it can't work then please show it i have been trying to do this for a long time and it shocks me that it's so small must be something wrong in there so if you easily find a better way or that it's no way at all then i missed it and I'm too early and I'm semi mal informed ie stupeid and I'm a baaad scientrist cepting I'm not one et all not quite easily done Kjell E Godo" -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/798609ea/attachment.htm From gettimothy at zoho.com Fri May 27 18:13:02 2016 From: gettimothy at zoho.com (gettimothy) Date: Fri May 27 18:13:10 2016 Subject: [squeak-dev] Re: FYI Squeak5.0 latest update: #15987 In-Reply-To: <1464358332770-4897849.post@n4.nabble.com> References: <154f2a42638.105d1cdba2806.4239698955046131711@zoho.com> <1464358332770-4897849.post@n4.nabble.com> Message-ID: <154f36b65f6.106b2f4074900.1971821193933797059@zoho.com> Hi Timothy, which time stamp does SimpleHierarchicalListMorph >> drawLinesOn: have in your image? It seems rather old to me. The current version is mt 4/22/2016 10:52 : Bingo. I installed the BabyIDE and that set it back to TRee 3/25/2008 I will revert now. thanks! ---- On Fri, 27 May 2016 10:12:12 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- SimpleHierarchicalListMorph >> drawLinesOn: aCanvas | lColor | lColor := self lineColor. aCanvas transformBy: scroller transform clippingTo: scroller innerBounds during:[:clippedCanvas | scroller submorphsDo: [ :submorph | (submorph visible and: [(submorph isExpanded or: [clippedCanvas isVisible: submorph fullBounds] ) or: [ submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling fullBounds]]]) ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor indentThreshold: 0] ] ] smoothing: scroller smoothing. Best, Marcel -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/51c034f9/attachment.htm From asqueaker at gmail.com Fri May 27 18:36:00 2016 From: asqueaker at gmail.com (Chris Muller) Date: Fri May 27 18:36:43 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <1464356401742-4897830.post@n4.nabble.com> References: <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> <1463816433367-4896486.post@n4.nabble.com> <1464356401742-4897830.post@n4.nabble.com> Message-ID: Hi Marcel, global keyboard shortcuts are important, a 1-microsecond slowdown per event does not sound significant. But, yes, for performance critical code like event handling, its probably worth adding an instvar than a dictionary lookup. I don't know under what case an event-type would ever change. Events are events generated by the input devices. They should basically be created and then immutable... On Fri, May 27, 2016 at 8:40 AM, marcel.taeumel wrote: > marcel.taeumel wrote >> Hi, there. >> >> Here is a new version of event filters with support for separating >> capturing filters from bubbling filters. >> https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture >> https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-bubbling >> >> Here is the change set: >> event-filters.cs >> >> Note that you should either use a fresh trunk image with the latest >> updates OR unload all the changes from my previous change set because I >> cleaned up this one. So, there will be some "method removed" calls >> missing. >> >> Anyway, with support for capturing filters, you can also filter, for >> example, mouse events for system windows that are always active (see >> preference "Windows Active Only On Top" disabled). >> >> wnd := ActiveWorld submorphs fourth. >> mouseFilter := PluggableEventFilter on: [:evt :target | evt ignore]. >> wnd addMouseCaptureFilter: mouseFilter. >> wnd removeMouseCaptureFilter: mouseFilter. >> >> See how the behavior is different when you use the filter for the bubbling >> phase: >> >> wnd addMouseBubbleFilter: mouseFilter. >> wnd removeMouseBubbleFilter: mouseFilter. >> >> Note that event bubbling is implemented in MorphicEventDispatcher. If >> there would be no bubbling, those filters would be meaningless. However, I >> am not aware of an alternative event dispatcher for Squeak's Morphic. >> >> What other dispatch patterns are out there? :-) >> >> Best, >> Marcel > > Hi, there. > > I benched the event filters mechanism without having any active filters to > reveal the impact of my changes. Here is the benchmark: > > 0) Close all windows. > > 1) Open a system browser and position it in the upper-left corner right > below the world main docking bar. > > 2) Open a workspace, not covering the system browser. > > 3) Execute some code: > > event := MouseButtonEvent new > setType: #mouseDown > position: 100@100 > which: 2r000 "no change" > buttons: 2r100 "red/left pressed" > hand: ActiveHand > stamp: 0. "not needed" > > [ > event resetHandlerFields. > event hand sendMouseEvent: event. > ] bench. > > On my Windows 10 machine (MS Surface Pro 3, Core i7 mobile) with Cog/Spur > #3663 and Squeak #15987 I got: > > Before: 3.73 microseconds per run > After: 4.5 microseconds per run > > This tests a mouse-down event because it involves full dispatching (resp. > capturing) and handling (resp. bubbling) without taking the shortcut via > mouse focus (or keyboard focus). > > This benchmark combined with MessageTally class >> #spyOn: provided > interesting insights about expensive calls. > > About 5.9 percent are spend for sending generic and mouse bubble filters. > Note that 4.1 percent are spend for accessing the Morph's properties to find > out that there are no filters at the moment. This could be optimized by > adding instance variables to MorphExtension. > > (Interestingly, about 11 percent (before: 12.7 percent) are spent in Morph >>> #handleMouseDown: to call HandMorph >> #removePendingBalloonFor:.) > > (On a side note, the current way to provide global keyboard shortcuts eats > up 47.1 percent (before: 48.4 precent) for this mouse down handling because > of installing/removing event listeners in PasteUpMorph >> > #becomeActiveDuring:. But this will be optimized on a few days.) > > The following questions remain: > - Can I put this in trunk and use it to improve the implementation of global > keyboard shortcuts? > - Should I add instance variables in MorphExtension to speed-up the look-up? > Note that I already did add instance variables to HandMorph to speed-up the > look-up of global event capturing filters. > - Is it conceptually good to re-evaluate the filters if one of them changes > the kind of an event? This affects only mouse event filters and keyboard > event filters that convert between mouse and keyboard. Note that an endless > loop is possible if such filters do not converge. > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4897830.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Yoshiki.Ohshima at acm.org Fri May 27 18:50:07 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Fri May 27 18:50:11 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: <20160526000944.GA63335@shell.msen.com> References: <134A2A71-3AEE-4FCF-A7E4-120AA0565F99@rowledge.org> <20160516022713.GA45004@shell.msen.com> <20160523000344.GA88439@shell.msen.com> <20160525032034.GB84033@shell.msen.com> <20160526000944.GA63335@shell.msen.com> Message-ID: I see r3732, which has the working recordPendingKeys(). Once ImmX11Plugin is automatically added to plugins.ext, I think the VM change is all set. Thank you! On Wed, May 25, 2016 at 5:09 PM, David T. Lewis wrote: > On Wed, May 25, 2016 at 03:42:45PM -0700, Yoshiki Ohshima wrote: >> >> On Wed, May 25, 2016 at 12:13 PM, Yoshiki Ohshima >> wrote: >> > On Wed, May 25, 2016 at 9:51 AM, Yoshiki Ohshima >> > wrote: >> >> I'd rather avoid touching existing files. But once I figure out how >> >> to pass --prefix for configure under the cmake regime, I am happy to >> >> go forward from there. (No, Dave, you are moving very fast and prompt! >> >> Thank you!) >> >> >> >> But then I'll try the oscog branch and makes a cleaner now. >> > >> > I've been assuming that the "oscog" branch is "svn/branches/Cog", and >> > I can confirm that the -compositioninput flag provided to the main VM >> > binary is passed to the X11 driver, and other things seem to work. >> > (The recordPendingKeys() in r3730 is not updated and ImmX11Plugin has >> > not been added to plugins.ext so the actual Japanese input still does >> > not work, but it seems close.) >> >> In any case, I just copy and pasted the implementation of >> recordPendingKeys() from trunk to the Cog branch and it works as >> expected in an UTF8 environment. > > Excellent, thank you for confirming. > > Yes when I said "oscog branch" I should have said "svn/branches/Cog", sorry. > > I just committed the update to SVN branches/Cog so that all of the Cog, > Spur, and interpreter VMs will have the new recordPendingKeys() function, > and command line parameters will be passed correctly to the X11 display > module. > > Dave > > -- -- Yoshiki From Das.Linux at gmx.de Fri May 27 19:40:27 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri May 27 19:40:48 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: References: <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> <1463816433367-4896486.post@n4.nabble.com> <1464356401742-4897830.post@n4.nabble.com> Message-ID: <80895F3B-CD78-44C5-83B2-D0823E8575E0@gmx.de> On 27.05.2016, at 20:36, Chris Muller wrote: > Hi Marcel, global keyboard shortcuts are important, a 1-microsecond > slowdown per event does not sound significant. But, yes, for > performance critical code like event handling, its probably worth > adding an instvar than a dictionary lookup. > > I don't know under what case an event-type would ever change. Events > are events generated by the input devices. They should basically be > created and then immutable... > Unless you want a filter that turns a mouse click into a keypress, like for automation? Best -Tobias > On Fri, May 27, 2016 at 8:40 AM, marcel.taeumel wrote: >> marcel.taeumel wrote >>> Hi, there. >>> >>> Here is a new version of event filters with support for separating >>> capturing filters from bubbling filters. >>> https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-capture >>> https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-flow-bubbling >>> >>> Here is the change set: >>> event-filters.cs >>> >>> Note that you should either use a fresh trunk image with the latest >>> updates OR unload all the changes from my previous change set because I >>> cleaned up this one. So, there will be some "method removed" calls >>> missing. >>> >>> Anyway, with support for capturing filters, you can also filter, for >>> example, mouse events for system windows that are always active (see >>> preference "Windows Active Only On Top" disabled). >>> >>> wnd := ActiveWorld submorphs fourth. >>> mouseFilter := PluggableEventFilter on: [:evt :target | evt ignore]. >>> wnd addMouseCaptureFilter: mouseFilter. >>> wnd removeMouseCaptureFilter: mouseFilter. >>> >>> See how the behavior is different when you use the filter for the bubbling >>> phase: >>> >>> wnd addMouseBubbleFilter: mouseFilter. >>> wnd removeMouseBubbleFilter: mouseFilter. >>> >>> Note that event bubbling is implemented in MorphicEventDispatcher. If >>> there would be no bubbling, those filters would be meaningless. However, I >>> am not aware of an alternative event dispatcher for Squeak's Morphic. >>> >>> What other dispatch patterns are out there? :-) >>> >>> Best, >>> Marcel >> >> Hi, there. >> >> I benched the event filters mechanism without having any active filters to >> reveal the impact of my changes. Here is the benchmark: >> >> 0) Close all windows. >> >> 1) Open a system browser and position it in the upper-left corner right >> below the world main docking bar. >> >> 2) Open a workspace, not covering the system browser. >> >> 3) Execute some code: >> >> event := MouseButtonEvent new >> setType: #mouseDown >> position: 100@100 >> which: 2r000 "no change" >> buttons: 2r100 "red/left pressed" >> hand: ActiveHand >> stamp: 0. "not needed" >> >> [ >> event resetHandlerFields. >> event hand sendMouseEvent: event. >> ] bench. >> >> On my Windows 10 machine (MS Surface Pro 3, Core i7 mobile) with Cog/Spur >> #3663 and Squeak #15987 I got: >> >> Before: 3.73 microseconds per run >> After: 4.5 microseconds per run >> >> This tests a mouse-down event because it involves full dispatching (resp. >> capturing) and handling (resp. bubbling) without taking the shortcut via >> mouse focus (or keyboard focus). >> >> This benchmark combined with MessageTally class >> #spyOn: provided >> interesting insights about expensive calls. >> >> About 5.9 percent are spend for sending generic and mouse bubble filters. >> Note that 4.1 percent are spend for accessing the Morph's properties to find >> out that there are no filters at the moment. This could be optimized by >> adding instance variables to MorphExtension. >> >> (Interestingly, about 11 percent (before: 12.7 percent) are spent in Morph >>>> #handleMouseDown: to call HandMorph >> #removePendingBalloonFor:.) >> >> (On a side note, the current way to provide global keyboard shortcuts eats >> up 47.1 percent (before: 48.4 precent) for this mouse down handling because >> of installing/removing event listeners in PasteUpMorph >> >> #becomeActiveDuring:. But this will be optimized on a few days.) >> >> The following questions remain: >> - Can I put this in trunk and use it to improve the implementation of global >> keyboard shortcuts? >> - Should I add instance variables in MorphExtension to speed-up the look-up? >> Note that I already did add instance variables to HandMorph to speed-up the >> look-up of global event capturing filters. >> - Is it conceptually good to re-evaluate the filters if one of them changes >> the kind of an event? This affects only mouse event filters and keyboard >> event filters that convert between mouse and keyboard. Note that an endless >> loop is possible if such filters do not converge. >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4897830.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. From frank.shearar at gmail.com Fri May 27 20:55:09 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Fri May 27 20:55:11 2016 Subject: [squeak-dev] The Object>>recurse: Method In-Reply-To: References: Message-ID: On 27 May 2016 at 10:42, Kjell Godo wrote: > Object>>recurse: aZeroInputValuable"ThatReturnsATwoInputValuable" > > ^( aZeroInputValuable value > ) value:( self )value:[ :anObject | anObject recurse: aZeroInputValuable ] > > "Object>>recurse: > > does for recursion what >>do: does for iteration > > it enables any Object O to do recursion > Without writing a new recursive method in the Class of O > Yep. Unless my eyes deceive me, that's the Y combinator. You can see a more classically academic implementation at https://rosettacode.org/wiki/Y_combinator#Smalltalk frank -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160527/c858a8bc/attachment.htm From ma.chris.m at gmail.com Fri May 27 21:42:04 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri May 27 21:42:46 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: <80895F3B-CD78-44C5-83B2-D0823E8575E0@gmx.de> References: <1463517162184-4895523.post@n4.nabble.com> <7A219123-D0E0-470F-A471-B6C9BD0EF9D8@rowledge.org> <1463588721564-4895797.post@n4.nabble.com> <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> <1463816433367-4896486.post@n4.nabble.com> <1464356401742-4897830.post@n4.nabble.com> <80895F3B-CD78-44C5-83B2-D0823E8575E0@gmx.de> Message-ID: On Fri, May 27, 2016 at 2:40 PM, Tobias Pape wrote: > > On 27.05.2016, at 20:36, Chris Muller wrote: > >> Hi Marcel, global keyboard shortcuts are important, a 1-microsecond >> slowdown per event does not sound significant. But, yes, for >> performance critical code like event handling, its probably worth >> adding an instvar than a dictionary lookup. >> >> I don't know under what case an event-type would ever change. Events >> are events generated by the input devices. They should basically be >> created and then immutable... >> > > Unless you want a filter that turns a mouse click into a keypress, like for automation? Instead of converting an event, shouldn't the automater-thingy just push a new event? The responsibility of Events is to interface the UI hardware (keyboard, mouse, etc.) to some UI framework (MVC, Morphic). They represent the low-level, immutable "data" from the hardware, interpreted by the UI framework. IMHO, this "signal" between VM and Morphic should remain a thin, clean, simple and raw encapsulation of the data (i.e., getters and setters). I don't think application-specific behaviors belong way down there.. You mentioned, automation? From commits at source.squeak.org Fri May 27 21:58:11 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri May 27 21:58:13 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160527215811.30115.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068152.html Name: Monticello-kfr.633 Ancestors: Monticello-mt.632 When a class only has instance variable changes MCMergeBrowser does not offer a menu option to access a browser ============================================= From tim at rowledge.org Fri May 27 22:22:43 2016 From: tim at rowledge.org (tim Rowledge) Date: Fri May 27 22:22:44 2016 Subject: [squeak-dev] The Object>>recurse: Method In-Reply-To: References: Message-ID: > On 27-05-2016, at 1:55 PM, Frank Shearar wrote: > You can see a more classically academic implementation at https://rosettacode.org/wiki/Y_combinator#Smalltalk Good grief. I didn?t know there are so many ugly languages that I hope never to see again... tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Fractured Idiom:- J'Y SUIS, J'Y PESTES - I can stay for the weekend From digit at sonic.net Sat May 28 15:59:22 2016 From: digit at sonic.net (Tim Johnson) Date: Sat May 28 15:59:26 2016 Subject: [squeak-dev] OSProcess tests crash the VM Message-ID: <97834833-0E6D-43F4-A1B1-34781E88DCB3@sonic.net> Hi all, I installed OSProcess into a 4.6 image via SqueakMap this morning and ran its tests. I am running OS X 10.6.8. Early into the list of tests to run, the VM crashes. What follows are the crash logs from Cocoa VM 5.7.4.1 (http://www.squeakvm.org/mac/ contains some broken links and may be quite out of date, FWIW), and Cog v3397. Here is the crash log from 5.7.4.1: Process: Squeak [803] Path: /Applications/Squeak/Squeak 5.7.4.1.app/Contents/MacOS/Squeak Identifier: Squeak Version: ??? (???) Code Type: X86 (Native) Parent Process: Squeak [790] Date/Time: 2016-05-28 08:41:56.560 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_INVALID_ADDRESS at 0x000000006c1f6f3b Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: abort() called *** multi-threaded process forked *** Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x94580c5a __kill + 10 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 2 libSystem.B.dylib 0x946135a5 raise + 26 3 libSystem.B.dylib 0x946296e4 abort + 93 4 org.squeak.Squeak 0x000a3ccc sigsegv + 44 5 ??? 0xffffffff 0 + 4294967295 Thread 0 crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x94629693 ecx: 0xbfffe23c edx: 0x94580c5a edi: 0x1ff121a0 esi: 0xbfffe670 ebp: 0xbfffe258 esp: 0xbfffe23c ss: 0x0000001f efl: 0x00000282 eip: 0x94580c5a cs: 0x00000007 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x3f23c940 +++++ Cog VM v3397: +++++ Process: Squeak [685] Path: /Applications/Squeak/Cog 3397.app/Contents/MacOS/Squeak Identifier: com.squeak.Cog Version: Squeak Cog 4.0.3397 (4.0.3397) Code Type: X86 (Native) Parent Process: launchd [339] Date/Time: 2016-05-28 08:30:21.513 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE Exception Type: EXC_BAD_ACCESS (SIGABRT) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000104 Crashed Thread: 0 Dispatch queue: com.apple.main-thread Application Specific Information: abort() called Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libSystem.B.dylib 0x94580c5a __kill + 10 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 2 libSystem.B.dylib 0x946135a5 raise + 26 3 libSystem.B.dylib 0x946296e4 abort + 93 4 com.squeak.Cog 0x00071564 sigsegv + 404 5 libSystem.B.dylib 0x9458605b _sigtramp + 43 6 ??? 0xffffffff 0 + 4294967295 7 com.squeak.Cog 0x000c97a3 scanForCleanBlocks + 83 8 com.squeak.Cog 0x000cbd03 compileCogMethod + 403 9 com.squeak.Cog 0x000cbe37 cogselector + 103 10 com.squeak.Cog 0x000f2f72 makeBaseFrameFor + 546 11 com.squeak.Cog 0x000f427d transferTofrom + 413 12 com.squeak.Cog 0x000f4706 synchronousSignal + 262 13 com.squeak.Cog 0x000f7fb1 checkForEventsMayContextSwitch + 625 14 com.squeak.Cog 0x000f82b0 ceCheckForInterrupts + 16 15 ??? 0x181106e3 0 + 403769059 16 com.squeak.Cog 0x00104976 interpret + 3174 17 com.squeak.Cog 0x0005f7a0 EventLoopEventHandler + 144 18 com.apple.HIToolbox 0x910f9c2f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 19 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 20 com.apple.HIToolbox 0x910f8d55 SendEventToEventTargetWithOptions + 58 21 com.apple.HIToolbox 0x9112da24 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 3006 22 com.apple.HIToolbox 0x910fa080 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672 23 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 24 com.apple.HIToolbox 0x9111b7f3 SendEventToEventTarget + 52 25 com.apple.HIToolbox 0x912a4c17 ToolboxEventDispatcher + 86 26 com.apple.HIToolbox 0x912a4d4f RunApplicationEventLoop + 243 27 com.squeak.Cog 0x0005efba RunApplicationEventLoopWithSqueak + 218 28 com.squeak.Cog 0x000711b2 main + 690 29 com.squeak.Cog 0x00002b56 start + 54 From eliot.miranda at gmail.com Sat May 28 18:00:42 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat May 28 18:00:47 2016 Subject: [squeak-dev] OSProcess tests crash the VM In-Reply-To: <97834833-0E6D-43F4-A1B1-34781E88DCB3@sonic.net> References: <97834833-0E6D-43F4-A1B1-34781E88DCB3@sonic.net> Message-ID: <715F49D0-9E0A-45B2-A6D2-18752F3C7C9B@gmail.com> Hi Tim, 3397 is really old. Please download more up2date VMs from mirandabanda.org, i.e. http://www.mirandabanda.org/files/Cog/VM/VM.r3732 _,,,^..^,,,_ (phone) > On May 28, 2016, at 8:59 AM, Tim Johnson wrote: > > Hi all, > > I installed OSProcess into a 4.6 image via SqueakMap this morning and ran its tests. I am running OS X 10.6.8. Early into the list of tests to run, the VM crashes. What follows are the crash logs from Cocoa VM 5.7.4.1 (http://www.squeakvm.org/mac/ contains some broken links and may be quite out of date, FWIW), and Cog v3397. > > Here is the crash log from 5.7.4.1: > > Process: Squeak [803] > Path: /Applications/Squeak/Squeak 5.7.4.1.app/Contents/MacOS/Squeak > Identifier: Squeak > Version: ??? (???) > Code Type: X86 (Native) > Parent Process: Squeak [790] > > Date/Time: 2016-05-28 08:41:56.560 -0700 > OS Version: Mac OS X 10.6.8 (10K549) > Report Version: 6 > > Exception Type: EXC_BAD_ACCESS (SIGABRT) > Exception Codes: KERN_INVALID_ADDRESS at 0x000000006c1f6f3b > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > Application Specific Information: > abort() called > *** multi-threaded process forked *** > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libSystem.B.dylib 0x94580c5a __kill + 10 > 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 > 2 libSystem.B.dylib 0x946135a5 raise + 26 > 3 libSystem.B.dylib 0x946296e4 abort + 93 > 4 org.squeak.Squeak 0x000a3ccc sigsegv + 44 > 5 ??? 0xffffffff 0 + 4294967295 > > Thread 0 crashed with X86 Thread State (32-bit): > eax: 0x00000000 ebx: 0x94629693 ecx: 0xbfffe23c edx: 0x94580c5a > edi: 0x1ff121a0 esi: 0xbfffe670 ebp: 0xbfffe258 esp: 0xbfffe23c > ss: 0x0000001f efl: 0x00000282 eip: 0x94580c5a cs: 0x00000007 > ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 > cr2: 0x3f23c940 > > > +++++ > > Cog VM v3397: > > +++++ > > Process: Squeak [685] > Path: /Applications/Squeak/Cog 3397.app/Contents/MacOS/Squeak > Identifier: com.squeak.Cog > Version: Squeak Cog 4.0.3397 (4.0.3397) > Code Type: X86 (Native) > Parent Process: launchd [339] > > Date/Time: 2016-05-28 08:30:21.513 -0700 > OS Version: Mac OS X 10.6.8 (10K549) > Report Version: 6 > > Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE > > Exception Type: EXC_BAD_ACCESS (SIGABRT) > Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000104 > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > Application Specific Information: > abort() called > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > 0 libSystem.B.dylib 0x94580c5a __kill + 10 > 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 > 2 libSystem.B.dylib 0x946135a5 raise + 26 > 3 libSystem.B.dylib 0x946296e4 abort + 93 > 4 com.squeak.Cog 0x00071564 sigsegv + 404 > 5 libSystem.B.dylib 0x9458605b _sigtramp + 43 > 6 ??? 0xffffffff 0 + 4294967295 > 7 com.squeak.Cog 0x000c97a3 scanForCleanBlocks + 83 > 8 com.squeak.Cog 0x000cbd03 compileCogMethod + 403 > 9 com.squeak.Cog 0x000cbe37 cogselector + 103 > 10 com.squeak.Cog 0x000f2f72 makeBaseFrameFor + 546 > 11 com.squeak.Cog 0x000f427d transferTofrom + 413 > 12 com.squeak.Cog 0x000f4706 synchronousSignal + 262 > 13 com.squeak.Cog 0x000f7fb1 checkForEventsMayContextSwitch + 625 > 14 com.squeak.Cog 0x000f82b0 ceCheckForInterrupts + 16 > 15 ??? 0x181106e3 0 + 403769059 > 16 com.squeak.Cog 0x00104976 interpret + 3174 > 17 com.squeak.Cog 0x0005f7a0 EventLoopEventHandler + 144 > 18 com.apple.HIToolbox 0x910f9c2f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 > 19 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 > 20 com.apple.HIToolbox 0x910f8d55 SendEventToEventTargetWithOptions + 58 > 21 com.apple.HIToolbox 0x9112da24 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 3006 > 22 com.apple.HIToolbox 0x910fa080 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672 > 23 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 > 24 com.apple.HIToolbox 0x9111b7f3 SendEventToEventTarget + 52 > 25 com.apple.HIToolbox 0x912a4c17 ToolboxEventDispatcher + 86 > 26 com.apple.HIToolbox 0x912a4d4f RunApplicationEventLoop + 243 > 27 com.squeak.Cog 0x0005efba RunApplicationEventLoopWithSqueak + 218 > 28 com.squeak.Cog 0x000711b2 main + 690 > 29 com.squeak.Cog 0x00002b56 start + 54 > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160528/29bd18b8/attachment.htm From Marcel.Taeumel at hpi.de Sun May 29 08:25:11 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 29 09:02:34 2016 Subject: [squeak-dev] Re: Event filters for user input events (i.e. mouse clicks etc.) In-Reply-To: References: <1463750380043-4896366.post@n4.nabble.com> <573F4E40.9090106@ccs.neu.edu> <1463772820184-4896440.post@n4.nabble.com> <1835F625-621D-45BC-85FF-6CC2A0F73396@rowledge.org> <1463810170875-4896472.post@n4.nabble.com> <1463816433367-4896486.post@n4.nabble.com> <1464356401742-4897830.post@n4.nabble.com> <80895F3B-CD78-44C5-83B2-D0823E8575E0@gmx.de> Message-ID: <1464510311629-4897982.post@n4.nabble.com> Chris Muller-4 wrote > On Fri, May 27, 2016 at 2:40 PM, Tobias Pape < > Das.Linux@ > > wrote: >> >> On 27.05.2016, at 20:36, Chris Muller < > asqueaker@ > > wrote: >> >>> Hi Marcel, global keyboard shortcuts are important, a 1-microsecond >>> slowdown per event does not sound significant. But, yes, for >>> performance critical code like event handling, its probably worth >>> adding an instvar than a dictionary lookup. >>> >>> I don't know under what case an event-type would ever change. Events >>> are events generated by the input devices. They should basically be >>> created and then immutable... >>> >> >> Unless you want a filter that turns a mouse click into a keypress, like >> for automation? > > Instead of converting an event, shouldn't the automater-thingy just > push a new event? > > The responsibility of Events is to interface the UI hardware > (keyboard, mouse, etc.) to some UI framework (MVC, Morphic). They > represent the low-level, immutable "data" from the hardware, > interpreted by the UI framework. IMHO, this "signal" between VM and > Morphic should remain a thin, clean, simple and raw encapsulation of > the data (i.e., getters and setters). I don't think > application-specific behaviors belong way down there.. You mentioned, > automation? If you want to convert a mouse click into a keypress for automation, you would have two options to write a global/hand capture filter: 1st option) Write a mouse filter that ignores the given click event, generates a keyboard event, and processes that keyboard event via "givenMouseEvent hand processEvent: newKeyboardEvent.". Eventually, return that original (but ignored) mouse event. 2nd option) Write a mouse filter that just generates a keyboard event and returns that. I want to ensure that both options yield the same results to mitigate programming errors. The 1st option would trigger all active filters again, and hence also keyboard filters, because event processing starts again. The 2nd option continues the current event processing and hence should also trigger global keyboard filters (again). Just make option 1 behave like option 2. @Chris: Yes, such event filters are specific to Morphic. In MVC, such filters do still not exist. The code that I added resides in Morph, HandMorph, and MorphEventDispatcher. However, we should consider moving the UserInputEvent tree out of Morphic into the base system for other frameworks to work with user input events in an object-oriented fashion. :-) One could also implement generic event filters in EventSensor >> #nextEvent but this is not what I had in mind here. Our global keyboard shortcuts are for Morphic only. Best, Marcel -- View this message in context: http://forum.world.st/Event-filters-for-user-input-events-i-e-mouse-clicks-etc-tp4895521p4897982.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun May 29 08:50:51 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 29 09:28:13 2016 Subject: [squeak-dev] #caseOf:otherwise: -> Parser is way too cautious Message-ID: <1464511851251-4897986.post@n4.nabble.com> Hi, there! I cannot write this without the parser complaining: number caseOf: { 0 -> 1. 1 -> 1. } otherwise: { ... }. Because what I should write is this: number caseOf: { [0] -> [1]. [1] -> [1]. } otherwise: { ... }. I think that this is not for the parser to decide. Numbers do understand #value. Any object does. So this is fine. Am I missing something? It reminds me of this mistake our students typically make at least once: (someBooleanExpression) and: (someOtherBooleanExpression) versus (someBooleanExpression) and: [someOtherBooleanExpression] versus [someBooleanExpression] and: (someOtherBooleanExpression) versus [someBooleanExpression] and: [someOtherBooleanExpression] Sure, we can offer tool support to help in such situations. But the parser is just too naggy. :-) Best, Marcel -- View this message in context: http://forum.world.st/caseOf-otherwise-Parser-is-way-too-cautious-tp4897986.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun May 29 08:59:18 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 29 09:36:40 2016 Subject: [squeak-dev] Re: #caseOf:otherwise: -> Parser is way too cautious In-Reply-To: <1464511851251-4897986.post@n4.nabble.com> References: <1464511851251-4897986.post@n4.nabble.com> Message-ID: <1464512358297-4897987.post@n4.nabble.com> marcel.taeumel wrote > Hi, there! > > I cannot write this without the parser complaining: > > number caseOf: { > 0 -> 1. > 1 -> 1. > } otherwise: { ... }. > > Because what I should write is this: > > number caseOf: { > [0] -> [1]. > [1] -> [1]. > } otherwise: { ... }. > > I think that this is not for the parser to decide. Numbers do understand > #value. Any object does. So this is fine. Am I missing something? > > It reminds me of this mistake our students typically make at least once: > > (someBooleanExpression) and: (someOtherBooleanExpression) > versus > (someBooleanExpression) and: [someOtherBooleanExpression] > versus > [someBooleanExpression] and: (someOtherBooleanExpression) > versus > [someBooleanExpression] and: [someOtherBooleanExpression] > > Sure, we can offer tool support to help in such situations. But the parser > is just too naggy. :-) > > Best, > Marcel Okay, this was stoopid. ;o) I assumed an implicit comparison: number caseOf: { [number = 0] -> [1]. [number = 1] -> [1]. } otherwise: { ... }. Still, no need to force the result also into a block? Why not just modify the implementation of #caseOf:otherwise: to make such comparisons if there is no block given? Goal: Avoid nested iftrue-iffalse calls. Is there something more Smalltalk-ish? Or functional? Is there some pattern matching hidden somewhere? Best, Marcel -- View this message in context: http://forum.world.st/caseOf-otherwise-Parser-is-way-too-cautious-tp4897986p4897987.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun May 29 09:04:58 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 29 09:42:20 2016 Subject: [squeak-dev] Re: The Object>>recurse: Method In-Reply-To: References: Message-ID: <1464512698465-4897988.post@n4.nabble.com> Kjell Godo wrote > Object>>recurse: aZeroInputValuable"ThatReturnsATwoInputValuable" > > ^( aZeroInputValuable value > ) value:( self )value:[ :anObject | anObject recurse: aZeroInputValuable > ] > > "Object>>recurse: > > does for recursion what >>do: does for iteration > > it enables any Object O to do recursion > Without writing a new recursive method in the Class of O > > It does this even if the > BlockClosures in this version of Smalltalk being used > Can only do tail recursion accurately > Like in Dolphin Smalltalk 6 > > You call it like > > ( anObject recurse:[[ :anobject :recurse | > ( anobject someChildren collect:[ :child | > ( something something ). > ( ( recurse value:( child something ) ) something ) > ] > ) asSomeObjectSomething > ]] ) > > ok > So i haven't actually tried it yet > so i do not actually know if it actually works > so it's too hot off the presses for that > because I'm more into a math major than physics > i guess i always like math way better > and so i have a tendency to say that has already been shown > but i can't see how it can fail > So i am putting it out there right now without testing it first > each recursion creates a new twoInputValuable > and the >>recurse: method keeps getting called > from inside of itself > > so i think it works > > but i guess you have to try it to find out > > if you can figure an easier way > or why it can't work > then please show it > > i have been trying to do this for a long time > and it shocks me that it's so small must be something wrong in there > so if you easily find a better way > or that it's no way at all > then i missed it and I'm too early > and I'm semi mal informed > ie stupeid > and I'm a baaad scientrist cepting I'm not one > et all > not quite easily done > > Kjell E Godo" Hi Kjell, I suppose that this code is a suggestion for Trunk? If you did not try it out, where does it come from? Dolphin Smalltalk 6? It does look like a valuable addition to me. Although, I read it like re-curse and thought of Monkey Island and LeChuck. :-D Are there other words for this? #combine: #doRecursive: Anyway, it seems to work for Fibonacci: 6 recurse: [[:number :step | number caseOf: { [0] -> [1]. [1] -> [1]. } otherwise: [ (step value: number - 2) + (step value: number - 1)]]]. Best, Marcel -- View this message in context: http://forum.world.st/The-Object-recurse-Method-tp4897901p4897988.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Marcel.Taeumel at hpi.de Sun May 29 09:58:42 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Sun May 29 10:36:04 2016 Subject: [squeak-dev] Re: Add the "do" menu to world main docking bar In-Reply-To: <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> References: <1463210319295-4894792.post@n4.nabble.com> <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> Message-ID: <1464515922183-4897989.post@n4.nabble.com> Eliot Miranda-2 wrote >> On May 14, 2016, at 12:18 AM, marcel.taeumel < > Marcel.Taeumel@ > > wrote: >> >> Hi, there. >> >> We have a convenient mini-script-shortcut feature: the "do..." menu, >> accessible via the world menu. Very easy to modify. >> >> What about adding it to the docking bar? >> >> Here is a change set that does that: do-menu.cs >> <http://forum.world.st/file/n4894792/do-menu.cs> >> >> You need to rebuild the menus after that. ("Extras" -> "Rebuild menus"). > > +1. If we accept this, Marcel, would it be possible to add a drag and > drop action to drag a text selection into the do menu to add to it? Or do > you think that "edit this menu" is good enough? > >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> Hey Eliot, instead of Drag&Drop, which is challenging to impement at the moment, what about a simple "add from clipboard" entry? Best, Marcel -- View this message in context: http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792p4897989.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From eliot.miranda at gmail.com Sun May 29 13:54:26 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun May 29 13:54:32 2016 Subject: [squeak-dev] Re: Add the "do" menu to world main docking bar In-Reply-To: <1464515922183-4897989.post@n4.nabble.com> References: <1463210319295-4894792.post@n4.nabble.com> <08C97B64-DDDD-4421-8AAB-696F5CB7B8AE@gmail.com> <1464515922183-4897989.post@n4.nabble.com> Message-ID: <5F97C0E0-1A6F-4A01-A237-97389D334BF2@gmail.com> Hi Marcel, > On May 29, 2016, at 2:58 AM, marcel.taeumel wrote: > > Eliot Miranda-2 wrote >>> On May 14, 2016, at 12:18 AM, marcel.taeumel < > >> Marcel.Taeumel@ > >> > wrote: >>> >>> Hi, there. >>> >>> We have a convenient mini-script-shortcut feature: the "do..." menu, >>> accessible via the world menu. Very easy to modify. >>> >>> What about adding it to the docking bar? >>> >>> Here is a change set that does that: do-menu.cs >>> <http://forum.world.st/file/n4894792/do-menu.cs> >>> >>> You need to rebuild the menus after that. ("Extras" -> "Rebuild menus"). >> >> +1. If we accept this, Marcel, would it be possible to add a drag and >> drop action to drag a text selection into the do menu to add to it? Or do >> you think that "edit this menu" is good enough? Keep the "edit this menu"; it's fine until we can do dragndrop. But "do" on the menu bar is IMO a must have :-) >> >>> >>> Best, >>> Marcel >>> >>> >>> >>> -- >>> View this message in context: >>> http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792.html >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > > Hey Eliot, > > instead of Drag&Drop, which is challenging to impement at the moment, what > about a simple "add from clipboard" entry? > > > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Add-the-do-menu-to-world-main-docking-bar-tp4894792p4897989.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From gettimothy at zoho.com Sun May 29 19:06:23 2016 From: gettimothy at zoho.com (gettimothy) Date: Sun May 29 19:06:29 2016 Subject: [squeak-dev] Morphic layout issues Linux 64x64 squeak.cog.spur Message-ID: <154fde8f635.104e865c734065.8387469061818795486@zoho.com> I posted a pic here: https://timmydosmalltalk.wordpress.com/2016/05/29/linux-64x64-squeak-cog-spur-display-problems/squeak64x64debuggerproblem/ Debugger and inspectors do not show some morphic panes correctly. I don't know how to begin to track this down. I will be happy to try if somebody will tell me where to start. cheers. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160529/c3e7d7c3/attachment.htm From Marcel.Taeumel at hpi.de Mon May 30 06:56:44 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Mon May 30 07:34:13 2016 Subject: [squeak-dev] Re: Morphic layout issues Linux 64x64 squeak.cog.spur In-Reply-To: <154fde8f635.104e865c734065.8387469061818795486@zoho.com> References: <154fde8f635.104e865c734065.8387469061818795486@zoho.com> Message-ID: <1464591404350-4898041.post@n4.nabble.com> Hi Timothy, is this a plain and updated Squeak Trunk image? Did you load additional code? I suspect that some external projects overwrote current, important methods. If this is not a rounding issue with some floats, I don't think this is a 64-bit issue. Best, Marcel -- View this message in context: http://forum.world.st/Morphic-layout-issues-Linux-64x64-squeak-cog-spur-tp4898020p4898041.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From bert at freudenbergs.de Mon May 30 10:53:29 2016 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon May 30 10:53:35 2016 Subject: [squeak-dev] Re: #caseOf:otherwise: -> Parser is way too cautious In-Reply-To: <1464512358297-4897987.post@n4.nabble.com> References: <1464511851251-4897986.post@n4.nabble.com> <1464512358297-4897987.post@n4.nabble.com> Message-ID: <92547DF2-C045-4059-BD6F-DD02A7DE7BB4@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4207 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160530/688c9e40/smime-0001.bin From gettimothy at zoho.com Mon May 30 11:07:38 2016 From: gettimothy at zoho.com (gettimothy) Date: Mon May 30 11:07:45 2016 Subject: [squeak-dev] Re: Morphic layout issues Linux 64x64 squeak.cog.spur In-Reply-To: <1464591404350-4898041.post@n4.nabble.com> References: <154fde8f635.104e865c734065.8387469061818795486@zoho.com> <1464591404350-4898041.post@n4.nabble.com> Message-ID: <155015902c1.bc02b6bd47319.7434501424169159942@zoho.com> Hi Marcel I downloaded a clean 15711 trunk image and changes from here: http://www.mirandabanda.org/files/Cog/SpurImages/ Prior to update, there is no problem. After update squeak, the problem appears. You can see the difference here: https://timmydosmalltalk.files.wordpress.com/2016/05/squeak64x64debuggerproblem1.png The good debugger and update info is on the right (I left them open during the update) After update, I show the bad debugger and update info on the left. Let me know what I can do to help. cheers. tty ---- On Mon, 30 May 2016 02:56:44 -0400 marcel.taeumel <Marcel.Taeumel@hpi.de> wrote ---- Hi Timothy, is this a plain and updated Squeak Trunk image? Did you load additional code? I suspect that some external projects overwrote current, important methods. If this is not a rounding issue with some floats, I don't think this is a 64-bit issue. Best, Marcel -- View this message in context: http://forum.world.st/Morphic-layout-issues-Linux-64x64-squeak-cog-spur-tp4898020p4898041.html Sent from the Squeak - Dev mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160530/519b4138/attachment.htm From lewis at mail.msen.com Mon May 30 22:03:24 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Mon May 30 22:03:26 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? Message-ID: <20160530220324.GA27465@shell.msen.com> We did this change recently: Name: Files-ul.154 Time: 15 May 2016, 11:17:08.015805 pm - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections This assumes that we can convert a ByteString to a ByteArray using Behavior>>adoptInstance. If the conversion does not work, as it the case with a V3 image and Cog or interpreter VM, then we end up with a corrupt image after trying to save the image as new version (and maybe other cases as well). It does not seem that #ascii and #binary are called frequently, even when doing Monticello updates, so I suspect that the optimization is not very important. Do we need the #ascii and #binary optimizations in Files-ul.154? Dave From leves at caesar.elte.hu Mon May 30 22:35:12 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Mon May 30 22:35:17 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: <20160530220324.GA27465@shell.msen.com> References: <20160530220324.GA27465@shell.msen.com> Message-ID: Hi Dave, It's an optimization, so it's not mandatory. Of course it's nice to have, and #adoptInstance: should work (as it does in Spur). So the question is: why doesn't it work? The answer is that in V3 ByteString is compact, but ByteArray is not. Since the compact classes array has plenty of space, I suggest ByteArray should be compact as well. If you evaluate [ByteArray becomeCompact] in a V3 image, then you'll find that the change will work in those images, too. I've mentioned it earlier that Spur made some optimizations possible, that are not V3 compatible. Another widely used example is using #== for Character comparison. These will of course not work in V3 images, and detecting the problems due to these changes is extremely hard. Levente On Mon, 30 May 2016, David T. Lewis wrote: > We did this change recently: > > Name: Files-ul.154 > Time: 15 May 2016, 11:17:08.015805 pm > > - use #adoptInstance: to convert between binary and ascii mode instead of creating new collections > > This assumes that we can convert a ByteString to a ByteArray using > Behavior>>adoptInstance. If the conversion does not work, as it the case > with a V3 image and Cog or interpreter VM, then we end up with a corrupt > image after trying to save the image as new version (and maybe other cases > as well). > > It does not seem that #ascii and #binary are called frequently, even when > doing Monticello updates, so I suspect that the optimization is not very > important. > > Do we need the #ascii and #binary optimizations in Files-ul.154? > > Dave > > From commits at source.squeak.org Mon May 30 23:55:10 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 30 23:55:12 2016 Subject: [squeak-dev] The Trunk: Morphic-ul.1151.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.1151.mcz ==================== Summary ==================== Name: Morphic-ul.1151 Author: ul Time: 31 May 2016, 1:05:09.648151 am UUID: 88bc6d22-477b-477f-8aa9-b324ff0dbcd0 Ancestors: Morphic-mt.1150 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #1. =============== Diff against Morphic-mt.1150 =============== Item was changed: Heap subclass: #MorphicAlarmQueue + instanceVariableNames: 'mutex sequenceNumber heap' - instanceVariableNames: 'mutex sequenceNumber' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! !MorphicAlarmQueue commentStamp: 'jcg 1/9/2010 13:34' prior: 0! MorphicAlarmQueue is a specialized Heap. The main change is to stamp each added MorphicAlarm with a sequence number to ensure that alarms scheduled for the same time are executed in the order that they were added.! Item was changed: ----- Method: MorphicAlarmQueue>>add: (in category 'adding') ----- add: aMorphicAlarm + + heap ifNotNil: [ + aMorphicAlarm sequenceNumber: self nextSequenceNumber. + ^heap add: aMorphicAlarm ]. (sequenceNumber := sequenceNumber + 1) = 16r3FFFFFFF ifTrue: [ "Sequence number overflow... reassign sequence numbers starting at 0." | alarmList | alarmList := self asArray sort: [:msg1 :msg2 | msg1 sequenceNumber < msg2 sequenceNumber ]. alarmList withIndexDo: [:msg :ind | msg sequenceNumber: ind-1]. "The #bitAnd: for the unlikely event that we have > 16r3FFFFFF messages in the queue." sequenceNumber := alarmList last sequenceNumber + 1 bitAnd: 16r3FFFFFFF. ]. aMorphicAlarm sequenceNumber: sequenceNumber. super add: aMorphicAlarm. "If we doubt our sanity..." false ifTrue: [ self isValidHeap ifFalse: [self error: 'not a valid heap!!!!!!']. ]. ^aMorphicAlarm! Item was added: + ----- Method: MorphicAlarmQueue>>detect:ifNone: (in category 'migration') ----- + detect: aBlock ifNone: noneBlock + + heap ifNil: [ ^super detect: aBlock ifNone: noneBlock ]. + ^heap detect: aBlock ifNone: noneBlock! Item was added: + ----- Method: MorphicAlarmQueue>>do: (in category 'migration') ----- + do: aBlock + + heap ifNil: [ ^super do: aBlock ]. + ^heap do: aBlock! Item was added: + ----- Method: MorphicAlarmQueue>>first (in category 'migration') ----- + first + + heap ifNil: [ ^super first ]. + ^heap first! Item was changed: ----- Method: MorphicAlarmQueue>>initialize (in category 'initialize') ----- initialize + super initialize. + sequenceNumber := 0. + heap := Heap sortBlock: [ :alarmA :alarmB | + alarmA scheduledTime = alarmB scheduledTime + ifFalse: [ alarmA scheduledTime < alarmB scheduledTime ] + ifTrue: [ + alarmA sequenceNumber = alarmB sequenceNumber + ifFalse: [ alarmA sequenceNumber < alarmB sequenceNumber ] + ifTrue: [ self error: 'These alarms run at the same time' ] ] ]! - sequenceNumber := 0.! Item was added: + ----- Method: MorphicAlarmQueue>>isEmpty (in category 'migration') ----- + isEmpty + + heap ifNil: [ ^super isEmpty ]. + ^heap isEmpty! Item was added: + ----- Method: MorphicAlarmQueue>>migrate (in category 'migration') ----- + migrate + + heap ifNotNil: [ ^self ]. + heap := Heap withAll: self asArray sortBlock: [ :alarmA :alarmB | + alarmA scheduledTime = alarmB scheduledTime + ifFalse: [ alarmA scheduledTime < alarmB scheduledTime ] + ifTrue: [ + alarmA sequenceNumber = alarmB sequenceNumber + ifFalse: [ alarmA sequenceNumber < alarmB sequenceNumber ] + ifTrue: [ self error: 'These alarms run at the same time' ] ] ]! Item was added: + ----- Method: MorphicAlarmQueue>>nextSequenceNumber (in category 'private') ----- + nextSequenceNumber + + (sequenceNumber := sequenceNumber + 1) = 16r3FFFFFFF ifTrue: [ + "Sequence number overflow... reassign sequence numbers starting at 1." + | alarmList | + alarmList := heap fullySort asArray. + alarmList withIndexDo: [ :alarm :index | + alarm sequenceNumber: index ]. + sequenceNumber := alarmList size + 1 ]. + ^sequenceNumber! Item was added: + ----- Method: MorphicAlarmQueue>>postCopy (in category 'as yet unclassified') ----- + postCopy + + super postCopy. + heap := heap copy! Item was added: + ----- Method: MorphicAlarmQueue>>remove: (in category 'migration') ----- + remove: anObject + + heap ifNil: [ ^super remove: anObject ]. + ^heap remove: anObject! Item was added: + ----- Method: MorphicAlarmQueue>>removeFirst (in category 'migration') ----- + removeFirst + + heap ifNil: [ ^super removeFirst ]. + ^heap removeFirst! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'MorphicAlarmQueue allInstancesDo: #migrate'! - (PackageInfo named: 'Morphic') postscript: 'SystemWindow reconfigureWindowsForFocus.'! From commits at source.squeak.org Mon May 30 23:58:20 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon May 30 23:59:05 2016 Subject: [squeak-dev] The Trunk: Morphic-ul.1152.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.1152.mcz ==================== Summary ==================== Name: Morphic-ul.1152 Author: ul Time: 31 May 2016, 1:32:25.341018 am UUID: a2bb9c46-93c3-4586-84e3-7dff9fec4bd0 Ancestors: Morphic-ul.1151 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #2. =============== Diff against Morphic-ul.1151 =============== Item was changed: + Object subclass: #MorphicAlarmQueue - Heap subclass: #MorphicAlarmQueue instanceVariableNames: 'mutex sequenceNumber heap' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Events'! !MorphicAlarmQueue commentStamp: 'jcg 1/9/2010 13:34' prior: 0! MorphicAlarmQueue is a specialized Heap. The main change is to stamp each added MorphicAlarm with a sequence number to ensure that alarms scheduled for the same time are executed in the order that they were added.! Item was changed: ----- Method: MorphicAlarmQueue>>add: (in category 'adding') ----- add: aMorphicAlarm + aMorphicAlarm sequenceNumber: self nextSequenceNumber. + ^heap add: aMorphicAlarm! - heap ifNotNil: [ - aMorphicAlarm sequenceNumber: self nextSequenceNumber. - ^heap add: aMorphicAlarm ]. - (sequenceNumber := sequenceNumber + 1) = 16r3FFFFFFF ifTrue: [ - "Sequence number overflow... reassign sequence numbers starting at 0." - | alarmList | - alarmList := self asArray sort: [:msg1 :msg2 | - msg1 sequenceNumber < msg2 sequenceNumber - ]. - alarmList withIndexDo: [:msg :ind | msg sequenceNumber: ind-1]. - "The #bitAnd: for the unlikely event that we have > 16r3FFFFFF messages in the queue." - sequenceNumber := alarmList last sequenceNumber + 1 bitAnd: 16r3FFFFFFF. - ]. - aMorphicAlarm sequenceNumber: sequenceNumber. - super add: aMorphicAlarm. - - "If we doubt our sanity..." - false ifTrue: [ - self isValidHeap ifFalse: [self error: 'not a valid heap!!!!!!']. - ]. - ^aMorphicAlarm! Item was added: + ----- Method: MorphicAlarmQueue>>alarmsDoSafely: (in category 'enumeration') ----- + alarmsDoSafely: aBlock + + heap asArray do: aBlock! Item was changed: ----- Method: MorphicAlarmQueue>>detect:ifNone: (in category 'migration') ----- detect: aBlock ifNone: noneBlock - heap ifNil: [ ^super detect: aBlock ifNone: noneBlock ]. ^heap detect: aBlock ifNone: noneBlock! Item was changed: ----- Method: MorphicAlarmQueue>>do: (in category 'migration') ----- do: aBlock - heap ifNil: [ ^super do: aBlock ]. ^heap do: aBlock! Item was changed: ----- Method: MorphicAlarmQueue>>first (in category 'migration') ----- first - heap ifNil: [ ^super first ]. ^heap first! Item was added: + ----- Method: MorphicAlarmQueue>>incrementScheduledTimesBy: (in category 'accessing') ----- + incrementScheduledTimesBy: anInteger + + heap do: [ :each | each scheduledTime: each scheduledTime + anInteger ]! Item was changed: ----- Method: MorphicAlarmQueue>>initialize (in category 'initialize') ----- initialize super initialize. + mutex := Mutex new. sequenceNumber := 0. heap := Heap sortBlock: [ :alarmA :alarmB | alarmA scheduledTime = alarmB scheduledTime ifFalse: [ alarmA scheduledTime < alarmB scheduledTime ] ifTrue: [ alarmA sequenceNumber = alarmB sequenceNumber ifFalse: [ alarmA sequenceNumber < alarmB sequenceNumber ] ifTrue: [ self error: 'These alarms run at the same time' ] ] ]! Item was changed: ----- Method: MorphicAlarmQueue>>isEmpty (in category 'migration') ----- isEmpty - heap ifNil: [ ^super isEmpty ]. ^heap isEmpty! Item was removed: - ----- Method: MorphicAlarmQueue>>isValidHeap (in category 'private') ----- - isValidHeap - "Verify the correctness of the heap" - 2 to: tally do:[:i| - (self sorts: (array at: i // 2) before: (array at: i)) ifFalse:[^false]. - ]. - ^true! Item was removed: - ----- Method: MorphicAlarmQueue>>migrate (in category 'migration') ----- - migrate - - heap ifNotNil: [ ^self ]. - heap := Heap withAll: self asArray sortBlock: [ :alarmA :alarmB | - alarmA scheduledTime = alarmB scheduledTime - ifFalse: [ alarmA scheduledTime < alarmB scheduledTime ] - ifTrue: [ - alarmA sequenceNumber = alarmB sequenceNumber - ifFalse: [ alarmA sequenceNumber < alarmB sequenceNumber ] - ifTrue: [ self error: 'These alarms run at the same time' ] ] ]! Item was changed: ----- Method: MorphicAlarmQueue>>mutex (in category 'accessing') ----- mutex + + ^mutex! - ^mutex ifNil: [mutex := Mutex new]! Item was changed: ----- Method: MorphicAlarmQueue>>nextSequenceNumber (in category 'private') ----- nextSequenceNumber (sequenceNumber := sequenceNumber + 1) = 16r3FFFFFFF ifTrue: [ "Sequence number overflow... reassign sequence numbers starting at 1." + heap fullySort. + 1 to: heap size do: [ :index | + (heap at: index) sequenceNumber: index ]. + sequenceNumber := heap size + 1 ]. - | alarmList | - alarmList := heap fullySort asArray. - alarmList withIndexDo: [ :alarm :index | - alarm sequenceNumber: index ]. - sequenceNumber := alarmList size + 1 ]. ^sequenceNumber! Item was changed: + ----- Method: MorphicAlarmQueue>>postCopy (in category 'copying') ----- - ----- Method: MorphicAlarmQueue>>postCopy (in category 'as yet unclassified') ----- postCopy super postCopy. heap := heap copy! Item was changed: ----- Method: MorphicAlarmQueue>>remove: (in category 'migration') ----- remove: anObject - heap ifNil: [ ^super remove: anObject ]. ^heap remove: anObject! Item was added: + ----- Method: MorphicAlarmQueue>>removeAlarmWithReceiver:selector: (in category 'removing') ----- + removeAlarmWithReceiver: receiver selector: selector + + heap + detect: [ :each | each receiver == receiver and: [ each selector == selector ] ] + ifFound: [ :found | heap remove: found ] + ifNone: [ ]! Item was added: + ----- Method: MorphicAlarmQueue>>removeAllAlarmsBefore: (in category 'removing') ----- + removeAllAlarmsBefore: nowTime + + ^Array new: 10 streamContents: [ :stream | + [ heap notEmpty and: [ heap first scheduledTime < nowTime ] ] + whileTrue: [ stream nextPut: heap removeFirst ] ]! Item was changed: ----- Method: MorphicAlarmQueue>>removeFirst (in category 'migration') ----- removeFirst - heap ifNil: [ ^super removeFirst ]. ^heap removeFirst! Item was removed: - ----- Method: MorphicAlarmQueue>>sorts:before: (in category 'comparing') ----- - sorts: alarmA before: alarmB - alarmA scheduledTime = alarmB scheduledTime - ifFalse:[^alarmA scheduledTime < alarmB scheduledTime]. - alarmA sequenceNumber = alarmB sequenceNumber - ifFalse:[^alarmA sequenceNumber < alarmB sequenceNumber]. - ^self error: 'These alarms run at the same time'! Item was changed: ----- Method: WorldState>>adjustAlarmTimes: (in category 'alarms') ----- adjustAlarmTimes: nowTime "Adjust the alarm times after some clock weirdness (such as roll-over, image-startup etc)" + | deltaTime | + (deltaTime := nowTime - lastAlarmTime) = 0 ifTrue: [ ^self ]. + self lockAlarmsDuring: [ :locked | locked incrementScheduledTimesBy: deltaTime ]! - deltaTime := nowTime - lastAlarmTime. - self lockAlarmsDuring: [:locked | - locked do:[:alarm| alarm scheduledTime: alarm scheduledTime + deltaTime]. - ]! Item was changed: ----- Method: WorldState>>cleanseStepListForWorld: (in category 'stepping') ----- cleanseStepListForWorld: aWorld "Remove morphs from the step list that are not in this World. Often were in a flap that has moved on to another world." + | deletions | - | deletions morphToStep | deletions := nil. stepList do: [:entry | + entry receiver world == aWorld ifFalse: [ + (deletions ifNil: [ deletions := OrderedCollection new ]) + addLast: entry ] ]. - morphToStep := entry receiver. - morphToStep world == aWorld ifFalse:[ - deletions ifNil: [deletions := OrderedCollection new]. - deletions addLast: entry]]. deletions ifNotNil:[ deletions do: [:entry| self stopStepping: entry receiver]]. self lockAlarmsDuring: [:locked | + locked alarmsDoSafely: [ :entry | + | morphToStep | - locked copy do: [:entry | morphToStep := entry receiver. + (morphToStep isMorph and: [morphToStep world == aWorld]) ifFalse: [ + locked removeAlarmWithReceiver: entry receiver selector: entry selector ] ] ]! - (morphToStep isMorph and:[morphToStep world == aWorld]) - ifFalse:[self removeAlarm: entry selector for: entry receiver]] - ].! Item was changed: ----- Method: WorldState>>removeAlarm:for: (in category 'alarms') ----- removeAlarm: aSelector for: aTarget "Remove the alarm with the given selector" self lockAlarmsDuring: [:locked | + locked removeAlarmWithReceiver: aTarget selector: aSelector ]! - | alarm | - alarm := locked - detect: [:any | any receiver == aTarget and: [any selector == aSelector]] - ifNone: [nil]. - alarm ifNotNil: [locked remove: alarm] - ]. - ! Item was changed: ----- Method: WorldState>>triggerAlarmsBefore: (in category 'alarms') ----- triggerAlarmsBefore: nowTime "Trigger all pending alarms that are to be executed before nowTime." | triggered | lastAlarmTime ifNil:[lastAlarmTime := nowTime]. (nowTime < lastAlarmTime or:[nowTime - lastAlarmTime > 10000]) ifTrue:[self adjustAlarmTimes: nowTime]. + triggered := self lockAlarmsDuring: [:pending | + pending removeAllAlarmsBefore: nowTime ]. - triggered := OrderedCollection new. - self lockAlarmsDuring: [:pending | - [pending isEmpty not and: [pending first scheduledTime < nowTime]] - whileTrue: [triggered add: pending removeFirst]]. triggered do: [:alarm | alarm value: nowTime]. lastAlarmTime := nowTime.! From commits at source.squeak.org Tue May 31 00:00:08 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 31 00:00:55 2016 Subject: [squeak-dev] The Trunk: Morphic-ul.1153.mcz Message-ID: Levente Uzonyi uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-ul.1153.mcz ==================== Summary ==================== Name: Morphic-ul.1153 Author: ul Time: 31 May 2016, 1:34:24.714285 am UUID: d9b6d326-3f36-44a7-9810-974b46978e89 Ancestors: Morphic-ul.1152 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #3. =============== Diff against Morphic-ul.1152 =============== Item was removed: - ----- Method: MorphicAlarmQueue>>detect:ifNone: (in category 'migration') ----- - detect: aBlock ifNone: noneBlock - - ^heap detect: aBlock ifNone: noneBlock! Item was removed: - ----- Method: MorphicAlarmQueue>>do: (in category 'migration') ----- - do: aBlock - - ^heap do: aBlock! Item was removed: - ----- Method: MorphicAlarmQueue>>first (in category 'migration') ----- - first - - ^heap first! Item was removed: - ----- Method: MorphicAlarmQueue>>isEmpty (in category 'migration') ----- - isEmpty - - ^heap isEmpty! Item was changed: ----- Method: MorphicAlarmQueue>>postCopy (in category 'copying') ----- postCopy super postCopy. + mutex := Mutex new. heap := heap copy! Item was removed: - ----- Method: MorphicAlarmQueue>>remove: (in category 'migration') ----- - remove: anObject - - ^heap remove: anObject! Item was changed: ----- Method: MorphicAlarmQueue>>removeAlarmWithReceiver:selector: (in category 'removing') ----- removeAlarmWithReceiver: receiver selector: selector + ^heap - heap detect: [ :each | each receiver == receiver and: [ each selector == selector ] ] ifFound: [ :found | heap remove: found ] ifNone: [ ]! Item was removed: - ----- Method: MorphicAlarmQueue>>removeFirst (in category 'migration') ----- - removeFirst - - ^heap removeFirst! From frank.shearar at gmail.com Tue May 31 00:00:19 2016 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue May 31 00:00:56 2016 Subject: [squeak-dev] Re: The Object>>recurse: Method In-Reply-To: <1464512698465-4897988.post@n4.nabble.com> References: <1464512698465-4897988.post@n4.nabble.com> Message-ID: On 29 May 2016 at 02:04, marcel.taeumel wrote: > Kjell Godo wrote > > Object>>recurse: aZeroInputValuable"ThatReturnsATwoInputValuable" > > > > ^( aZeroInputValuable value > > ) value:( self )value:[ :anObject | anObject recurse: aZeroInputValuable > > ] > > > > "Object>>recurse: > > > > does for recursion what >>do: does for iteration > > > > it enables any Object O to do recursion > > Without writing a new recursive method in the Class of O > > > > It does this even if the > > BlockClosures in this version of Smalltalk being used > > Can only do tail recursion accurately > > Like in Dolphin Smalltalk 6 > > > > You call it like > > > > ( anObject recurse:[[ :anobject :recurse | > > ( anobject someChildren collect:[ :child | > > ( something something ). > > ( ( recurse value:( child something ) ) something ) > > ] > > ) asSomeObjectSomething > > ]] ) > > > > ok > > So i haven't actually tried it yet > > so i do not actually know if it actually works > > so it's too hot off the presses for that > > because I'm more into a math major than physics > > i guess i always like math way better > > and so i have a tendency to say that has already been shown > > but i can't see how it can fail > > So i am putting it out there right now without testing it first > > each recursion creates a new twoInputValuable > > and the >>recurse: method keeps getting called > > from inside of itself > > > > so i think it works > > > > but i guess you have to try it to find out > > > > if you can figure an easier way > > or why it can't work > > then please show it > > > > i have been trying to do this for a long time > > and it shocks me that it's so small must be something wrong in there > > so if you easily find a better way > > or that it's no way at all > > then i missed it and I'm too early > > and I'm semi mal informed > > ie stupeid > > and I'm a baaad scientrist cepting I'm not one > > et all > > not quite easily done > > > > Kjell E Godo" > > Hi Kjell, > > I suppose that this code is a suggestion for Trunk? If you did not try it > out, where does it come from? Dolphin Smalltalk 6? > > It does look like a valuable addition to me. Although, I read it like > re-curse and thought of Monkey Island and LeChuck. :-D Are there other > words > for this? > > #combine: > #doRecursive: > > Anyway, it seems to work for Fibonacci: > > 6 recurse: [[:number :step | > number caseOf: { > [0] -> [1]. > [1] -> [1]. > } otherwise: [ > (step value: number - 2) > + (step value: number - 1)]]]. > I bet you'd like it a whole lot less if someone used it and you had to debug it. I've done things that were at most half as tricky as this [1], and it was NOT fun to debug. In fact, trying to do so breaks the debugger if you do the obvious thing and try debug-edit-and-resume, and I still owe a fix for that... frank [1] https://github.com/frankshearar/Parsing-Derivatives/blob/master/Derivatives/DerivingParser.st#L199..L226 > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Object-recurse-Method-tp4897901p4897988.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160530/cb6a8acd/attachment.htm From lewis at mail.msen.com Tue May 31 01:38:12 2016 From: lewis at mail.msen.com (David T. Lewis) Date: Tue May 31 01:38:14 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> Message-ID: <20160531013812.GA66497@shell.msen.com> On Tue, May 31, 2016 at 12:35:12AM +0200, Levente Uzonyi wrote: > Hi Dave, > > It's an optimization, so it's not mandatory. Of course it's nice to have, > and #adoptInstance: should work (as it does in Spur). > So the question is: why doesn't it work? > > The answer is that in V3 ByteString is compact, but ByteArray is not. > Since the compact classes array has plenty of space, I suggest ByteArray > should be compact as well. > If you evaluate [ByteArray becomeCompact] in a V3 image, then you'll find > that the change will work in those images, too. Brilliant! Yes, [ByteArray becomeCompact] makes it work. It still fails on interpreter VM (VM crash), but I think there is a bug in the interpreter primitiveAdoptInstance so that is not directly related, so that would be a separate issue. > > I've mentioned it earlier that Spur made some optimizations possible, that > are not V3 compatible. Another widely used example is using #== for > Character comparison. These will of course not work in V3 images, and > detecting the problems due to these changes is extremely hard. > > Levente Not really so extremely hard, I noticed it because of failures on http://build.squeak.org/job/FollowTrunkOnOldV3Image/ Overall, I am quite happy to see that the Spur/V3 differences remain isolated to 4 packages for trunk. The one glitch that I noticed here affects the Files package, but this is the first such case that I have seen since the Spur conversion. So this seems really good to me. Dave > > On Mon, 30 May 2016, David T. Lewis wrote: > > >We did this change recently: > > > > Name: Files-ul.154 > > Time: 15 May 2016, 11:17:08.015805 pm > > > > - use #adoptInstance: to convert between binary and ascii mode instead of > > creating new collections > > > >This assumes that we can convert a ByteString to a ByteArray using > >Behavior>>adoptInstance. If the conversion does not work, as it the case > >with a V3 image and Cog or interpreter VM, then we end up with a corrupt > >image after trying to save the image as new version (and maybe other cases > >as well). > > > >It does not seem that #ascii and #binary are called frequently, even when > >doing Monticello updates, so I suspect that the optimization is not very > >important. > > > >Do we need the #ascii and #binary optimizations in Files-ul.154? > > > >Dave > > > > From Marcel.Taeumel at hpi.de Tue May 31 07:55:25 2016 From: Marcel.Taeumel at hpi.de (marcel.taeumel) Date: Tue May 31 08:33:00 2016 Subject: [squeak-dev] Re: The Trunk: Morphic-ul.1153.mcz In-Reply-To: References: Message-ID: <1464681325447-4898243.post@n4.nabble.com> Hi Levente, very nice! :) +1 Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-ul-1153-mcz-tp4898220p4898243.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue May 31 08:43:06 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 31 08:43:08 2016 Subject: [squeak-dev] The Trunk: Morphic-mt.1154.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.1154.mcz ==================== Summary ==================== Name: Morphic-mt.1154 Author: mt Time: 31 May 2016, 10:41:59.45866 am UUID: 37fee264-be7d-a442-8ea5-cf72d229cab3 Ancestors: Morphic-ul.1153 Another refactoring of SystemWindow. Improves readability of window properties: Windows Raise on Any Click Windows' Contents Are Always Active Windows' Controls Are Always Active Thanks to Chris for pointing out several issues. =============== Diff against Morphic-ul.1153 =============== Item was added: + ----- Method: CornerGripMorph>>mouseDown: (in category 'as yet unclassified') ----- + mouseDown: anEvent + "Disable drop shadow to improve performance." + + super mouseDown: anEvent. + + target ifNil: [^ self]. + target fastFramingOn ifFalse: [ + self setProperty: #targetHadDropShadow toValue: target hasDropShadow. + target hasDropShadow: false].! Item was changed: ----- Method: CornerGripMorph>>mouseMove: (in category 'as yet unclassified') ----- mouseMove: anEvent | delta | target ifNil: [^ self]. target fastFramingOn ifTrue: [delta := target doFastWindowReframe: self ptName] ifFalse: [ - target hasDropShadow: false. delta := lastMouse ifNil: [0@0] ifNotNil: [anEvent cursorPoint - lastMouse]. lastMouse := anEvent cursorPoint. self apply: delta. self bounds: (self bounds origin + delta extent: self bounds extent)].! Item was changed: ----- Method: CornerGripMorph>>mouseUp: (in category 'as yet unclassified') ----- mouseUp: anEvent target ifNil: [^ self]. target fastFramingOn ifFalse: [ + (self valueOfProperty: #targetHadDropShadow ifAbsent: [false]) ifTrue: [target hasDropShadow: true]. + self removeProperty: #targetHadDropShadow].! - target hasDropShadow: Preferences menuAppearance3d].! Item was changed: MorphicModel subclass: #SystemWindow instanceVariableNames: 'labelString stripes label closeBox collapseBox paneMorphs paneRects collapsedFrame fullFrame isCollapsed isActive menuBox mustNotClose labelWidgetAllowance updatablePanes allowReframeHandles labelArea expandBox' + classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowTitleActiveOnFirstClick WindowsRaiseOnClick' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImageFlat CloseBoxImageGradient CollapseBoxImageFlat CollapseBoxImageGradient DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImageFlat ExpandBoxImageGradient FocusFollowsMouse GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow WindowsActiveOnlyOnTop' poolDictionaries: '' category: 'Morphic-Windows'! !SystemWindow commentStamp: '' 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 added: + ----- Method: SystemWindow class>>windowTitleActiveOnFirstClick (in category 'preferences') ----- + windowTitleActiveOnFirstClick + + ^ WindowTitleActiveOnFirstClick ifNil: [ true ]! Item was added: + ----- Method: SystemWindow class>>windowTitleActiveOnFirstClick: (in category 'preferences') ----- + windowTitleActiveOnFirstClick: boolean + WindowTitleActiveOnFirstClick := boolean. + self reconfigureWindowsForFocus.! Item was removed: - ----- Method: SystemWindow class>>windowsActiveOnlyOnTop (in category 'preferences') ----- - windowsActiveOnlyOnTop - - ^ WindowsActiveOnlyOnTop ifNil: [ true ]! Item was removed: - ----- Method: SystemWindow class>>windowsActiveOnlyOnTop: (in category 'preferences') ----- - windowsActiveOnlyOnTop: aBoolean - - aBoolean = WindowsActiveOnlyOnTop ifTrue: [^ self]. - WindowsActiveOnlyOnTop := aBoolean. - self reconfigureWindowsForFocus.! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick (in category 'preferences') ----- + windowsRaiseOnClick + + ^ WindowsRaiseOnClick ifNil: [ true ]! Item was added: + ----- Method: SystemWindow class>>windowsRaiseOnClick: (in category 'preferences') ----- + windowsRaiseOnClick: boolean + WindowsRaiseOnClick := boolean.! Item was changed: ----- Method: SystemWindow>>activate (in category 'focus') ----- activate "Bring the receiver to the top. If I am modal, bring along my modal owning window and my model child as well." self isActive ifTrue: [self lookFocused. ^ self]. self topRendererOrSelf owner ifNil: [^ self "avoid spurious activate when drop in trash"]. self isActive: true. "Special handling for expanded windows." self isCollapsed ifFalse: [ model modelWakeUpIn: self. self positionSubmorphs]. self submorphsDo: [:each | each unlock]. + self lookFocused.! - self - lookFocused; - updateFocusLookAtHand.! Item was changed: ----- Method: SystemWindow>>beKeyWindow (in category 'top window') ----- beKeyWindow "Let me be the most important window on the screen. I am at the top and I can have a shadow to get more attention by the user. I am the window that is responsible for window keyboard shortcuts." | oldKeyWindow | self isKeyWindow ifTrue: [^ self]. oldKeyWindow := TopWindow. TopWindow := self. PasteUpMorph globalCommandKeysEnabled ifTrue: [ self activeHand addKeyboardListener: self ]. self unlockWindowDecorations; "here, because all windows might be active anyway" activate; "if not already active, activate now" comeToFront. "key windows are on top" "Change appearance to get noticed." self hasDropShadow: Preferences menuAppearance3d. (self valueOfProperty: #borderWidthWhenActive) ifNotNil: [:bw | self acquireBorderWidth: bw]. oldKeyWindow ifNotNil: [:wnd | wnd passivateIfNeeded. self activeHand removeKeyboardListener: oldKeyWindow. "Change appearance to not look prettier than the new key window." wnd hasDropShadow: false. (wnd valueOfProperty: #borderWidthWhenInactive) + ifNotNil: [:bw | wnd acquireBorderWidth: bw]]. + + "Synchronize focus look with position of current hand because any call could have made this window the new key window." + self updateFocusLookAtHand.! - ifNotNil: [:bw | wnd acquireBorderWidth: bw]].! Item was added: + ----- Method: SystemWindow>>handleMouseDown: (in category 'events') ----- + handleMouseDown: evt + + "If my submorphs handled the events, we still need to use this hook to raise." + (self isKeyWindow not + and: [self class windowsRaiseOnClick + or: [self windowDecorations anySatisfy: [:morph | morph bounds containsPoint: evt position]] ]) + ifTrue: [self beKeyWindow]. + + ^ super handleMouseDown: evt! Item was changed: ----- Method: SystemWindow>>justDroppedInto:event: (in category 'geometry') ----- justDroppedInto: aMorph event: anEvent + isCollapsed + ifTrue: [self position: ((self position max: 0@0) grid: 8@8). + collapsedFrame := self bounds] + ifFalse: [fullFrame := self bounds]. + + self beKeyWindow. + self hasDropShadow: true. "See #startDragFromLabel:." + + aMorph == self world ifTrue: [self assureLabelAreaVisible]. + (ToolBuilder 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. - grip referencePoint: anEvent position. anEvent hand newMouseFocus: grip]]. - - self hasDropShadow: (self isKeyWindow and: [Preferences menuAppearance3d]). - - isCollapsed - ifTrue: [self position: ((self position max: 0@0) grid: 8@8). - collapsedFrame := self bounds] - ifFalse: [fullFrame := self bounds. - self beKeyWindow]. - aMorph == self world ifTrue: [self assureLabelAreaVisible]. - ^super justDroppedInto: aMorph event: anEvent! Item was changed: ----- Method: SystemWindow>>lockWindowDecorations (in category 'focus') ----- lockWindowDecorations "Lock all window decrations, that is grips, splitters, and title bar." + self windowDecorations do: [:m | m lock].! - self submorphsDo: [:m | - (self paneMorphs includes: m) - ifFalse: [m lock]].! Item was added: + ----- Method: SystemWindow>>lockWindowTitle (in category 'focus') ----- + lockWindowTitle + + labelArea ifNotNil: [:m | m lock].! Item was changed: ----- Method: SystemWindow>>lookFocused (in category 'focus') ----- lookFocused label ifNotNil: [ label color: Color black ]. + + (self isKeyWindow or: [self class windowTitleActiveOnFirstClick]) - - (self isKeyWindow or: [model windowActiveOnFirstClick]) ifTrue: [self undimWindowButtons]. + - self paneColorToUse in: [ : col | self setStripeColorsFrom: col ; adoptPaneColor: col].! Item was changed: ----- Method: SystemWindow>>mouseDown: (in category 'events') ----- mouseDown: evt - | wasKeyWindow | - (wasKeyWindow := self isKeyWindow) ifFalse: [ - evt hand releaseKeyboardFocus. - self beKeyWindow]. - - "If the window was locked, we did unlock it by now. If the user does not want to invest an additional click to interact with an actual widget, re-process the event." - (wasKeyWindow not and: [model windowActiveOnFirstClick]) - ifTrue: [ - evt wasHandled: false. - ^ self processEvent: evt]. - evt hand waitForClicksOrDrag: self event: evt selectors: { nil. nil. nil. #startDragFromLabel: } threshold: HandMorph dragThreshold.! Item was changed: ----- Method: SystemWindow>>mouseEnter: (in category 'events') ----- mouseEnter: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseEnter: anEvent. + self isActive ifTrue: [self lookFocused].! - self isActive - ifTrue: [self lookFocused] - ifFalse: [model windowActiveOnFirstClick - ifTrue: [self undimWindowButtons]].! Item was changed: ----- Method: SystemWindow>>mouseEnterDragging: (in category 'events') ----- mouseEnterDragging: evt "unlock children for drop operations" self flag: #performance. "mt: There may be no need to change appearance if no widget wants the drop." + self isActive ifTrue: [self lookFocused]. - self isActive - ifTrue: [self lookFocused] - ifFalse: [model windowActiveOnFirstClick - ifTrue: [self undimWindowButtons]]. (self isActive not and: [evt hand hasSubmorphs]) ifTrue: [ self activate. "unlock contents for drop" evt hand addMouseListener: self. "for drop completion on submorph" ].! Item was changed: ----- Method: SystemWindow>>mouseLeave: (in category 'events') ----- mouseLeave: anEvent "Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it." super mouseLeave: anEvent. + model windowActiveOnFirstClick ifTrue: [self lookUnfocused].! - (self isActive and: [self class windowsActiveOnlyOnTop not]) - ifTrue: [self lookUnfocused] - ifFalse: [self isKeyWindow - ifFalse: [self dimWindowButtons]].! Item was changed: ----- Method: SystemWindow>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: evt "Passivate after drop operations if needed." + model windowActiveOnFirstClick ifTrue: [self lookUnfocused]. - (self isActive and: [self class windowsActiveOnlyOnTop not]) - ifTrue: [self lookUnfocused] - ifFalse: [self isKeyWindow - ifFalse: [self dimWindowButtons]]. (self isKeyWindow not and: [evt hand hasSubmorphs]) ifTrue:[ self passivateIfNeeded. evt hand removeMouseListener: self. "no more drop completion possible on submorph" ].! Item was changed: ----- Method: SystemWindow>>passivateIfNeeded (in category 'focus') ----- passivateIfNeeded + model windowActiveOnFirstClick + ifFalse: [self passivate] + ifTrue: [self lookUnfocused]. + + self unlockWindowDecorations. + + self class windowTitleActiveOnFirstClick + ifFalse: [self lockWindowTitle] + ifTrue: [self unlockWindowTitle].! - self class windowsActiveOnlyOnTop - ifTrue: [self passivate] - ifFalse: [self lockWindowDecorations; lookUnfocused].! Item was changed: ----- Method: SystemWindow>>unlockWindowDecorations (in category 'focus') ----- unlockWindowDecorations "Unlock all window decrations, that is grips, splitters, and title bar." + self windowDecorations do: [:m | m unlock]. - self submorphsDo: [:m | - (self paneMorphs includes: m) - ifFalse: [m unlock]]. - + "Migrate old window instances. Can be removed in the future." - "Migrate old window instances." labelArea ifNotNil: [:m | m submorphsDo: [:sm | sm unlock]].! Item was added: + ----- Method: SystemWindow>>unlockWindowTitle (in category 'focus') ----- + unlockWindowTitle + + labelArea ifNotNil: [:m | m unlock].! Item was changed: ----- Method: SystemWindow>>updateFocusLookAtHand (in category 'focus') ----- updateFocusLookAtHand "If there is more than one active window, look for the mouse cursor and update the window focus look accordingly. This method is not on the class-side because we need our world and some active hand." + model windowActiveOnFirstClick ifFalse: [^ self]. - self class windowsActiveOnlyOnTop ifTrue: [^ self]. ((self class windowsIn: self world) do: [:window | window lookUnfocused]; select: [:window | window bounds containsPoint: self activeHand position]) + ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"].! - ifNotEmpty: [:windowsPointed | windowsPointed first lookFocused "only to foremost window"]. - - self class keyWindow lookFocused.! Item was added: + ----- Method: SystemWindow>>windowDecorations (in category 'focus') ----- + windowDecorations + + ^ self submorphs copyWithoutAll: self paneMorphs! Item was changed: + (PackageInfo named: 'Morphic') postscript: 'SystemWindow reconfigureWindowsForFocus.'! - (PackageInfo named: 'Morphic') postscript: 'MorphicAlarmQueue allInstancesDo: #migrate'! From commits at source.squeak.org Tue May 31 08:44:12 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 31 08:45:12 2016 Subject: [squeak-dev] The Trunk: Kernel-mt.1027.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.1027.mcz ==================== Summary ==================== Name: Kernel-mt.1027 Author: mt Time: 31 May 2016, 10:43:24.59966 am UUID: a9379948-081f-fb4f-a55d-5f72c6d674e5 Ancestors: Kernel-pre.1026 Appendix to Morphic-mt.1154. =============== Diff against Kernel-pre.1026 =============== Item was changed: ----- Method: Model class>>windowActiveOnFirstClick (in category 'preferences') ----- windowActiveOnFirstClick + ^ WindowActiveOnFirstClick ifNil: [ false ]! Item was changed: ----- Method: Model class>>windowActiveOnFirstClick: (in category 'preferences') ----- windowActiveOnFirstClick: aBoolean + WindowActiveOnFirstClick := aBoolean. + (Smalltalk classNamed: #SystemWindow) ifNotNil: [:c | c reconfigureWindowsForFocus].! - WindowActiveOnFirstClick := aBoolean.! From karlramberg at gmail.com Tue May 31 15:00:36 2016 From: karlramberg at gmail.com (karl ramberg) Date: Tue May 31 15:00:39 2016 Subject: [squeak-dev] Re: Problems updating, canvas being nil In-Reply-To: <1464362545334-4897881.post@n4.nabble.com> References: <1464090327158-4897035.post@n4.nabble.com> <1464268561035-4897537.post@n4.nabble.com> <1464360690096-4897866.post@n4.nabble.com> <1464362545334-4897881.post@n4.nabble.com> Message-ID: Hi, Image seems to work once I revert the hack. I'm not sure why I got that error Best, Karl On Fri, May 27, 2016 at 5:22 PM, marcel.taeumel wrote: > Karl Ramberg wrote > > Both images were quite old and with several projects open. > > > > The hack I did brought the past the update process > > > > Best, > > Karl > > > > On Fri, May 27, 2016 at 4:51 PM, marcel.taeumel < > > > Marcel.Taeumel@ > > > > > > wrote: > > > >> Karl Ramberg wrote > >> > My images usually have several projects. Could that be part of the > >> > problem? > >> > > >> > Best, > >> > Karl > >> > > >> > On Thu, May 26, 2016 at 3:16 PM, marcel.taeumel < > >> > >> > Marcel.Taeumel@ > >> > >> > > > >> > wrote: > >> > > >> >> Karl Ramberg wrote > >> >> > I updated another image and ran into the same problem: > >> >> > > >> >> > Best, > >> >> > Karl > >> >> > > >> >> > On Tue, May 24, 2016 at 2:36 PM, karl ramberg < > >> >> > >> >> > karlramberg@ > >> >> > >> >> > > wrote: > >> >> > > >> >> >> I changed the method as described and updated the image... No > saved > >> >> copy > >> >> >> or call stack saved > >> >> >> > >> >> >> Best, > >> >> >> Karl > >> >> >> > >> >> >> On Tue, May 24, 2016 at 1:45 PM, marcel.taeumel < > >> >> > >> >> > Marcel.Taeumel@ > >> >> > >> >> > > > >> >> >> wrote: > >> >> >> > >> >> >>> Hi Karl, > >> >> >>> > >> >> >>> can you share the problematic image? > >> >> >>> > >> >> >>> Best, > >> >> >>> Marcel > >> >> >>> > >> >> >>> > >> >> >>> > >> >> >>> -- > >> >> >>> View this message in context: > >> >> >>> > >> >> > >> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897035.html > >> >> >>> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> >> >>> > >> >> >>> > >> >> >> > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > SqueakDebug.log (16K) > >> >> > <http://forum.world.st/attachment/4897276/0/SqueakDebug.log> > >> >> > >> >> Hi Karl, > >> >> > >> >> I just updated an older image from #15844 to #15987 with many tools > >> open > >> >> and > >> >> I did not run into your problem. It seems strange that your image has > >> a > >> >> world without a canvas. Even if so, there are measures to take care > of > >> it > >> >> just 2-3 lines above your fix. > >> >> > >> >> :-/ > >> >> > >> >> Best, > >> >> Marcel > >> >> > >> >> > >> >> > >> >> -- > >> >> View this message in context: > >> >> > >> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897537.html > >> >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> >> > >> >> > >> > >> Hi Karl, > >> > >> maybe. If you had multiple projects open when I made the project > >> refactorings, some existing world may have gotten into an invalid state. > >> However, the bug should have occured ealier? Which version did you try > to > >> update from? > >> > >> Best, > >> Marcel > >> > >> > >> > >> > >> -- > >> View this message in context: > >> > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897866.html > >> Sent from the Squeak - Dev mailing list archive at Nabble.com. > >> > >> > > Hi Karl, > > can you revert the hack now? > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/Problems-updating-canvas-being-nil-tp4896873p4897881.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/e4e9b25c/attachment.htm From asqueaker at gmail.com Tue May 31 15:00:50 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 31 15:01:32 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> Message-ID: > It's an optimization, so it's not mandatory. Of course it's nice to have, An optimization of what? Execution speed? Is it such an optimization that any human could ever possibly notice? Setting the mode of a stream, really? I like most of your optimizations but, IMO, this one is so infinitesmal, I don't think it exceeds the cost of the decreased legibility / complexity.. From digit at sonic.net Tue May 31 15:07:00 2016 From: digit at sonic.net (Tim Johnson) Date: Tue May 31 15:07:08 2016 Subject: [squeak-dev] OSProcess tests crash the VM In-Reply-To: <715F49D0-9E0A-45B2-A6D2-18752F3C7C9B@gmail.com> References: <97834833-0E6D-43F4-A1B1-34781E88DCB3@sonic.net> <715F49D0-9E0A-45B2-A6D2-18752F3C7C9B@gmail.com> Message-ID: <7BFAA027-CCB5-49B5-8DD5-FC34570F8C4B@sonic.net> Hi Eliot, No dice. After I first experienced this crash in Cog, I found Cog would crash immediately upon launch. I tried again with each and every 2016 build. (I have deleted the Cog prefs .plist from my Library/Preferences and I rebooted the computer to no avail.) Thus, v3397 was the only Cog version which would still launch. This is still the case, days later. I left this out of my bug report as I wasn't sure if it was just my computer (OS X 10.6.8) and didn't have the time/patience to retry on a newer OS X or a different user account or whatever. I do wonder if this crash is replicable (install OSProcess, run tests, find Cog no longer launches) in a different environment, but I find it unlikely anyone else would experience the same, so I didn't report it. The Cog crash log: Process: launchd [4272] Path: /Applications/Squeak/Cog 3732.app/Contents/MacOS/Squeak Identifier: org.squeak.Squeak$(VM_MONIKER) Version: ??? (???) Code Type: X86 (Native) Parent Process: launchd [339] Date/Time: 2016-05-31 08:00:57.144 -0700 OS Version: Mac OS X 10.6.8 (10K549) Report Version: 6 Interval Since Last Report: 1576598 sec Crashes Since Last Report: 26 Per-App Crashes Since Last Report: 19 Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes: KERN_INVALID_ADDRESS at 0x000000008fe01030 Crashed Thread: Unknown Backtrace not available Unknown thread crashed with X86 Thread State (32-bit): eax: 0x00000000 ebx: 0x00000000 ecx: 0x00000000 edx: 0x00000000 edi: 0x00000000 esi: 0x00000000 ebp: 0x00000000 esp: 0x00000000 ss: 0x0000001f efl: 0x00010202 eip: 0x8fe01030 cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000000 cr2: 0x8fe01030 Binary images description not available Thanks, Tim On May 28, 2016, at 11:00 AM, Eliot Miranda wrote: > Hi Tim, > > 3397 is really old. Please download more up2date VMs from mirandabanda.org, i.e. http://www.mirandabanda.org/files/Cog/VM/VM.r3732 > > _,,,^..^,,,_ (phone) > >> On May 28, 2016, at 8:59 AM, Tim Johnson wrote: >> >> Hi all, >> >> I installed OSProcess into a 4.6 image via SqueakMap this morning and ran its tests. I am running OS X 10.6.8. Early into the list of tests to run, the VM crashes. What follows are the crash logs from Cocoa VM 5.7.4.1 (http://www.squeakvm.org/mac/ contains some broken links and may be quite out of date, FWIW), and Cog v3397. >> >> Here is the crash log from 5.7.4.1: >> >> Process: Squeak [803] >> Path: /Applications/Squeak/Squeak 5.7.4.1.app/Contents/MacOS/Squeak >> Identifier: Squeak >> Version: ??? (???) >> Code Type: X86 (Native) >> Parent Process: Squeak [790] >> >> Date/Time: 2016-05-28 08:41:56.560 -0700 >> OS Version: Mac OS X 10.6.8 (10K549) >> Report Version: 6 >> >> Exception Type: EXC_BAD_ACCESS (SIGABRT) >> Exception Codes: KERN_INVALID_ADDRESS at 0x000000006c1f6f3b >> Crashed Thread: 0 Dispatch queue: com.apple.main-thread >> >> Application Specific Information: >> abort() called >> *** multi-threaded process forked *** >> >> Thread 0 Crashed: Dispatch queue: com.apple.main-thread >> 0 libSystem.B.dylib 0x94580c5a __kill + 10 >> 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 >> 2 libSystem.B.dylib 0x946135a5 raise + 26 >> 3 libSystem.B.dylib 0x946296e4 abort + 93 >> 4 org.squeak.Squeak 0x000a3ccc sigsegv + 44 >> 5 ??? 0xffffffff 0 + 4294967295 >> >> Thread 0 crashed with X86 Thread State (32-bit): >> eax: 0x00000000 ebx: 0x94629693 ecx: 0xbfffe23c edx: 0x94580c5a >> edi: 0x1ff121a0 esi: 0xbfffe670 ebp: 0xbfffe258 esp: 0xbfffe23c >> ss: 0x0000001f efl: 0x00000282 eip: 0x94580c5a cs: 0x00000007 >> ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 >> cr2: 0x3f23c940 >> >> >> +++++ >> >> Cog VM v3397: >> >> +++++ >> >> Process: Squeak [685] >> Path: /Applications/Squeak/Cog 3397.app/Contents/MacOS/Squeak >> Identifier: com.squeak.Cog >> Version: Squeak Cog 4.0.3397 (4.0.3397) >> Code Type: X86 (Native) >> Parent Process: launchd [339] >> >> Date/Time: 2016-05-28 08:30:21.513 -0700 >> OS Version: Mac OS X 10.6.8 (10K549) >> Report Version: 6 >> >> Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE >> >> Exception Type: EXC_BAD_ACCESS (SIGABRT) >> Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000104 >> Crashed Thread: 0 Dispatch queue: com.apple.main-thread >> >> Application Specific Information: >> abort() called >> >> Thread 0 Crashed: Dispatch queue: com.apple.main-thread >> 0 libSystem.B.dylib 0x94580c5a __kill + 10 >> 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 >> 2 libSystem.B.dylib 0x946135a5 raise + 26 >> 3 libSystem.B.dylib 0x946296e4 abort + 93 >> 4 com.squeak.Cog 0x00071564 sigsegv + 404 >> 5 libSystem.B.dylib 0x9458605b _sigtramp + 43 >> 6 ??? 0xffffffff 0 + 4294967295 >> 7 com.squeak.Cog 0x000c97a3 scanForCleanBlocks + 83 >> 8 com.squeak.Cog 0x000cbd03 compileCogMethod + 403 >> 9 com.squeak.Cog 0x000cbe37 cogselector + 103 >> 10 com.squeak.Cog 0x000f2f72 makeBaseFrameFor + 546 >> 11 com.squeak.Cog 0x000f427d transferTofrom + 413 >> 12 com.squeak.Cog 0x000f4706 synchronousSignal + 262 >> 13 com.squeak.Cog 0x000f7fb1 checkForEventsMayContextSwitch + 625 >> 14 com.squeak.Cog 0x000f82b0 ceCheckForInterrupts + 16 >> 15 ??? 0x181106e3 0 + 403769059 >> 16 com.squeak.Cog 0x00104976 interpret + 3174 >> 17 com.squeak.Cog 0x0005f7a0 EventLoopEventHandler + 144 >> 18 com.apple.HIToolbox 0x910f9c2f DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567 >> 19 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 >> 20 com.apple.HIToolbox 0x910f8d55 SendEventToEventTargetWithOptions + 58 >> 21 com.apple.HIToolbox 0x9112da24 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 3006 >> 22 com.apple.HIToolbox 0x910fa080 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2672 >> 23 com.apple.HIToolbox 0x910f8ef6 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411 >> 24 com.apple.HIToolbox 0x9111b7f3 SendEventToEventTarget + 52 >> 25 com.apple.HIToolbox 0x912a4c17 ToolboxEventDispatcher + 86 >> 26 com.apple.HIToolbox 0x912a4d4f RunApplicationEventLoop + 243 >> 27 com.squeak.Cog 0x0005efba RunApplicationEventLoopWithSqueak + 218 >> 28 com.squeak.Cog 0x000711b2 main + 690 >> 29 com.squeak.Cog 0x00002b56 start + 54 >> >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/08b42fca/attachment-0001.htm From leves at caesar.elte.hu Tue May 31 16:12:53 2016 From: leves at caesar.elte.hu (Levente Uzonyi) Date: Tue May 31 16:12:55 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> Message-ID: On Tue, 31 May 2016, Chris Muller wrote: >> It's an optimization, so it's not mandatory. Of course it's nice to have, > > An optimization of what? Execution speed? Is it such an optimization > that any human could ever possibly notice? Setting the mode of a > stream, really? I suspect that you expect one to set mode at most once per stream, which is not always the case. I could easily give you an artificial benchmark showing 30x speedup, but that would make no sense. It's a library method and as such, why not make it quicker when possible? > > I like most of your optimizations but, IMO, this one is so > infinitesmal, I don't think it exceeds the cost of the decreased > legibility / complexity.. Please explain the legibility / complexity part. Levente > > From eliot.miranda at gmail.com Tue May 31 18:16:01 2016 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue May 31 18:16:04 2016 Subject: [squeak-dev] OSProcess tests crash the VM In-Reply-To: <7BFAA027-CCB5-49B5-8DD5-FC34570F8C4B@sonic.net> References: <97834833-0E6D-43F4-A1B1-34781E88DCB3@sonic.net> <715F49D0-9E0A-45B2-A6D2-18752F3C7C9B@gmail.com> <7BFAA027-CCB5-49B5-8DD5-FC34570F8C4B@sonic.net> Message-ID: Hi Tim, On Tue, May 31, 2016 at 8:07 AM, Tim Johnson wrote: > Hi Eliot, > > No dice. After I first experienced this crash in Cog, I found Cog would > crash immediately upon launch. I tried again with each and every 2016 > build. (I have deleted the Cog prefs .plist from my Library/Preferences > and I rebooted the computer to no avail.) Thus, v3397 was the only Cog > version which would still launch. This is still the case, days later. > > I left this out of my bug report as I wasn't sure if it was just my > computer (OS X 10.6.8) and didn't have the time/patience to retry on a > newer OS X or a different user account or whatever. I do wonder if this > crash is replicable (install OSProcess, run tests, find Cog no longer > launches) in a different environment, but I find it unlikely anyone else > would experience the same, so I didn't report it. > Alas 10.6.8 is now unsupported. The new VMs only run on 10.7 or later. This is not a superficial change. We have moved the platform subsystem to Cocoa (Objective-C) from Carbon (C), necessitated by providing 64-bit support. It would be a lot of work to produce an up-to-date 32-bit Mac OS X VM for 10.6.8. Sorry :-( > > The Cog crash log: > > Process: launchd [4272] > Path: /Applications/Squeak/Cog 3732.app/Contents/MacOS/Squeak > Identifier: org.squeak.Squeak$(VM_MONIKER) > Version: ??? (???) > Code Type: X86 (Native) > Parent Process: launchd [339] > > Date/Time: 2016-05-31 08:00:57.144 -0700 > OS Version: Mac OS X 10.6.8 (10K549) > Report Version: 6 > > Interval Since Last Report: 1576598 sec > Crashes Since Last Report: 26 > Per-App Crashes Since Last Report: 19 > Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE > > Exception Type: EXC_BAD_ACCESS (SIGSEGV) > Exception Codes: KERN_INVALID_ADDRESS at 0x000000008fe01030 > Crashed Thread: Unknown > > Backtrace not available > > Unknown thread crashed with X86 Thread State (32-bit): > eax: 0x00000000 ebx: 0x00000000 ecx: 0x00000000 edx: 0x00000000 > edi: 0x00000000 esi: 0x00000000 ebp: 0x00000000 esp: 0x00000000 > ss: 0x0000001f efl: 0x00010202 eip: 0x8fe01030 cs: 0x00000017 > ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000000 > cr2: 0x8fe01030 > > Binary images description not available > > > Thanks, > Tim > > On May 28, 2016, at 11:00 AM, Eliot Miranda wrote: > > Hi Tim, > > 3397 is really old. Please download more up2date VMs from > mirandabanda.org, i.e. http://www.mirandabanda.org/files/Cog/VM/VM.r3732 > > _,,,^..^,,,_ (phone) > > On May 28, 2016, at 8:59 AM, Tim Johnson wrote: > > > Hi all, > > > I installed OSProcess into a 4.6 image via SqueakMap this morning and ran > its tests. I am running OS X 10.6.8. Early into the list of tests to run, > the VM crashes. What follows are the crash logs from Cocoa VM 5.7.4.1 ( > http://www.squeakvm.org/mac/ contains some broken links and may be quite > out of date, FWIW), and Cog v3397. > > > Here is the crash log from 5.7.4.1: > > > Process: Squeak [803] > > Path: /Applications/Squeak/Squeak > 5.7.4.1.app/Contents/MacOS/Squeak > > Identifier: Squeak > > Version: ??? (???) > > Code Type: X86 (Native) > > Parent Process: Squeak [790] > > > Date/Time: 2016-05-28 08:41:56.560 -0700 > > OS Version: Mac OS X 10.6.8 (10K549) > > Report Version: 6 > > > Exception Type: EXC_BAD_ACCESS (SIGABRT) > > Exception Codes: KERN_INVALID_ADDRESS at 0x000000006c1f6f3b > > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > > Application Specific Information: > > abort() called > > *** multi-threaded process forked *** > > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > > 0 libSystem.B.dylib 0x94580c5a __kill + 10 > > 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 > > 2 libSystem.B.dylib 0x946135a5 raise + 26 > > 3 libSystem.B.dylib 0x946296e4 abort + 93 > > 4 org.squeak.Squeak 0x000a3ccc sigsegv + 44 > > 5 ??? 0xffffffff 0 + 4294967295 > > > Thread 0 crashed with X86 Thread State (32-bit): > > eax: 0x00000000 ebx: 0x94629693 ecx: 0xbfffe23c edx: 0x94580c5a > > edi: 0x1ff121a0 esi: 0xbfffe670 ebp: 0xbfffe258 esp: 0xbfffe23c > > ss: 0x0000001f efl: 0x00000282 eip: 0x94580c5a cs: 0x00000007 > > ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 > > cr2: 0x3f23c940 > > > > +++++ > > > Cog VM v3397: > > > +++++ > > > Process: Squeak [685] > > Path: /Applications/Squeak/Cog 3397.app/Contents/MacOS/Squeak > > Identifier: com.squeak.Cog > > Version: Squeak Cog 4.0.3397 (4.0.3397) > > Code Type: X86 (Native) > > Parent Process: launchd [339] > > > Date/Time: 2016-05-28 08:30:21.513 -0700 > > OS Version: Mac OS X 10.6.8 (10K549) > > Report Version: 6 > > > Anonymous UUID: E643DB34-DCF4-46E5-B8DF-93CDE79B01CE > > > Exception Type: EXC_BAD_ACCESS (SIGABRT) > > Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000104 > > Crashed Thread: 0 Dispatch queue: com.apple.main-thread > > > Application Specific Information: > > abort() called > > > Thread 0 Crashed: Dispatch queue: com.apple.main-thread > > 0 libSystem.B.dylib 0x94580c5a __kill + 10 > > 1 libSystem.B.dylib 0x94580c4c kill$UNIX2003 + 32 > > 2 libSystem.B.dylib 0x946135a5 raise + 26 > > 3 libSystem.B.dylib 0x946296e4 abort + 93 > > 4 com.squeak.Cog 0x00071564 sigsegv + 404 > > 5 libSystem.B.dylib 0x9458605b _sigtramp + 43 > > 6 ??? 0xffffffff 0 + 4294967295 > > 7 com.squeak.Cog 0x000c97a3 scanForCleanBlocks + 83 > > 8 com.squeak.Cog 0x000cbd03 compileCogMethod + 403 > > 9 com.squeak.Cog 0x000cbe37 cogselector + 103 > > 10 com.squeak.Cog 0x000f2f72 makeBaseFrameFor + 546 > > 11 com.squeak.Cog 0x000f427d transferTofrom + 413 > > 12 com.squeak.Cog 0x000f4706 synchronousSignal + 262 > > 13 com.squeak.Cog 0x000f7fb1 > checkForEventsMayContextSwitch + 625 > > 14 com.squeak.Cog 0x000f82b0 ceCheckForInterrupts + 16 > > 15 ??? 0x181106e3 0 + 403769059 > > 16 com.squeak.Cog 0x00104976 interpret + 3174 > > 17 com.squeak.Cog 0x0005f7a0 EventLoopEventHandler + > 144 > > 18 com.apple.HIToolbox 0x910f9c2f > DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) > + 1567 > > 19 com.apple.HIToolbox 0x910f8ef6 > SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, > HandlerCallRec*) + 411 > > 20 com.apple.HIToolbox 0x910f8d55 > SendEventToEventTargetWithOptions + 58 > > 21 com.apple.HIToolbox 0x9112da24 > ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, > void*) + 3006 > > 22 com.apple.HIToolbox 0x910fa080 > DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) > + 2672 > > 23 com.apple.HIToolbox 0x910f8ef6 > SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, > HandlerCallRec*) + 411 > > 24 com.apple.HIToolbox 0x9111b7f3 SendEventToEventTarget + > 52 > > 25 com.apple.HIToolbox 0x912a4c17 ToolboxEventDispatcher + > 86 > > 26 com.apple.HIToolbox 0x912a4d4f RunApplicationEventLoop + > 243 > > 27 com.squeak.Cog 0x0005efba > RunApplicationEventLoopWithSqueak + 218 > > 28 com.squeak.Cog 0x000711b2 main + 690 > > 29 com.squeak.Cog 0x00002b56 start + 54 > > > > > > > > > > > -- _,,,^..^,,,_ best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/b7c69b2c/attachment.htm From ma.chris.m at gmail.com Tue May 31 18:19:23 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue May 31 18:20:06 2016 Subject: [squeak-dev] Files-ul.154 seems dangerous, is it needed? In-Reply-To: References: <20160530220324.GA27465@shell.msen.com> Message-ID: You're right, I've never imagined a system that would need to be flipping the mode back and forth. In that case, adoptInstance is quicker, but since we've had to special-case it, its certainly more "complex" and the fact that swapping out an objects class is not a common thing to do in Smalltalk, it seems fair to say its less legible. That's not an objection, though. :) On Tue, May 31, 2016 at 11:12 AM, Levente Uzonyi wrote: > On Tue, 31 May 2016, Chris Muller wrote: > >>> It's an optimization, so it's not mandatory. Of course it's nice to have, >> >> >> An optimization of what? Execution speed? Is it such an optimization >> that any human could ever possibly notice? Setting the mode of a >> stream, really? > > > I suspect that you expect one to set mode at most once per stream, which is > not always the case. > I could easily give you an artificial benchmark showing 30x speedup, but > that would make no sense. > It's a library method and as such, why not make it quicker when possible? > >> >> I like most of your optimizations but, IMO, this one is so >> infinitesmal, I don't think it exceeds the cost of the decreased >> legibility / complexity.. > > > Please explain the legibility / complexity part. > > Levente > >> >> > From ma.chris.m at gmail.com Tue May 31 18:40:45 2016 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue May 31 18:41:27 2016 Subject: [squeak-dev] New Window and Focus related preferences Message-ID: HI all, with Morphic-mt.1154, Marcel did a great upgrade to the focus-related preferences introduced last October. He was able to reduce the number of preferences from four to three, while eliminating all semantic ambiguity between them AND keeping all of the existing functionality. The old preferences: mouseOverForKeyboardFocus Focus Follows Mouse Window Active On First Click Windows Raise On Click have been replaced with just these three: Windows' Contents Are Always Active Windows' Controls Are Always Active Windows Raise On Any Click and yet every combination of variability among the dimensions of z-ordering, widget focus, and window focus are still available, except now, unambiguously. Nice work! From gettimothy at zoho.com Tue May 31 18:54:03 2016 From: gettimothy at zoho.com (gettimothy) Date: Tue May 31 18:54:09 2016 Subject: [squeak-dev] New Window and Focus related preferences In-Reply-To: References: Message-ID: <155082a64d3.cff3db806094.2972102598216636125@zoho.com> Thank you. ---- On Tue, 31 May 2016 14:40:45 -0400 Chris Muller <ma.chris.m@gmail.com> wrote ---- HI all, with Morphic-mt.1154, Marcel did a great upgrade to the focus-related preferences introduced last October. He was able to reduce the number of preferences from four to three, while eliminating all semantic ambiguity between them AND keeping all of the existing functionality. The old preferences: mouseOverForKeyboardFocus Focus Follows Mouse Window Active On First Click Windows Raise On Click have been replaced with just these three: Windows' Contents Are Always Active Windows' Controls Are Always Active Windows Raise On Any Click and yet every combination of variability among the dimensions of z-ordering, widget focus, and window focus are still available, except now, unambiguously. Nice work! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/d105d799/attachment.htm From gettimothy at zoho.com Tue May 31 20:28:33 2016 From: gettimothy at zoho.com (gettimothy) Date: Tue May 31 20:28:38 2016 Subject: [squeak-dev] How do I debug the debugger? Message-ID: <1550880e766.cb36eb857079.415252399705242259@zoho.com> Hi all. I am trying to track down this bug: https://timmydosmalltalk.wordpress.com/2016/05/29/linux-64x64-squeak-cog-spur-display-problems/ I need to debug how that debugger window gets built. ideas? thx -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/d9f30cb4/attachment.htm From jakob.reschke at student.hpi.de Tue May 31 20:40:51 2016 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Tue May 31 20:41:15 2016 Subject: [squeak-dev] How do I debug the debugger? In-Reply-To: <0e3c5cfaf08b487e851485db9b259339@MX2015-DAG2.hpi.uni-potsdam.de> References: <0e3c5cfaf08b487e851485db9b259339@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: You could start by putting a breakpoint in Debugger class>>morphicOpenOn:context:label:contents:fullView: or ToolBuilder>>openDebugger:label: Also save your image before you start your debugging attempt. The last time I tried to debug the Debugger, stepping out of the original context or, in general, pressing the wrong button at the wrong time gave me countless more debuggers or froze the image. However, if you only navigate through the ToolBuilder code, you might be better off. 2016-05-31 22:28 GMT+02:00 gettimothy : > Hi all. > > I am trying to track down this bug: > > https://timmydosmalltalk.wordpress.com/2016/05/29/linux-64x64-squeak-cog-spur-display-problems/ > > > I need to debug how that debugger window gets built. > > ideas? > > thx > > > From gettimothy at zoho.com Tue May 31 20:58:10 2016 From: gettimothy at zoho.com (gettimothy) Date: Tue May 31 20:58:16 2016 Subject: [squeak-dev] How do I debug the debugger? In-Reply-To: References: <0e3c5cfaf08b487e851485db9b259339@MX2015-DAG2.hpi.uni-potsdam.de> Message-ID: <155089c04f6.ba158c067394.7504195611692703438@zoho.com> Hi Jakob. I just got into ToolBuilder and that is where the problem is. Debugger >>buildFullWith: I am able to make the windows that should be there jump and twitch by not adding some windows to the pluggableWindowSpec components. I will poke around pluggableWindowSpec now. thx. . ---- On Tue, 31 May 2016 16:40:51 -0400 Jakob Reschke<jakob.reschke@student.hpi.de> wrote ---- You could start by putting a breakpoint in Debugger class>>morphicOpenOn:context:label:contents:fullView: or ToolBuilder>>openDebugger:label: Also save your image before you start your debugging attempt. The last time I tried to debug the Debugger, stepping out of the original context or, in general, pressing the wrong button at the wrong time gave me countless more debuggers or froze the image. However, if you only navigate through the ToolBuilder code, you might be better off. 2016-05-31 22:28 GMT+02:00 gettimothy <gettimothy@zoho.com>: > Hi all. > > I am trying to track down this bug: > > https://timmydosmalltalk.wordpress.com/2016/05/29/linux-64x64-squeak-cog-spur-display-problems/ > > > I need to debug how that debugger window gets built. > > ideas? > > thx > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160531/90df94cb/attachment.htm From commits at source.squeak.org Tue May 31 21:26:51 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 31 21:27:33 2016 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-cmm.164.mcz Message-ID: Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.164.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-cmm.164 Author: cmm Time: 31 May 2016, 4:26:42.939857 pm UUID: bd968a1e-4af0-4499-98b4-bd3fa99f7f14 Ancestors: ToolBuilder-Morphic-mt.163 - Make #balloonText, like #printString, less disruptive to the user-interface when there's a problem. - Clarify the name of the preference which allows filtering hierarchical lists by only their labels. =============== Diff against ToolBuilder-Morphic-mt.163 =============== Item was changed: ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- + drawBalloonTextOn: aCanvas - drawBalloonTextOn: aCanvas "Show balloon text in the text morph if it has no contents." + textMorph contents ifNotEmpty: [ ^ self ]. + ([ self balloonText ] + on: Error + do: [ : err | 'error in balloonText' ]) ifNotNil: + [ : text | aCanvas - - textMorph contents ifNotEmpty: [^ self]. - - self balloonText ifNotNil: [:text | - aCanvas drawString: text + in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0)) + font: textMorph textStyle defaultFont "I want italic here" + color: (Color gray: 0.7) ]! - in: (self innerBounds insetBy: (5@2 corner: 0@0)) - font: textMorph textStyle defaultFont - color: (Color gray: 0.7)].! Item was changed: ----- Method: PluggableTreeMorph class>>filterByLabelsOnly (in category 'preferences') ----- filterByLabelsOnly + ^ FilterByLabelsOnly ifNil: [ false ]! From Das.Linux at gmx.de Tue May 31 21:42:20 2016 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue May 31 21:42:40 2016 Subject: Formatting? was: Re: [squeak-dev] The Trunk: ToolBuilder-Morphic-cmm.164.mcz Message-ID: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> On 31.05.2016, at 21:26, commits@source.squeak.org wrote: > Item was changed: > ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- > + drawBalloonTextOn: aCanvas > - drawBalloonTextOn: aCanvas > "Show balloon text in the text morph if it has no contents." > + textMorph contents ifNotEmpty: [ ^ self ]. > + ([ self balloonText ] > + on: Error > + do: [ : err | 'error in balloonText' ]) ifNotNil: > + [ : text | aCanvas > - > - textMorph contents ifNotEmpty: [^ self]. > - > - self balloonText ifNotNil: [:text | > - aCanvas > drawString: text > + in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0)) > + font: textMorph textStyle defaultFont "I want italic here" > + color: (Color gray: 0.7) ]! > - in: (self innerBounds insetBy: (5@2 corner: 0@0)) > - font: textMorph textStyle defaultFont > - color: (Color gray: 0.7)].! Just curious, why are you adding spaces everywhere? :) Best regards -toibas From commits at source.squeak.org Tue May 31 21:58:07 2016 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue May 31 21:58:09 2016 Subject: [squeak-dev] Daily Commit Log Message-ID: <20160531215807.28640.qmail@box4.squeak.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2016-May/068153.html Name: Morphic-ul.1151 Ancestors: Morphic-mt.1150 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #1. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068154.html Name: Morphic-ul.1152 Ancestors: Morphic-ul.1151 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #2. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068155.html Name: Morphic-ul.1153 Ancestors: Morphic-ul.1152 Make MorphicAlarmQueue not be a subclass of Heap. Use encapsulation instead. Part #3. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068156.html Name: Morphic-mt.1154 Ancestors: Morphic-ul.1153 Another refactoring of SystemWindow. Improves readability of window properties: Windows Raise on Any Click Windows' Contents Are Always Active Windows' Controls Are Always Active Thanks to Chris for pointing out several issues. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068157.html Name: Kernel-mt.1027 Ancestors: Kernel-pre.1026 Appendix to Morphic-mt.1154. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2016-May/068158.html Name: ToolBuilder-Morphic-cmm.164 Ancestors: ToolBuilder-Morphic-mt.163 - Make #balloonText, like #printString, less disruptive to the user-interface when there's a problem. - Clarify the name of the preference which allows filtering hierarchical lists by only their labels. ============================================= From asqueaker at gmail.com Tue May 31 21:58:09 2016 From: asqueaker at gmail.com (Chris Muller) Date: Tue May 31 21:58:51 2016 Subject: Formatting? was: Re: [squeak-dev] The Trunk: ToolBuilder-Morphic-cmm.164.mcz In-Reply-To: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> References: <6F818A97-F08F-45AD-A589-5E12EC19CB35@gmx.de> Message-ID: By "everywhere" I assume you mean the ones just inside my brackets? When block arguments are written without a space between the colon and variable name, like this: coll do: [:each|each do something] then I can't simply double-click the "each" declaration and then use Cmd+g to find further occurrences, because double-clicking it also selects the colon. So, I could write: coll do: [: each|each do something] but it looks strange to me. But also for easier expression editing. With no space, it is harder to select the inner expression via double clicking just inside the opening bracket; because a space there affords the user more width to hit the expression than the narrow colon. This effect can be verified on a computer with touch pad with **separate buttons** (e.g., able to double-click without moving the mouse even one pixel). 1) put a space there, 2) place mouse about halfway into width of the space. 3) Without touching touch pad, double-click to ensure expression is selected. 4) Now single-click to deselect expression. 5) Now press [Delete] to delete the space. 6) Without touching touch pad, again double-click in the exact same spot. The colon is selected instead of the expression. On Tue, May 31, 2016 at 4:42 PM, Tobias Pape wrote: > > On 31.05.2016, at 21:26, commits@source.squeak.org wrote: > > >> Item was changed: >> ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- >> + drawBalloonTextOn: aCanvas >> - drawBalloonTextOn: aCanvas >> "Show balloon text in the text morph if it has no contents." >> + textMorph contents ifNotEmpty: [ ^ self ]. >> + ([ self balloonText ] >> + on: Error >> + do: [ : err | 'error in balloonText' ]) ifNotNil: >> + [ : text | aCanvas >> - >> - textMorph contents ifNotEmpty: [^ self]. >> - >> - self balloonText ifNotNil: [:text | >> - aCanvas >> drawString: text >> + in: (self innerBounds insetBy: (5 @ 2 corner: 0 @ 0)) >> + font: textMorph textStyle defaultFont "I want italic here" >> + color: (Color gray: 0.7) ]! >> - in: (self innerBounds insetBy: (5@2 corner: 0@0)) >> - font: textMorph textStyle defaultFont >> - color: (Color gray: 0.7)].! > > Just curious, why are you adding spaces everywhere? > :) > Best regards > -toibas From Yoshiki.Ohshima at acm.org Tue May 31 22:09:22 2016 From: Yoshiki.Ohshima at acm.org (Yoshiki Ohshima) Date: Tue May 31 22:09:25 2016 Subject: [squeak-dev] International text input on X11 In-Reply-To: References: <20160514030535.GB15271@shell.msen.com> <70720C82-CCB2-4D9D-83E1-35E2E8A58740@gmail.com> <20160515045834.GA18254@shell.msen.com> Message-ID: Hi Tim, As the VM changes for this matter is in shape (if I'm not mistaken, the plugins.ext has to have ImmX11Plugin), the following image side changes will greatly help the usability for kids in Japan and elsewhere. Can you add those at some point? On Sun, May 15, 2016 at 1:19 PM, Yoshiki Ohshima wrote: > Then on the image side, we need to fix ImmX11>>keyboardFocusForMorph: > to support non-TextMorphs. My feeble attempt involves to test whether > the given morph understand #paragraph and make it read: > > ------------------- > keyboardFocusForAMorph: aMorph > > aMorph ifNil: [^ self]. > [ > | left bottom pos height | > pos := aMorph preferredKeyboardPosition. > left := (pos x min: Display width max: 0) asInteger. > (aMorph respondsTo: #paragraph) ifTrue: [ > height := (aMorph paragraph > characterBlockForIndex: aMorph editor selectionInterval first) height > ] ifFalse: [ > height := aMorph height]. > bottom := (pos y min: Display height max: 0) asInteger > + height. > self setCompositionWindowPositionX: left y: bottom asInteger > ] on: Error > do: [:ex |]. > > ------------------- > (#asInteger is sent so that the primitive does not get floats.) > > and then to use it StringFieldMorph (and possible a few other classes) > need its #keyboardFocusChange: to read: > > ------------------- > keyboardFocusChange: t1 > (t1 > and: [isKeyboardFocus not]) > ifTrue: [lastContents := stringMorph contents]. > (isKeyboardFocus > and: [t1 not]) > ifTrue: [lastContents := nil. > isNumeric > ifTrue: [self contents: stringMorph contents asNumberNoError printStringNoExponent]. > acceptWhenFocusLost > ifTrue: [self acceptEdits]]. > isKeyboardFocus := t1. > isKeyboardFocus > ifTrue: [selectionStart := 0. > selectionEnd := stringMorph contents size]. > "This line below" > isKeyboardFocus ifTrue: [ActiveHand compositionWindowManager keyboardFocusForAMorph: self]. > self changed > ------------------- > > The result is that when the input method is enabled, and the user > tries to type into a field, the preedit window shows up right there > where you are typing in. -- -- Yoshiki