From craig at netjam.org Sun Mar 1 01:13:02 2015 From: craig at netjam.org (Craig Latta) Date: Sun Mar 1 01:13:16 2015 Subject: [squeak-dev] re: The Trunk: Kernel-ul.906.mcz In-Reply-To: <20150227012849.GA16045@shell.msen.com> References: <201502262103.t1QL3SdO071768@shell.msen.com> <20150227012849.GA16045@shell.msen.com> Message-ID: > I remember someone long ago (maybe it was Andreas or Dan?) describing > Squeak as a "computer science degree in a box". It was Jim Benson: http://tinyurl.com/os3hjz9 (lists.squeakfoundation.org) -C -- Craig Latta netjam.org +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From herbertkoenig at gmx.net Sun Mar 1 03:16:40 2015 From: herbertkoenig at gmx.net (=?ISO-8859-1?Q?Herbert_K=F6nig?=) Date: Sun Mar 1 03:16:47 2015 Subject: =?US-ASCII?Q?AW:_Re:_[squeak-dev]_community_decision_?= =?US-ASCII?Q?making_(was:_The_Trunk:=0D_=09Tools-mt.534.mcz)?= Message-ID: Hi, I voted for sort preferece I have to enable because i have a visual memory and resorting forces me to search. For new code it doesn't matter but once I used a (any) order I must not change it. One vote explained :-) Cheers Herbert (phone)
-------- Urspr?ngliche Nachricht --------
Von: "David T. Lewis"
Datum:28.02.2015 20:26 (GMT+01:00)
An: ma.chris.m@gmail.com,The general-purpose Squeak developers list
Betreff: Re: [squeak-dev] community decision making (was: The Trunk: Tools-mt.534.mcz)
On Sat, Feb 28, 2015 at 12:48:14PM -0600, Chris Muller wrote: > > Ha! I just voted, and it looks like the number of different opinions > > exactly matches the number of people who have voted so far. > > > > If we could get one more person to vote, then stop the election, we > > would have a decision ;-) > > > > Joking aside, there is something to be said for taking of poll to find > > out what most people want, without regard for who has the loudest opinion. > > It already is without regard to loudness, the loudest voters still > only get one vote. > > > So folks - if you have an opinion on this topic, please follow the link > > above and click on your preference. > > Voting has been a last resort, not a first resort, of decision-making > by this community.? When an issue comes up, the people who care enough > about that issue to step up and present the reasons of their position > to their peers, so that a community consensus is arrived at based on > community-input from those with a vested interest. > > By contrast, some external, anonymous poll in which dozens folks who > don't participate much, don't care that much because they started a > Squeak image 3 times in their whole life, -- those folks having as > much pull as everyone else who is more-vested. > > Besides, how can we know such an external poll is even fair?? Could > someone vote multiple times from different computers, for example? > Right here, we know any votes are fair, and by the discussions we know > the *reasons* for the outcome.. Sure, no disagreement. Like most attempts at democratic processes, it probably will not work very well. But sometimes we don't actually know how people are using the system, and asking the broader community for input is one way to get information. Think of the poll as a way to ask for input that you can use to make an informed decision. I don't know if it will work, but it seems worth a try, so let's see what happens. Dave -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150301/b94b468a/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 1 09:16:20 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 1 09:24:25 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: References: <1425058521607-4808402.post@n4.nabble.com> Message-ID: <1425201380167-4808631.post@n4.nabble.com> Chris Muller-3 wrote > I didn't realize this was for method categories too because you said > the "System Browser", which I almost never use.. This actually > affects every browser with a message-category list. > > The type of ordering I like to do for message protocols is "usage > order". For example: > > setup > build > summarize > private > > In this object, you have to do a "setup" before you can "build". You > have to "build" before you can "summarize". Alphabetical order blows > that up and now puts private in the middle instead of at the bottom, > where I prefer it to be.. > > ... I know and support this scenario. To avoid messing up such an order, you could/should prepend "1 - ...", "2 - ..." etc. to your categories. Otherwise this is quite unstable. I guess. :) See RBParser, for example. They do it with A/B/C for documenting categories. I will make it a preference and disable it by default. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-534-mcz-tp4808262p4808631.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Mar 1 09:46:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 1 09:46:54 2015 Subject: [squeak-dev] The Trunk: Tools-mt.535.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.535.mcz ==================== Summary ==================== Name: Tools-mt.535 Author: mt Time: 1 March 2015, 10:46:38.721 am UUID: 5406c378-35cd-1d43-aa16-abb5ec8b11e2 Ancestors: Tools-mt.534 New preference for auto-sorting the message category list. Disabled by default. =============== Diff against Tools-mt.534 =============== Item was changed: CodeHolder subclass: #Browser instanceVariableNames: 'environment systemOrganizer classOrganizer metaClassOrganizer editSelection metaClassIndicated selectedSystemCategory selectedClassName selectedMessageName selectedMessageCategoryName' + classVariableNames: 'ListClassesHierarchically RecentClasses SortMessageCategoriesAlphabetically' - classVariableNames: 'ListClassesHierarchically RecentClasses' poolDictionaries: '' category: 'Tools-Browser'! !Browser commentStamp: 'cwp 12/27/2012 11:09' prior: 0! I represent a query path into the class descriptions, the software of the system.! Item was added: + ----- Method: Browser class>>sortMessageCategoriesAlphabetically (in category 'preferences') ----- + sortMessageCategoriesAlphabetically + + + + ^ SortMessageCategoriesAlphabetically ifNil: [false] + ! Item was added: + ----- Method: Browser class>>sortMessageCategoriesAlphabetically: (in category 'preferences') ----- + sortMessageCategoriesAlphabetically: aBoolean + + SortMessageCategoriesAlphabetically := aBoolean. + ! Item was changed: ----- Method: Browser>>messageCategoryList (in category 'message category list') ----- messageCategoryList "Answer the selected category of messages." + ^ self hasClassSelected + ifFalse: [Array new] + ifTrue: [ {ClassOrganizer allCategory}, + (self class sortMessageCategoriesAlphabetically + ifTrue: [self rawMessageCategoryList sorted] + ifFalse: [self rawMessageCategoryList]) ]! - self hasClassSelected - ifTrue: [^ (Array with: ClassOrganizer allCategory), self classOrMetaClassOrganizer categories sorted] - ifFalse: [^ Array new]! From leves at elte.hu Sun Mar 1 10:40:47 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 1 10:40:50 2015 Subject: [squeak-dev] last update 299 might be broken In-Reply-To: References: Message-ID: On Sat, 28 Feb 2015, Nicolas Cellier wrote: > Hi, > it seems that last update is loading Graphics first and thus removing CornerRounder before loading Morphic. Alas, the old Morphic might still be using CornerRounder. > > In some old images still using some rounded things it happened that the update process failed with unresponsive image (recursive error or something...). > > I disabled all the rounded* Preferences, but it does not seem to be enough (I think the progress dialog itself must be using rounded corners or some thing like that...). > > Can we fix that? > (for example just delay inclusion of latest Graphics - that is exclude it from the latest update) I've changed the last update map to load Graphics-kfr.305 instead of Graphics-mt.307. Levente > > From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 1 12:42:19 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 1 12:50:24 2015 Subject: [squeak-dev] Re: last update 299 might be broken In-Reply-To: References: Message-ID: <1425213739514-4808665.post@n4.nabble.com> We could just re-introduce the CornerRounder until the dependencies are fixed. I thought that committing Morphic before Graphics ensures some kind of update order. Why does this happen? Best, Marcel -- View this message in context: http://forum.world.st/last-update-299-might-be-broken-tp4808593p4808665.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 1 12:44:55 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 1 12:52:58 2015 Subject: [squeak-dev] Re: last update 299 might be broken In-Reply-To: References: Message-ID: <1425213895724-4808666.post@n4.nabble.com> Yes, the SystemProgressMorph is a Singleton. Changing the preference for roundedMenuCorners does not affect it until calling "SystemProgressMorph reset" Best, Marcel -- View this message in context: http://forum.world.st/last-update-299-might-be-broken-tp4808593p4808666.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From nicolas.cellier.aka.nice at gmail.com Sun Mar 1 14:26:42 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Sun Mar 1 14:26:45 2015 Subject: [squeak-dev] Re: last update 299 might be broken In-Reply-To: <1425213895724-4808666.post@n4.nabble.com> References: <1425213895724-4808666.post@n4.nabble.com> Message-ID: Levente, thanks it now works like a charm. Marcel, nothing more needs to be done, it's now updating smoothly. Well, of course, I mean a lot yet remain to be done to Morphic, but you had a great start ;) 2015-03-01 13:44 GMT+01:00 Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de>: > Yes, the SystemProgressMorph is a Singleton. Changing the preference for > roundedMenuCorners does not affect it until calling "SystemProgressMorph > reset" > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/last-update-299-might-be-broken-tp4808593p4808666.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/20150301/cf77e607/attachment.htm From leves at elte.hu Sun Mar 1 14:49:31 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 1 14:49:36 2015 Subject: [squeak-dev] Re: last update 299 might be broken In-Reply-To: <1425213739514-4808665.post@n4.nabble.com> References: <1425213739514-4808665.post@n4.nabble.com> Message-ID: On Sun, 1 Mar 2015, Marcel Taeumel wrote: > We could just re-introduce the CornerRounder until the dependencies are > fixed. I thought that committing Morphic before Graphics ensures some kind > of update order. > > Why does this happen? The load order is defined by the update map (aka Monticello Confiruation, aka .mcm file). Commit order has no effect on the load order. Levente > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/last-update-299-might-be-broken-tp4808593p4808665.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From commits at source.squeak.org Sun Mar 1 16:41:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 1 16:41:45 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.767.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.767.mcz ==================== Summary ==================== Name: Morphic-mt.767 Author: mt Time: 1 March 2015, 5:41:07.646 pm UUID: aeb8e33f-7b90-7545-b3fa-b83eb88cad79 Ancestors: Morphic-mt.766 Make TransformMorph use #clipSubmorphs: as specified in Morph. Having this, TransforMorphs can have a #layoutPolicy: again. #layoutBounds overwritten to respect local coordinate system. =============== Diff against Morphic-mt.766 =============== Item was removed: - ----- Method: TransformMorph>>fullBounds (in category 'layout') ----- - fullBounds - "Overridden to clip submorph hit detection to my bounds." - "It might be better to override doLayoutIn:, and remove this method" - - fullBounds ifNotNil:[^ fullBounds]. - fullBounds := bounds. - submorphs do: [:m| m ownerChanged]. - ^ fullBounds! Item was changed: ----- Method: TransformMorph>>initialize (in category 'initialization') ----- initialize "initialize the state of the receiver" super initialize. "" smoothing := 1. + transform := MorphicTransform identity. + self clipSubmorphs: true.! - transform := MorphicTransform identity! Item was added: + ----- Method: TransformMorph>>layoutBounds (in category 'layout') ----- + layoutBounds + + ^ (transform globalBoundsToLocal: super layoutBounds) truncated + ! From bert at freudenbergs.de Sun Mar 1 18:02:10 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Mar 1 18:02:40 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: References: <1425058521607-4808402.post@n4.nabble.com> Message-ID: <96035146-0745-467C-BA0E-6AA9F90AF23D@freudenbergs.de> On 28.02.2015, at 09:58, Chris Muller wrote: > > The type of ordering I like to do for message protocols is "usage > order". For example: > > setup > build > summarize > private > > In this object, you have to do a "setup" before you can "build". You > have to "build" before you can "summarize". Alphabetical order blows > that up and now puts private in the middle instead of at the bottom, > where I prefer it to be.. +1 We do have a problem with Monticello, which often messes up the order. I agree with Marcel that alphabetic is better than random, but a careful manual order is much better than alphabetic. You may need to have worked in a pre MC image for a while to appreciate that. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150301/d8805247/smime.bin From commits at source.squeak.org Sun Mar 1 20:19:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 1 20:19:18 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.94.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.94.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.94 Author: mt Time: 1 March 2015, 9:19:10.471 pm UUID: 1fb0b656-e93e-2540-8164-a993206d8cce Ancestors: ToolBuilder-Morphic-mt.93 Fixed creation of pluggable scroll pane. Failed to use correct interface for #whenNeeded behavior of scroll bars. =============== Diff against ToolBuilder-Morphic-mt.93 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableScrollPane: (in category 'widgets optional') ----- buildPluggableScrollPane: spec | widget | widget := self scrollPaneClass new. widget model: spec model. self register: widget id: spec name. spec children ifNotNil: [:obj | "Create panel morph to scroll it." widget morph: (self pluggablePanelSpec new children: obj; layout: spec layout; frame: (0@0 corner: 1@1); buildWith: self). spec layout ~~ #proportional ifTrue: [ "Fix #spaceFill resizing because it does not make sense in scroll pane." widget morph hResizing: #shrinkWrap; vResizing: #shrinkWrap. widget morph submorphsDo: [:m | m extent: 100@100; flag: #refactor; "mt: Restore orginial properties?" hResizing: #rigid; vResizing: #rigid] ]] ifNil: [spec morph ifNotNil: [:m | widget morph: m] ifNil: [widget morphClass: spec morphClass]]. self setFrame: spec frame in: widget. parent ifNotNil: [self add: widget to: parent]. widget borderWidth: spec borderWidth. spec hScrollBarPolicy caseOf: { [#always] -> [widget alwaysShowHScrollBar: true]. [#never] -> [widget hideHScrollBarIndefinitely: true]. + [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded: false]}. - [#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded: true]}. spec vScrollBarPolicy caseOf: { [#always] -> [widget alwaysShowVScrollBar: true]. [#never] -> [widget hideVScrollBarIndefinitely: true]. + [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded: false]}. - [#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded: true]}. ^ widget! From commits at source.squeak.org Sun Mar 1 20:35:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 1 20:35:50 2015 Subject: [squeak-dev] The Inbox: Tools-mt.536.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Inbox: http://source.squeak.org/inbox/Tools-mt.536.mcz ==================== Summary ==================== Name: Tools-mt.536 Author: mt Time: 1 March 2015, 9:35:39.627 pm UUID: 1ab7460c-c7be-f647-a881-9bca8ab6e605 Ancestors: Tools-mt.535 NEW TOOL: Object Collection Tool Drag and drop classes or methods from the browser into it to open mini-editors in a list. Dropping morphs will open an object explorer for that morph. ObjectCollectionTool open. =============== Diff against Tools-mt.535 =============== Item was added: + Morph subclass: #ObjectCollectionItem + instanceVariableNames: 'object' + classVariableNames: '' + poolDictionaries: '' + category: 'Tools-Browser'! Item was added: + ----- Method: ObjectCollectionItem class>>on:object: (in category 'instance creation') ----- + on: aMorph object: anObject + + aMorph + hResizing: #spaceFill; + vResizing: #spaceFill. + + ^ self new + object: anObject; + addMorphFront: aMorph; + yourself! Item was added: + ----- Method: ObjectCollectionItem>>fastFramingOn (in category 'compatibility') ----- + fastFramingOn + "Compatibility with system window interface. Needed by grip morphs." + + ^ false! Item was added: + ----- Method: ObjectCollectionItem>>initialize (in category 'initialization') ----- + initialize + + super initialize. + self + height: 200; + color: Color transparent; + layoutPolicy: TableLayout new; + listDirection: #topToBottom; + hResizing: #spaceFill; + vResizing: #rigid. + + self addMorph: (BottomGripMorph new target: self).! Item was added: + ----- Method: ObjectCollectionItem>>object (in category 'accessing') ----- + object + + ^ object! Item was added: + ----- Method: ObjectCollectionItem>>object: (in category 'accessing') ----- + object: anObject + + object := anObject.! Item was added: + Morph subclass: #ObjectCollectionPane + instanceVariableNames: 'model' + classVariableNames: '' + poolDictionaries: '' + category: 'Tools-Browser'! Item was added: + ----- Method: ObjectCollectionPane>>acceptDroppingMorph:event: (in category 'drag and drop') ----- + acceptDroppingMorph: aMorph event: evt + + self model + acceptDroppingMorph: aMorph + event: evt + inMorph: self.! Item was added: + ----- Method: ObjectCollectionPane>>adoptPaneColor: (in category 'accessing') ----- + adoptPaneColor: c + + self + color: c; + borderColor: c darker darker. + + super adoptPaneColor: c.! Item was added: + ----- Method: ObjectCollectionPane>>drawOn: (in category 'initialization') ----- + drawOn: aCanvas + + super drawOn: aCanvas. + + ('Drop objects here or in-between. Close editors with CMD+W.' asText + addAttribute: (TextColor color: self borderStyle color darker); + asMorph) + center: (self center x @ (self bottom - 10)); + drawOn: aCanvas.! Item was added: + ----- Method: ObjectCollectionPane>>initialize (in category 'initialization') ----- + initialize + + super initialize. + self + height: 200; + layoutPolicy: TableLayout new; + layoutInset: (0@0 corner: 0@25); + listDirection: #topToBottom; + hResizing: #spaceFill; + vResizing: #shrinkWrap; + dropEnabled: true.! Item was added: + ----- Method: ObjectCollectionPane>>model (in category 'accessing') ----- + model + + ^ model! Item was added: + ----- Method: ObjectCollectionPane>>model: (in category 'accessing') ----- + model: anObjectCollectionTool + + model := anObjectCollectionTool.! Item was added: + ----- Method: ObjectCollectionPane>>removedMorph: (in category 'submorphs-add/remove') ----- + removedMorph: anItem + + self model removeObject: anItem object.! Item was added: + ----- Method: ObjectCollectionPane>>submorphAt: (in category 'submorphs-accessing') ----- + submorphAt: position + + ^ (self morphsAt: position) + detect: [:m | self submorphs includes: m] + ifNone: []! Item was added: + ----- Method: ObjectCollectionPane>>wantsDroppedMorph:event: (in category 'drag and drop') ----- + wantsDroppedMorph: aMorph event: evt + + ^ self model + wantsDroppedMorph: aMorph + event: evt + inMorph: self! Item was added: + Model subclass: #ObjectCollectionTool + instanceVariableNames: 'objects' + classVariableNames: '' + poolDictionaries: '' + category: 'Tools-Browser'! Item was added: + ----- Method: ObjectCollectionTool class>>open (in category 'instance creation') ----- + open + + ^ (ToolBuilder open: self new) model! Item was added: + ----- Method: ObjectCollectionTool class>>windowColorSpecification (in category 'instance creation') ----- + windowColorSpecification + "WindowColorRegistry refresh." + + ^ WindowColorSpec + classSymbol: self name + wording: 'Object Collection Tool' + brightColor: #lightGreen + pastelColor: #paleGreen + helpMessage: ''! Item was added: + ----- Method: ObjectCollectionTool>>acceptDroppingMorph:event:inMorph: (in category 'drag and drop') ----- + acceptDroppingMorph: transferMorph event: dropEvent inMorph: collectionPane + + | object | + object := (transferMorph respondsTo: #passenger) + ifTrue: [transferMorph passenger] + ifFalse: [transferMorph]. + self + buildWidgetFor: object + then: [:widget | + (ObjectCollectionItem on: widget object: object) in: [:newItem | + (collectionPane submorphAt: dropEvent position) + ifNil: [collectionPane addMorphBack: newItem] + ifNotNil: [:m | + dropEvent position y < m center y + ifTrue: [collectionPane addMorph: newItem inFrontOf: m] + ifFalse: [collectionPane addMorph: newItem behind: m]] ]. + self addObject: object]. + + .! Item was added: + ----- Method: ObjectCollectionTool>>addObject: (in category 'accessing - objects') ----- + addObject: anObject + + self objects add: anObject. + self changed: #labelString ! Item was added: + ----- Method: ObjectCollectionTool>>buildWidgetFor:then: (in category 'widgets') ----- + buildWidgetFor: anObject then: actionBlock + + (anObject isKindOf: CompiledMethod) + ifTrue: [^ self buildWidgetForCompiledMethod: anObject then: actionBlock]. + (anObject isKindOf: ClassDescription) + ifTrue: [^ self buildWidgetForClassDescription: anObject then: actionBlock]. + + self buildWidgetForObject: anObject then: actionBlock.! Item was added: + ----- Method: ObjectCollectionTool>>buildWidgetForClassDescription:then: (in category 'widgets') ----- + buildWidgetForClassDescription: cls then: actionBlock + + | builder spec menu | + menu := MenuMorph new + defaultTarget: [:symbol | + builder := ToolBuilder default. + spec := Browser new + selectSystemCategory: cls category; + selectClass: cls; + metaClassIndicated: (symbol = #meta); + editSelection: #editClass; + buildCodePaneWith: builder. + actionBlock value: (builder build: spec)]; + + add: cls theNonMetaClass name selector: #value: argument: #nonMeta; + add: cls theMetaClass name selector: #value: argument: #meta; + popUpAt: self currentEvent position forHand: self currentHand in: self currentWorld. + + "We need to trick the window, which will overlap the menu here." + Project current addDeferredUIMessage:[menu comeToFront].! Item was added: + ----- Method: ObjectCollectionTool>>buildWidgetForCompiledMethod:then: (in category 'widgets') ----- + buildWidgetForCompiledMethod: method then: actionBlock + + | builder spec | + builder := ToolBuilder default. + spec := Browser new + selectSystemCategory: method methodClass category; + selectClass: method methodClass; + metaClassIndicated: method methodClass isMeta; + selectMessageNamed: method selector; + editSelection: #editMessage; + buildCodePaneWith: builder. + + "MethodHolder new + methodClass: method methodClass methodSelector: method selector; + buildCodePaneWith: builder." + + actionBlock value: (builder build: spec).! Item was added: + ----- Method: ObjectCollectionTool>>buildWidgetForObject:then: (in category 'widgets') ----- + buildWidgetForObject: anObject then: actionBlock + "Fall-back if nothing more special can be found." + + actionBlock value: ( + "Get rid of the system window." + Morph new + changeProportionalLayout; + color: Color transparent; + addAllMorphs: (ObjectExplorer new explorerFor: Morph new) paneMorphs; + yourself). + ! Item was added: + ----- Method: ObjectCollectionTool>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + + | windowSpec scrollSpec morph | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + label: #labelString; + children: OrderedCollection new. + + scrollSpec := builder pluggableScrollPaneSpec new. + scrollSpec + name: #scrollPane; + model: self; + hScrollBarPolicy: #never; + vScrollBarPolicy: #whenNeeded; + borderWidth: 0; + morph: (ObjectCollectionPane new + model: self; + yourself); + frame: (0@0 corner: 1@1). + windowSpec children add: scrollSpec. + + morph := builder build: windowSpec. + + "Set the layout policy for the transform morph." + (builder widgetAt: #scrollPane) scroller + layoutPolicy: TableLayout new; + color: morph paneColor darker darker. + (builder widgetAt: #scrollPane) morph + color: morph paneColor. + ActiveHand addKeyboardListener: self. + + ^ morph! Item was added: + ----- Method: ObjectCollectionTool>>defaultBackgroundColor (in category 'user interface') ----- + defaultBackgroundColor + + self flag: #refactor. "mt: Does not use the preference mechansim." + ^ Color colorFrom: self class windowColorSpecification brightColor! Item was added: + ----- Method: ObjectCollectionTool>>handleListenEvent: (in category 'events-processing') ----- + handleListenEvent: anEvent + + "Has something keyboard focus at all?" + anEvent hand keyboardFocus ifNil: [^ self]. + + "CMD+W?" + ((anEvent isKeystroke + and: [anEvent commandKeyPressed]) + and: [anEvent keyCharacter = $w]) + ifFalse: [^ self]. + + "Has keyboard?" + (anEvent hand keyboardFocus firstOwnerSuchThat: [:m | + m isSystemWindow and: [m model == self]]) + ifNil: [^ self]. + + "Which item is it?" + (anEvent hand keyboardFocus firstOwnerSuchThat: [:m | + m owner class = ObjectCollectionPane]) delete.! Item was added: + ----- Method: ObjectCollectionTool>>labelString (in category 'user interface') ----- + labelString + + ^ 'Object Collection Tool ({1})' format: {self objects size}! Item was added: + ----- Method: ObjectCollectionTool>>objects (in category 'accessing - objects') ----- + objects + + ^ objects ifNil: [objects := OrderedCollection new]! Item was added: + ----- Method: ObjectCollectionTool>>removeObject: (in category 'accessing - objects') ----- + removeObject: anObject + + self objects remove: anObject. + self changed: #labelString ! Item was added: + ----- Method: ObjectCollectionTool>>wantsDroppedMorph:event:inMorph: (in category 'drag and drop') ----- + wantsDroppedMorph: transferMorph event: dropEvent inMorph: collectionPane + + ^ collectionPane dropEnabled! Item was added: + ----- Method: ObjectCollectionTool>>windowIsClosing (in category 'updating') ----- + windowIsClosing + + ActiveHand removeKeyboardListener: self.! From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 1 20:31:07 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 1 20:39:12 2015 Subject: [squeak-dev] Re: The Inbox: Tools-mt.536.mcz In-Reply-To: References: Message-ID: <1425241867710-4808732.post@n4.nabble.com> For such a tool to be more effective, we need to provide more drag operations in other tools such as: - Object Explorer - Senders/Implementors Browser - Versions Browser If you want to get rid of the button bars and annotation panes, just disable them in the preferences. Due to code reuse, those are the same as for regular browsers. Do we want such a tool in the trunk? Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Tools-mt-536-mcz-tp4808731p4808732.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Sun Mar 1 20:55:47 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 1 20:55:52 2015 Subject: [squeak-dev] Re: The Inbox: Tools-mt.536.mcz In-Reply-To: <1425241867710-4808732.post@n4.nabble.com> References: <1425241867710-4808732.post@n4.nabble.com> Message-ID: <504AD705-FB50-434D-B6A3-A8A0BFAE4BE0@gmx.de> On 01.03.2015, at 21:31, Marcel Taeumel wrote: > > > For such a tool to be more effective, we need to provide more drag > operations in other tools such as: > > - Object Explorer > - Senders/Implementors Browser > - Versions Browser Also, drag-and-drop for message categories would help sorting ;D Best -Tobias > > If you want to get rid of the button bars and annotation panes, just disable > them in the preferences. Due to code reuse, those are the same as for > regular browsers. > > Do we want such a tool in the trunk? cool! > > Best, > Marcel From commits at source.squeak.org Sun Mar 1 21:06:45 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 1 21:06:46 2015 Subject: [squeak-dev] The Inbox: Tools-topa.537.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-topa.537.mcz ==================== Summary ==================== Name: Tools-topa.537 Author: topa Time: 1 March 2015, 10:06:30.484 pm UUID: 0d48320d-e26c-43d7-8e8a-ca3a1cfdc918 Ancestors: Tools-mt.536 Fix Object collection tool for meta-side methods. Hint: variable name of Browser>>selectClass: classNotMeta =============== Diff against Tools-mt.536 =============== Item was changed: ----- Method: ObjectCollectionTool>>buildWidgetForCompiledMethod:then: (in category 'widgets') ----- buildWidgetForCompiledMethod: method then: actionBlock | builder spec | builder := ToolBuilder default. spec := Browser new selectSystemCategory: method methodClass category; + selectClass: method methodClass theNonMetaClass; - selectClass: method methodClass; metaClassIndicated: method methodClass isMeta; selectMessageNamed: method selector; editSelection: #editMessage; buildCodePaneWith: builder. "MethodHolder new methodClass: method methodClass methodSelector: method selector; buildCodePaneWith: builder." actionBlock value: (builder build: spec).! From asqueaker at gmail.com Mon Mar 2 02:47:54 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Mar 2 02:47:58 2015 Subject: [squeak-dev] Re: The Inbox: Tools-mt.536.mcz In-Reply-To: <1425241867710-4808732.post@n4.nabble.com> References: <1425241867710-4808732.post@n4.nabble.com> Message-ID: Neat. > For such a tool to be more effective, we need to provide more drag > operations in other tools such as: > > - Object Explorer > - Senders/Implementors Browser > - Versions Browser You know with this drag-and-drop you could be on to something which has been been itching me for a long time. A Behavior Browser. Imagine a normal HierarchyBrowser window but dedicated to a particular *object* of that class -- so that when you select a method, in the upper-right corner of the code-pane is a little button which will run that method. Clicking that button runs the method and displays a little "result-icon" (maybe just the letter "R") next to the button. The "R" (result-icon) encapsulates the return-value from running the method and provides a context menu to inspect, explore or open into its _own_ behavior browser. The printString could also be displayed in the code pane (temporarily until another method is selected). Finally, when a keyword message is selected in the behavior browser, Drop-Targets representing the arguments are provided. The button to run the method cannot be clicked until the user has dragged from the "R" result-icons (e.g., from other browsers) into those *input* Drop-Targets of that keyword message. I feel this is the browser that is "missing" from Smalltalk-80 since the beginning.. > If you want to get rid of the button bars and annotation panes, just disable > them in the preferences. Due to code reuse, those are the same as for > regular browsers. > > Do we want such a tool in the trunk? Looks neat, very possibly. So, the power this brings the user is the ability to bring together any heterogeneous collection of objects, methods, Morphs(?), into a Object Collection Tool (OCT) window. I assume it does not save and load into other images so this is meant as a temporary "working organization" of objects and behaviors is that right? For example, I might want to open a OCT window, drag some objects and related methods into it, and then be able to make some code changes to the methods while observing the inspected results right there in the same OCT. Is this how it should be used or another way? Thanks. PS -- when I dragged a variable from an inspector I'm getting a Morph instead of the object. PPS -- What do you think of the Behavior Browser idea? From commits at source.squeak.org Mon Mar 2 08:36:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 2 08:36:45 2015 Subject: [squeak-dev] The Inbox: Tools-mt.538.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Inbox: http://source.squeak.org/inbox/Tools-mt.538.mcz ==================== Summary ==================== Name: Tools-mt.538 Author: mt Time: 2 March 2015, 9:36:27.558 am UUID: 5ca4bf81-d7c0-0e46-ab9a-d5da652f57d3 Ancestors: Tools-topa.537 Fix ObjectCollectionTool: Dropping objects other than method/class now opens object explorer correctly for *that* object (not just "Morph new"). =============== Diff against Tools-topa.537 =============== Item was changed: ----- Method: ObjectCollectionTool>>buildWidgetForObject:then: (in category 'widgets') ----- buildWidgetForObject: anObject then: actionBlock "Fall-back if nothing more special can be found." actionBlock value: ( "Get rid of the system window." Morph new changeProportionalLayout; color: Color transparent; + addAllMorphs: (ObjectExplorer new explorerFor: anObject) paneMorphs; - addAllMorphs: (ObjectExplorer new explorerFor: Morph new) paneMorphs; yourself). ! From commits at source.squeak.org Mon Mar 2 09:42:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 2 09:42:15 2015 Subject: [squeak-dev] The Trunk: Tools-mt.537.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.537.mcz ==================== Summary ==================== Name: Tools-mt.537 Author: mt Time: 2 March 2015, 10:41:49.215 am UUID: eb73e15d-fffe-b942-b160-5b3cf793e656 Ancestors: Tools-mt.535 Make use of proper abstractions/interface in browser models for message category selection. =============== Diff against Tools-mt.535 =============== Item was changed: ----- Method: Browser>>setClass:selector: (in category 'initialize-release') ----- setClass: aBehavior selector: aSymbol "Set the state of a new, uninitialized Browser." + | isMeta aClass | - | isMeta aClass messageCatIndex | aBehavior ifNil: [^ self]. (aBehavior isKindOf: Metaclass) ifTrue: [ isMeta := true. aClass := aBehavior soleInstance] ifFalse: [ isMeta := false. aClass := aBehavior]. + + self + selectEnvironment: aClass environment; + selectCategoryForClass: aClass; + classListIndex: (self classListIndexOf: aClass name); + metaClassIndicated: isMeta; + setSelector: aSymbol.! - self selectEnvironment: aClass environment. - self selectCategoryForClass: aClass. - self classListIndex: (self classListIndexOf: aClass name). - self metaClassIndicated: isMeta. - aSymbol ifNil: [^ self]. - messageCatIndex := aBehavior organization numberOfCategoryOfElement: aSymbol. - self messageCategoryListIndex: (messageCatIndex > 0 - ifTrue: [messageCatIndex + 1] - ifFalse: [0]). - messageCatIndex = 0 ifTrue: [^ self]. - self messageListIndex: ( - (aBehavior organization listAtCategoryNumber: messageCatIndex) - indexOf: aSymbol).! Item was changed: ----- Method: Browser>>setSelector: (in category 'initialize-release') ----- setSelector: aSymbol "Make the receiver point at the given selector, in the currently chosen class" + | aClass | - | aClass messageCatIndex | aSymbol ifNil: [^ self]. (aClass := self selectedClassOrMetaClass) ifNil: [^ self]. + (aClass organization categoryOfElement: aSymbol) + ifNil: [^ self] + ifNotNil: [:category | + self + selectMessageCategoryNamed: category; + selectMessageNamed: aSymbol].! - messageCatIndex := aClass organization numberOfCategoryOfElement: aSymbol. - self messageCategoryListIndex: messageCatIndex + 1. - messageCatIndex = 0 ifTrue: [^ self]. - self messageListIndex: - ((aClass organization listAtCategoryNumber: messageCatIndex) - indexOf: aSymbol)! Item was changed: ----- Method: CodeHolder>>spawnHierarchy (in category 'traits') ----- spawnHierarchy "Create and schedule a new hierarchy browser on the currently selected class or meta." + | newBrowser aSymbol selectedClassOrMetaClass | - | newBrowser aSymbol aBehavior messageCatIndex selectedClassOrMetaClass | (selectedClassOrMetaClass := self selectedClassOrMetaClass) ifNil: [^ self]. selectedClassOrMetaClass isTrait ifTrue: [^self]. newBrowser := HierarchyBrowser new initHierarchyForClass: selectedClassOrMetaClass. ((aSymbol := self selectedMessageName) notNil and: [(MessageSet isPseudoSelector: aSymbol) not]) + ifTrue: [newBrowser setSelector: aSymbol]. - ifTrue: - [aBehavior := selectedClassOrMetaClass. - messageCatIndex := aBehavior organization numberOfCategoryOfElement: aSymbol. - newBrowser messageCategoryListIndex: messageCatIndex + 1. - newBrowser messageListIndex: - ((aBehavior organization listAtCategoryNumber: messageCatIndex) indexOf: aSymbol)]. Browser openBrowserView: (newBrowser openSystemCatEditString: nil) label: newBrowser labelString. Smalltalk isMorphic ifTrue: ["this workaround only needed in morphic" newBrowser assureSelectionsShow]. ^ newBrowser.! From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 2 12:10:17 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 2 12:18:26 2015 Subject: [squeak-dev] Re: The Inbox: Tools-mt.536.mcz In-Reply-To: References: <1425241867710-4808732.post@n4.nabble.com> Message-ID: <1425298217694-4808826.post@n4.nabble.com> Hi Chris, thank you, I fixed that bug with "Morph new". :) The idea with the Behavior Browser sounds interesting. Should not be that difficult to prototype. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Tools-mt-536-mcz-tp4808731p4808826.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Mon Mar 2 17:37:56 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Mar 2 17:38:00 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: I tried to run this on box3, and it just works as expected. But the SqueakTrunk job hasn't produced any artifacts since build #1059. Levente On Tue, 17 Feb 2015, Frank Shearar wrote: > On 16 February 2015 at 19:55, Eliot Miranda wrote: >> >> >> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >> wrote: >>> >>> Reverted, but I still get the same error. >> >> >> What's the last good version? > > I'm not convinced it's a Cog issue: the last known good was 3164 [1] > but the next build showed the "Operation not permitted" problem [2], > also with 3164. > > [1] http://build.squeak.org/job/SqueakTrunk/990/console > [2] http://build.squeak.org/job/SqueakTrunk/991/console > > frank > >>> frank >>> >>> On 15 February 2015 at 18:13, Eliot Miranda >>> wrote: >>>> Hi Frank, >>>> >>>> can you revert to 3253? This one should be good. I'm pretty sure >>>> the >>>> 3254 VMs are subject to the same inlning bug that I mentioned after the >>>> latest VMMaker.oscog commit and am working on fixing now. >>>> >>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>> wrote: >>>>> >>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>> wrote: >>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>> >>>>>> >>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>> update, >>>>>> and changes the default text encoding to UTF-8 on linux. >>>>> >>>>> I updated CI with 3254, and now I see errors like this: >>>>> >>>>> spawning command 1 with timeout 1500 seconds: >>>>> >>>>> >>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>> -vm-sound-null -vm-display-null >>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>> ../update-image.st >>>>> pthread_setschedparam failed: Operation not permitted >>>>> Read e.g. http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>> >>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>> build.squeak.org that looks like this: >>>>> >>>>> * hard rtprio 2 >>>>> * soft rtprio 2 >>>>> >>>>> Thoughts? >>>>> >>>>> frank >>>>> >>>> >>>> >>>> >>>> -- >>>> best, >>>> Eliot >>>> >>>> >>>> >>> >> >> >> >> -- >> best, >> Eliot > > From ma.chris.m at gmail.com Tue Mar 3 00:11:59 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Mar 3 00:12:03 2015 Subject: [squeak-dev] How to view an old Error in the debugger? Message-ID: My app signaled an Error, which was handled at a higher level to present a nice message to the user. However, I want to see the stack that led to it. I have the Error instance that was signaled and I see I have ToolSet class>>#debug:, et al. But by the time it unwinds and I get hold of Error, its signalerContext is gone, so I can't get anything useful from the debugger. As this script shows, in the handler I still have access to the signalerContext, but once I unwind back out, its gone. So is there a way to debug an old error? | errorToDebug | errorToDebug := [Error signal] on: Error do: [ : err | errorToDebug := err. self assert: err signalerContext sender notNil. err ]. self assert: errorToDebug signalerContext sender notNil Thanks. From bert at freudenbergs.de Tue Mar 3 00:23:02 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 3 00:23:07 2015 Subject: [squeak-dev] List filtering broken? Message-ID: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> We used to be able to filter lists by typing a few characters. This still works, but the pane does not turn pink anymore to indicate the filtered state, and it does not revert to the full list when you mouse out. Is anyone else seeing this, or is it just broken in my image? - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150302/c41a94e2/smime.bin From eliot.miranda at gmail.com Tue Mar 3 05:22:14 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 3 05:22:16 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.534.mcz In-Reply-To: <1425060144352-4808408.post@n4.nabble.com> References: <1425058521607-4808402.post@n4.nabble.com> <1425060144352-4808408.post@n4.nabble.com> Message-ID: Hi Marcel, On Fri, Feb 27, 2015 at 10:02 AM, Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > At the moment, programmers can do three things with message categories: > > 1. Define their name. > 2. Define their content. > 3. Define their order. > > Naming is already difficult. Finding the right place for a message can be > challenging, too. > > The thing is that order gets messed up pretty quickly. For example, > extension categories just popup somewhere in between depending on the > projects you have installed. > > My general impression is often that those categories just have *some* order > and *want* to be alphabetized to make any sense out of it. I am not sure > but > w/o describing the intent of an order, it may just appear bogus to a > programmer. > > Personally, I am really happy with anything that I do not have to organize > or care for. Message category orders are such a thing. :-) > > But don't get me wrong: I don't want to push my personal expriences onto > everybody. Let's discuss it here. ;-) > Personally I find ordering of protocols really helpful for productivity, especially with complex classes such as the VM's interpreter classes. These are >100 method classes. I do things like put all the bytecode protocols, stack bytecodes, send bytecodes, return bytecodes, etc, next to each other (which of course doesn't work with alphabetization unless one rewrites to bytecodes-stack etc). I was /mortified/ the first time I loaded VMMaker into a clean image because Monticello *does not record protocols order*. I wish this would be fixed. I find myself alphabetising and then, for certain classes, such as the interpreter, carefully putting things in order. This is wasted effort. Monticello really should preserve order. I have no objection to a preference that tells the browser to display protocols alphabetically. Please don't make it the default. When we did this for VisualWorks (I think it was Vassili Bykov) we ordered initialize protocols at the top, private protocols at the bottom, and everything else in the middle. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Trunk-Tools-mt-534-mcz-tp4808262p4808408.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150302/8ea40abb/attachment.htm From Das.Linux at gmx.de Tue Mar 3 08:08:53 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 3 08:09:06 2015 Subject: [squeak-dev] List filtering broken? In-Reply-To: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> Message-ID: On 03.03.2015, at 01:23, Bert Freudenberg wrote: > We used to be able to filter lists by typing a few characters. This still works, but the pane does not turn pink anymore to indicate the filtered state, and it does not revert to the full list when you mouse out. > > Is anyone else seeing this, or is it just broken in my image? Works from here? Best -Tobias -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1625 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/989b26db/signature.pgp From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 3 08:50:54 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 3 08:59:12 2015 Subject: [squeak-dev] Re: List filtering broken? In-Reply-To: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> Message-ID: <1425372654888-4809065.post@n4.nabble.com> Works for me, too. (Update 14718) Best, Marcel -- View this message in context: http://forum.world.st/List-filtering-broken-tp4809005p4809065.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From frank.shearar at gmail.com Tue Mar 3 12:02:13 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 3 12:02:17 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: Yep, this is the problem that I was trying to resolve the other week with Eliot. I don't think it's a Cog bug, I think it's a bug in our security settings or something. I had a look, things looked OK, but this is well beyond my rememberings of Linux security, hence why it's still broken. frank On 2 March 2015 at 17:37, Levente Uzonyi wrote: > I tried to run this on box3, and it just works as expected. > But the SqueakTrunk job hasn't produced any artifacts since build #1059. > > Levente > > > On Tue, 17 Feb 2015, Frank Shearar wrote: > >> On 16 February 2015 at 19:55, Eliot Miranda >> wrote: >>> >>> >>> >>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>> wrote: >>>> >>>> >>>> Reverted, but I still get the same error. >>> >>> >>> >>> What's the last good version? >> >> >> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >> but the next build showed the "Operation not permitted" problem [2], >> also with 3164. >> >> [1] http://build.squeak.org/job/SqueakTrunk/990/console >> [2] http://build.squeak.org/job/SqueakTrunk/991/console >> >> frank >> >>>> frank >>>> >>>> On 15 February 2015 at 18:13, Eliot Miranda >>>> wrote: >>>>> >>>>> Hi Frank, >>>>> >>>>> can you revert to 3253? This one should be good. I'm pretty sure >>>>> the >>>>> 3254 VMs are subject to the same inlning bug that I mentioned after the >>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>> >>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>> >>>>> wrote: >>>>>> >>>>>> >>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>> wrote: >>>>>>> >>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>> >>>>>>> >>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>> update, >>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>> >>>>>> >>>>>> I updated CI with 3254, and now I see errors like this: >>>>>> >>>>>> spawning command 1 with timeout 1500 seconds: >>>>>> >>>>>> >>>>>> >>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>> -vm-sound-null -vm-display-null >>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>> ../update-image.st >>>>>> pthread_setschedparam failed: Operation not permitted >>>>>> Read e.g. >>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>> >>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>> build.squeak.org that looks like this: >>>>>> >>>>>> * hard rtprio 2 >>>>>> * soft rtprio 2 >>>>>> >>>>>> Thoughts? >>>>>> >>>>>> frank >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> best, >>>>> Eliot >>>>> >>>>> >>>>> >>>> >>> >>> >>> >>> -- >>> best, >>> Eliot >> >> >> > From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 3 13:06:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 3 13:15:00 2015 Subject: [squeak-dev] How to play animated GIFs in Squeak? Message-ID: <1425388001931-4809137.post@n4.nabble.com> Is it possible? There is an "AnimatedGIFReadWriter" class but it only produces some forms that seem not to represent frames --- but I am no expert in how GIFs are encoded at all. :) Best, Marcel -- View this message in context: http://forum.world.st/How-to-play-animated-GIFs-in-Squeak-tp4809137.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Tue Mar 3 13:28:22 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 3 13:28:25 2015 Subject: [squeak-dev] How to play animated GIFs in Squeak? In-Reply-To: <1425388001931-4809137.post@n4.nabble.com> References: <1425388001931-4809137.post@n4.nabble.com> Message-ID: <20150303132822.GA34677@shell.msen.com> On Tue, Mar 03, 2015 at 05:06:41AM -0800, Marcel Taeumel wrote: > Is it possible? There is an "AnimatedGIFReadWriter" class but it only > produces some forms that seem not to represent frames --- but I am no expert > in how GIFs are encoded at all. :) > I'm not sure the current status, but there are a number of pages on the swiki related to animated gifs. Try going to wiki.squeak.org and do a search for "animated gif". Dave From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 3 13:31:49 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 3 13:40:07 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <20150303132822.GA34677@shell.msen.com> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> Message-ID: <1425389509032-4809147.post@n4.nabble.com> Ah, I found (Via swiki) the AnimatedImageMorph. However, it is a GIF89a and the result looks quite broken. I suppose the AnimatedGIFReadWriter is broken in this respect *or* my input file is not a valid GIF89a. Does anyone know whether the forms list should represent *complete* frames or could it be part of frames that have to be on top of each other? Best, Marcel -- View this message in context: http://forum.world.st/How-to-play-animated-GIFs-in-Squeak-tp4809137p4809147.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 3 13:41:54 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 3 13:50:11 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <1425389509032-4809147.post@n4.nabble.com> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> Message-ID: <1425390114528-4809159.post@n4.nabble.com> Ah, I see. First image is the background. The following are only the visual diff. Now, the reader destroys those diffs by cropping the transparent surroundings and the animated morph does not know about the concept of background image. Hmmm... Best, Marcel -- View this message in context: http://forum.world.st/How-to-play-animated-GIFs-in-Squeak-tp4809137p4809159.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Tue Mar 3 14:38:55 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Mar 3 14:38:59 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On Tue, 3 Mar 2015, Frank Shearar wrote: > Yep, this is the problem that I was trying to resolve the other week > with Eliot. I don't think it's a Cog bug, I think it's a bug in our > security settings or something. > > I had a look, things looked OK, but this is well beyond my > rememberings of Linux security, hence why it's still broken. Changes of the files in limits.d are only applied to new sessions. The squeak.conf file was created after jenkins was started. So restarting jenkins should fix the problem. Levente > > frank > > On 2 March 2015 at 17:37, Levente Uzonyi wrote: >> I tried to run this on box3, and it just works as expected. >> But the SqueakTrunk job hasn't produced any artifacts since build #1059. >> >> Levente >> >> >> On Tue, 17 Feb 2015, Frank Shearar wrote: >> >>> On 16 February 2015 at 19:55, Eliot Miranda >>> wrote: >>>> >>>> >>>> >>>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>>> wrote: >>>>> >>>>> >>>>> Reverted, but I still get the same error. >>>> >>>> >>>> >>>> What's the last good version? >>> >>> >>> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >>> but the next build showed the "Operation not permitted" problem [2], >>> also with 3164. >>> >>> [1] http://build.squeak.org/job/SqueakTrunk/990/console >>> [2] http://build.squeak.org/job/SqueakTrunk/991/console >>> >>> frank >>> >>>>> frank >>>>> >>>>> On 15 February 2015 at 18:13, Eliot Miranda >>>>> wrote: >>>>>> >>>>>> Hi Frank, >>>>>> >>>>>> can you revert to 3253? This one should be good. I'm pretty sure >>>>>> the >>>>>> 3254 VMs are subject to the same inlning bug that I mentioned after the >>>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>>> >>>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>>> >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>>> wrote: >>>>>>>> >>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>>> >>>>>>>> >>>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>>> update, >>>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>>> >>>>>>> >>>>>>> I updated CI with 3254, and now I see errors like this: >>>>>>> >>>>>>> spawning command 1 with timeout 1500 seconds: >>>>>>> >>>>>>> >>>>>>> >>>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>>> -vm-sound-null -vm-display-null >>>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>>> ../update-image.st >>>>>>> pthread_setschedparam failed: Operation not permitted >>>>>>> Read e.g. >>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>>> >>>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>>> build.squeak.org that looks like this: >>>>>>> >>>>>>> * hard rtprio 2 >>>>>>> * soft rtprio 2 >>>>>>> >>>>>>> Thoughts? >>>>>>> >>>>>>> frank >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> best, >>>>>> Eliot >>>>>> >>>>>> >>>>>> >>>>> >>>> >>>> >>>> >>>> -- >>>> best, >>>> Eliot >>> >>> >>> >> > From frank.shearar at gmail.com Tue Mar 3 14:43:52 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 3 14:43:54 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On 3 March 2015 at 14:38, Levente Uzonyi wrote: > On Tue, 3 Mar 2015, Frank Shearar wrote: > >> Yep, this is the problem that I was trying to resolve the other week >> with Eliot. I don't think it's a Cog bug, I think it's a bug in our >> security settings or something. >> >> I had a look, things looked OK, but this is well beyond my >> rememberings of Linux security, hence why it's still broken. > > > Changes of the files in limits.d are only applied to new sessions. The > squeak.conf file was created after jenkins was started. So restarting > jenkins should fix the problem. Oh, because Jenkins spins up the VMs, so the Cog processes inherit the permissions that Jenkins had? I'll reboot Jenkins then! frank > Levente > > >> >> frank >> >> On 2 March 2015 at 17:37, Levente Uzonyi wrote: >>> >>> I tried to run this on box3, and it just works as expected. >>> But the SqueakTrunk job hasn't produced any artifacts since build #1059. >>> >>> Levente >>> >>> >>> On Tue, 17 Feb 2015, Frank Shearar wrote: >>> >>>> On 16 February 2015 at 19:55, Eliot Miranda >>>> wrote: >>>>> >>>>> >>>>> >>>>> >>>>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>>>> >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> Reverted, but I still get the same error. >>>>> >>>>> >>>>> >>>>> >>>>> What's the last good version? >>>> >>>> >>>> >>>> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >>>> but the next build showed the "Operation not permitted" problem [2], >>>> also with 3164. >>>> >>>> [1] http://build.squeak.org/job/SqueakTrunk/990/console >>>> [2] http://build.squeak.org/job/SqueakTrunk/991/console >>>> >>>> frank >>>> >>>>>> frank >>>>>> >>>>>> On 15 February 2015 at 18:13, Eliot Miranda >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> Hi Frank, >>>>>>> >>>>>>> can you revert to 3253? This one should be good. I'm pretty >>>>>>> sure >>>>>>> the >>>>>>> 3254 VMs are subject to the same inlning bug that I mentioned after >>>>>>> the >>>>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>>>> >>>>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>>>> >>>>>>> wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>>>> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>>>> >>>>>>>>> >>>>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>>>> update, >>>>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> I updated CI with 3254, and now I see errors like this: >>>>>>>> >>>>>>>> spawning command 1 with timeout 1500 seconds: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>>>> -vm-sound-null -vm-display-null >>>>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>>>> ../update-image.st >>>>>>>> pthread_setschedparam failed: Operation not permitted >>>>>>>> Read e.g. >>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>>>> >>>>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>>>> build.squeak.org that looks like this: >>>>>>>> >>>>>>>> * hard rtprio 2 >>>>>>>> * soft rtprio 2 >>>>>>>> >>>>>>>> Thoughts? >>>>>>>> >>>>>>>> frank >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> best, >>>>>>> Eliot >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> best, >>>>> Eliot >>>> >>>> >>>> >>>> >>> >> > From frank.shearar at gmail.com Tue Mar 3 15:18:36 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 3 15:18:39 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: On 3 March 2015 at 14:43, Frank Shearar wrote: > On 3 March 2015 at 14:38, Levente Uzonyi wrote: >> On Tue, 3 Mar 2015, Frank Shearar wrote: >> >>> Yep, this is the problem that I was trying to resolve the other week >>> with Eliot. I don't think it's a Cog bug, I think it's a bug in our >>> security settings or something. >>> >>> I had a look, things looked OK, but this is well beyond my >>> rememberings of Linux security, hence why it's still broken. >> >> >> Changes of the files in limits.d are only applied to new sessions. The >> squeak.conf file was created after jenkins was started. So restarting >> jenkins should fix the problem. > > Oh, because Jenkins spins up the VMs, so the Cog processes inherit the > permissions that Jenkins had? I'll reboot Jenkins then! Rebooted, and now I see failures like "bundle gem not installed". So I added a new build step to install that gem, but it seems that the gem package isn't installed on that box? I don't have my credentials with me so I can't look into the problem. I may only be able to dig into the problem a few days from now. frank > frank > >> Levente >> >> >>> >>> frank >>> >>> On 2 March 2015 at 17:37, Levente Uzonyi wrote: >>>> >>>> I tried to run this on box3, and it just works as expected. >>>> But the SqueakTrunk job hasn't produced any artifacts since build #1059. >>>> >>>> Levente >>>> >>>> >>>> On Tue, 17 Feb 2015, Frank Shearar wrote: >>>> >>>>> On 16 February 2015 at 19:55, Eliot Miranda >>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>>>>> >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> Reverted, but I still get the same error. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> What's the last good version? >>>>> >>>>> >>>>> >>>>> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >>>>> but the next build showed the "Operation not permitted" problem [2], >>>>> also with 3164. >>>>> >>>>> [1] http://build.squeak.org/job/SqueakTrunk/990/console >>>>> [2] http://build.squeak.org/job/SqueakTrunk/991/console >>>>> >>>>> frank >>>>> >>>>>>> frank >>>>>>> >>>>>>> On 15 February 2015 at 18:13, Eliot Miranda >>>>>>> wrote: >>>>>>>> >>>>>>>> >>>>>>>> Hi Frank, >>>>>>>> >>>>>>>> can you revert to 3253? This one should be good. I'm pretty >>>>>>>> sure >>>>>>>> the >>>>>>>> 3254 VMs are subject to the same inlning bug that I mentioned after >>>>>>>> the >>>>>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>>>>> >>>>>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>>>>> >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>>>>> >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>>>>> update, >>>>>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> I updated CI with 3254, and now I see errors like this: >>>>>>>>> >>>>>>>>> spawning command 1 with timeout 1500 seconds: >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>>>>> -vm-sound-null -vm-display-null >>>>>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>>>>> ../update-image.st >>>>>>>>> pthread_setschedparam failed: Operation not permitted >>>>>>>>> Read e.g. >>>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>>>>> >>>>>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>>>>> build.squeak.org that looks like this: >>>>>>>>> >>>>>>>>> * hard rtprio 2 >>>>>>>>> * soft rtprio 2 >>>>>>>>> >>>>>>>>> Thoughts? >>>>>>>>> >>>>>>>>> frank >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> best, >>>>>>>> Eliot >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> best, >>>>>> Eliot >>>>> >>>>> >>>>> >>>>> >>>> >>> >> From leves at elte.hu Tue Mar 3 15:57:44 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Mar 3 15:57:49 2015 Subject: [squeak-dev] Re: New Cog VMs available In-Reply-To: References: Message-ID: We've had this issue before. Everything is there, but not where jenkins is looking for: /var/lib/jenkins/.rvm/src/ruby-1.9.3-p194/bin/gem /var/lib/jenkins/.rvm/src/ruby-1.9.3-p392/bin/gem /var/lib/jenkins/.rvm/src/ruby-2.0.0-p0/bin/gem /var/lib/jenkins/.rvm/src/rubygems-1.8.25/bin/gem Levente On Tue, 3 Mar 2015, Frank Shearar wrote: > On 3 March 2015 at 14:43, Frank Shearar wrote: >> On 3 March 2015 at 14:38, Levente Uzonyi wrote: >>> On Tue, 3 Mar 2015, Frank Shearar wrote: >>> >>>> Yep, this is the problem that I was trying to resolve the other week >>>> with Eliot. I don't think it's a Cog bug, I think it's a bug in our >>>> security settings or something. >>>> >>>> I had a look, things looked OK, but this is well beyond my >>>> rememberings of Linux security, hence why it's still broken. >>> >>> >>> Changes of the files in limits.d are only applied to new sessions. The >>> squeak.conf file was created after jenkins was started. So restarting >>> jenkins should fix the problem. >> >> Oh, because Jenkins spins up the VMs, so the Cog processes inherit the >> permissions that Jenkins had? I'll reboot Jenkins then! > > Rebooted, and now I see failures like "bundle gem not installed". So I > added a new build step to install that gem, but it seems that the gem > package isn't installed on that box? I don't have my credentials with > me so I can't look into the problem. I may only be able to dig into > the problem a few days from now. > > frank > >> frank >> >>> Levente >>> >>> >>>> >>>> frank >>>> >>>> On 2 March 2015 at 17:37, Levente Uzonyi wrote: >>>>> >>>>> I tried to run this on box3, and it just works as expected. >>>>> But the SqueakTrunk job hasn't produced any artifacts since build #1059. >>>>> >>>>> Levente >>>>> >>>>> >>>>> On Tue, 17 Feb 2015, Frank Shearar wrote: >>>>> >>>>>> On 16 February 2015 at 19:55, Eliot Miranda >>>>>> wrote: >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Mon, Feb 16, 2015 at 9:12 AM, Frank Shearar >>>>>>> >>>>>>> wrote: >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> Reverted, but I still get the same error. >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> What's the last good version? >>>>>> >>>>>> >>>>>> >>>>>> I'm not convinced it's a Cog issue: the last known good was 3164 [1] >>>>>> but the next build showed the "Operation not permitted" problem [2], >>>>>> also with 3164. >>>>>> >>>>>> [1] http://build.squeak.org/job/SqueakTrunk/990/console >>>>>> [2] http://build.squeak.org/job/SqueakTrunk/991/console >>>>>> >>>>>> frank >>>>>> >>>>>>>> frank >>>>>>>> >>>>>>>> On 15 February 2015 at 18:13, Eliot Miranda >>>>>>>> wrote: >>>>>>>>> >>>>>>>>> >>>>>>>>> Hi Frank, >>>>>>>>> >>>>>>>>> can you revert to 3253? This one should be good. I'm pretty >>>>>>>>> sure >>>>>>>>> the >>>>>>>>> 3254 VMs are subject to the same inlning bug that I mentioned after >>>>>>>>> the >>>>>>>>> latest VMMaker.oscog commit and am working on fixing now. >>>>>>>>> >>>>>>>>> On Sat, Feb 14, 2015 at 5:47 AM, Frank Shearar >>>>>>>>> >>>>>>>>> wrote: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On 12 February 2015 at 20:42, Eliot Miranda >>>>>>>>>> >>>>>>>>>> wrote: >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/ >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> These fix two important bugs in the Spur VMs, so Newspeakers should >>>>>>>>>>> update, >>>>>>>>>>> and changes the default text encoding to UTF-8 on linux. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> I updated CI with 3254, and now I see errors like this: >>>>>>>>>> >>>>>>>>>> spawning command 1 with timeout 1500 seconds: >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> /var/lib/jenkins/workspace/SqueakTrunk/target/cog.r3254/coglinuxht/bin/squeak >>>>>>>>>> -vm-sound-null -vm-display-null >>>>>>>>>> "/var/lib/jenkins/workspace/SqueakTrunk/target/TrunkImage.image" >>>>>>>>>> ../update-image.st >>>>>>>>>> pthread_setschedparam failed: Operation not permitted >>>>>>>>>> Read e.g. >>>>>>>>>> http://www.mirandabanda.org/files/Cog/VM/VM.r3254/README.3254 >>>>>>>>>> >>>>>>>>>> As it happens, we do have a /etc/security/limits.d/squeak.conf on >>>>>>>>>> build.squeak.org that looks like this: >>>>>>>>>> >>>>>>>>>> * hard rtprio 2 >>>>>>>>>> * soft rtprio 2 >>>>>>>>>> >>>>>>>>>> Thoughts? >>>>>>>>>> >>>>>>>>>> frank >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> best, >>>>>>>>> Eliot >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> -- >>>>>>> best, >>>>>>> Eliot >>>>>> >>>>>> >>>>>> >>>>>> >>>>> >>>> >>> > From nicolas.cellier.aka.nice at gmail.com Tue Mar 3 16:41:43 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Mar 3 16:41:46 2015 Subject: [squeak-dev] Re: List filtering broken? In-Reply-To: <1425372654888-4809065.post@n4.nabble.com> References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> <1425372654888-4809065.post@n4.nabble.com> Message-ID: Bert, do you have Morphic marked as dirty with Morphic.nice.737 in the ancestry? This version was in trunk once, but was moved to treated inbox, because the ancestry was broken. So cmm had to rewrite the history... He integrated the changes from nice but rejected the changes from kfr because causing some problems... If you have updated your image at that time (july/august 2014?), it's possible that you get some scories... 2015-03-03 9:50 GMT+01:00 Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de>: > Works for me, too. (Update 14718) > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/List-filtering-broken-tp4809005p4809065.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/20150303/5d3c22a5/attachment.htm From nicolas.cellier.aka.nice at gmail.com Tue Mar 3 16:42:28 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Tue Mar 3 16:42:31 2015 Subject: [squeak-dev] Re: List filtering broken? In-Reply-To: References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> <1425372654888-4809065.post@n4.nabble.com> Message-ID: 2015-03-03 17:41 GMT+01:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > Bert, do you have Morphic marked as dirty with Morphic.nice.737 in the > ancestry? > This version was in trunk once, but was moved to treated inbox, because > the ancestry was broken. > So cmm had to rewrite the history... > He integrated the changes from nice but rejected the changes from kfr > because causing some problems... > If you have updated your image at that time (july/august 2014?), it's > possible that you get some scories... > > By the way, some of kfr changes might have been valid? > 2015-03-03 9:50 GMT+01:00 Marcel Taeumel < > marcel.taeumel@student.hpi.uni-potsdam.de>: > >> Works for me, too. (Update 14718) >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/List-filtering-broken-tp4809005p4809065.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/20150303/db5a646a/attachment.htm From asqueaker at gmail.com Tue Mar 3 17:08:11 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 3 17:08:14 2015 Subject: [squeak-dev] List filtering broken? In-Reply-To: References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> Message-ID: Reverting to the unfiltered state is controlled by "Filtered Lists Clear Automatically" -- make sure you have that unchecked. But the pink for filtered indication is always there, that should be working.. On Tue, Mar 3, 2015 at 2:08 AM, Tobias Pape wrote: > > On 03.03.2015, at 01:23, Bert Freudenberg wrote: > >> We used to be able to filter lists by typing a few characters. This still works, but the pane does not turn pink anymore to indicate the filtered state, and it does not revert to the full list when you mouse out. >> >> Is anyone else seeing this, or is it just broken in my image? > > Works from here? > > Best > -Tobias > > > > > > From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 3 20:18:08 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 3 20:26:27 2015 Subject: [squeak-dev] Speaking of all those hacks in HandMorph... Message-ID: <1425413888776-4809295.post@n4.nabble.com> Hi, there! I am just looking into all those scary hacks in HandMorph regarding drawing routings... Why? I stumbled upon GrafPort (BitBlt) #image:at:... methods and noticed that thei ignore Form >> #offset, which is important for AnimatedImageMorph (and animated GIFs). I fixed that. Then, dragging things with the hand got messed up. Let me summarize it one question: Why does HandMorph not behave like other morphs considering, #fullBounds, #changed, #position:, #fullDrawOn:, #hasDropShadow, #drawDropShadowOn:, #drawSubmorphsOn:... ? Is it or was it a performance thing? The goal is to avoid code like that: aCanvas paintImage: aForm at: aForm offset. Because only BitBlt should read #offset. Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-all-those-hacks-in-HandMorph-tp4809295.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Mar 3 20:29:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 3 20:29:25 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.155.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.155.mcz ==================== Summary ==================== Name: MorphicExtras-mt.155 Author: mt Time: 3 March 2015, 9:29:08.112 pm UUID: c74a5771-8891-9640-9476-7dfdaf3c6f38 Ancestors: MorphicExtras-bf.154 Extended animated image morph so that it can be used with forms coming from animated gifs that only store diff/delta-frames. =============== Diff against MorphicExtras-bf.154 =============== Item was changed: ImageMorph subclass: #AnimatedImageMorph + instanceVariableNames: 'images delays stepTime nextTime imageIndex formsAreDiffs' - instanceVariableNames: 'images delays stepTime nextTime imageIndex' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-AdditionalMorphs'! !AnimatedImageMorph commentStamp: '' prior: 0! I am an ImageMorph that can hold more than one image. Each image has its own delay time.! Item was added: + ----- Method: AnimatedImageMorph>>formsAreDiffs (in category 'accessing') ----- + formsAreDiffs + "Should the forms be drawn on top of each other to produce the frame?" + ^ formsAreDiffs ifNil: [false]! Item was added: + ----- Method: AnimatedImageMorph>>formsAreDiffs: (in category 'accessing') ----- + formsAreDiffs: aBoolean + + formsAreDiffs := aBoolean. + self reset.! Item was changed: ----- Method: AnimatedImageMorph>>fromReader: (in category 'private') ----- fromReader: reader + images := reader forms. delays := reader delays. + self reset.! - imageIndex := 0. - self image: (Form extent: images first extent depth: 32). - self step! Item was added: + ----- Method: AnimatedImageMorph>>reset (in category 'private') ----- + reset + + imageIndex := 0. + self image: (Form extent: images first extent depth: 32). + self step.! Item was changed: ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') ----- step + | d next | - | d | images isEmpty ifTrue: [^ self]. nextTime > Time millisecondClockValue ifTrue: [^self]. self changed . + next := images at: (imageIndex := imageIndex \\ images size + 1). + self formsAreDiffs + ifFalse: [self image: next] + ifTrue: [self image getCanvas translucentImage: next at: next offset].. - self image: (images at: - (imageIndex := imageIndex \\ images size + 1)). self changed . d := (delays at: imageIndex) ifNil: [0]. nextTime := Time millisecondClockValue + d ! From bert at freudenbergs.de Tue Mar 3 23:24:28 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 3 23:24:34 2015 Subject: [squeak-dev] Re: List filtering broken? In-Reply-To: References: <397AC7A7-101D-4849-8F9B-F5E642B7492E@freudenbergs.de> <1425372654888-4809065.post@n4.nabble.com> Message-ID: <66CAC522-CFF0-462B-B4A1-1E009F3D27E8@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/a2c3a240/smime-0001.bin From bert at freudenbergs.de Tue Mar 3 23:32:50 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 3 23:32:54 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <1425390114528-4809159.post@n4.nabble.com> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> <1425390114528-4809159.post@n4.nabble.com> Message-ID: Skipped content of type multipart/mixed-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/f53385e0/smime.bin From bert at freudenbergs.de Tue Mar 3 23:47:23 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 3 23:47:29 2015 Subject: [squeak-dev] Speaking of all those hacks in HandMorph... In-Reply-To: <1425413888776-4809295.post@n4.nabble.com> References: <1425413888776-4809295.post@n4.nabble.com> Message-ID: <2169477F-66FF-4707-8A11-DF394E7746A9@freudenbergs.de> On 03.03.2015, at 12:18, Marcel Taeumel wrote: > > Hi, there! > > I am just looking into all those scary hacks in HandMorph regarding drawing > routings... > > Why? I stumbled upon GrafPort (BitBlt) #image:at:... methods and noticed > that thei ignore Form >> #offset, which is important for AnimatedImageMorph > (and animated GIFs). > > I fixed that. I'm not sure that is the right way to fix it. Rather, AnimatedImageMorph should not ignore the offset. > Then, dragging things with the hand got messed up. > > Let me summarize it one question: > > Why does HandMorph not behave like other morphs considering, #fullBounds, > #changed, #position:, #fullDrawOn:, #hasDropShadow, #drawDropShadowOn:, > #drawSubmorphsOn:... ? Is it or was it a performance thing? Likely performance, yes, and also the hands are not considered part of the world (they are not submorphs of the world). > The goal is to avoid code like that: > > aCanvas paintImage: aForm at: aForm offset. Why? > Because only BitBlt should read #offset. BitBlt ignores the offset. The offset is pretty much only used for cursors. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/8ca20095/smime.bin From bert at freudenbergs.de Tue Mar 3 23:59:50 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 3 23:59:56 2015 Subject: [squeak-dev] How to view an old Error in the debugger? In-Reply-To: References: Message-ID: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> On 02.03.2015, at 16:11, Chris Muller wrote: > > My app signaled an Error, which was handled at a higher level to > present a nice message to the user. > > However, I want to see the stack that led to it. I have the Error > instance that was signaled and I see I have ToolSet class>>#debug:, et > al. > > But by the time it unwinds and I get hold of Error, its > signalerContext is gone, so I can't get anything useful from the > debugger. > > As this script shows, in the handler I still have access to the > signalerContext, but once I unwind back out, its gone. > > So is there a way to debug an old error? You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/e37b919e/smime.bin From lewis at mail.msen.com Wed Mar 4 00:45:05 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Wed Mar 4 00:45:07 2015 Subject: [squeak-dev] Protocols ordering (was: The Trunk: Tools-mt.534.mcz) In-Reply-To: References: <1425058521607-4808402.post@n4.nabble.com> <1425060144352-4808408.post@n4.nabble.com> Message-ID: <20150304004505.GA37897@shell.msen.com> On Mon, Mar 02, 2015 at 09:22:14PM -0800, Eliot Miranda wrote: > Hi Marcel, > > On Fri, Feb 27, 2015 at 10:02 AM, Marcel Taeumel < > marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > > > At the moment, programmers can do three things with message categories: > > > > 1. Define their name. > > 2. Define their content. > > 3. Define their order. > > > > Naming is already difficult. Finding the right place for a message can be > > challenging, too. > > > > The thing is that order gets messed up pretty quickly. For example, > > extension categories just popup somewhere in between depending on the > > projects you have installed. > > > > My general impression is often that those categories just have *some* order > > and *want* to be alphabetized to make any sense out of it. I am not sure but > > w/o describing the intent of an order, it may just appear bogus to a > > programmer. > > > > Personally, I am really happy with anything that I do not have to organize > > or care for. Message category orders are such a thing. :-) > > > > But don't get me wrong: I don't want to push my personal expriences onto > > everybody. Let's discuss it here. ;-) > > > > Personally I find ordering of protocols really helpful for productivity, > especially with complex classes such as the VM's interpreter classes. > These are >100 method classes. I do things like put all the > bytecode protocols, stack bytecodes, send bytecodes, return bytecodes, etc, > next to each other (which of course doesn't work with alphabetization > unless one rewrites to bytecodes-stack etc). I was /mortified/ the first > time I loaded VMMaker into a clean image because Monticello *does not > record protocols order*. I wish this would be fixed. This does seem like something we should fix. But is it a Monticello issue? If I file out a class, the only thing in that fileout that seems to define the order of the protocols is the order in which the methods were filed out. If I alphabetize the protocols, and file that same class out again, there is no explicit declaration of the order of the protocols. The methods just appear in the fileout in whatever order they had been organized in the image. I am guessing that what we would want is some kind of ClassChangeRecord that declares a reorganization of the protocols, and that appears in change sets, fileouts, and Monticello updates. I am not sure if it is practical to do this in a backward compatible manner, but at first glance this seems to be the missing piece that would be needed to support declarative protocol organizations that could be preserved in Monticello. Dave From asqueaker at gmail.com Wed Mar 4 02:59:31 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 4 02:59:33 2015 Subject: [squeak-dev] How to view an old Error in the debugger? In-Reply-To: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> Message-ID: On Tue, Mar 3, 2015 at 5:59 PM, Bert Freudenberg wrote: > On 02.03.2015, at 16:11, Chris Muller wrote: >> >> My app signaled an Error, which was handled at a higher level to >> present a nice message to the user. >> >> However, I want to see the stack that led to it. I have the Error >> instance that was signaled and I see I have ToolSet class>>#debug:, et >> al. >> >> But by the time it unwinds and I get hold of Error, its >> signalerContext is gone, so I can't get anything useful from the >> debugger. >> >> As this script shows, in the handler I still have access to the >> signalerContext, but once I unwind back out, its gone. >> >> So is there a way to debug an old error? > > You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc. That makes sense but I still want my app to handle the error the way it does presenting the messageText, but I want to add a button, "Debug" which will open up what happened in the debugger. The process which the error occurs in is the UI process so I can't suspending it. It seems like I want to somehow clone it. Wait.. A Continuation!? Is that what I need? From bert at freudenbergs.de Wed Mar 4 03:56:02 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 4 03:56:10 2015 Subject: [squeak-dev] How to view an old Error in the debugger? In-Reply-To: References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> Message-ID: On 03.03.2015, at 18:59, Chris Muller wrote: > > On Tue, Mar 3, 2015 at 5:59 PM, Bert Freudenberg wrote: >> >> You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc. > > That makes sense but I still want my app to handle the error the way > it does presenting the messageText, but I want to add a button, > "Debug" which will open up what happened in the debugger. The process > which the error occurs in is the UI process so I can't suspending it. > It seems like I want to somehow clone it. Wait.. A Continuation!? > Is that what I need? What you need is a prettier PreDebugWindow. This used to be what was shown before the actual debugger (in openNotifierContents:label:) but that's now toolbuilderified. In any case, that method is still the one that schedules a new UI process to debug the old UI process. You can customize it to show a nice and friendly notification instead of the usual pink pre-debug notifier. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150303/5dc48dec/smime.bin From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 4 06:38:06 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 4 06:46:29 2015 Subject: [squeak-dev] Re: Speaking of all those hacks in HandMorph... In-Reply-To: <2169477F-66FF-4707-8A11-DF394E7746A9@freudenbergs.de> References: <1425413888776-4809295.post@n4.nabble.com> <2169477F-66FF-4707-8A11-DF394E7746A9@freudenbergs.de> Message-ID: <1425451086120-4809352.post@n4.nabble.com> Ah, I thought that BitBlt should handle #offset because BitBlt >> #copyForm:to:rule:colorMap: does it, too. At the moment, it is inconsistent. However, I made AnimatedImageMorph use that offset for now. Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-all-those-hacks-in-HandMorph-tp4809295p4809352.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 4 06:39:35 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 4 06:47:59 2015 Subject: [squeak-dev] Re: Speaking of all those hacks in HandMorph... In-Reply-To: <1425451086120-4809352.post@n4.nabble.com> References: <1425413888776-4809295.post@n4.nabble.com> <2169477F-66FF-4707-8A11-DF394E7746A9@freudenbergs.de> <1425451086120-4809352.post@n4.nabble.com> Message-ID: <1425451175343-4809353.post@n4.nabble.com> ActiveHand owner == ActiveWorld. I think, hand morphs should be regular submorphs of the world. :-) Best, Marcel -- View this message in context: http://forum.world.st/Speaking-of-all-those-hacks-in-HandMorph-tp4809295p4809353.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 4 06:46:34 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 4 06:54:56 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> <1425390114528-4809159.post@n4.nabble.com> Message-ID: <1425451594495-4809356.post@n4.nabble.com> Nope, it's broken, too. Try the attached GIF. It does not consider #offset. :-) And it does not treat individual forms as deltas of the animation but whole frames, which is wrong. smart-hover-1.gif Best, Marcel -- View this message in context: http://forum.world.st/How-to-play-animated-GIFs-in-Squeak-tp4809137p4809356.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gus.duarte at gmail.com Wed Mar 4 11:22:03 2015 From: gus.duarte at gmail.com (Gustavo Duarte) Date: Wed Mar 4 11:22:04 2015 Subject: [squeak-dev] Fwd: Video problem in Fedora 20 ARM In-Reply-To: References: Message-ID: ---------- Forwarded message ---------- From: Gustavo Duarte Date: Wed, Mar 4, 2015 at 8:39 AM Subject: Re: Video problem in Fedora 20 ARM To: Squeak Virtual Machine Development Discussion The squeak version is squeak-vm-4.10.2.2614-9.fc20.armv7hl On Wed, Mar 4, 2015 at 8:35 AM, Gustavo Duarte wrote: > Hi guys, > > I'm testing Scratch and Etoys on a OLPC laptop with Fedora 20 and ARM > arch, and i'm having problems with the camera. The image of the camera > on customs dialog is showed in a wrong way. (attached you can find a > picture) > > Other app which are using the camera video is working well, so i'm > thinking the driver isn't the problem. > > Could be the squeak camera plugin the problem ? > > How can make more debugging to figure out what is the problem ? > > The source code of the camera plugin is open ? where i can find it ? > > > Thanks in advance. > > Gustavo. From gus.duarte at gmail.com Wed Mar 4 11:30:25 2015 From: gus.duarte at gmail.com (Gustavo Duarte) Date: Wed Mar 4 11:30:27 2015 Subject: [squeak-dev] Video problem in Fedora 20 ARM Message-ID: Hi guys, I'm testing Scratch and Etoys on an OLPC laptop with Fedora 20 and ARM arch, and i'm having problems with the camera. The image showed by the camera on customs dialog isn't right, as you can see on in the following picture (https://drive.google.com/open?id=0B_AXpRp35HPfc2ZhMUUtUHdlYWc&authuser=0) Other apps which are using the camera video is working well on this machine, so i'm thinking the driver isn't the problem. Could be the squeak camera plugin the problem ? How can make more debugging to figure out what is the problem ? The source code of the camera plugin is open ? where i can find it ? Thes VM squeak version is: squeak-vm-4.10.2.2614-9.fc20.armv7hl Thanks in advance. Gustavo. From edgardec2005 at gmail.com Wed Mar 4 11:47:32 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Wed Mar 4 12:01:17 2015 Subject: [squeak-dev] How to play animated GIFs in Squeak? In-Reply-To: <1425388001931-4809137.post@n4.nabble.com> Message-ID: On 3/3/15, 10:06 AM, "Marcel Taeumel" wrote: > Is it possible? There is an "AnimatedGIFReadWriter" class but it only > produces some forms that seem not to represent frames --- but I am no expert > in how GIFs are encoded at all. :) > > Best, > Marcel I think maybe once I did this, must search my old things into the "catacumbas". If (when) I found send feedback. Edgar P.D. And you was welcomed in our Spanish From asqueaker at gmail.com Wed Mar 4 16:34:14 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 4 16:34:19 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <1425451594495-4809356.post@n4.nabble.com> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> <1425390114528-4809159.post@n4.nabble.com> <1425451594495-4809356.post@n4.nabble.com> Message-ID: > smart-hover-1.gif Ohh, "smart hover" looks neat what is that? From bert at freudenbergs.de Wed Mar 4 17:44:29 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 4 17:44:35 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <1425451594495-4809356.post@n4.nabble.com> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> <1425390114528-4809159.post@n4.nabble.com> <1425451594495-4809356.post@n4.nabble.com> Message-ID: <3A7275B2-8701-4BED-82D2-D0C5E60E89A0@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150304/3243ebcd/smime-0001.bin From commits at source.squeak.org Wed Mar 4 17:49:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 4 17:49:55 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.768.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.768.mcz ==================== Summary ==================== Name: Morphic-mt.768 Author: mt Time: 4 March 2015, 6:48:50.402 pm UUID: 2b59d13e-c425-9946-8b27-8ceef7df20c1 Ancestors: Morphic-mt.767 Fixes rounded corners and respects #gradientWindow preference in UserDialogBoxMorph. =============== Diff against Morphic-mt.767 =============== Item was added: + ----- Method: UserDialogBoxMorph>>drawSubmorphsOn: (in category 'drawing') ----- + drawSubmorphsOn: aCanvas + + super drawSubmorphsOn: aCanvas. + + self wantsRoundedCorners ifTrue: [ + "Overdraw lower part of title bar to hide bottom corners." + aCanvas + fillRectangle: (self submorphs first "titleRow" bottomLeft - (-1 @ Morph preferredCornerRadius) + corner: self submorphs first "titleRow" bottomRight - (1@0)) + color: self color].! Item was changed: ----- Method: UserDialogBoxMorph>>initialize (in category 'initialization') ----- initialize + + | titleRow cc | - | titleRow titleFill cc | super initialize. self color: Color white. self listDirection: #topToBottom; wrapCentering: #center; hResizing: #shrinkWrap; vResizing: #shrinkWrap. + self layoutInset: -1 @ -1; cellInset: 5@5. - self layoutInset: 0@0; cellInset: 5@5. self borderStyle: BorderStyle thinGray. + self + useRoundedCorners; + addDropShadow; + shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); + shadowOffset: 1 @ 1. - self useRoundedCorners; - addDropShadow; - shadowColor: (TranslucentColor r: 0.0 g: 0.0 b: 0.0 alpha: 0.666); - shadowOffset: 1 @ 1. cc := Color gray: 0.8. titleRow := AlignmentMorph newRow. titleRow hResizing: #spaceFill; vResizing: #shrinkWrap. + titleRow useRoundedCorners. + titleRow borderStyle: BorderStyle thinGray. + titleRow layoutInset: (2@5 corner: (2@ (5 + Morph preferredCornerRadius))). - titleRow layoutInset: 2@5. titleRow color: cc. - titleFill := GradientFillStyle ramp: {0.0 -> Color white. 1 ->cc}. - titleFill radial: false; origin: titleRow topLeft; direction: 0 @ TextStyle defaultFont height. - titleRow fillStyle: titleFill. titleRow fillStyle: self titleGradient. titleMorph := StringMorph new. titleMorph emphasis: 1. titleRow addMorph: titleMorph. labelMorph := TextMorph new. labelMorph margins: 5@5. labelMorph lock. buttonRow := AlignmentMorph newRow vResizing: #shrinkWrap. buttonRow hResizing: #shrinkWrap; layoutInset: 5@5; cellInset: 5@5. buttonRow color: Color transparent. self addMorphBack: titleRow ; addMorphBack: labelMorph ; addMorphBack: buttonRow ; addDropShadow. keyMap := Dictionary new! Item was changed: ----- Method: UserDialogBoxMorph>>titleGradient (in category 'initialization') ----- titleGradient + | cc gradient | + SystemWindow gradientWindow + ifFalse: [^ SolidFillStyle color: self buttonColor]. + cc := self buttonColor. gradient := GradientFillStyle ramp: { 0.0 -> Color white. 0.33 ->(cc mixed: 0.5 with: Color white). 1.0 -> cc. }. gradient origin: 0@0. gradient direction: 0 @ (TextStyle defaultFont height + 10). ^gradient! From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 4 17:52:44 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 4 18:01:09 2015 Subject: [squeak-dev] Re: How to play animated GIFs in Squeak? In-Reply-To: <3A7275B2-8701-4BED-82D2-D0C5E60E89A0@freudenbergs.de> References: <1425388001931-4809137.post@n4.nabble.com> <20150303132822.GA34677@shell.msen.com> <1425389509032-4809147.post@n4.nabble.com> <1425390114528-4809159.post@n4.nabble.com> <1425451594495-4809356.post@n4.nabble.com> <3A7275B2-8701-4BED-82D2-D0C5E60E89A0@freudenbergs.de> Message-ID: <1425491564229-4809550.post@n4.nabble.com> Ah, #displayOn:... considers #offset from the form. Okay, we can take that implementation. Best, Marcel -- View this message in context: http://forum.world.st/How-to-play-animated-GIFs-in-Squeak-tp4809137p4809550.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Mar 4 18:05:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 4 18:05:09 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.156.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.156.mcz ==================== Summary ==================== Name: MorphicExtras-mt.156 Author: mt Time: 4 March 2015, 7:04:52.068 pm UUID: 1b149c50-aaf7-b043-86e1-ce80d88bc68b Ancestors: MorphicExtras-mt.155 Uses eToys' implementation of AnimatedImageMorph, which works fine with animated GIFs now. =============== Diff against MorphicExtras-mt.155 =============== Item was changed: ImageMorph subclass: #AnimatedImageMorph + instanceVariableNames: 'images delays stepTime nextTime imageIndex stepper' - instanceVariableNames: 'images delays stepTime nextTime imageIndex formsAreDiffs' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-AdditionalMorphs'! !AnimatedImageMorph commentStamp: '' prior: 0! I am an ImageMorph that can hold more than one image. Each image has its own delay time.! Item was added: + ----- Method: AnimatedImageMorph class>>additionsToViewerCategories (in category 'class initialization') ----- + additionsToViewerCategories + "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." + ^ #( + + (#'graphics' + ( + (slot isGifPlaying 'Whether the gif is playing' + Boolean readWrite Player getGifPlaying Player setGifPlaying:) + (slot opaque 'Whether the gif opaque' + Boolean readWrite Player getOpaque Player setOpaque:) + + )) + + ) + ! Item was changed: ----- Method: AnimatedImageMorph class>>fromGIFFileNamed: (in category 'instance creation') ----- fromGIFFileNamed: fileName | reader | + reader _ AnimatedGIFReadWriter formsFromFileNamed: fileName. - reader := AnimatedGIFReadWriter formsFromFileNamed: fileName. ^reader forms size = 1 ifTrue: [ ImageMorph new image: reader forms first ] ifFalse: [ self new fromReader: reader ]! Item was changed: ----- Method: AnimatedImageMorph class>>fromStream: (in category 'instance creation') ----- fromStream: aStream | reader | + reader _ AnimatedGIFReadWriter formsFromStream: aStream. - reader := AnimatedGIFReadWriter formsFromStream: aStream. ^reader forms size = 1 ifTrue: [ ImageMorph new image: reader forms first ] ifFalse: [ self new fromReader: reader ]! Item was removed: - ----- Method: AnimatedImageMorph class>>initialize (in category 'class initialization') ----- - initialize - "register the receiver in the global registries" - self environment - at: #FileList - ifPresent: [:cl | cl registerFileReader: self]! Item was changed: ----- Method: AnimatedImageMorph class>>serviceOpenGIFInWindow (in category 'fileIn/Out') ----- serviceOpenGIFInWindow "Answer a service for opening a gif graphic in a window" ^ (SimpleServiceEntry provider: self label: 'open the graphic as a morph' selector: #openGIFInWindow: description: 'open a GIF graphic file as a morph' + buttonLabel: 'open gif') - buttonLabel: 'open') argumentGetter: [:fileList | fileList readOnlyStream]! Item was changed: ----- Method: AnimatedImageMorph class>>services (in category 'fileIn/Out') ----- services ^ Array with: self serviceOpenGIFInWindow "with: Form serviceImageImports" + "with: Form serviceImageAsBackground"! - with: Form serviceImageAsBackground! Item was added: + ----- Method: AnimatedImageMorph>>addCustomMenuItems:hand: (in category 'stepping and presenter') ----- + addCustomMenuItems: aMenu hand: aHand + super addCustomMenuItems: aMenu hand: aHand. + aMenu addUpdating: #steppingString action: #toggleStepping! Item was removed: - ----- Method: AnimatedImageMorph>>formsAreDiffs (in category 'accessing') ----- - formsAreDiffs - "Should the forms be drawn on top of each other to produce the frame?" - ^ formsAreDiffs ifNil: [false]! Item was removed: - ----- Method: AnimatedImageMorph>>formsAreDiffs: (in category 'accessing') ----- - formsAreDiffs: aBoolean - - formsAreDiffs := aBoolean. - self reset.! Item was added: + ----- Method: AnimatedImageMorph>>fromArray: (in category 'private') ----- + fromArray: reader + images := reader first. + delays := reader second. + imageIndex := 0. + self + image: (Form extent: images first extent depth: 32). + self isOpaque: true. + self step! Item was changed: ----- Method: AnimatedImageMorph>>fromReader: (in category 'private') ----- + fromReader: reader - fromReader: reader - images := reader forms. delays := reader delays. + imageIndex := 0. + self + image: (Form extent: images first extent depth: 32). + self isOpaque: true. + self step! - self reset.! Item was changed: ----- Method: AnimatedImageMorph>>initialize (in category 'private') ----- initialize nextTime := Time millisecondClockValue. imageIndex := 1. stepTime := 10. + stepper :=true. super initialize! Item was removed: - ----- Method: AnimatedImageMorph>>reset (in category 'private') ----- - reset - - imageIndex := 0. - self image: (Form extent: images first extent depth: 32). - self step.! Item was added: + ----- Method: AnimatedImageMorph>>setStepping: (in category 'stepping and presenter') ----- + setStepping: aBoolean + self wantsSteps ifFalse:[^false]. + stepper := aBoolean. + stepper ifTrue:[self startStepping] + ifFalse:[self stopStepping]. + + ! Item was changed: ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') ----- step + | form delay | + stepper ifFalse:[ self stopStepping]. + images isEmpty + ifTrue: [^ self]. + nextTime > Time millisecondClockValue + ifTrue: [^self]. + imageIndex > 0 ifTrue: [ + form := images at: imageIndex. + form displayOn: self image at: 0@0 rule: + ((self isOpaque) ifTrue:[Form paint] ifFalse:[Form erase]). + ]. + imageIndex _ imageIndex \\ images size + 1. + form := images at: imageIndex. + form displayOn: self image at: 0@0 rule: Form paint. + self changed. + delay := (delays at: imageIndex) ifNil: [0]. + nextTime := Time millisecondClockValue +delay! - | d next | - images isEmpty ifTrue: [^ self]. - - nextTime > Time millisecondClockValue - ifTrue: [^self]. - self changed . - next := images at: (imageIndex := imageIndex \\ images size + 1). - self formsAreDiffs - ifFalse: [self image: next] - ifTrue: [self image getCanvas translucentImage: next at: next offset].. - self changed . - d := (delays at: imageIndex) ifNil: [0]. - nextTime := Time millisecondClockValue + d - ! Item was changed: ----- Method: AnimatedImageMorph>>stepTime: (in category 'stepping and presenter') ----- stepTime: anInteger + stepTime _ anInteger! - stepTime := anInteger! Item was added: + ----- Method: AnimatedImageMorph>>steppingString (in category 'stepping and presenter') ----- + steppingString + ^ (stepper + ifTrue: [''] + ifFalse: ['']), 'stepping' translated! Item was added: + ----- Method: AnimatedImageMorph>>toggleStepping (in category 'stepping and presenter') ----- + toggleStepping + self wantsSteps + ifTrue: [stepper := stepper not]. + stepper ifTrue:[self startStepping] + ifFalse:[self stopStepping]. + + ! From Das.Linux at gmx.de Wed Mar 4 19:07:46 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Mar 4 19:07:56 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.156.mcz Message-ID: <30980544-CE03-4812-9011-FF96B81E29C4@gmx.de> Hi. quick review. On 04.03.2015, at 18:04, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: > http://source.squeak.org/trunk/MorphicExtras-mt.156.mcz > > ==================== Summary ==================== > > Name: MorphicExtras-mt.156 > Author: mt > Time: 4 March 2015, 7:04:52.068 pm > UUID: 1b149c50-aaf7-b043-86e1-ce80d88bc68b > Ancestors: MorphicExtras-mt.155 > > Uses eToys' implementation of AnimatedImageMorph, which works fine with animated GIFs now. > > =============== Diff against MorphicExtras-mt.155 =============== > > Item was changed: > ImageMorph subclass: #AnimatedImageMorph > + instanceVariableNames: 'images delays stepTime nextTime imageIndex stepper' > - instanceVariableNames: 'images delays stepTime nextTime imageIndex formsAreDiffs' > classVariableNames: '' > poolDictionaries: '' > category: 'MorphicExtras-AdditionalMorphs'! > > !AnimatedImageMorph commentStamp: '' prior: 0! > I am an ImageMorph that can hold more than one image. Each image has its own delay time.! > > Item was added: > + ----- Method: AnimatedImageMorph class>>additionsToViewerCategories (in category 'class initialization') ----- > + additionsToViewerCategories > + "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." > + ^ #( > + > + (#'graphics' > + ( > + (slot isGifPlaying 'Whether the gif is playing' > + Boolean readWrite Player getGifPlaying Player setGifPlaying:) > + (slot opaque 'Whether the gif opaque' > + Boolean readWrite Player getOpaque Player setOpaque:) > + > + )) > + > + ) > + ! > > Item was changed: > ----- Method: AnimatedImageMorph class>>fromGIFFileNamed: (in category 'instance creation') ----- > fromGIFFileNamed: fileName > | reader | > + reader _ AnimatedGIFReadWriter formsFromFileNamed: fileName. > - reader := AnimatedGIFReadWriter formsFromFileNamed: fileName. Should be changed back. > ^reader forms size = 1 > ifTrue: [ ImageMorph new image: reader forms first ] > ifFalse: [ self new fromReader: reader ]! > > Item was changed: > ----- Method: AnimatedImageMorph class>>fromStream: (in category 'instance creation') ----- > fromStream: aStream > | reader | > + reader _ AnimatedGIFReadWriter formsFromStream: aStream. > - reader := AnimatedGIFReadWriter formsFromStream: aStream. Should be changed back. > ^reader forms size = 1 > ifTrue: [ ImageMorph new image: reader forms first ] > ifFalse: [ self new fromReader: reader ]! > > Item was removed: > - ----- Method: AnimatedImageMorph class>>initialize (in category 'class initialization') ----- > - initialize > - "register the receiver in the global registries" > - self environment > - at: #FileList > - ifPresent: [:cl | cl registerFileReader: self]! This remove should be reverted. > > Item was changed: > ----- Method: AnimatedImageMorph class>>serviceOpenGIFInWindow (in category 'fileIn/Out') ----- > serviceOpenGIFInWindow > "Answer a service for opening a gif graphic in a window" > ^ (SimpleServiceEntry > provider: self > label: 'open the graphic as a morph' > selector: #openGIFInWindow: > description: 'open a GIF graphic file as a morph' > + buttonLabel: 'open gif') > - buttonLabel: 'open') > argumentGetter: [:fileList | fileList readOnlyStream]! > > Item was changed: > ----- Method: AnimatedImageMorph class>>services (in category 'fileIn/Out') ----- > services > ^ Array > with: self serviceOpenGIFInWindow > "with: Form serviceImageImports" > + "with: Form serviceImageAsBackground"! > - with: Form serviceImageAsBackground! While virtually no one uses services, I think this can stay without the comment > > Item was added: > + ----- Method: AnimatedImageMorph>>addCustomMenuItems:hand: (in category 'stepping and presenter') ----- > + addCustomMenuItems: aMenu hand: aHand > + super addCustomMenuItems: aMenu hand: aHand. > + aMenu addUpdating: #steppingString action: #toggleStepping! > > Item was removed: > - ----- Method: AnimatedImageMorph>>formsAreDiffs (in category 'accessing') ----- > - formsAreDiffs > - "Should the forms be drawn on top of each other to produce the frame?" > - ^ formsAreDiffs ifNil: [false]! > > Item was removed: > - ----- Method: AnimatedImageMorph>>formsAreDiffs: (in category 'accessing') ----- > - formsAreDiffs: aBoolean > - > - formsAreDiffs := aBoolean. > - self reset.! > > Item was added: > + ----- Method: AnimatedImageMorph>>fromArray: (in category 'private') ----- > + fromArray: reader > + images := reader first. > + delays := reader second. > + imageIndex := 0. > + self > + image: (Form extent: images first extent depth: 32). > + self isOpaque: true. > + self step! > > Item was changed: > ----- Method: AnimatedImageMorph>>fromReader: (in category 'private') ----- > + fromReader: reader > - fromReader: reader > - > images := reader forms. > delays := reader delays. > + imageIndex := 0. > + self > + image: (Form extent: images first extent depth: 32). > + self isOpaque: true. > + self step! > - self reset.! > > Item was changed: > ----- Method: AnimatedImageMorph>>initialize (in category 'private') ----- > initialize > nextTime := Time millisecondClockValue. > imageIndex := 1. > stepTime := 10. > + stepper :=true. > super initialize! > > Item was removed: > - ----- Method: AnimatedImageMorph>>reset (in category 'private') ----- > - reset > - > - imageIndex := 0. > - self image: (Form extent: images first extent depth: 32). > - self step.! > > Item was added: > + ----- Method: AnimatedImageMorph>>setStepping: (in category 'stepping and presenter') ----- > + setStepping: aBoolean > + self wantsSteps ifFalse:[^false]. > + stepper := aBoolean. > + stepper ifTrue:[self startStepping] > + ifFalse:[self stopStepping]. > + > + ! > > Item was changed: > ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') ----- > step > + | form delay | > + stepper ifFalse:[ self stopStepping]. > + images isEmpty > + ifTrue: [^ self]. > + nextTime > Time millisecondClockValue > + ifTrue: [^self]. > + imageIndex > 0 ifTrue: [ > + form := images at: imageIndex. > + form displayOn: self image at: 0@0 rule: > + ((self isOpaque) ifTrue:[Form paint] ifFalse:[Form erase]). > + ]. > + imageIndex _ imageIndex \\ images size + 1. > + form := images at: imageIndex. > + form displayOn: self image at: 0@0 rule: Form paint. > + self changed. > + delay := (delays at: imageIndex) ifNil: [0]. > + nextTime := Time millisecondClockValue +delay! > - | d next | > - images isEmpty ifTrue: [^ self]. > - > - nextTime > Time millisecondClockValue > - ifTrue: [^self]. > - self changed . > - next := images at: (imageIndex := imageIndex \\ images size + 1). > - self formsAreDiffs > - ifFalse: [self image: next] > - ifTrue: [self image getCanvas translucentImage: next at: next offset].. > - self changed . > - d := (delays at: imageIndex) ifNil: [0]. > - nextTime := Time millisecondClockValue + d > - ! > > Item was changed: > ----- Method: AnimatedImageMorph>>stepTime: (in category 'stepping and presenter') ----- > stepTime: anInteger > + stepTime _ anInteger! > - stepTime := anInteger! Should be changed back. > Item was added: > + ----- Method: AnimatedImageMorph>>steppingString (in category 'stepping and presenter') ----- > + steppingString > + ^ (stepper > + ifTrue: [''] > + ifFalse: ['']), 'stepping' translated! > > Item was added: > + ----- Method: AnimatedImageMorph>>toggleStepping (in category 'stepping and presenter') ----- > + toggleStepping > + self wantsSteps > + ifTrue: [stepper := stepper not]. > + stepper ifTrue:[self startStepping] > + ifFalse:[self stopStepping]. > + > + ! > > From tim at rowledge.org Wed Mar 4 19:11:04 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Mar 4 19:11:11 2015 Subject: [squeak-dev] Video problem in Fedora 20 ARM In-Reply-To: References: Message-ID: <060E9008-D1FD-456B-8F48-B2A75974173E@rowledge.org> I?ve just been working on a problem with the Rasperry Pi camera and its v4l2 libraries and the Scratch CameraPlugin. A year or so ago it mostly worked but the colour map was flipped so everyone was Smurfed. When I checked it for some reason a couple of weeks ago that problem was solved (and I think that colour mapping might your problem, by the way) but we could only open the camera once per session, which is a bit limiting. It turned out that we were (within the sqCamera-linux.c file) closing a different number of buffers than we were opening. That fix is in the svn repository at http://www.squeakvm.org/cgi-bin/viewvc.cgi/squeak/branches/Cog/platforms/unix/plugins/CameraPlugin/sqCamera-linux.c?view=log tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful Latin Phrases:- Ne auderis delere orbem rigidum meum! = Don't you dare erase my hard disk! From commits at source.squeak.org Wed Mar 4 20:10:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 4 20:10:31 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.157.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.157.mcz ==================== Summary ==================== Name: MorphicExtras-mt.157 Author: mt Time: 4 March 2015, 9:10:14.479 pm UUID: 0b806ef9-9fe4-4a42-a854-bd1a7c18f358 Ancestors: MorphicExtras-mt.156 Reverted eToys-specific changes in AnimatedImageMorph but kept its working core in #step for displaying animated gifs. =============== Diff against MorphicExtras-mt.156 =============== Item was changed: ImageMorph subclass: #AnimatedImageMorph + instanceVariableNames: 'images delays stepTime nextTime imageIndex' - instanceVariableNames: 'images delays stepTime nextTime imageIndex stepper' classVariableNames: '' poolDictionaries: '' category: 'MorphicExtras-AdditionalMorphs'! !AnimatedImageMorph commentStamp: '' prior: 0! I am an ImageMorph that can hold more than one image. Each image has its own delay time.! Item was removed: - ----- Method: AnimatedImageMorph class>>additionsToViewerCategories (in category 'class initialization') ----- - additionsToViewerCategories - "Answer a list of ( ) pairs that characterize the phrases this kind of morph wishes to add to various Viewer categories." - ^ #( - - (#'graphics' - ( - (slot isGifPlaying 'Whether the gif is playing' - Boolean readWrite Player getGifPlaying Player setGifPlaying:) - (slot opaque 'Whether the gif opaque' - Boolean readWrite Player getOpaque Player setOpaque:) - - )) - - ) - ! Item was changed: ----- Method: AnimatedImageMorph class>>fromGIFFileNamed: (in category 'instance creation') ----- fromGIFFileNamed: fileName | reader | + reader := AnimatedGIFReadWriter formsFromFileNamed: fileName. - reader _ AnimatedGIFReadWriter formsFromFileNamed: fileName. ^reader forms size = 1 ifTrue: [ ImageMorph new image: reader forms first ] ifFalse: [ self new fromReader: reader ]! Item was changed: ----- Method: AnimatedImageMorph class>>fromStream: (in category 'instance creation') ----- fromStream: aStream | reader | + reader := AnimatedGIFReadWriter formsFromStream: aStream. - reader _ AnimatedGIFReadWriter formsFromStream: aStream. ^reader forms size = 1 ifTrue: [ ImageMorph new image: reader forms first ] ifFalse: [ self new fromReader: reader ]! Item was added: + ----- Method: AnimatedImageMorph class>>initialize (in category 'class initialization') ----- + initialize + "register the receiver in the global registries" + self environment + at: #FileList + ifPresent: [:cl | cl registerFileReader: self]! Item was changed: ----- Method: AnimatedImageMorph class>>serviceOpenGIFInWindow (in category 'fileIn/Out') ----- serviceOpenGIFInWindow "Answer a service for opening a gif graphic in a window" ^ (SimpleServiceEntry provider: self label: 'open the graphic as a morph' selector: #openGIFInWindow: description: 'open a GIF graphic file as a morph' + buttonLabel: 'open') - buttonLabel: 'open gif') argumentGetter: [:fileList | fileList readOnlyStream]! Item was changed: ----- Method: AnimatedImageMorph class>>services (in category 'fileIn/Out') ----- services ^ Array with: self serviceOpenGIFInWindow "with: Form serviceImageImports" + with: Form serviceImageAsBackground! - "with: Form serviceImageAsBackground"! Item was removed: - ----- Method: AnimatedImageMorph>>addCustomMenuItems:hand: (in category 'stepping and presenter') ----- - addCustomMenuItems: aMenu hand: aHand - super addCustomMenuItems: aMenu hand: aHand. - aMenu addUpdating: #steppingString action: #toggleStepping! Item was removed: - ----- Method: AnimatedImageMorph>>fromArray: (in category 'private') ----- - fromArray: reader - images := reader first. - delays := reader second. - imageIndex := 0. - self - image: (Form extent: images first extent depth: 32). - self isOpaque: true. - self step! Item was changed: ----- Method: AnimatedImageMorph>>fromReader: (in category 'private') ----- + fromReader: reader + - fromReader: reader images := reader forms. delays := reader delays. - imageIndex := 0. - self - image: (Form extent: images first extent depth: 32). self isOpaque: true. + self reset.! - self step! Item was changed: ----- Method: AnimatedImageMorph>>initialize (in category 'private') ----- initialize nextTime := Time millisecondClockValue. imageIndex := 1. stepTime := 10. - stepper :=true. super initialize! Item was added: + ----- Method: AnimatedImageMorph>>reset (in category 'private') ----- + reset + + imageIndex := 0. + self image: (Form extent: images first extent depth: 32). + self step.! Item was removed: - ----- Method: AnimatedImageMorph>>setStepping: (in category 'stepping and presenter') ----- - setStepping: aBoolean - self wantsSteps ifFalse:[^false]. - stepper := aBoolean. - stepper ifTrue:[self startStepping] - ifFalse:[self stopStepping]. - - ! Item was changed: ----- Method: AnimatedImageMorph>>step (in category 'stepping and presenter') ----- step + | d form | + images isEmpty ifTrue: [^ self]. + + nextTime > Time millisecondClockValue + ifTrue: [^self]. + " self changed." + imageIndex > 0 ifTrue: [ - | form delay | - stepper ifFalse:[ self stopStepping]. - images isEmpty - ifTrue: [^ self]. - nextTime > Time millisecondClockValue - ifTrue: [^self]. - imageIndex > 0 ifTrue: [ form := images at: imageIndex. + form displayOn: self image at: 0@0 rule: (self isOpaque ifTrue: [Form paint] ifFalse: [Form erase])]. + form := images at: (imageIndex := imageIndex \\ images size + 1). + form displayOn: self image at: 0@0 rule: Form paint. + self changed. + d := (delays at: imageIndex) ifNil: [0]. + nextTime := Time millisecondClockValue + d + ! - form displayOn: self image at: 0@0 rule: - ((self isOpaque) ifTrue:[Form paint] ifFalse:[Form erase]). - ]. - imageIndex _ imageIndex \\ images size + 1. - form := images at: imageIndex. - form displayOn: self image at: 0@0 rule: Form paint. - self changed. - delay := (delays at: imageIndex) ifNil: [0]. - nextTime := Time millisecondClockValue +delay! Item was changed: ----- Method: AnimatedImageMorph>>stepTime: (in category 'stepping and presenter') ----- stepTime: anInteger + stepTime := anInteger! - stepTime _ anInteger! Item was removed: - ----- Method: AnimatedImageMorph>>steppingString (in category 'stepping and presenter') ----- - steppingString - ^ (stepper - ifTrue: [''] - ifFalse: ['']), 'stepping' translated! Item was removed: - ----- Method: AnimatedImageMorph>>toggleStepping (in category 'stepping and presenter') ----- - toggleStepping - self wantsSteps - ifTrue: [stepper := stepper not]. - stepper ifTrue:[self startStepping] - ifFalse:[self stopStepping]. - - ! From gus.duarte at gmail.com Wed Mar 4 23:32:02 2015 From: gus.duarte at gmail.com (Gustavo Duarte) Date: Wed Mar 4 23:32:05 2015 Subject: [squeak-dev] Video problem in Fedora 20 ARM In-Reply-To: <060E9008-D1FD-456B-8F48-B2A75974173E@rowledge.org> References: <060E9008-D1FD-456B-8F48-B2A75974173E@rowledge.org> Message-ID: Many thanks Tim, i'm going to download the latest source code from svn repo and compile the unix/CameraPlugin in my Arm machine. I'll let you know the result. Regards. Gustavo On Wed, Mar 4, 2015 at 5:11 PM, tim Rowledge wrote: > I?ve just been working on a problem with the Rasperry Pi camera and its v4l2 libraries and the Scratch CameraPlugin. A year or so ago it mostly worked but the colour map was flipped so everyone was Smurfed. When I checked it for some reason a couple of weeks ago that problem was solved (and I think that colour mapping might your problem, by the way) but we could only open the camera once per session, which is a bit limiting. It turned out that we were (within the sqCamera-linux.c file) closing a different number of buffers than we were opening. That fix is in the svn repository at http://www.squeakvm.org/cgi-bin/viewvc.cgi/squeak/branches/Cog/platforms/unix/plugins/CameraPlugin/sqCamera-linux.c?view=log > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful Latin Phrases:- Ne auderis delere orbem rigidum meum! = Don't you dare erase my hard disk! > > > From commits at source.squeak.org Thu Mar 5 10:41:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 10:41:56 2015 Subject: [squeak-dev] The Trunk: Kernel-mt.909.mcz Message-ID: Marcel Taeumel uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-mt.909.mcz ==================== Summary ==================== Name: Kernel-mt.909 Author: mt Time: 5 March 2015, 11:41:30.983 am UUID: bd97ddfb-65ef-9a4d-956a-7ebb84782a01 Ancestors: Kernel-ul.908 Two utility messages added to classes to find out whether a selector is an override or will be overridden in subclasses. =============== Diff against Kernel-ul.908 =============== Item was added: + ----- Method: ClassDescription>>isSelectorOverridden: (in category 'testing') ----- + isSelectorOverridden: aSelector + + (self includesSelector: aSelector) + ifFalse: [^ false]. + + self allSubclassesDo: [ :class | + (class includesSelector: aSelector) + ifTrue: [ ^ true ] ]. + ^ false! Item was added: + ----- Method: ClassDescription>>isSelectorOverride: (in category 'testing') ----- + isSelectorOverride: aSelector + + (self includesSelector: aSelector) + ifFalse: [^ false]. + + self allSuperclassesDo: [ :class | + (class includesSelector: aSelector) + ifTrue: [ ^ true ] ]. + ^ false! From commits at source.squeak.org Thu Mar 5 10:43:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 10:43:04 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.769.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.769.mcz ==================== Summary ==================== Name: Morphic-mt.769 Author: mt Time: 5 March 2015, 11:42:26.808 am UUID: ee4fec28-7d78-7a4b-9f0e-5c7a883d0964 Ancestors: Morphic-mt.768 Fixes icon access wrt. list filtering. =============== Diff against Morphic-mt.768 =============== Item was changed: ----- Method: PluggableListMorph>>iconAt: (in category 'model access') ----- iconAt: anInteger + + | index | + index := (self hasFilter and: [list notNil]) + ifTrue: [self getFullList indexOf: (list at: anInteger)] + ifFalse: [anInteger]. + ^ getIconSelector ifNotNil: [model perform: getIconSelector with: index]! - ^ getIconSelector ifNotNil: [model perform: getIconSelector with: anInteger]! From commits at source.squeak.org Thu Mar 5 10:44:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 10:44:50 2015 Subject: [squeak-dev] The Trunk: Tools-mt.539.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.539.mcz ==================== Summary ==================== Name: Tools-mt.539 Author: mt Time: 5 March 2015, 11:44:32.854 am UUID: 5639bb02-c299-6f46-b201-1251937cc8a3 Ancestors: Tools-mt.537 Add icons to class list and message list in browsers. Can be turned off in preferences. Icons are stored in ToolIcons (like MenuIcons and HelpIcons do). =============== Diff against Tools-mt.537 =============== Item was changed: CodeHolder subclass: #Browser instanceVariableNames: 'environment systemOrganizer classOrganizer metaClassOrganizer editSelection metaClassIndicated selectedSystemCategory selectedClassName selectedMessageName selectedMessageCategoryName' + classVariableNames: 'ListClassesHierarchically RecentClasses ShowClassIcons ShowMessageIcons SortMessageCategoriesAlphabetically' - classVariableNames: 'ListClassesHierarchically RecentClasses SortMessageCategoriesAlphabetically' poolDictionaries: '' category: 'Tools-Browser'! !Browser commentStamp: 'cwp 12/27/2012 11:09' prior: 0! I represent a query path into the class descriptions, the software of the system.! Item was added: + ----- Method: Browser class>>showClassIcons (in category 'preferences') ----- + showClassIcons + + ^ShowClassIcons ifNil: [true] + ! Item was added: + ----- Method: Browser class>>showClassIcons: (in category 'preferences') ----- + showClassIcons: aBoolean + ShowClassIcons := aBoolean.! Item was added: + ----- Method: Browser class>>showMessageIcons (in category 'preferences') ----- + showMessageIcons + + ^ShowMessageIcons ifNil: [true] + ! Item was added: + ----- Method: Browser class>>showMessageIcons: (in category 'preferences') ----- + showMessageIcons: aBoolean + + ShowMessageIcons := aBoolean.! Item was changed: ----- Method: Browser>>buildClassListWith: (in category 'toolbuilder') ----- buildClassListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; + list: #classList; - list: #classList; getIndex: #classListIndex; + setIndex: #classListIndex:; + icon: #classIconAt:; - setIndex: #classListIndex:; menu: #classListMenu:shifted:; keyPress: #classListKey:from:. SystemBrowser browseWithDragNDrop ifTrue:[listSpec dragItem: #dragFromClassList:]. ^listSpec ! Item was changed: ----- Method: Browser>>buildMessageListWith: (in category 'toolbuilder') ----- buildMessageListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #messageList; getIndex: #messageListIndex; setIndex: #messageListIndex:; + icon: #messageIconAt:; menu: #messageListMenu:shifted:; keyPress: #messageListKey:from:. SystemBrowser browseWithDragNDrop ifTrue:[listSpec dragItem: #dragFromMessageList:]. ^listSpec ! Item was added: + ----- Method: Browser>>classIconAt: (in category 'class list') ----- + classIconAt: anIndex + + self class showClassIcons + ifFalse: [^ nil]. + + ^ ToolIcons iconNamed: (ToolIcons iconForClass: (self classList at: anIndex) withBlanksTrimmed asSymbol)! Item was added: + ----- Method: Browser>>messageIconAt: (in category 'message list') ----- + messageIconAt: anIndex + + self class showMessageIcons + ifFalse: [^ nil]. + + ^ ToolIcons iconNamed: (ToolIcons + iconForClass: self selectedClass + selector: (self messageList at: anIndex))! Item was added: + Object subclass: #ToolIcons + instanceVariableNames: '' + classVariableNames: 'Icons' + poolDictionaries: '' + category: 'Tools-Base'! Item was added: + ----- Method: ToolIcons class>>abstract (in category 'private') ----- + abstract + + ^ (Form + extent: 12@12 + depth: 32 + fromArray: #( 165 165 165 165 165 16777215 16777215 165 165 165 165 165 16777215 16777215 165 165 16777215 2712832 2712832 16777215 165 165 165 165 165 165 165 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 165 165 165 165 165 4294967295 4284714821 4284714821 4284714821 4284714821 4284714821 4284714821 4294967295 165 165 165 16777215 4294967295 4284714821 4288074840 4288074840 4288074840 4287677545 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287679828 4287810910 4287677545 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287614291 4287810910 4286361178 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287677545 4286361178 4286361178 4284714821 4294967295 16777215 165 165 165 4294967295 4284714821 4284714821 4284714821 4284714821 4284714821 4284714821 4294967295 165 165 165 165 165 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 165 165 165 165 165 165 165 16777215 2712832 2712832 16777215 165 165 165 165 165 165 165 165 165 16777215 16777215 165 165 165 165 165) + offset: 0@0)! Item was added: + ----- Method: ToolIcons class>>arrowDown (in category 'private') ----- + arrowDown + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 185273099 185273099 185273099 185273099 185273099 185273099 185273098 168430090 168495883 185273098 151587081 168495883 185273098 151191561 168495883 185207306 151388169 168430091 185207049 151257353 151587339 185272841 328199 151653131 185273098 150997001 168495883 185273099 168364298 185273099 185273099 185207307 185273099 185273099 185273099 185273099) + offset: 0@0) + colorsFromArray: #(#(0.573 0.804 0.369) #(0.565 0.768 0.412) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(0.565 0.804 0.329) #(0.545 0.772 0.349) #(0.486 0.682 0.353) #(0.388 0.561 0.271) #(1.0 1.0 1.0) #( )))! Item was added: + ----- Method: ToolIcons class>>arrowUp (in category 'private') ----- + arrowUp + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 185273099 185273099 185273099 185273099 185273099 185273099 185273099 185207307 185273099 185273099 168364298 185273099 185273098 150997001 168495883 185272841 328199 151653131 185207049 151257353 151587339 185207306 151388169 168430091 185273098 151191561 168495883 185273098 151587081 168495883 185273098 168430090 168495883 185273099 185273099 185273099) + offset: 0@0) + colorsFromArray: #(#(0.573 0.804 0.369) #(0.565 0.768 0.412) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(0.565 0.804 0.329) #(0.545 0.772 0.349) #(0.486 0.682 0.353) #(0.388 0.561 0.271) #(1.0 1.0 1.0) #( )))! Item was added: + ----- Method: ToolIcons class>>arrowUpAndDown (in category 'private') ----- + arrowUpAndDown + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 185273099 185207307 185273099 185273099 167772170 185273099 185273098 262400 168495883 185272832 67699971 658187 185204736 524800 2571 185207306 459776 168430091 185207306 394240 168430091 185204736 524800 2571 185272832 67699971 658187 185273098 262400 168495883 185273099 167772170 185273099 185273099 185207307 185273099) + offset: 0@0) + colorsFromArray: #(#(0.388 0.561 0.271) #(0.486 0.682 0.353) #(0.565 0.768 0.412) #(0.545 0.772 0.349) #(0.573 0.804 0.369) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.565 0.804 0.329) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(1.0 1.0 1.0) #( )))! Item was added: + ----- Method: ToolIcons class>>blank (in category 'private') ----- + blank + ^ Form extent: 12 @ 12 depth: 8! Item was added: + ----- Method: ToolIcons class>>breakpoint (in category 'private') ----- + breakpoint + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 437918234 437918234 437918234 437654804 319885069 26 437590295 404100630 100859930 437524241 269290764 100860442 437327375 235736076 67305498 437261581 218893324 67305754 437130258 303174162 84082970 436931081 134678279 196890 437918234 437918234 196890 454761243 454761242 196890 454761243 454761242 196634 454761243 454761242 26) + offset: 0@0) + colorsFromArray: #(#(0.349 0.212 0.098) #(0.329 0.2 0.094) #(0.376 0.232 0.109) #(0.694 0.462 0.271) #(0.608 0.271 0.204) #(0.545 0.185 0.113) #(0.784 0.322 0.294) #(0.721 0.023 0.023) #(0.788 0.055 0.055) #(0.848 0.106 0.106) #(0.875 0.137 0.137) #(0.914 0.208 0.208) #(0.953 0.298 0.298) #(0.953 0.318 0.318) #(0.953 0.333 0.333) #(0.953 0.349 0.349) #(0.953 0.365 0.365) #(0.953 0.388 0.388) #(0.922 0.427 0.427) #(0.953 0.482 0.482) #(0.949 0.542 0.538) #(0.957 0.592 0.592) #(0.953 0.624 0.62) #(0.984 0.879 0.879) #(0.988 0.898 0.898) #(0.992 0.918 0.918) #(1.0 1.0 1.0) #( )))! Item was added: + ----- Method: ToolIcons class>>collection (in category 'private') ----- + collection + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 168952850 171324982 909522486 255008812 271977989 285543990 706029348 70649368 724044854 254681884 271986469 689508662 135534100 137758237 890965046 909522486 909513472 436212534 909508866 151126326 909522486 909511457 807338806 909522486 909521969 841353526 909522486 909511458 504824630 909522486 909511943 755436854 909522486 909522486 909522486 909522486) + offset: 0@0) + colorsFromArray: #(#(0.565 0.764 0.538) #(0.992 0.98 0.934) #(0.957 0.879 0.549) #(0.953 0.867 0.514) #(1.0 0.569 0.286) #(0.577 0.772 0.553) #(0.557 0.761 0.53) #(0.957 0.875 0.538) #(1.0 0.949 0.914) #(0.937 0.827 0.369) #(1.0 0.953 0.922) #(0.953 0.871 0.53) #(0.542 0.753 0.518) #(0.992 0.98 0.926) #(0.937 0.965 0.934) #(1.0 0.678 0.466) #(1.0 0.667 0.451) #(0.408 0.678 0.372) #(1.0 0.694 0.494) #(0.93 0.961 0.926) #(1.0 0.682 0.478) #(0.918 0.631 0.447) #(1.0 0.557 0.271) #(0.848 0.757 0.384) #(0.545 0.745 0.506) #(0.561 0.686 0.522) #(0.392 0.671 0.357) #(0.466 0.659 0.423) #(0.887 0.53 0.298) #(0.514 0.71 0.474) #(0.807 0.737 0.458) #(0.887 0.796 0.423) #(0.91 0.628 0.443) #(0.93 0.84 0.466) #(0.894 0.804 0.435) #(0.831 0.553 0.372) #(0.823 0.542 0.357) #(0.643 0.772 0.604) #(0.804 0.733 0.443) #(0.871 0.588 0.408) #(0.498 0.698 0.462) #(0.612 0.733 0.573) #(1.0 0.577 0.306) #(0.639 0.764 0.6) #(0.926 0.569 0.337) #(0.937 0.823 0.353) #(0.937 0.581 0.349) #(0.419 0.686 0.388) #(0.883 0.811 0.53) #(0.894 0.823 0.534) #(0.848 0.776 0.494) #(0.973 0.612 0.38) #(0.941 0.831 0.384) #(0.573 0.694 0.534) #( ) ))! Item was added: + ----- Method: ToolIcons class>>exception (in category 'private') ----- + exception + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 1583238196 1191577949 759500554 1583225870 390089009 36066088 1578711384 857557019 906518110 1581393173 991970905 1549688414 722677332 570761514 1583242846 1327383559 1091971346 5322527 792346372 337270359 1297099812 1011548469 286015067 654532190 1583242842 941838926 1432247902 1583242763 221384798 1583242846 1583224899 1029594718 1583242846 1583231050 1583242846 1583242846) + offset: 0@0) + colorsFromArray: #(#(0.906 0.764 0.392) #(0.945 0.867 0.6) #(0.918 0.776 0.306) #(0.969 0.922 0.815) #(0.945 0.831 0.443) #(0.953 0.84 0.443) #(0.934 0.823 0.388) #(0.953 0.819 0.286) #(0.98 0.949 0.855) #(0.93 0.815 0.376) #(0.992 0.98 0.941) #(0.894 0.733 0.302) #(0.945 0.792 0.4) #(0.898 0.725 0.286) #(0.949 0.863 0.423) #(0.965 0.91 0.737) #(0.984 0.961 0.906) #(0.914 0.772 0.365) #(0.91 0.768 0.384) #(0.941 0.844 0.415) #(0.953 0.844 0.498) #(0.965 0.871 0.4) #(0.953 0.836 0.474) #(0.945 0.859 0.439) #(0.949 0.867 0.651) #(0.988 0.965 0.867) #(0.949 0.815 0.455) #(0.957 0.855 0.542) #(0.953 0.875 0.514) #(0.957 0.836 0.341) #(0.953 0.867 0.474) #(0.914 0.78 0.474) #(0.945 0.8 0.263) #(0.934 0.811 0.431) #(0.941 0.792 0.216) #(0.93 0.788 0.443) #(0.965 0.914 0.796) #(0.965 0.891 0.51) #(0.898 0.733 0.22) #(0.906 0.764 0.435) #(0.992 0.984 0.953) #(0.898 0.737 0.275) #(0.957 0.894 0.71) #(0.992 0.977 0.914) #(0.926 0.815 0.569) #(0.918 0.788 0.333) #(0.973 0.902 0.561) #(0.918 0.788 0.286) #(0.957 0.891 0.725) #(0.937 0.815 0.396) #(0.902 0.757 0.396) #(0.965 0.867 0.369) #(0.937 0.84 0.384) #(0.934 0.836 0.526) #(0.91 0.764 0.306) #(0.887 0.721 0.333) #(0.914 0.764 0.357) #(0.941 0.855 0.412) #(0.949 0.855 0.462) #(0.949 0.811 0.232) #(0.957 0.891 0.635) #(0.945 0.863 0.659) #(0.941 0.776 0.408) #(0.953 0.855 0.474) #(0.945 0.844 0.427) #(0.941 0.78 0.236) #(0.957 0.891 0.608) #(0.875 0.69 0.216) #(0.969 0.883 0.451) #(0.906 0.761 0.286) #(0.957 0.848 0.498) #(0.934 0.836 0.396) #(0.961 0.84 0.415) #(0.941 0.831 0.408) #(0.977 0.941 0.855) #(0.949 0.875 0.604) #(0.965 0.91 0.655) #(0.922 0.757 0.404) #(0.941 0.851 0.635) #(0.965 0.914 0.698) #(0.879 0.69 0.247) #(0.898 0.741 0.353) #(0.891 0.717 0.302) #(0.973 0.934 0.804) #(0.953 0.831 0.279) #(1.0 0.996 0.992) #(0.941 0.796 0.443) #(0.941 0.804 0.486) #(0.98 0.922 0.573) #(0.914 0.772 0.345) #(0.98 0.945 0.859) #(0.902 0.725 0.322) #(0.969 0.918 0.772) #(0.926 0.8 0.357) #( ) ))! Item was added: + ----- Method: ToolIcons class>>flag (in category 'private') ----- + flag + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 437918234 437918234 437918234 436470535 101584139 387389210 436404481 17105924 303634202 436666638 218827016 35198490 437126412 185075720 1644314 437060363 168298504 1644570 436930320 269422351 370743322 437326099 320082453 387520538 437918234 437918234 387520538 454761243 454761242 387520538 454761243 454761242 387520282 454761243 454761242 387389210) + offset: 0@0) + colorsFromArray: #(#(0.22 0.396 0.585) #(0.898 0.945 0.996) #(0.228 0.498 0.761) #(0.608 0.796 0.98) #(0.635 0.804 0.98) #(0.655 0.819 0.98) #(0.47 0.729 0.973) #(0.542 0.768 0.977) #(0.251 0.631 0.961) #(0.267 0.639 0.961) #(0.275 0.643 0.961) #(0.286 0.647 0.961) #(0.302 0.659 0.965) #(0.326 0.667 0.965) #(0.353 0.678 0.965) #(0.396 0.714 0.965) #(0.419 0.729 0.969) #(0.239 0.686 0.93) #(0.243 0.624 0.772) #(0.236 0.682 0.851) #(0.228 0.667 0.788) #(0.224 0.616 0.671) #(0.384 0.228 0.082) #(0.349 0.212 0.098) #(0.329 0.2 0.094) #(0.694 0.462 0.271) #(1.0 1.0 1.0) #( )))! Item was added: + ----- Method: ToolIcons class>>iconForClass: (in category 'support') ----- + iconForClass: aClassNameSymbol + + (Smalltalk at: aClassNameSymbol) withAllSuperclassesDo: [:class | + (self class includesSelector: class name asLowercase asSymbol) + ifTrue: [^ class name asLowercase asSymbol]]. + ^ #blank! Item was added: + ----- Method: ToolIcons class>>iconForClass:selector: (in category 'support') ----- + iconForClass: aClassDescription selector: aSelector + "Answer an icon to be shown for the selector aSymbol in aClassDescription." + + aClassDescription methodDictionary at: aSelector ifPresent: [ :method | + method literalsDo: [ :literal | + (literal == #halt or: [ literal == #halt: or: [ literal == #haltIfNil or: [ literal == #haltIf: or: [ literal == #haltOnce or: [ literal == #haltOnce: or: [ literal == #haltOnCount: or: [ literal == #halt:onCount: ] ] ] ] ] ] ]) + ifTrue: [^ #breakpoint]. + (literal == #flag: or: [ literal == #needsWork or: [ literal == #notYetImplemented ] ]) + ifTrue: [^ #flag]. + + (literal == #shouldBeImplemented or: [literal == #subclassResponsibility]) + ifTrue: [^ #abstract] ] ]. + + ^ (aClassDescription isSelectorOverride: aSelector) + ifTrue: [ + (aClassDescription isSelectorOverridden: aSelector) + ifTrue: [ #arrowUp ] + ifFalse: [ #arrowUpAndDown ] ] + ifFalse: [ + (aClassDescription isSelectorOverridden: aSelector) + ifTrue: [ #arrowDown ] + ifFalse: [#blank ] ]! Item was added: + ----- Method: ToolIcons class>>iconNamed: (in category 'accessing') ----- + iconNamed: aSymbol + + ^self icons at: aSymbol ifAbsentPut: [self perform: aSymbol]! Item was added: + ----- Method: ToolIcons class>>icons (in category 'accessing') ----- + icons + + ^ Icons ifNil: [Icons := Dictionary new]! Item was added: + ----- Method: ToolIcons class>>magnitude (in category 'private') ----- + magnitude + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 874447653 738461995 85013556 875824136 573444634 471217204 875826957 607204404 875115572 875836464 489816628 875836468 875836468 50409268 875836468 875836468 268902708 875836468 875836418 101004340 875836468 875836448 167851060 873804852 875825163 204747815 874722356 875763995 321259818 335557684 875042605 102243847 930868 875836468 875836468 875836468) + offset: 0@0) + colorsFromArray: #(#(0.372 0.372 0.372) #(0.608 0.608 0.608) #(0.961 0.961 0.961) #(0.506 0.506 0.506) #(0.588 0.588 0.588) #(0.415 0.415 0.415) #(0.419 0.419 0.419) #(0.384 0.384 0.384) #(0.745 0.745 0.745) #(0.561 0.561 0.561) #(0.447 0.447 0.447) #(0.435 0.435 0.435) #(0.427 0.427 0.427) #(0.545 0.545 0.545) #(0.522 0.522 0.522) #(0.902 0.902 0.902) #(0.761 0.761 0.761) #(0.53 0.53 0.53) #(0.686 0.686 0.686) #(0.628 0.628 0.628) #(0.181 0.181 0.181) #(0.204 0.204 0.204) #(0.604 0.604 0.604) #(0.455 0.455 0.455) #(0.408 0.408 0.408) #(0.341 0.341 0.341) #(0.659 0.659 0.659) #(0.333 0.333 0.333) #(0.663 0.663 0.663) #(0.624 0.624 0.624) #(0.396 0.396 0.396) #(0.875 0.875 0.875) #(0.542 0.542 0.542) #(0.592 0.592 0.592) #(0.569 0.569 0.569) #(0.236 0.236 0.236) #(0.565 0.565 0.565) #(0.494 0.494 0.494) #(0.62 0.62 0.62) #(0.953 0.953 0.953) #(0.733 0.733 0.733) #(0.502 0.502 0.502) #(0.298 0.298 0.298) #(0.451 0.451 0.451) #(0.585 0.585 0.585) #(0.439 0.439 0.439) #(0.698 0.698 0.698) #(0.714 0.714 0.714) #(0.721 0.721 0.721) #(0.855 0.855 0.855) #(0.474 0.474 0.474) #(0.871 0.871 0.871) #( ) ))! Item was added: + ----- Method: ToolIcons class>>morph (in category 'private') ----- + morph + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 1578631802 292362797 539127618 1895825665 2117994270 1445606482 202325275 1997372285 33573212 859313989 1763509875 1213866361 1064308758 192424752 1645101626 793665883 476466020 85208644 1751792704 621947215 1414349622 527711064 676669009 1346794755 1617375851 1095982919 656635516 1819423020 354700362 1695037706 154613091 420699479 75263577 2139062143 2139062143 2139062143) + offset: 0@0) + colorsFromArray: #(#(0.557 0.714 0.898) #(0.526 0.686 0.887) #(0.557 0.706 0.887) #(0.494 0.604 0.796) #(0.494 0.6 0.792) #(0.585 0.811 1.0) #(0.879 0.93 0.883) #(0.514 0.671 0.867) #(0.84 0.867 0.902) #(0.581 0.667 0.804) #(0.474 0.577 0.753) #(0.729 0.851 0.674) #(0.51 0.678 0.883) #(0.565 0.71 0.918) #(0.733 0.894 1.0) #(0.538 0.694 0.883) #(0.455 0.741 1.0) #(0.553 0.69 0.871) #(0.969 0.867 0.78) #(0.506 0.635 0.815) #(0.757 0.906 1.0) #(0.851 0.879 0.922) #(0.655 0.844 1.0) #(0.836 0.918 0.992) #(0.604 0.741 0.902) #(0.518 0.631 0.804) #(0.542 0.678 0.855) #(0.549 0.698 0.883) #(0.753 0.875 0.725) #(0.815 0.894 0.823) #(0.51 0.667 0.863) #(0.639 0.733 0.91) #(0.522 0.659 0.84) #(0.686 0.757 0.867) #(0.542 0.671 0.836) #(1.0 0.949 0.612) #(0.848 0.859 0.894) #(0.988 0.949 0.918) #(1.0 0.682 0.514) #(0.984 0.871 0.415) #(1.0 0.796 0.674) #(0.977 0.914 0.867) #(0.518 0.671 0.859) #(0.585 0.776 0.518) #(0.836 0.879 0.922) #(0.534 0.671 0.851) #(0.706 0.757 0.855) #(0.643 0.745 0.879) #(0.819 0.918 1.0) #(0.827 0.871 0.906) #(0.458 0.721 0.404) #(0.62 0.737 0.891) #(0.51 0.631 0.8) #(0.577 0.663 0.848) #(0.506 0.612 0.776) #(0.565 0.671 0.84) #(0.926 0.961 0.992) #(0.581 0.659 0.792) #(0.545 0.639 0.792) #(0.4 0.686 0.353) #(0.811 0.898 0.827) #(0.561 0.706 0.883) #(0.518 0.674 0.871) #(0.659 0.757 0.891) #(0.887 0.945 0.902) #(1.0 0.84 0.717) #(0.717 0.776 0.863) #(0.678 0.745 0.859) #(0.538 0.628 0.776) #(0.898 0.945 0.992) #(1.0 0.918 0.549) #(0.996 0.961 0.757) #(0.863 0.93 0.992) #(0.474 0.628 0.827) #(0.844 0.871 0.914) #(0.62 0.807 0.581) #(0.848 0.867 0.91) #(0.988 0.977 0.898) #(0.804 0.914 1.0) #(0.98 0.977 0.934) #(0.957 0.84 0.365) #(0.961 0.93 0.714) #(0.596 0.678 0.815) #(1.0 0.6 0.314) #(0.953 0.937 0.823) #(1.0 0.538 0.243) #(0.502 0.659 0.855) #(0.498 0.596 0.768) #(0.549 0.792 0.577) #(0.612 0.682 0.807) #(0.914 0.957 0.992) #(0.706 0.863 1.0) #(0.482 0.616 0.8) #(0.498 0.624 0.792) #(0.694 0.757 0.863) #(1.0 0.737 0.569) #(0.631 0.721 0.902) #(0.522 0.772 1.0) #(0.549 0.792 1.0) #(0.553 0.647 0.823) #(0.836 0.926 1.0) #(0.84 0.863 0.891) #(0.423 0.717 0.423) #(0.788 0.898 0.733) #(0.612 0.729 0.887) #(0.918 0.953 0.922) #(0.934 0.965 0.934) #(0.616 0.831 0.628) #(0.53 0.643 0.807) #(0.545 0.686 0.863) #(0.502 0.596 0.753) #(0.616 0.702 0.823) #(0.772 0.898 1.0) #(0.581 0.686 0.844) #(0.851 0.891 0.934) #(0.937 0.965 0.992) #(0.729 0.859 0.686) #(0.671 0.745 0.879) #(0.682 0.749 0.879) #(0.545 0.698 0.898) #(0.388 0.682 0.341) #(0.534 0.639 0.8) #(0.561 0.702 0.883) #(0.553 0.706 0.91) #(0.486 0.588 0.776) #(0.542 0.698 0.887) #(0.522 0.678 0.875) #( ) ))! Item was added: + ----- Method: ToolIcons class>>string (in category 'private') ----- + string + ^ ((ColorForm + extent: 12@12 + depth: 8 + fromArray: #( 673716502 100672805 623061032 673717016 118757928 587409448 673710082 33825576 354166824 673717518 268698408 19277864 673714447 504037672 638134312 673720360 302655016 606152744 673720360 673588264 555886632 673720360 673456424 572991528 673720360 671621672 656418856 673720360 673654568 538912808 673720360 671948840 84682792 673720360 673128232 320284712) + offset: 0@0) + colorsFromArray: #(#(0.439 0.721 0.937) #(0.447 0.674 0.93) #(0.573 0.784 0.953) #(0.451 0.682 0.937) #(0.534 0.761 0.949) #(0.435 0.631 0.926) #(0.439 0.729 0.945) #(0.573 0.788 0.953) #(0.443 0.651 0.926) #(0.443 0.663 0.93) #(0.427 0.671 0.93) #(0.494 0.733 0.945) #(0.431 0.631 0.926) #(0.435 0.643 0.926) #(0.498 0.745 0.945) #(0.478 0.694 0.934) #(0.569 0.78 0.953) #(0.941 0.965 0.992) #(0.941 0.961 0.992) #(0.431 0.628 0.926) #(0.538 0.764 0.949) #(0.447 0.682 0.937) #(0.435 0.706 0.937) #(0.431 0.628 0.918) #(0.522 0.768 0.949) #(0.827 0.898 0.977) #(0.455 0.694 0.937) #(0.419 0.71 0.937) #(0.447 0.682 0.93) #(0.455 0.698 0.937) #(0.443 0.71 0.937) #(0.435 0.635 0.926) #(0.435 0.639 0.926) #(0.443 0.659 0.926) #(0.439 0.651 0.926) #(0.451 0.686 0.937) #(0.443 0.659 0.93) #(0.439 0.717 0.937) #(0.443 0.671 0.93) #(0.435 0.647 0.926) #( ) ))! From Das.Linux at gmx.de Thu Mar 5 10:49:04 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 5 10:49:08 2015 Subject: [squeak-dev] The Trunk: Tools-mt.539.mcz Message-ID: \o/ On 05.03.2015, at 10:44, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.539.mcz > > ==================== Summary ==================== > > Name: Tools-mt.539 > Author: mt > Time: 5 March 2015, 11:44:32.854 am > UUID: 5639bb02-c299-6f46-b201-1251937cc8a3 > Ancestors: Tools-mt.537 > > Add icons to class list and message list in browsers. Can be turned off in preferences. Icons are stored in ToolIcons (like MenuIcons and HelpIcons do). > > =============== Diff against Tools-mt.537 =============== > > Item was changed: > CodeHolder subclass: #Browser > instanceVariableNames: 'environment systemOrganizer classOrganizer metaClassOrganizer editSelection metaClassIndicated selectedSystemCategory selectedClassName selectedMessageName selectedMessageCategoryName' > + classVariableNames: 'ListClassesHierarchically RecentClasses ShowClassIcons ShowMessageIcons SortMessageCategoriesAlphabetically' > - classVariableNames: 'ListClassesHierarchically RecentClasses SortMessageCategoriesAlphabetically' > poolDictionaries: '' > category: 'Tools-Browser'! > > !Browser commentStamp: 'cwp 12/27/2012 11:09' prior: 0! > I represent a query path into the class descriptions, the software of the system.! > > Item was added: From jannik.laval at gmail.com Thu Mar 5 15:48:11 2015 From: jannik.laval at gmail.com (jannik laval) Date: Thu Mar 5 15:48:16 2015 Subject: [squeak-dev] CFP IWST 2015 - Reminder - Deadline April 10th Message-ID: [Please accept our apologies if you receive multiple copies of this call] [Please send to interested colleagues / mailing-lists] ************************************************************************************************************ CALL FOR PAPERS IWST15 ? International Workshop on Smalltalk Technologies Brescia, Italy; July 15, 2015 http://www.esug.org/wiki/pier/Conferences/2015/International-Workshop-IWST_15 ************************************************************************************************************ ------------------- Goals and scopes ------------------- The goals of the workshop is to create a forum around advances or experience in Smalltalk and to trigger discussions and exchanges of ideas. The topics of your paper can be on all aspect of Smalltalk, theoretical as well as practical. Participants are invited to submit research articles or industrial papers. This year we want to open two different tracks: one research track and one industrial track with less scientific constraints. We expect papers of three kinds: Short position papers describing emerging ideas Long research papers with deeper description of experiments and of research results. Industrial papers with presentation of real and innovative Smalltalk applications; this kind of paper should enlighten why Smalltalk is really appropriate for your application. We will not enforce any length restriction. -------------------- Important Dates -------------------- *Submission deadline: April 10th, 2015* Notification deadline: May 20th, 2015 Workshop : July 15th, 2015 All accepted papers will be published in ACM DL ------------------- Topics ------------------- We welcome contributions on all aspects, theoretical as well as practical, of Smalltalk related topics such as: -Aspect-oriented programming, -Design patterns, -Experience reports, -Frameworks, -Implementation, new dialects or languages implemented in Smalltalk, -Interaction with other languages, -Meta-programming and Meta-modeling, -Tools ------------------- Best Paper Award ------------------- To encourage the submission of high-quality papers, the IWST organizing committee is very proud to announce a Best Paper Award for this edition of IWST. We thank the Lam Research Corporation for its financial contribution which makes it possible for prizes for the three best papers: 1000 USD for first place, 600 USD for second place and 400 USD for third place. The ranking will be decided by the program committee during the review process. The awards will be given during the ESUG conference social event. The Best Paper Award will take place only with a minimum of six submissions. Notice also that to be eligible, a paper must be presented at the workshop by one of the author and that the presenting author must be registered at the ESUG conference. ------------------- Publication ------------------- Both submissions and final papers must be prepared using the ACM SIGPLAN 10 point format. Templates for Word and LaTeX are available at http://www.acm.org/sigs/sigplan/authorInformation.htm. This site also contains links to useful informations on how to write effective submissions. ------------------- Submission ------------------- All submissions must be sent via easychair: https://easychair.org/conferences/?conf=iwst2015 ------------------- Program chairs ------------------- Anne Etien (Universit? de Lille 1, France) Jannik Laval (Ecole des Mines de Douai, France) -- ~~Jannik Laval~~ ?cole des Mines de Douai Enseignant-chercheur http://www.jannik-laval.eu http://www.phratch.com http://www.approchealpes.info http://car.mines-douai.fr/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150305/1f6dc74b/attachment.htm From commits at source.squeak.org Thu Mar 5 20:47:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 20:47:51 2015 Subject: [squeak-dev] The Trunk: System.spur-topa.704.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-topa.704.mcz ==================== Summary ==================== Name: System.spur-topa.704 Author: eem Time: 5 March 2015, 12:44:47.947 pm UUID: ce615558-ce9e-42de-b34c-41301246071d Ancestors: System-topa.704, System.spur-eem.703 System-topa.704 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) =============== Diff against System-topa.704 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Thu Mar 5 20:48:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 20:48:49 2015 Subject: [squeak-dev] The Trunk: System.spur-mt.705.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-mt.705.mcz ==================== Summary ==================== Name: System.spur-mt.705 Author: eem Time: 5 March 2015, 12:48:04.493 pm UUID: aea1ffb7-3847-4aa5-b284-48e9f4589e38 Ancestors: System-mt.705, System.spur-topa.704 System-mt.705 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Auto-generated method for #gradientMenu removed because of postload-script in Morphic-mt.764. =============== Diff against System-mt.705 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Thu Mar 5 20:49:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 20:49:27 2015 Subject: [squeak-dev] The Trunk: System.spur-mt.706.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-mt.706.mcz ==================== Summary ==================== Name: System.spur-mt.706 Author: eem Time: 5 March 2015, 12:48:06.3 pm UUID: d9900bb6-7097-4d55-9b03-8433d15a53d6 Ancestors: System-mt.706, System.spur-mt.705 System-mt.706 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Re-activated possibility to have multiple categories for a single preference. Worked for old-style preferences, now works again for pragma-style preferences. Use #categoryList: instead of #category: in the pragma and provide an array of strings (or symbols). =============== Diff against System-mt.706 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Thu Mar 5 20:49:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 20:49:43 2015 Subject: [squeak-dev] The Trunk: System.spur-mt.707.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-mt.707.mcz ==================== Summary ==================== Name: System.spur-mt.707 Author: eem Time: 5 March 2015, 12:48:08.103 pm UUID: 035cb2d1-2807-44b2-8f8e-71c8681c2c97 Ancestors: System-mt.707, System.spur-mt.706 System-mt.707 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Old-style preference #roundedMenuCorners removed. See Morphic-mt.766 postload-script. =============== Diff against System-mt.707 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From eliot.miranda at gmail.com Thu Mar 5 21:22:34 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 5 21:22:39 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: Hi All, recent instability seems to have been cured. Please find new VMs at http://www.mirandabanda.org/files/Cog/VM/VM.r3266. For Squeakers, these are close to release candidates for the upcoming 5.0 release. I have one last modification to do with free space handling on start-up in Spur (the current VMs over-allocate free space), and maybe a minor speed-up of the LargeIntegersPlugin; other than that I intend bug fixes only. CogVM binaries as per VMMaker.oscog-eem.1085/r3266 Avoid duplication in fetching active process and scheduler in process-switch machinery. Take advantage of endianness for simpler large integer initialization. Simplify primitiveMakePoint. Include primitiveMethodXray to introspect on Cog state of methods. Refactor positive32BitIntegerFor: and signed32BitIntegerFor: in the realization that these reduce to essentially integerObjectOf: in 64-bit Spur. The idea is to inline if in 64-bit Spur but not if in the 32-bit VMs. Add notOption: processing to allow excluding noInlineSigned32BitIntegerFor: et al. Add hasSixtyFourBitImmediates to no longer assume that wordSize = 8 implies 64-bit immediates. Use positiveMachineIntegerFor: in place of positive32BitIntegerFor: in some plugins. Simplify primitiveDisplayString given isArray:. Simplify two B3DAcceleratorPlugin prims given topRemappableOop and isArray: Slang: Changes to type inferrence/propagation and inlining to better support 64-bit Spur. See change log of VMMaker.oscog in 1067-1085 range for exhaustive details. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150305/707e395b/attachment.htm From commits at source.squeak.org Thu Mar 5 22:04:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 5 22:04:06 2015 Subject: [squeak-dev] The Trunk: Tools-topa.540.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.540.mcz ==================== Summary ==================== Name: Tools-topa.540 Author: topa Time: 5 March 2015, 11:03:47.832 pm UUID: a752e434-b5ad-40d1-90c0-e7c56cf68246 Ancestors: Tools-mt.539 Fix ToolIcons to work with PseudoClasses used by File Contents Browser =============== Diff against Tools-mt.539 =============== Item was changed: ----- Method: ToolIcons class>>iconForClass: (in category 'support') ----- iconForClass: aClassNameSymbol + + (Smalltalk at: aClassNameSymbol ifAbsent: [^ #blank]) withAllSuperclassesDo: [:class | - (Smalltalk at: aClassNameSymbol) withAllSuperclassesDo: [:class | (self class includesSelector: class name asLowercase asSymbol) ifTrue: [^ class name asLowercase asSymbol]]. ^ #blank! Item was changed: ----- Method: ToolIcons class>>iconForClass:selector: (in category 'support') ----- iconForClass: aClassDescription selector: aSelector "Answer an icon to be shown for the selector aSymbol in aClassDescription." + | classDescription | + classDescription := (aClassDescription isKindOf: PseudoClass) + ifTrue: [aClassDescription realClass ifNil: [^ #blank ]] + ifFalse: [aClassDescription]. + classDescription methodDictionary at: aSelector ifPresent: [ :method | - - aClassDescription methodDictionary at: aSelector ifPresent: [ :method | method literalsDo: [ :literal | (literal == #halt or: [ literal == #halt: or: [ literal == #haltIfNil or: [ literal == #haltIf: or: [ literal == #haltOnce or: [ literal == #haltOnce: or: [ literal == #haltOnCount: or: [ literal == #halt:onCount: ] ] ] ] ] ] ]) ifTrue: [^ #breakpoint]. (literal == #flag: or: [ literal == #needsWork or: [ literal == #notYetImplemented ] ]) ifTrue: [^ #flag]. (literal == #shouldBeImplemented or: [literal == #subclassResponsibility]) ifTrue: [^ #abstract] ] ]. + ^ (classDescription isSelectorOverride: aSelector) - ^ (aClassDescription isSelectorOverride: aSelector) ifTrue: [ + (classDescription isSelectorOverridden: aSelector) - (aClassDescription isSelectorOverridden: aSelector) ifTrue: [ #arrowUp ] ifFalse: [ #arrowUpAndDown ] ] ifFalse: [ + (classDescription isSelectorOverridden: aSelector) - (aClassDescription isSelectorOverridden: aSelector) ifTrue: [ #arrowDown ] ifFalse: [#blank ] ]! From lewis at mail.msen.com Fri Mar 6 00:07:00 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 6 00:07:02 2015 Subject: [squeak-dev] Removing class PreDebugWindow (was: How to view an old Error in the debugger?) In-Reply-To: References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> Message-ID: <20150306000700.GA88582@shell.msen.com> On Tue, Mar 03, 2015 at 07:56:02PM -0800, Bert Freudenberg wrote: > On 03.03.2015, at 18:59, Chris Muller wrote: > > > > On Tue, Mar 3, 2015 at 5:59 PM, Bert Freudenberg wrote: > >> > >> You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc. > > > > That makes sense but I still want my app to handle the error the way > > it does presenting the messageText, but I want to add a button, > > "Debug" which will open up what happened in the debugger. The process > > which the error occurs in is the UI process so I can't suspending it. > > It seems like I want to somehow clone it. Wait.. A Continuation!? > > Is that what I need? > > What you need is a prettier PreDebugWindow. This used to be what was shown before the actual debugger (in openNotifierContents:label:) but that's now toolbuilderified. > PreDebugWindow is unreferenced since a long time. The debug notifier is now created with ToolBuilder. Is there any reason that PreDebugWindow should stay in the image? Dave From asqueaker at gmail.com Fri Mar 6 03:04:42 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 6 03:04:46 2015 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: > I have one last > modification to do with free space handling on start-up in Spur (the current > VMs over-allocate free space), ... If its on start-up, does that mean I'll need to start and then immediately save my image for the free-space to be freed in the saved-state of the image? I assume not. :) From eliot.miranda at gmail.com Fri Mar 6 04:59:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 6 04:59:56 2015 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: <2544E008-D778-4394-8DC1-46C57F45644F@gmail.com> Hi Chris, On Mar 5, 2015, at 7:04 PM, Chris Muller wrote: >> I have one last >> modification to do with free space handling on start-up in Spur (the current >> VMs over-allocate free space), ... > > If its on start-up, does that mean I'll need to start and then > immediately save my image for the free-space to be freed in the > saved-state of the image? I assume not. :) It depends on where you start. If (once the issue is fixed) from a fresh spur image then no; if from an older one then yes, if you want a compact snapshot. It'll need a snapshot to squeeze out some free space from the image. The snapshot code tries to not write out empty segments or the free space at the end of each segment, but currently includes all other free space in old space. Hopefully it'll get cleverer eventually. From commits at source.squeak.org Fri Mar 6 07:44:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 07:44:46 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.770.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.770.mcz ==================== Summary ==================== Name: Morphic-mt.770 Author: mt Time: 6 March 2015, 8:44:10.825 am UUID: c8483e78-e2d0-9747-9517-7b4b51ae1b6d Ancestors: Morphic-mt.769 Convenience items added to "Windows" menu in world main docking bar to close multiple or all windows at once. Idea: Clean up the whole world and start a new task with few clicks. =============== Diff against Morphic-mt.769 =============== Item was added: + ----- Method: TheWorldMainDockingBar>>closeAllWindows (in category 'submenu - windows') ----- + closeAllWindows + self allVisibleWindows do: [:each | + each model canDiscardEdits ifTrue: [each delete]]! Item was added: + ----- Method: TheWorldMainDockingBar>>closeAllWindowsButWorkspaces (in category 'submenu - windows') ----- + closeAllWindowsButWorkspaces + + (UserDialogBoxMorph + confirm: 'There might be unsaved changes.\Do you really want to close all windows\that are no workspaces?' withCRs + title: 'Only keep workspaces') ifTrue: [ + self allVisibleWindows + reject: [:each | each model isKindOf: Workspace] + thenDo: [:each | [each delete] valueSupplyingAnswer: true]].! Item was added: + ----- Method: TheWorldMainDockingBar>>closeAllWindowsUnsafe (in category 'submenu - windows') ----- + closeAllWindowsUnsafe + + (UserDialogBoxMorph + confirm: 'There might be unsaved changes.\Do you really want to close all windows?' withCRs + title: 'Close All Windows') ifTrue: [ + self allVisibleWindows do: [:each | [each delete] valueSupplyingAnswer: true]].! 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 activateAndForceLabelToShow; expand ] ] ]. + menu + addLine; + add: 'Close all windows' target: self selector: #closeAllWindowsUnsafe; + add: 'Close all windows w/o changes' target: self selector: #closeAllWindows; + add: 'Close all windows but workspaces' target: self selector: #closeAllWindowsButWorkspaces.! - action: [ each activateAndForceLabelToShow; expand ] ] ].! From herbertkoenig at gmx.net Fri Mar 6 07:55:02 2015 From: herbertkoenig at gmx.net (=?ISO-8859-15?Q?Herbert_K=F6nig?=) Date: Fri Mar 6 07:55:06 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.770.mcz Message-ID: <54F95D56.8080700@gmx.net> Hi, Am 06.03.2015 um 07:44 schrieb commits@source.squeak.org: > > Idea: Clean up the whole world and start a new task with few clicks. > > In this case I usually open a new Project :-) Cheers, Herbert From commits at source.squeak.org Fri Mar 6 08:13:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 08:13:02 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.771.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.771.mcz ==================== Summary ==================== Name: Morphic-mt.771 Author: mt Time: 6 March 2015, 9:12:23.556 am UUID: 1363b90c-d0cd-d942-8a15-e43d4e3f818e Ancestors: Morphic-mt.770 Fall-back implementations for drawing rounded rectangles added to abstract Canvas class. Fixes problems with color-mapping canvases. =============== Diff against Morphic-mt.770 =============== Item was added: + ----- Method: Canvas>>fillRoundRect:radius:fillStyle: (in category 'drawing-rectangles') ----- + fillRoundRect: aRectangle radius: radius fillStyle: fillStyle + + self + fillRectangle: aRectangle + fillStyle: fillStyle.! Item was added: + ----- Method: Canvas>>frameAndFillRoundRect:radius:fillStyle:borderWidth:borderColor: (in category 'drawing-rectangles') ----- + frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc + + self + frameAndFillRectangle: aRectangle + fillColor: fillStyle asColor + borderWidth: bw + borderColor: bc.! Item was added: + ----- Method: Canvas>>frameRoundRect:radius:width:color: (in category 'drawing-rectangles') ----- + frameRoundRect: aRectangle radius: radius width: borderWidth color: borderColor + + self + frameRectangle: aRectangle + width: borderWidth + color: borderColor.! Item was changed: + ----- Method: FormCanvas>>balloonFillRectangle:fillStyle: (in category 'private') ----- - ----- Method: FormCanvas>>balloonFillRectangle:fillStyle: (in category 'drawing-rectangles') ----- balloonFillRectangle: aRectangle fillStyle: aFillStyle self asBalloonCanvas fillRectangle: aRectangle fillStyle: aFillStyle.! Item was changed: + ----- Method: FormCanvas>>balloonFillRoundRect:radius:fillStyle: (in category 'private') ----- - ----- Method: FormCanvas>>balloonFillRoundRect:radius:fillStyle: (in category 'drawing-rectangles') ----- balloonFillRoundRect: aRectangle radius: radius fillStyle: fillStyle ^self asBalloonCanvas fillRoundRect: aRectangle radius: radius fillStyle: fillStyle! Item was changed: + ----- Method: FormCanvas>>infiniteFillRectangle:fillStyle: (in category 'private') ----- - ----- Method: FormCanvas>>infiniteFillRectangle:fillStyle: (in category 'drawing-rectangles') ----- infiniteFillRectangle: aRectangle fillStyle: aFillStyle | additionalOffset rInPortTerms clippedPort targetTopLeft clipOffset ex | "this is a bit of a kludge to get the form to be aligned where I *think* it should be. something better is needed, but not now" additionalOffset := 0@0. ex := aFillStyle form extent. rInPortTerms := aRectangle translateBy: origin. clippedPort := port clippedBy: rInPortTerms. targetTopLeft := clippedPort clipRect topLeft truncateTo: ex. clipOffset := rInPortTerms topLeft - targetTopLeft. additionalOffset := (clipOffset \\ ex) - ex. ^aFillStyle displayOnPort: clippedPort offsetBy: additionalOffset ! From mbaehr at email.archlab.tuwien.ac.at Fri Mar 6 10:17:42 2015 From: mbaehr at email.archlab.tuwien.ac.at (=?utf-8?q?Martin_B=C3=A4hr?=) Date: Fri Mar 6 10:17:57 2015 Subject: [squeak-dev] any smalltalkers in singapore next week for FOSSASIA? Message-ID: <1425636897-sup-3376@email.archlab.tuwien.ac.at> hi, i am going to the FOSSASIA conference next week, and i wonder if there is anyone here going too? would be nice to meet and chat... see fossasia.org for details. btw: i'll do a workshop about building a REST api in smalltalk at the conference. greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin B?hr working in china http://societyserver.org/mbaehr/ From commits at source.squeak.org Fri Mar 6 11:11:36 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 11:11:37 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.772.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.772.mcz ==================== Summary ==================== Name: Morphic-mt.772 Author: mt Time: 6 March 2015, 12:10:55.322 pm UUID: 01c63ecd-5c74-5946-b459-75db9e82725a Ancestors: Morphic-mt.771 Object explorer wrappers prepared to be used in columns. Some comments for tree morph updated. =============== Diff against Morphic-mt.771 =============== Item was changed: ListItemWrapper subclass: #ObjectExplorerWrapper instanceVariableNames: 'itemName parent' + classVariableNames: 'ShowContentsInColumns' - classVariableNames: '' poolDictionaries: '' category: 'Morphic-Explorer'! !ObjectExplorerWrapper commentStamp: '' prior: 0! Contributed by Bob Arning as part of the ObjectExplorer package. ! Item was added: + ----- Method: ObjectExplorerWrapper class>>showContentsInColumns (in category 'preferences') ----- + showContentsInColumns + + ^ ShowContentsInColumns ifNil: [true]! Item was added: + ----- Method: ObjectExplorerWrapper class>>showContentsInColumns: (in category 'preferences') ----- + showContentsInColumns: aBoolean + + ShowContentsInColumns := aBoolean.! Item was changed: ----- Method: ObjectExplorerWrapper>>asString (in category 'converting') ----- asString + | explorerString string separator | - | explorerString string | explorerString := [item asExplorerString] on: Error do: ['']. + separator := self class showContentsInColumns + ifTrue: [String tab] + ifFalse: [': ']. + string := (itemName ifNotNil: [itemName, separator] ifNil: ['']) , explorerString. - string := (itemName ifNotNil: [itemName , ': '] ifNil: ['']) , explorerString. (string includes: Character cr) ifTrue: [^ string withSeparatorsCompacted]. ^ string! Item was changed: ----- Method: ObjectExplorerWrapper>>icon (in category 'accessing') ----- icon "Answer a form to be used as icon" ^ Preferences visualExplorer + ifTrue: [(item iconOrThumbnailOfSize: 12) + ifNil: [self class showContentsInColumns + ifTrue: [ToolIcons iconNamed: #blank] + ifFalse: [nil]]] - ifTrue: [item iconOrThumbnailOfSize: 16] ifFalse: [nil]! Item was changed: ----- Method: SimpleHierarchicalListMorph>>autoDeselect: (in category 'initialization') ----- autoDeselect: trueOrFalse + "When selecting a selected item, it will be deselected. See #mouseUp:." + - "Enable/disable autoDeselect (see class comment)" autoDeselect := trueOrFalse.! Item was changed: ----- Method: SimpleHierarchicalListMorph>>columns: (in category 'accessing') ----- columns: anArray + "You can specify columns or specs for columns. This depends on the actual morph that is used as item. ObjectExplorers produce items that support exact numbers, blocks, and nil for max width." + - columns := anArray! From commits at source.squeak.org Fri Mar 6 11:13:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 11:13:04 2015 Subject: [squeak-dev] The Trunk: Tools-mt.541.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.541.mcz ==================== Summary ==================== Name: Tools-mt.541 Author: mt Time: 6 March 2015, 12:12:46.401 pm UUID: 90ab74c7-c1e5-f140-8d75-91822baedb7b Ancestors: Tools-topa.540 Object explorer now supports two columns: one for the keys and one for the values. Icons are shown in the second column. =============== Diff against Tools-topa.540 =============== Item was added: + ----- Method: IndentingListItemMorph class>>iconColumnIndex (in category 'defaults') ----- + iconColumnIndex + "Hack. For now, say who gets the icon here. We need a generic solution for icons in multi-column trees. PluggableTreeMorph does something in that direction." + ^ 2! Item was added: + ----- Method: IndentingListItemMorph>>contentsAtColumn: (in category 'accessing - columns') ----- + contentsAtColumn: index + "Split string contents at character." + + | column scanner cell | + column := 0. + scanner := ReadStream on: contents asString. + [(cell := scanner upTo: Character tab) notEmpty] + whileTrue: [column := column + 1. column = index ifTrue: [^ cell]]. + ^ ''! Item was added: + ----- Method: IndentingListItemMorph>>contentsSplitByColumns (in category 'accessing - columns') ----- + contentsSplitByColumns + "Split string contents at character." + + | result scanner cell | + result := OrderedCollection new. + scanner := ReadStream on: contents asString. + [(cell := scanner upTo: Character tab) notEmpty] + whileTrue: [result add: cell]. + ^ result! Item was changed: ----- Method: IndentingListItemMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | tRect sRect columnScanner columnLeft | tRect := self toggleRectangle. sRect := bounds withLeft: tRect right + 4. + sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. self drawToggleOn: aCanvas in: tRect. - icon isNil ifFalse:[ - aCanvas - translucentImage: icon - - at: sRect left @ (self top + (self height - icon height // 2)). - - - sRect := sRect left: sRect left + icon width + 2. - ]. - (container columns isNil or: [(contents asString indexOf: Character tab) = 0]) ifTrue: [ + icon ifNotNil: [ + aCanvas + translucentImage: icon + at: sRect left @ (self top + (self height - icon height // 2)). + sRect := sRect left: sRect left + icon width + 2. + ]. + - sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. aCanvas drawString: contents asString in: sRect font: self fontToUse color: color. ] ifFalse: [ columnLeft := sRect left. columnScanner := ReadStream on: contents asString. + container columns withIndexDo: [ :widthSpec :column | | columnRect columnData columnWidth | + "Draw icon." + column = self class iconColumnIndex ifTrue: [ + icon ifNotNil: [ + aCanvas + translucentImage: icon + at: columnLeft @ (self top + (self height - icon height // 2)). + columnLeft := columnLeft + icon width + 2]]. + + columnWidth := widthSpec isNumber + ifTrue: [widthSpec] + ifFalse: [widthSpec isBlock + ifTrue: [widthSpec cull: container cull: self] + ifFalse: [widthSpec ifNil: [self width] ifNotNil: [50 "Fall back"]]]. + columnRect := columnLeft @ sRect top extent: columnWidth @ sRect height. - container columns do: [ :width | | columnRect columnData | - columnRect := columnLeft @ sRect top extent: width @ sRect height. columnData := columnScanner upTo: Character tab. + + "Draw string." + columnData ifNotEmpty: [ + aCanvas drawString: columnData in: columnRect font: self fontToUse color: color]. + + "Compute next column offset." - columnData isEmpty ifFalse: [ - aCanvas drawString: columnData in: columnRect font: self fontToUse color: color - . - ]. columnLeft := columnRect right + 5. + column = 1 ifTrue: [columnLeft := columnLeft - tRect right + self left]. + ]. + ]! - ] - ! Item was added: + ----- Method: IndentingListItemMorph>>preferredColumnCount (in category 'accessing - columns') ----- + preferredColumnCount + + ^ self contentsSplitByColumns size! Item was added: + ----- Method: IndentingListItemMorph>>preferredWidthOfColumn: (in category 'accessing - columns') ----- + preferredWidthOfColumn: index + + ^ (self fontToUse widthOfString: (self contentsAtColumn: index)) + + (index = 1 ifTrue: [self toggleRectangle right - self left] ifFalse: [0])! Item was changed: + ----- Method: ObjectExplorer>>explorerFor: (in category 'user interface') ----- - ----- Method: ObjectExplorer>>explorerFor: (in category 'accessing') ----- explorerFor: anObject + | window view | - | window listMorph | rootObject := anObject. window := (SystemWindow labelled: self label) model: self. + window addMorph: (view := (SimpleHierarchicalListMorph - window addMorph: (listMorph := SimpleHierarchicalListMorph on: self list: #getList selected: #getCurrentSelection changeSelected: #noteNewSelection: menu: #genericMenu: keystroke: #explorerKey:from:) + columns: (ObjectExplorerWrapper showContentsInColumns + ifTrue: [{ + [:listMorph | (listMorph scroller submorphs collect: [:item | + item preferredWidthOfColumn: 1]) max]. + nil "take all the space"}] + ifFalse: []); + yourself) frame: (0@0 corner: 1@0.8). window addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash: readSelection: #contentsSelection menu: #codePaneMenu:shifted:) askBeforeDiscardingEdits: false) frame: (0@0.8 corner: 1@1). + view - listMorph autoDeselect: false. ^ window! Item was changed: ----- Method: ObjectExplorer>>explorerFor:withLabel: (in category 'user interface') ----- explorerFor: anObject withLabel: label + | window view | - | window listMorph | rootObject := anObject. window := (SystemWindow labelled: label) model: self. + window + addMorph: (view := (SimpleHierarchicalListMorph - addMorph: (listMorph := SimpleHierarchicalListMorph on: self list: #getList selected: #getCurrentSelection changeSelected: #noteNewSelection: menu: #genericMenu: keystroke: nil) + columns: (ObjectExplorerWrapper showContentsInColumns + ifTrue: [{ + [:listMorph | (listMorph scroller submorphs collect: [:item | + item preferredWidthOfColumn: 1]) max]. + nil "take all the space"}] + ifFalse: []); + yourself) frame: (0 @ 0 corner: 1 @ 0.8). window addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash: readSelection: #contentsSelection menu: #codePaneMenu:shifted:) askBeforeDiscardingEdits: false) frame: (0 @ 0.8 corner: 1 @ 1). + view autoDeselect: false. - listMorph autoDeselect: false. ^ window! From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 6 11:08:31 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 6 11:17:09 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.541.mcz In-Reply-To: References: Message-ID: <1425640111699-4809952.post@n4.nabble.com> Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-541-mcz-tp4809948p4809952.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Fri Mar 6 12:10:39 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 6 12:10:46 2015 Subject: [squeak-dev] The Trunk: Tools-mt.541.mcz Message-ID: <6AF42FA1-21D1-462B-8FD6-A72D3A22C6A6@gmx.de> Hi On 06.03.2015, at 11:12, commits@source.squeak.org wrote: > + [(cell := scanner upTo: Character tab) notEmpty] > + whileTrue: [column := column + 1. column = index ifTrue: [^ cell]]. > + what about #findTokens: here? Best -Tobias From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 6 12:14:08 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 6 12:22:46 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.541.mcz In-Reply-To: <6AF42FA1-21D1-462B-8FD6-A72D3A22C6A6@gmx.de> References: <6AF42FA1-21D1-462B-8FD6-A72D3A22C6A6@gmx.de> Message-ID: <1425644048832-4809965.post@n4.nabble.com> Hmmm... I just reused the existing code from #drawOn:. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-541-mcz-tp4809948p4809965.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 6 12:15:32 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 6 12:24:10 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.770.mcz In-Reply-To: <54F95D56.8080700@gmx.net> References: <54F95D56.8080700@gmx.net> Message-ID: <1425644132872-4809967.post@n4.nabble.com> And what happens to the old one? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-770-mcz-tp4809874p4809967.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From herbertkoenig at gmx.net Fri Mar 6 12:40:14 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Fri Mar 6 12:40:14 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.770.mcz In-Reply-To: <1425644132872-4809967.post@n4.nabble.com> References: <54F95D56.8080700@gmx.net> <1425644132872-4809967.post@n4.nabble.com> Message-ID: <54F9A02E.8010504@gmx.net> It stays open with all the tools in the state I left them. Usually I have one Squeak project for each aspect of the software I work on. Later I delete the entire project. Some projects are just for (grapical) documentation or brainstorming. BTW this is no objection to your change. Different people, different styles of work. Cheers, Herbert Am 06.03.2015 um 13:15 schrieb Marcel Taeumel: > And what happens to the old one? > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-770-mcz-tp4809874p4809967.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Fri Mar 6 15:50:59 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 6 15:51:01 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.541.mcz In-Reply-To: <1425640111699-4809952.post@n4.nabble.com> References: <1425640111699-4809952.post@n4.nabble.com> Message-ID: Very nice. On Fri, Mar 6, 2015 at 5:08 AM, Marcel Taeumel wrote: > > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Tools-mt-541-mcz-tp4809948p4809952.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From asqueaker at gmail.com Fri Mar 6 16:12:20 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 6 16:12:23 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.770.mcz In-Reply-To: <54F9A02E.8010504@gmx.net> References: <54F95D56.8080700@gmx.net> <1425644132872-4809967.post@n4.nabble.com> <54F9A02E.8010504@gmx.net> Message-ID: This is a very good function to have. I use this function for years to clean up the desktop so I can deploy a development image as a "production"-use image. I don't know if you reused the code which is attached to the "windows..." submenu of the World menu or not, I hope so.. :) On Fri, Mar 6, 2015 at 6:40 AM, Herbert K?nig wrote: > It stays open with all the tools in the state I left them. Usually I have > one Squeak project for each aspect of the software I work on. Later I delete > the entire project. > > Some projects are just for (grapical) documentation or brainstorming. > > BTW this is no objection to your change. Different people, different styles > of work. > > Cheers, > > Herbert > > Am 06.03.2015 um 13:15 schrieb Marcel Taeumel: > >> And what happens to the old one? >> >> Best, >> Marcel >> >> >> >> -- >> View this message in context: >> http://forum.world.st/The-Trunk-Morphic-mt-770-mcz-tp4809874p4809967.html >> Sent from the Squeak - Dev mailing list archive at Nabble.com. >> > > From djm1329 at san.rr.com Fri Mar 6 17:28:12 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Fri Mar 6 17:28:17 2015 Subject: [squeak-dev] Re: [Vm-dev] New Cog VMs available In-Reply-To: References: Message-ID: ARMv6 stack.v3 and stack.spur VMs updated accordingly. Doug > On Mar 5, 2015, at 13:22, Eliot Miranda wrote: > > Hi All, > > recent instability seems to have been cured. Please find new VMs at http://www.mirandabanda.org/files/Cog/VM/VM.r3266 . For Squeakers, these are close to release candidates for the upcoming 5.0 release. I have one last modification to do with free space handling on start-up in Spur (the current VMs over-allocate free space), and maybe a minor speed-up of the LargeIntegersPlugin; other than that I intend bug fixes only. > > > CogVM binaries as per VMMaker.oscog-eem.1085/r3266 > > Avoid duplication in fetching active process and scheduler in process-switch machinery. > > Take advantage of endianness for simpler large integer initialization. > > Simplify primitiveMakePoint. Include primitiveMethodXray to introspect on Cog state of methods. > > Refactor positive32BitIntegerFor: and signed32BitIntegerFor: in the realization that these > reduce to essentially integerObjectOf: in 64-bit Spur. The idea is to inline if in 64-bit Spur > but not if in the 32-bit VMs. Add notOption: processing to allow excluding > noInlineSigned32BitIntegerFor: et al. Add hasSixtyFourBitImmediates to no longer assume that > wordSize = 8 implies 64-bit immediates. > > Use positiveMachineIntegerFor: in place of positive32BitIntegerFor: in some plugins. > > Simplify primitiveDisplayString given isArray:. > Simplify two B3DAcceleratorPlugin prims given topRemappableOop and isArray: > > Slang: > Changes to type inferrence/propagation and inlining to better support 64-bit Spur. > See change log of VMMaker.oscog in 1067-1085 range for exhaustive details. > -- > best, > Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150306/80eb4e12/attachment.htm From eliot.miranda at gmail.com Fri Mar 6 19:07:45 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 6 19:07:50 2015 Subject: [squeak-dev] Re: [Vm-dev] New Cog VMs available In-Reply-To: References: Message-ID: Thanks Doug! On Fri, Mar 6, 2015 at 9:28 AM, Douglas McPherson wrote: > > ARMv6 stack.v3 and stack.spur VMs updated accordingly. > > Doug > > > On Mar 5, 2015, at 13:22, Eliot Miranda wrote: > > Hi All, > > recent instability seems to have been cured. Please find new VMs at > http://www.mirandabanda.org/files/Cog/VM/VM.r3266. For Squeakers, these > are close to release candidates for the upcoming 5.0 release. I have one > last modification to do with free space handling on start-up in Spur (the > current VMs over-allocate free space), and maybe a minor speed-up of the > LargeIntegersPlugin; other than that I intend bug fixes only. > > > CogVM binaries as per VMMaker.oscog-eem.1085/r3266 > > Avoid duplication in fetching active process and scheduler in > process-switch machinery. > > Take advantage of endianness for simpler large integer initialization. > > Simplify primitiveMakePoint. Include primitiveMethodXray to introspect on > Cog state of methods. > > Refactor positive32BitIntegerFor: and signed32BitIntegerFor: in the > realization that these > reduce to essentially integerObjectOf: in 64-bit Spur. The idea is to > inline if in 64-bit Spur > but not if in the 32-bit VMs. Add notOption: processing to allow excluding > noInlineSigned32BitIntegerFor: et al. Add hasSixtyFourBitImmediates to no > longer assume that > wordSize = 8 implies 64-bit immediates. > > Use positiveMachineIntegerFor: in place of positive32BitIntegerFor: in > some plugins. > > Simplify primitiveDisplayString given isArray:. > Simplify two B3DAcceleratorPlugin prims given topRemappableOop and isArray: > > Slang: > Changes to type inferrence/propagation and inlining to better support > 64-bit Spur. > See change log of VMMaker.oscog in 1067-1085 range for exhaustive details. > -- > best, > Eliot > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150306/f38e0e04/attachment.htm From ma.chris.m at gmail.com Fri Mar 6 20:23:00 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Mar 6 20:23:03 2015 Subject: [squeak-dev] Squeak 4.6 release update Message-ID: Besides welcoming Marcel to the board yesterday, we discussed that we'd like to push for the 4.6 / 5.0 release by April 30th. Somehow my name was the only one to be found on the volunteer list as release manager, but Eliot voiced his willingness to assist, but will be relying on others to chip in as well. So, I've just updated the Squeak 4.5-13686 image from trunk (lo and behold, it worked without a hitch!) to produce a Squeak4.6-14191.zip which is now available at ftp.squeak.org/4.6alpha/. >From this snapshot forward, lets start thinking about the 4.6 release and all that we want to be in it. If you have any low-level changes to the image that would benefit from as much testing as possible, now is the time to get those finalized and committed into the trunk. Controversial changes should start in the Inbox as always, we still have time for one or two more arguments. :) In a few weeks, we'll want to start being more conservative with our changes; only things like tools and cosmetics -- and we'll hammer out the look and UX. 4.6 is a dual release also as 5.0. We'll be releasing two VM's and two images; one each for the Cog and Spur formats. The content of the images will be equivalent. From ma.chris.m at gmail.com Fri Mar 6 20:24:39 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Mar 6 20:24:42 2015 Subject: [squeak-dev] 4.6 -- codename Message-ID: "From Cog to Spur" -- we need a snappy codename that makes sense for this release. I thought about "Cowboy" for a few seconds, but that's way too awful for marketing.. :) Someone help please. From ma.chris.m at gmail.com Fri Mar 6 20:28:53 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Mar 6 20:28:58 2015 Subject: [squeak-dev] 4.6 -- New .sources and .changes files Message-ID: We really should finally compressChanges and condenseSources for this release. The last time we spoke about this, I believe we said we want to: 1) current changes merged into .sources. 2) exclude leaves in history (methods with no descendants) 3) except the current one of course 4) all prior history with descendants is kept Did I say that right? We need a volunteer to look into this. Thanks! From tim at rowledge.org Fri Mar 6 20:29:10 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Mar 6 20:29:15 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: References: Message-ID: <33C530C6-3BD6-499B-A4D9-C5D0EF883781@rowledge.org> On 06-03-2015, at 12:24 PM, Chris Muller wrote: > "From Cog to Spur" -- we need a snappy codename that makes sense for > this release. Gearbox. Connects an input cog to an output spur gear tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Only playing with 51 cards. From lewis at mail.msen.com Fri Mar 6 21:36:06 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 6 21:36:08 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: <33C530C6-3BD6-499B-A4D9-C5D0EF883781@rowledge.org> References: <33C530C6-3BD6-499B-A4D9-C5D0EF883781@rowledge.org> Message-ID: <28187.136.2.1.105.1425677766.squirrel@webmail.msen.com> > > On 06-03-2015, at 12:24 PM, Chris Muller wrote: > >> "From Cog to Spur" -- we need a snappy codename that makes sense for >> this release. > > Gearbox. Connects an input cog to an output spur gear > > > tim > -- > tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim > Useful random insult:- Only playing with 51 cards. > "Gearbox" is perfect! I like it. The IBM Gearbox (http://www.meco.org/gallery/main.php?g2_itemId=7938) was a heavily hyped PC based product for industrial applications back in the 1990s. But I don't think they will mind if we liberate the name and apply it to a more noble purpose. Dave From commits at source.squeak.org Fri Mar 6 21:50:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 21:50:25 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.773.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.773.mcz ==================== Summary ==================== Name: Morphic-topa.773 Author: topa Time: 6 March 2015, 10:49:31.196 pm UUID: b8eb96f3-4b2f-4899-9069-2dacb1a8be92 Ancestors: Morphic-mt.772 Adapt ColorMappingCanvas and children to also map fill styles. Rounded-Corner rects are now correctly handled. =============== Diff against Morphic-mt.772 =============== Item was added: + ----- Method: AlphaBlendingCanvas>>mapFillStyle: (in category 'private') ----- + mapFillStyle: aFillStyle + + ^ self alpha = 1.0 + ifTrue: [aFillStyle] + ifFalse: [super mapFillStyle: aFillStyle] + ! Item was added: + ----- Method: ColorMappingCanvas>>frameAndFillRoundRect:radius:fillStyle:borderWidth:borderColor: (in category 'drawing-rectangles') ----- + frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc + "Draw the rectangle using the given attributes" + myCanvas + frameAndFillRoundRect: aRectangle + radius: cornerRadius + fillStyle: (self mapFillStyle: fillStyle) + borderWidth: bw + borderColor: (self mapColor: bc) + ! Item was added: + ----- Method: ColorMappingCanvas>>mapFillStyle: (in category 'private') ----- + mapFillStyle: aFillStyle + + ^ aFillStyle isGradientFill + ifFalse: [self mapColor: aFillStyle asColor] + ifTrue: [aFillStyle copy colorRamp: (aFillStyle colorRamp collect: [:assoc | assoc key -> (self mapColor: assoc value)])]. + ! Item was added: + ----- Method: PluggableCanvas>>frameAndFillRoundRect:radius:fillStyle:borderWidth:borderColor: (in category 'drawing-rectangles') ----- + frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc + self apply: [ :c | + c frameAndFillRoundRect: aRectangle radius: cornerRadius fillStyle: fillStyle borderWidth: bw borderColor: bc ]! From commits at source.squeak.org Fri Mar 6 21:58:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 21:58:04 2015 Subject: [squeak-dev] The Trunk: TrueType-topa.30.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.30.mcz ==================== Summary ==================== Name: TrueType-topa.30 Author: topa Time: 6 March 2015, 10:52:16.177 pm UUID: cf2b3756-eef6-488c-9072-3b357b939970 Ancestors: TrueType-bf.29 Cope for some ttc fonts actually being PostScript-Based opentype fonts our TTF code cannot deal with. Also: Include system fonts on OS X =============== Diff against TrueType-bf.29 =============== Item was changed: ----- Method: TTFileDescription class>>fontPathsDo: (in category 'font paths') ----- fontPathsDo: aBlock "Evaluate aBlock with all of the font paths that should be searched on the current platform" "Start with the current directory" aBlock value: FileDirectory default pathName. "Then subdirectory 'fonts'" aBlock value: (FileDirectory default directoryNamed: 'fonts') pathName. "Platform specific directories" Smalltalk platformName caseOf:{ ['Win32'] -> [ "Standard Windows fonts directory" aBlock value: 'C:\Windows\Fonts'. ]. ['Mac OS'] -> [ + "Standard system fonts directories" + #('/System/Library/Fonts' '/Library/Fonts') do: [:fontDir | + aBlock value: fontDir]. - "Standard system fonts directory" - aBlock value: '/Library/Fonts'. ]. ['unix'] -> [ | base | "Standard fonts are in /usr/share/fonts/*" base := '/usr/share/fonts'. (FileDirectory on: base) directoryNames do:[:dn| aBlock value: base, '/', dn]. ]. } otherwise:[]. ! Item was changed: ----- Method: TTFileDescription>>on:offset: (in category 'initialize') ----- on: aFileName offset: fontOffset "Initialize the receiver from a file name" fileName := aFileName. fileOffset := fontOffset. self withFileDo:[:fontFile| + "Some TTC fonts may actually be collection of PostScript-Based OpenType fonts" + (self findTable: 'CFF ' in: fontFile) + ifTrue: [^ nil] + ifFalse: [fontFile position: fileOffset "reset"]. "Some bitmap fonts are called .ttf; skip anything that doesn't have a header" (self findTable: 'head' in: fontFile) ifFalse:[^nil]. self processFontHeaderTable: fontFile. (self findTable: 'maxp' in: fontFile) ifFalse:[^self error: 'File does not have a profile table']. self processMaximumProfileTable: fontFile. (self findTable: 'name' in: fontFile) ifFalse:[^self error: 'File does not have a naming table']. self processNamingTable: fontFile. (self findTable: 'hhea' in: fontFile) ifFalse:[^self error: 'File does not have a horizontal header table']. self processHorizontalHeaderTable: fontFile. (self findTable: 'OS/2' in: fontFile) ifTrue:[self processOS2Table: fontFile]. (self findTable: 'hmtx' in: fontFile) ifFalse:[^self error: 'File does not have a horizontal header table']. hmtxTableOffset := fontFile position. (self findTable: 'loca' in: fontFile) ifFalse:[^self error: 'File does not have a naming table']. indexToLocOffset := fontFile position. (self findTable: 'glyf' in: fontFile) ifFalse:[^self error: 'File does not have a naming table']. glyphTableOffset := fontFile position. (self findTable: 'cmap' in: fontFile) ifFalse:[^self error: 'File does not have a header table']. self processCharacterMappingTable: fontFile. ].! From commits at source.squeak.org Fri Mar 6 22:55:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 22:55:07 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150306225506.32209.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-February/007535.html Name: Tests-eem.311 Ancestors: Tests-eem.310 Eliminate an interactive prompt in the MCEnvironmentLoadTest ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007536.html Name: Kernel-bf.899 Ancestors: Kernel-eem.898 Fix random for Really Large Integers. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007537.html Name: KernelTests-nice.287 Ancestors: KernelTests-mt.286 Put some higher expectations from #timesTwoPower: fallback code than it can currently handle. Some of these test will start failing when the primitive is disabled. Some will fail immediately. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007538.html Name: Kernel-nice.900 Ancestors: Kernel-bf.899 Rescue #timesTwoPower: fallback code from freshly discovered flaws. Don't be sparing of comments, if we ever need some, that gonna be here Some of us try very hard to make the tests speak in place of comments, I feel that having both don't hurt. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007539.html Name: Kernel-eem.901 Ancestors: Kernel-nice.900 Make Integer class>>byte1:byte2:byte3:byte4: 64-bit Spur savvy, and add a similarly savvy byte1:byte2:byte3:byte4:byte5:byte6:byte7:byte8: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007540.html Name: KernelTests-eem.288 Ancestors: KernelTests-nice.287 Make the testCreationFromBytes tests 64-bit Spur savvy ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007541.html Name: Kernel-nice.902 Ancestors: Kernel-eem.901 Generate large random integers a bit more fairly. The idea is just to generate a large bit sequence by gathering enough pseudo random chunks. Note that this implementation knows that Random cannot fairly generate 32 bits, so limit itself to 24 bits chunk. It knows two much about Random already and should better delegate, but since we have a single Pseudo Random Number Generator so far, don't bother too much. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007542.html Name: Kernel.spur-bf.899 Ancestors: Kernel-bf.899, Kernel.spur-eem.898 Kernel-bf.899 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Fix random for Really Large Integers. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007543.html Name: Kernel.spur-nice.900 Ancestors: Kernel-nice.900, Kernel.spur-bf.899 Kernel-nice.900 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Rescue #timesTwoPower: fallback code from freshly discovered flaws. Don't be sparing of comments, if we ever need some, that gonna be here Some of us try very hard to make the tests speak in place of comments, I feel that having both don't hurt. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007544.html Name: Kernel.spur-eem.901 Ancestors: Kernel-eem.901 Kernel-eem.901 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Make Integer class>>byte1:byte2:byte3:byte4: 64-bit Spur savvy, and add a similarly savvy byte1:byte2:byte3:byte4:byte5:byte6:byte7:byte8: ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007545.html Name: Kernel.spur-nice.902 Ancestors: Kernel-nice.902, Kernel.spur-eem.901 Kernel-nice.902 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Generate large random integers a bit more fairly. The idea is just to generate a large bit sequence by gathering enough pseudo random chunks. Note that this implementation knows that Random cannot fairly generate 32 bits, so limit itself to 24 bits chunk. It knows two much about Random already and should better delegate, but since we have a single Pseudo Random Number Generator so far, don't bother too much. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007546.html Name: Kernel-ul.904 Ancestors: Kernel-nice.902 Avoid the frequent time checks, and the clock rollover bug in BlockClosure >> #bench. Introduced BlockClosure >> #benchFor:, a variant of #bench, which takes the duration of the benchmark as its parameter. Added more information about the running times to the answer. E.g.: [ 10 factorial ] benchFor: 0.1 seconds. "'7,990,000 per second. 125 nanoseconds per run.'" [ 100 factorial ] benchFor: 10 seconds. "'19,900 per second. 50.3 microseconds per run.'" [ 1000 factorial ] bench. "'378 per second. 2.65 milliseconds per run.'" [ 20000 factorial ] bench. "'0.843 per second. 1.19 seconds per run.'" ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007547.html Name: KernelTests-eem.289 Ancestors: KernelTests-eem.288 Fix the 64-bitized testCreationFromBytes tests. The read bytes need to be reversed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007548.html Name: Compiler-bf.293 Ancestors: Compiler-topa.292 Fix deoptimization of ifNil: etc. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007549.html Name: Compiler-bf.294 Ancestors: Compiler-bf.293 Accidentally changed method category. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007550.html Name: Compiler.spur-bf.293 Ancestors: Compiler-bf.293, Compiler.spur-topa.292 Compiler-bf.293 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Fix deoptimization of ifNil: etc. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007551.html Name: Compiler.spur-bf.294 Ancestors: Compiler-bf.294, Compiler.spur-bf.293 Compiler-bf.294 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Accidentally changed method category. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007552.html Name: Kernel.spur-ul.904 Ancestors: Kernel-ul.904, Kernel.spur-nice.902 Kernel-ul.904 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Avoid the frequent time checks, and the clock rollover bug in BlockClosure >> #bench. Introduced BlockClosure >> #benchFor:, a variant of #bench, which takes the duration of the benchmark as its parameter. Added more information about the running times to the answer. E.g.: [ 10 factorial ] benchFor: 0.1 seconds. "'7,990,000 per second. 125 nanoseconds per run.'" [ 100 factorial ] benchFor: 10 seconds. "'19,900 per second. 50.3 microseconds per run.'" [ 1000 factorial ] bench. "'378 per second. 2.65 milliseconds per run.'" [ 20000 factorial ] bench. "'0.843 per second. 1.19 seconds per run.'" ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007553.html Name: Morphic-mt.758 Ancestors: Morphic-mt.757 Preferences for gradient* fixed or implemented: Windows, buttons, scrollbars, menus. The gradient fill-styles can now be fully disabled in all standard tools. Default is still "enabled". ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007554.html Name: Kernel-topa.905 Ancestors: Kernel-ul.904 Add a convenience method to access arguments of a context. Also: increases compatibility. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007555.html Name: Morphic-topa.759 Ancestors: Morphic-mt.758 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007556.html Name: ReleaseBuilder-topa.116 Ancestors: ReleaseBuilder-cmm.115 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007557.html Name: System-topa.704 Ancestors: System-eem.703 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007558.html Name: Morphic-mt.760 Ancestors: Morphic-topa.759 Corner rounding refactored. Does not rely on (spooky) CornerRounder implementation anymore. Many hacks for that CornerRounder could be removed from Morphic. A preference can be used to choose the preferred corner radius for rounded morphs. (Preferences > Morphic > Preferred Corner Radius) Subclasses may override the drawing of corners as needed. See draw* methods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007559.html Name: Nebraska-mt.40 Ancestors: Nebraska-bf.39 No CornerRounder anymore. Depended morphs have to round corners themselves. See Morphic-mt.760. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007560.html Name: Graphics-mt.307 Ancestors: Graphics-kfr.305 No CornerRounder anymore. Depended morphs have to round corners themselves. See Morphic-mt.760. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007561.html Name: Morphic-mt.761 Ancestors: Morphic-mt.760 Make pluggable buttons use the appropriate code for handling rounded corners (e.g. like system windows do). Corner rounding is now also configurable for buttons. Same preference: 'Preferred corner radius'. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007562.html Name: Morphic-mt.762 Ancestors: Morphic-mt.761 Flag added to document that we don't handle rounded corners for roll-over borders. (eToys only?) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007563.html Name: Kernel-ul.906 Ancestors: Kernel-topa.905 Added an implementation of a 30-bit Mersenne Twister (p=521) to Random. All existing Random instances are migrated to the new implementation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007564.html Name: Kernel-ul.907 Ancestors: Kernel-ul.906 Removed the old random number generator implementation from Random. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007565.html Name: Kernel-ul.908 Ancestors: Kernel-ul.907 Removed the unused variables from Random. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007566.html Name: Morphic-ul.763 Ancestors: Morphic-mt.762, Morphic-ul.754 Merged Morphic-ul.754: Simplified and improved WorldState >> #interCyclePause: - don't create a new Delay (along with a new Semaphore) every 20 (or 50) milliseconds - use #millisecondsSince: to avoid the effects of the clock rollover - separated the code of time calculation and actual waiting ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007567.html Name: Morphic-ul.754 Ancestors: Morphic-bf.753 Simplified and improved WorldState >> #interCyclePause: - don't create a new Delay (along with a new Semaphore) every 20 (or 50) milliseconds - use #millisecondsSince: to avoid the effects of the clock rollover - separated the code of time calculation and actual waiting Depends on Kernel-ul.893 ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007568.html Name: Morphic-mt.764 Ancestors: Morphic-ul.763 New pragma-preference for #gradientMenu to update SystemProgressbar instance accordingly. Postload-script will remove the old-style preference. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007569.html Name: System-mt.705 Ancestors: System-topa.704 Auto-generated method for #gradientMenu removed because of postload-script in Morphic-mt.764. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007570.html Name: System-mt.706 Ancestors: System-mt.705 Re-activated possibility to have multiple categories for a single preference. Worked for old-style preferences, now works again for pragma-style preferences. Use #categoryList: instead of #category: in the pragma and provide an array of strings (or symbols). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007571.html Name: Morphic-mt.765 Ancestors: Morphic-mt.764 Recategorized #preferredCornerRadius into all affected preference categories. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007572.html Name: Morphic-mt.766 Ancestors: Morphic-mt.765 Several cosmetic fixes considering dockingbar morphs and menu morphs. #roundedMenuCorners is now a pragma-style preference. Several magic numbers could be removed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007573.html Name: ReleaseBuilder-mt.117 Ancestors: ReleaseBuilder-topa.116 Updated to use pragma-style preference for #roundedMenuCorners. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007574.html Name: System-mt.707 Ancestors: System-mt.706 Old-style preference #roundedMenuCorners removed. See Morphic-mt.766 postload-script. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007575.html Name: KernelTests-ul.290 Ancestors: KernelTests-eem.289 Updated RandomTest to match the new implementation of Random. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-February/007576.html Name: Tools-mt.534 Ancestors: Tools-topa.533 Auto-sort message category list in System Browser. Does not affect internal order of categories in class organization. Only a view thing. Makes 'alphabetize' in the menu somewhat obsolete for this column. Saves some mouse clicks. However, hides insertion order of message categories. Not that important, right? :-) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007577.html Name: Tools-mt.535 Ancestors: Tools-mt.534 New preference for auto-sorting the message category list. Disabled by default. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007578.html Name: Morphic-mt.767 Ancestors: Morphic-mt.766 Make TransformMorph use #clipSubmorphs: as specified in Morph. Having this, TransforMorphs can have a #layoutPolicy: again. #layoutBounds overwritten to respect local coordinate system. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007579.html Name: ToolBuilder-Morphic-mt.94 Ancestors: ToolBuilder-Morphic-mt.93 Fixed creation of pluggable scroll pane. Failed to use correct interface for #whenNeeded behavior of scroll bars. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007580.html Name: Tools-mt.537 Ancestors: Tools-mt.535 Make use of proper abstractions/interface in browser models for message category selection. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007581.html Name: MorphicExtras-mt.155 Ancestors: MorphicExtras-bf.154 Extended animated image morph so that it can be used with forms coming from animated gifs that only store diff/delta-frames. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007582.html Name: Morphic-mt.768 Ancestors: Morphic-mt.767 Fixes rounded corners and respects #gradientWindow preference in UserDialogBoxMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007583.html Name: MorphicExtras-mt.156 Ancestors: MorphicExtras-mt.155 Uses eToys' implementation of AnimatedImageMorph, which works fine with animated GIFs now. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007584.html Name: MorphicExtras-mt.157 Ancestors: MorphicExtras-mt.156 Reverted eToys-specific changes in AnimatedImageMorph but kept its working core in #step for displaying animated gifs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007585.html Name: Kernel-mt.909 Ancestors: Kernel-ul.908 Two utility messages added to classes to find out whether a selector is an override or will be overridden in subclasses. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007586.html Name: Morphic-mt.769 Ancestors: Morphic-mt.768 Fixes icon access wrt. list filtering. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007587.html Name: Tools-mt.539 Ancestors: Tools-mt.537 Add icons to class list and message list in browsers. Can be turned off in preferences. Icons are stored in ToolIcons (like MenuIcons and HelpIcons do). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007588.html Name: Kernel.spur-topa.905 Ancestors: Kernel-topa.905, Kernel.spur-ul.904 Kernel-topa.905 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Add a convenience method to access arguments of a context. Also: increases compatibility. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007589.html Name: Kernel.spur-ul.906 Ancestors: Kernel-ul.906, Kernel.spur-topa.905 Kernel-ul.906 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Added an implementation of a 30-bit Mersenne Twister (p=521) to Random. All existing Random instances are migrated to the new implementation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007590.html Name: Kernel.spur-ul.907 Ancestors: Kernel-ul.907, Kernel.spur-ul.906 Kernel-ul.907 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Removed the old random number generator implementation from Random. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007591.html Name: Kernel.spur-ul.908 Ancestors: Kernel-ul.908, Kernel.spur-ul.907 Kernel-ul.908 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Removed the unused variables from Random. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007592.html Name: Kernel.spur-mt.909 Ancestors: Kernel-mt.909 Kernel-mt.909 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Two utility messages added to classes to find out whether a selector is an override or will be overridden in subclasses. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007593.html Name: System.spur-topa.704 Ancestors: System-topa.704, System.spur-eem.703 System-topa.704 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Retain scrollBar look now that the pref actually does something (as of Morphic-mt.758) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007594.html Name: System.spur-mt.705 Ancestors: System-mt.705, System.spur-topa.704 System-mt.705 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Auto-generated method for #gradientMenu removed because of postload-script in Morphic-mt.764. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007595.html Name: System.spur-mt.706 Ancestors: System-mt.706, System.spur-mt.705 System-mt.706 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Re-activated possibility to have multiple categories for a single preference. Worked for old-style preferences, now works again for pragma-style preferences. Use #categoryList: instead of #category: in the pragma and provide an array of strings (or symbols). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007596.html Name: System.spur-mt.707 Ancestors: System-mt.707, System.spur-mt.706 System-mt.707 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.240 Old-style preference #roundedMenuCorners removed. See Morphic-mt.766 postload-script. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007597.html Name: Tools-topa.540 Ancestors: Tools-mt.539 Fix ToolIcons to work with PseudoClasses used by File Contents Browser ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007598.html Name: Morphic-mt.770 Ancestors: Morphic-mt.769 Convenience items added to "Windows" menu in world main docking bar to close multiple or all windows at once. Idea: Clean up the whole world and start a new task with few clicks. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007599.html Name: Morphic-mt.771 Ancestors: Morphic-mt.770 Fall-back implementations for drawing rounded rectangles added to abstract Canvas class. Fixes problems with color-mapping canvases. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007600.html Name: Morphic-mt.772 Ancestors: Morphic-mt.771 Object explorer wrappers prepared to be used in columns. Some comments for tree morph updated. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007601.html Name: Tools-mt.541 Ancestors: Tools-topa.540 Object explorer now supports two columns: one for the keys and one for the values. Icons are shown in the second column. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007602.html Name: Morphic-topa.773 Ancestors: Morphic-mt.772 Adapt ColorMappingCanvas and children to also map fill styles. Rounded-Corner rects are now correctly handled. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007603.html Name: TrueType-topa.30 Ancestors: TrueType-bf.29 Cope for some ttc fonts actually being PostScript-Based opentype fonts our TTF code cannot deal with. Also: Include system fonts on OS X ============================================= From Das.Linux at gmx.de Fri Mar 6 23:17:54 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 6 23:17:58 2015 Subject: [squeak-dev] The Debugger bugs me Message-ID: Hey, using the current trunk (doest not happen in 4.5), I cannot use the debugger in a useful way anymore. Regardless of what I do in the editor view of the Debugger, after a second or so, I tries to select the current expression (as if I had clicked 'Where')[1] and scrolls to that place. This is especially annoying when scrolling around long methods or trying to do a printIt or exploreIt on other expressions? Any clue? Best -Tobias [1]: I also have the impresison that, when one uses 'toggle break on entry', that the current expression is off-by-one with the actually current one. From Das.Linux at gmx.de Fri Mar 6 23:22:54 2015 From: Das.Linux at gmx.de (Das.Linux@gmx.de) Date: Fri Mar 6 23:22:59 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: References: Message-ID: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> On 07.03.2015, at 00:17, Tobias Pape wrote: > Hey, > > using the current trunk (doest not happen in 4.5), I cannot use the > debugger in a useful way anymore. > Regardless of what I do in the editor view of the Debugger, after > a second or so, I tries to select the current expression (as if I had > clicked 'Where')[1] and scrolls to that place. This is especially annoying > when scrolling around long methods or trying to do a printIt or exploreIt > on other expressions? > > Any clue? > > Best > -Tobias > > > [1]: I also have the impresison that, when one uses 'toggle break on entry', that > the current expression is off-by-one with the actually current one. Addendum: seems _only_ to happen with 'toggle break on entry' methods, that actually lose their formatting and seem "pretty"-printed. Can anyone confirm? From commits at source.squeak.org Fri Mar 6 23:40:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 23:40:17 2015 Subject: [squeak-dev] The Trunk: TrueType-topa.31.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.31.mcz ==================== Summary ==================== Name: TrueType-topa.31 Author: topa Time: 7 March 2015, 12:39:53.513 am UUID: 74ce9267-5c56-4766-b6c9-0ed574424565 Ancestors: TrueType-topa.30 In Fonts with multilingual names, prefer English =============== Diff against TrueType-topa.30 =============== Item was changed: ----- Method: TTFileDescription>>processNamingTable: (in category 'ttf tables') ----- processNamingTable: fontFile "copyright CHARPTR The font's copyright notice. familyName CHARPTR The font's family name. subfamilyName CHARPTR The font's subfamily name. uniqueName CHARPTR A unique identifier for this font. fullName CHARPTR The font's full name (a combination of familyName and subfamilyName). versionName CHARPTR The font's version string. " + | nRecords initialOffset storageOffset | - | nRecords initialOffset storageOffset pID sID nID length offset string | initialOffset := fontFile position. fontFile skip: 2. "Skip format selector" "Get the number of name records" nRecords := fontFile nextNumber: 2. "Offset from the beginning of this table" storageOffset := (fontFile nextNumber: 2) + initialOffset. + 1 to: nRecords do:[:i| | pID sID lID nID length offset string | - 1 to: nRecords do:[:i| fontFile position: initialOffset + 6 + ((i-1) * 12). pID := fontFile nextNumber: 2. sID := fontFile nextNumber: 2. + lID := fontFile nextNumber: 2. - "lID := "fontFile nextNumber: 2. nID := fontFile nextNumber: 2. length := fontFile nextNumber: 2. offset := fontFile nextNumber: 2. "Read only Macintosh or Microsoft strings" (pID = 1 or:[pID = 3 and:[sID = 1]]) ifTrue:[ "MS uses Unicode all others single byte" "multiBytes := pID = 3." fontFile position: storageOffset+offset. string := (fontFile next: length) asString. pID = 3 ifTrue:[ | keep | keep := true. string := string select:[:ch| keep := keep not]. ]. nID caseOf: { + "Select only English names, prefer Macintosh" "[0] -> [copyright := string]." + [1] -> [(lID = 0 and: [pID = 1 or:[familyName == nil]]) ifTrue:[familyName := string]]. + [2] -> [(lID = 0 and: [pID = 1 or:[subfamilyName == nil]]) ifTrue:[subfamilyName := string]]. + "[3] -> [(lID = 0 and: [pID = 1 or:[uniqueName == nil]]) ifTrue:[uniqueName := string]]." + "[4] -> [(lID = 0 and: [pID = 1 or:[fullName == nil]]) ifTrue:[fullName := string]]." + "[5] -> [(lID = 0 and: [pID = 1 or:[versionName == nil]]) ifTrue:[versionName := string]]." + "[6] -> [(lID = 0 and: [pID = 1 or:[postscriptName == ni]l]) ifTrue:[postscriptName := string]]." + "[7] -> [lpID = 0 and: [pID = 1 or:[trademark == nil]]) ifTrue:[trademark := string]]." - [1] -> [(pID = 1 or:[familyName == nil]) ifTrue:[familyName := string]]. - [2] -> [(pID = 1 or:[subfamilyName == nil]) ifTrue:[subfamilyName := string]]. - "[3] -> [(pID = 1 or:[uniqueName == nil]) ifTrue:[uniqueName := string]]." - "[4] -> [(pID = 1 or:[fullName == nil]) ifTrue:[fullName := string]]." - "[5] -> [(pID = 1 or:[versionName == nil]) ifTrue:[versionName := string]]." - "[6] -> [(pID = 1 or:[postscriptName == nil]) ifTrue:[postscriptName := string]]." - "[7] -> [(pID = 1 or:[trademark == nil]) ifTrue:[trademark := string]]." } otherwise:["ignore"]. ]. ]. ! Item was changed: ----- Method: TTFontReader>>processNamingTable: (in category 'processing') ----- processNamingTable: entry "copyright CHARPTR The font's copyright notice. familyName CHARPTR The font's family name. subfamilyName CHARPTR The font's subfamily name. uniqueName CHARPTR A unique identifier for this font. fullName CHARPTR The font's full name (a combination of familyName and subfamilyName). versionName CHARPTR The font's version string. + " | nRecords initialOffset storageOffset strings | - " | nRecords initialOffset storageOffset pID sID lID nID length offset multiBytes string strings | strings := Array new: 8. strings atAllPut:''. initialOffset := entry offset. entry skip: 2. "Skip format selector" "Get the number of name records" nRecords := entry nextUShort. "Offset from the beginning of this table" storageOffset := entry nextUShort + initialOffset. + 1 to: nRecords do:[:i| | pID sID lID nID length offset multiBytes string | - 1 to: nRecords do:[:i| pID := entry nextUShort. sID := entry nextUShort. lID := entry nextUShort. nID := entry nextUShort. length := entry nextUShort. offset := entry nextUShort. "Read only Macintosh or Microsoft strings" (pID = 1 or:[pID = 3 and:[sID = 1]]) ifTrue:[ "MS uses Unicode all others single byte" multiBytes := pID = 3. string := entry stringAt: storageOffset + offset length: length multiByte: multiBytes. "Put the name at the right location. + Note: We prefer Macintosh strings about everything else and use only English names." - Note: We prefer Macintosh strings about everything else." nID < strings size ifTrue:[ + (lID = 0 and: [pID = 1 or:[(strings at: nID+1) = '']]) - (pID = 1 or:[(strings at: nID+1) = '']) ifTrue:[strings at: nID+1 put: string]. ]. ]. ]. fontDescription setStrings: strings.! From commits at source.squeak.org Fri Mar 6 23:44:46 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 23:44:47 2015 Subject: [squeak-dev] The Inbox: Collections-cbc.604.mcz Message-ID: A new version of Collections was added to project The Inbox: http://source.squeak.org/inbox/Collections-cbc.604.mcz ==================== Summary ==================== Name: Collections-cbc.604 Author: cbc Time: 6 March 2015, 3:44:37.262 pm UUID: 0513e699-e650-2340-8505-70e368dd9c64 Ancestors: Collections-eem.603, Collections-cbc.582 Changes to support adding and subtracting strings from DateAndTimes. Supports syntax such as: DateAndTime now + '02:00:00:00' and DateAndTime now - '02:00:00:00' =============== Diff against Collections-eem.603 =============== Item was added: + ----- Method: String>>addToDateTime: (in category 'arithmetic') ----- + addToDateTime: aDateAndTime + "Utilized when adjusting DateAndTimes. Such as: + DateAndTime now + '02: 00:00:00' + Not expected to be used outside of that system." + ^self asDuration addToDateTime: aDateAndTime + ! Item was added: + ----- Method: String>>subtractFromDateTime: (in category 'arithmetic') ----- + subtractFromDateTime: aDateAndTime + "Utilized when adjusting DateAndTimes. Such as: + DateAndTime now - '02: 00:00:00' + Not expected to be used outside of that system." + ^self asDuration subtractFromDateTime: aDateAndTime + ! From commits at source.squeak.org Fri Mar 6 23:49:11 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 23:49:13 2015 Subject: [squeak-dev] The Inbox: Kernel-cbc.910.mcz Message-ID: A new version of Kernel was added to project The Inbox: http://source.squeak.org/inbox/Kernel-cbc.910.mcz ==================== Summary ==================== Name: Kernel-cbc.910 Author: cbc Time: 6 March 2015, 3:48:56.226 pm UUID: 6af9b576-3666-7444-ad16-9b84461a4dd0 Ancestors: Kernel-mt.909, Kernel-cbc.872 Changes to support adding months and years to a DateAndTime, such as: DateAndTime now + 2 months and DateAndTimeNow - 5 years This requires retro-fitting the + and - in DateAndTime to a double dispatch system, and requires changes in Collections as well (to support + and - with String representations). Added support for chaining durations (such as 1 month + 1 day). =============== Diff against Kernel-mt.909 =============== Item was changed: ----- Method: DateAndTime>>+ (in category 'ansi protocol') ----- + + aDuration + "aDuration is one of: Duration, GenericDuration, GenericMonth, or GenericYear." + ^aDuration addToDateTime: self - + operand - "operand conforms to protocol Duration" - - | ticks | - ticks := self ticks + (operand asDuration ticks) . - - ^ self class basicNew - ticks: ticks - offset: self offset; - yourself ! Item was changed: ----- Method: DateAndTime>>- (in category 'ansi protocol') ----- - operand + "operand is one of: Duration, GenericDuration, GenericMonth, or GenericYear; or a DateAndTime or Timespan." + ^operand subtractFromDateTime: self - "operand conforms to protocol DateAndTime or protocol Duration" - - ^ (operand respondsTo: #asDateAndTime) - ifTrue: - [ | lticks rticks | - lticks := self asLocal ticks. - - rticks := operand asDateAndTime asLocal ticks. - Duration - seconds: (SecondsInDay *(lticks first - rticks first)) + - (lticks second - rticks second) - nanoSeconds: (lticks third - rticks third) ] - - ifFalse: - - [ self + (operand negated) ] ! Item was added: + ----- Method: DateAndTime>>addToDateTime: (in category 'ansi protocol') ----- + addToDateTime: aDateAndTime + ^self asDuration addToDateTime: aDateAndTime + ! Item was added: + ----- Method: DateAndTime>>addToDuration: (in category 'ansi protocol') ----- + addToDuration: aDuration + ^Duration nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) + ! Item was added: + ----- Method: DateAndTime>>subtractFromDateTime: (in category 'ansi protocol') ----- + subtractFromDateTime: aDateAndTime + | lticks rticks | + lticks := aDateAndTime asLocal ticks. + rticks := self asLocal ticks. + ^Duration + seconds: (SecondsInDay * (lticks first - rticks first)) + + (lticks second - rticks second) + nanoSeconds: (lticks third - rticks third)! Item was added: + ----- Method: DateAndTime>>subtractFromDuration: (in category 'ansi protocol') ----- + subtractFromDuration: aDuration + ^Duration nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds)! Item was changed: ----- Method: Duration>>+ (in category 'ansi protocol') ----- + operand + "operand is a type of Duration" + ^operand addToDuration: self + ! - - "operand is a Duration" ^ self class nanoSeconds: (self asNanoSeconds + operand asNanoSeconds)! Item was changed: ----- Method: Duration>>- (in category 'ansi protocol') ----- - operand + "operand is a type of Duration" + ^operand subtractFromDuration: self + ! - "operand is a Duration" ^ self + operand negated! Item was added: + ----- Method: Duration>>addToDateTime: (in category 'ansi protocol') ----- + addToDateTime: aDateAndTime + | ticks | + ticks := self ticks + (aDateAndTime ticks) . + ^ aDateAndTime class basicNew + ticks: ticks + offset: aDateAndTime offset; + yourself + ! Item was added: + ----- Method: Duration>>addToDuration: (in category 'ansi protocol') ----- + addToDuration: aDuration + ^self class nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) + ! Item was added: + ----- Method: Duration>>subtractFromDateTime: (in category 'ansi protocol') ----- + subtractFromDateTime: aDateAndTime + ^self copy negated addToDateTime: aDateAndTime! Item was added: + ----- Method: Duration>>subtractFromDuration: (in category 'ansi protocol') ----- + subtractFromDuration: aDuration + ^self class nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds) + ! Item was added: + Object subclass: #GenericDuration + instanceVariableNames: 'sequence' + classVariableNames: '' + poolDictionaries: '' + category: 'Kernel-Chronology'! + + !GenericDuration commentStamp: 'cbc 9/21/2014 22:07' prior: 0! + The GenericDuration class exists to support simple DateAndTime arithmetic (also including Timespan, such as Date). This class supports chains of different duration arthmetic with each other, such as: + 1 year + 2 months + 3 days + 4 hours + 5 minuts + 6 seconds + 7 nanoSeconds + Instances of GenericDuration should be created by adding (or subtracting)2 or more durations with each other, including other instances of GenericDuration. + + You cannot ask a GenericDuration how long it is. This is a nonsensical question if a year or month is involved, as those are only resolvable once it is place into relationship to an actual date. + + GenericDuration are associate, but not commutative. That is + 1 month + 31 days ~= 31 days + 1 month + but + ((1 month + 1 year) + 31 days) = (1 month + (1 year + 31 days)) + ! Item was added: + ----- Method: GenericDuration>>+ (in category 'ansii protocol') ----- + + aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + aDuration class = self class + ifTrue: [sequence addAllLast: aDuration sequence] + ifFalse: [sequence addLast: aDuration copy] + ! Item was added: + ----- Method: GenericDuration>>- (in category 'ansii protocol') ----- + - aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + aDuration class = self class + ifTrue: [sequence addAllLast: (aDuration sequence collect: [:s| s copy negated])] + ifFalse: [sequence addLast: aDuration copy negated]! Item was added: + ----- Method: GenericDuration>>= (in category 'ansii protocol') ----- + = aGenericDuration + ^aGenericDuration hasSameSequence: sequence! Item was added: + ----- Method: GenericDuration>>addToDateTime: (in category 'ansii protocol') ----- + addToDateTime: aDateAndTime + ^sequence inject: aDateAndTime into: [:result :duration | result + duration ]! Item was added: + ----- Method: GenericDuration>>addToDuration: (in category 'ansii protocol') ----- + addToDuration: aDuration + sequence addFirst: aDuration copy! Item was added: + ----- Method: GenericDuration>>hasSameSequence: (in category 'ansii protocol') ----- + hasSameSequence: testSequence + ^sequence hasEqualElements: testSequence! Item was added: + ----- Method: GenericDuration>>hash (in category 'ansii protocol') ----- + hash + ^(sequence collect: #hash) sum hash! Item was added: + ----- Method: GenericDuration>>initialize (in category 'initialize-release') ----- + initialize + sequence := OrderedCollection new.! Item was added: + ----- Method: GenericDuration>>printOn: (in category 'squeak protocol') ----- + printOn: stream + sequence do: [:msg| msg printOn: stream] separatedBy: [stream nextPutAll: ' + ']! Item was added: + ----- Method: GenericDuration>>sequence (in category 'accessing') ----- + sequence + + ^ sequence! Item was added: + ----- Method: GenericDuration>>subtractFromDateTime: (in category 'ansii protocol') ----- + subtractFromDateTime: aDateAndTime + ^sequence inject: aDateAndTime into: [:result :duration | result + duration copy negated ]! Item was added: + ----- Method: GenericDuration>>subtractFromDuration: (in category 'ansii protocol') ----- + subtractFromDuration: aDuration + sequence addFirst: aDuration copy negated! Item was added: + Object subclass: #GenericMonth + instanceVariableNames: 'number' + classVariableNames: '' + poolDictionaries: '' + category: 'Kernel-Chronology'! + + !GenericMonth commentStamp: 'cbc 9/21/2014 22:01' prior: 0! + The GenericMonth class exists to support simple DateAndTime arithmetic with months (also including Timespan, such as Date). This class is the mechanism behind: + DateAndTime now + 3 months + Instances of this class should be created by sending #month or #months to an integer (other types of number result in unspecified results). + (note that sending #month to any number will result in either exactly 1 month or -1 month, ignoring the actual number you send it too.) + + Thse are the rules about what a 'month' is: + 1: If you add a month, you want the result to be in the next calendar month, never the following one. + 2: If you add a month, you want the same day of the month if possible, and if not (becaue the next month has less days), then the closest that you can get to it. + 4: If you add more than 1 month, you want to end up in the right calendar month that you would expect, and as close to the starting day of the month as you can. + 3: If you subtract a month, you want it in the previous calendar month, and as close to the starting day of the month as you can get. + + So, adding 1 month to August 31 would give September 30th; adding 2 months to August 31 would give October 31st. And adding 1 month to September 30th would give October 30th. + + + ! Item was added: + ----- Method: GenericMonth class>>months: (in category 'as yet unclassified') ----- + months: aNumber + ^self new number: aNumber! Item was added: + ----- Method: GenericMonth>>+ (in category 'ansiProtocol') ----- + + aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + ^GenericDuration new + self + aDuration! Item was added: + ----- Method: GenericMonth>>- (in category 'ansiProtocol') ----- + - aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + ^GenericDuration new + self - aDuration! Item was added: + ----- Method: GenericMonth>>= (in category 'ansiProtocol') ----- + = aGenericMonth + ^aGenericMonth class = GenericMonth + and: [aGenericMonth number = number]! Item was added: + ----- Method: GenericMonth>>addNegativeToDateTime: (in category 'ansiProtocol') ----- + addNegativeToDateTime: aDateAndTime + | next | + next := (1 to: number abs) inject: aDateAndTime into: [:end :mnth| + end - end dayOfMonth days. + ]. + ^next - (next dayOfMonth - aDateAndTime dayOfMonth max: 0) days! Item was added: + ----- Method: GenericMonth>>addToDateTime: (in category 'ansiProtocol') ----- + addToDateTime: aDateAndTime + | next | + number < 0 ifTrue: [^self addNegativeToDateTime: aDateAndTime]. + next := (1 to: number) inject: aDateAndTime into: [:end :mnth| + next := end + end daysInMonth days. + next dayOfMonth < end dayOfMonth + ifTrue: [next := next - next dayOfMonth days]. + next + ]. + ^next + ((next daysInMonth min: aDateAndTime dayOfMonth) - next dayOfMonth) days! Item was added: + ----- Method: GenericMonth>>addToDuration: (in category 'ansiProtocol') ----- + addToDuration: aDuration + ^GenericDuration new + aDuration + self + ! Item was added: + ----- Method: GenericMonth>>hash (in category 'ansiProtocol') ----- + hash + ^number hash! Item was added: + ----- Method: GenericMonth>>negated (in category 'accessing') ----- + negated + number := number negated! Item was added: + ----- Method: GenericMonth>>number (in category 'accessing') ----- + number + + ^ number! Item was added: + ----- Method: GenericMonth>>number: (in category 'accessing') ----- + number: anObject + + number := anObject! Item was added: + ----- Method: GenericMonth>>printOn: (in category 'squeak protocol') ----- + printOn: stream + stream nextPutAll: number asString; nextPutAll: ' month'. + number abs = 1 ifFalse: [stream nextPut: $s].! Item was added: + ----- Method: GenericMonth>>subtractFromDateTime: (in category 'ansiProtocol') ----- + subtractFromDateTime: aDateAndTime + ^self copy negated addToDateTime: aDateAndTime + ! Item was added: + ----- Method: GenericMonth>>subtractFromDuration: (in category 'ansiProtocol') ----- + subtractFromDuration: aDuration + ^GenericDuration new + aDuration - self! Item was added: + Object subclass: #GenericYear + instanceVariableNames: 'number' + classVariableNames: '' + poolDictionaries: '' + category: 'Kernel-Chronology'! + + !GenericYear commentStamp: 'cbc 9/21/2014 22:00' prior: 0! + The GenericYear class exists to support simple DateAndTime arithmetic with years (also including Timespan, such as Date). This class is the mechanism behind: + DateAndTime now + 3 years + Instances of this class should be created by sending #year or #years to an integer (other types of number result in unspecified results). + (note that sending #year to any number will result in either exactly 1 year or -1 year, ignoring the actual number you send it too.) + + Thse are the rules about what a 'year' is: + 1: If you add a year, you want the result to be in the next year, never the following one; it needs to end up in the same month as the starting month; and it needs to be the same day of the month if possible as the starting date, and if not (becaue the next years month has less days such as leap year to non-leap year), then the closest that you can get to it. + 4: If you add more than 1 year, you want to end up in the right year, same calendar month that you would expect, and as close to the starting day of the month as you can. + 3: If you subtract a year, you want it in the previous year and same calendar month, and as close to the starting day of the month as you can get.! Item was added: + ----- Method: GenericYear class>>years: (in category 'as yet unclassified') ----- + years: aNumber + ^self new number: aNumber! Item was added: + ----- Method: GenericYear>>+ (in category 'ansiProtocol') ----- + + aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + ^GenericDuration new + self + aDuration! Item was added: + ----- Method: GenericYear>>- (in category 'ansiProtocol') ----- + - aDuration + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" + ^GenericDuration new + self - aDuration! Item was added: + ----- Method: GenericYear>>= (in category 'ansiProtocol') ----- + = aGenericYear + ^aGenericYear class = GenericYear + and: [aGenericYear number = number]! Item was added: + ----- Method: GenericYear>>addNegativeToDateTime: (in category 'ansiProtocol') ----- + addNegativeToDateTime: aDateAndTime + | next | + next := (1 to: number abs) inject: aDateAndTime into: [:end :mnth| + end - end dayOfYear days. + ]. + next := next - (next month - aDateAndTime month) months. + ^next - (next dayOfMonth - aDateAndTime dayOfMonth max: 0) days! Item was added: + ----- Method: GenericYear>>addToDateTime: (in category 'ansiProtocol') ----- + addToDateTime: aDateAndTime + | next | + number < 0 ifTrue: [^self addNegativeToDateTime: aDateAndTime]. + ^(1 to: number) inject: aDateAndTime into: [:end :mnth| + next := end + ((end isLeapYear and: [end month > 2]) + ifTrue: [end daysInYear - 1] "We've already factored in the extra leap year" + ifFalse: [end daysInYear] "either not a leap year, or we need the extra day" + ) days. + "if we are now in a leap year, we may need to already factor in the extra day" + (next month > 2 and: [next isLeapYear and: [end dayOfMonth ~= next dayOfMonth]]) ifTrue: [next := next + 1 days]. + "If we have leaped out of a leap year, and we were on Feb 29th, we need to back up to Feb 28th" + next month > end month ifTrue: [next := next - next dayOfMonth days]. + "If we have leeped out of a leap year, and we were on Mar 1st, we need to increment by 1 to get back where we should be" + next month < end month ifTrue: [next := next + 1 day]. + next + ]. + ! Item was added: + ----- Method: GenericYear>>addToDuration: (in category 'ansiProtocol') ----- + addToDuration: aDuration + ^GenericDuration new + aDuration + self + ! Item was added: + ----- Method: GenericYear>>hash (in category 'ansiProtocol') ----- + hash + ^number hash! Item was added: + ----- Method: GenericYear>>negated (in category 'accessing') ----- + negated + number := number negated! Item was added: + ----- Method: GenericYear>>number (in category 'accessing') ----- + number + + ^ number! Item was added: + ----- Method: GenericYear>>number: (in category 'accessing') ----- + number: anObject + + number := anObject! Item was added: + ----- Method: GenericYear>>printOn: (in category 'squeak protocol') ----- + printOn: stream + stream nextPutAll: number asString; nextPutAll: ' year'. + number abs = 1 ifFalse: [stream nextPut: $s].! Item was added: + ----- Method: GenericYear>>subtractFromDateTime: (in category 'ansiProtocol') ----- + subtractFromDateTime: aDateAndTime + ^self copy negated addToDateTime: aDateAndTime! Item was added: + ----- Method: GenericYear>>subtractFromDuration: (in category 'ansiProtocol') ----- + subtractFromDuration: aDuration + ^GenericDuration new + aDuration - self! Item was changed: ----- Method: Month>>previous (in category 'squeak protocol') ----- previous + ^ self class starting: (self start - 1 month)! - ^ self class starting: (self start - 1)! Item was added: + ----- Method: Number>>addToDateTime: (in category 'arithmetic') ----- + addToDateTime: aDateAndTime + "Utilized when adjusting DateAndTimes. Such as: + DateAndTime now + 2 + Not expected to be used outside of that system. + Note, also, that this keeps the long-standing tradition that we are adding nanoseconds to the DateAndTime." + ^self asDuration addToDateTime: aDateAndTime + ! Item was added: + ----- Method: Number>>month (in category 'converting') ----- + month + + ^ self sign months! Item was added: + ----- Method: Number>>months (in category 'converting') ----- + months + + ^ GenericMonth months: self! Item was added: + ----- Method: Number>>subtractFromDateTime: (in category 'arithmetic') ----- + subtractFromDateTime: aDateAndTime + "Utilized when adjusting DateAndTimes. Such as: + DateAndTime now - 2 + Not expected to be used outside of that system. + Note, also, that this keeps the long-standing tradition that we are subtracting nanoseconds to the DateAndTime." + ^self asDuration subtractFromDateTime: aDateAndTime + ! Item was added: + ----- Method: Number>>year (in category 'converting') ----- + year + + ^ self sign years! Item was added: + ----- Method: Number>>years (in category 'converting') ----- + years + + ^ GenericYear years: self! Item was added: + ----- Method: Time>>addToDateTime: (in category 'squeak protocol') ----- + addToDateTime: aDateAndTime + ^self asDuration addToDateTime: aDateAndTime + ! Item was added: + ----- Method: Time>>addToDuration: (in category 'ansi protocol') ----- + addToDuration: aDuration + ^Duration nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) + ! Item was added: + ----- Method: Time>>subtractFromDateTime: (in category 'squeak protocol') ----- + subtractFromDateTime: aDateAndTime + ^self asDuration subtractFromDateTime: aDateAndTime + ! Item was added: + ----- Method: Time>>subtractFromDuration: (in category 'ansi protocol') ----- + subtractFromDuration: aDuration + ^Duration nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds)! Item was changed: ----- Method: Timespan>>+ (in category 'ansi protocol') ----- + + aDuration + "aDuration is one of: Duration, GenericDuration, GenericMonth, or GenericYear." + ^self class starting: (aDuration addToDateTime: self start) duration: self duration + ! - + operand - "operand conforms to protocol Duration" - - - ^ self class starting: (self start + operand) duration: self duration! Item was changed: ----- Method: Timespan>>- (in category 'ansi protocol') ----- - operand + | result | + "operand is one of: Duration, GenericDuration, GenericMonth, or GenericYear; or a DateAndTime or Timespan." + result := operand subtractFromDateTime: self start. + ^result class = DateAndTime + ifTrue: [ self class starting: result duration: self duration] + ifFalse: [result] - "operand conforms to protocol DateAndTime or protocol Duration" - - ^ (operand respondsTo: #asDateAndTime) - - ifTrue: [ self start - operand ] - - ifFalse: [ self + (operand negated) ] ! Item was added: + ----- Method: Timespan>>addToDateTime: (in category 'squeak protocol') ----- + addToDateTime: aDateAndTime + ^duration addToDateTime: aDateAndTime + ! Item was added: + ----- Method: Timespan>>subtractFromDateTime: (in category 'squeak protocol') ----- + subtractFromDateTime: aDateAndTime + ^start subtractFromDateTime: aDateAndTime! From commits at source.squeak.org Fri Mar 6 23:52:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 6 23:52:09 2015 Subject: [squeak-dev] The Inbox: KernelTests-cbc.291.mcz Message-ID: A new version of KernelTests was added to project The Inbox: http://source.squeak.org/inbox/KernelTests-cbc.291.mcz ==================== Summary ==================== Name: KernelTests-cbc.291 Author: cbc Time: 6 March 2015, 3:52:01.005 pm UUID: 54afce93-39e9-4c4a-92a4-ecbe32540c69 Ancestors: KernelTests-ul.290, KernelTests-cbc.278 Added DateAndTimeArithmeticTest - to test adding things to DateAndTime instances. This includes things like: DateAndTime now + 3 days. Test convering adding various durations (like above) as well as adding strings, numbers, Timespans, Times, and DateAndTimes. Also tests subtracting the same. Added DurationArithmeticTest - tests expected outcomes of adding durations together, including the generic ones (resulting in GenericDuration instances). Also, tested for certain tricky leapYear conditions when adding years. =============== Diff against KernelTests-ul.290 =============== Item was added: + TestCase subclass: #DateAndTimeArithmeticTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'KernelTests-Chronology'! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddDateAndTime1 (in category 'testing') ----- + testAddDateAndTime1 + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + (DateAndTime year: 2014 month: 3 day: 31)) = (DateAndTime year: 2014 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddDateAndTime2 (in category 'testing') ----- + testAddDateAndTime2 + self assert: ((DateAndTime year: 2014 month: 3 day: 31) + (DateAndTime year: 2014 month: 1 day: 31)) = (DateAndTime year: 2014 month: 3 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddDays (in category 'testing') ----- + testAddDays + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 days) = (DateAndTime year: 2014 month: 2 day: 2)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddHours (in category 'testing') ----- + testAddHours + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 hours) = (DateAndTime year: 2014 month: 1 day: 31 hour: 2 minute: 0)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddIntegers (in category 'testing') ----- + testAddIntegers + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2) = (DateAndTime year: 2014 month: 1 day: 31 hour: 0 minute: 0 second: 0 nanoSecond: 000000002 offset: DateAndTime localOffset)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMinutes (in category 'testing') ----- + testAddMinutes + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 minutes) = (DateAndTime year: 2014 month: 1 day: 31 hour: 0 minute: 2)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonthTimespan1 (in category 'testing') ----- + testAddMonthTimespan1 + self assert: ((DateAndTime year: 2014 month: 1 day: 1) + (Month month: 1 year: 2015) + = (DateAndTime year: 2014 month: 2 day: 1)). + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonthTimespan2 (in category 'testing') ----- + testAddMonthTimespan2 + self assert: ((DateAndTime year: 2014 month: 1 day: 1) + (Month month: 2 year: 2004) + = (DateAndTime year: 2014 month: 1 day: 30)). + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonthTimespan3 (in category 'testing') ----- + testAddMonthTimespan3 + self assert: ((DateAndTime year: 2014 month: 1 day: 1) + (Month month: 2 year: 2005) + = (DateAndTime year: 2014 month: 1 day: 29)). + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonths1 (in category 'testing') ----- + testAddMonths1 + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 1 month) = (DateAndTime year: 2014 month: 2 day: 28)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonths2 (in category 'testing') ----- + testAddMonths2 + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 months) = (DateAndTime year: 2014 month: 3 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddMonths4 (in category 'testing') ----- + testAddMonths4 + self assert: ((DateAndTime year: 2004 month: 1 day: 31) + 1 month) = (DateAndTime year: 2004 month: 2 day: 29)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddNanoSeconds (in category 'testing') ----- + testAddNanoSeconds + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 nanoSeconds) = (DateAndTime year: 2014 month: 1 day: 31 hour: 0 minute: 0 second: 0 nanoSecond: 000000002 offset: DateAndTime localOffset)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddSeconds (in category 'testing') ----- + testAddSeconds + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 seconds) = (DateAndTime year: 2014 month: 1 day: 31 hour: 0 minute: 0 second: 2)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddStrings (in category 'testing') ----- + testAddStrings + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + '02:00:00:00') = (DateAndTime year: 2014 month: 2 day: 2)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddTime (in category 'testing') ----- + testAddTime + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + ('02:00:00' asTime)) = (DateAndTime year: 2014 month: 1 day: 31 hour: 2 minute: 0)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddTimespan (in category 'testing') ----- + testAddTimespan + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + + ((DateAndTime year: 2014 month: 1 day: 1) to: (DateAndTime year: 2014 month: 1 day: 3))) = (DateAndTime year: 2014 month: 2 day: 2) + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddWeeks (in category 'testing') ----- + testAddWeeks + self assert: ((DateAndTime year: 2014 month: 1 day: 31) + 2 weeks) = (DateAndTime year: 2014 month: 2 day: 14) + + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears1 (in category 'testing') ----- + testAddYears1 + self assert: ((DateAndTime year: 2006 month: 1 day: 31) + 2 years) = (DateAndTime year: 2008 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears2 (in category 'testing') ----- + testAddYears2 + self assert: ((DateAndTime year: 2007 month: 1 day: 31) + 2 years) = (DateAndTime year: 2009 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears3 (in category 'testing') ----- + testAddYears3 + self assert: ((DateAndTime year: 2004 month: 2 day: 29) + 1 year) = (DateAndTime year: 2005 month: 2 day: 28)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears4 (in category 'testing') ----- + testAddYears4 + self assert: ((DateAndTime year: 2003 month: 4 day: 1) + 2 years) = (DateAndTime year: 2005 month: 4 day: 1)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears5 (in category 'testing') ----- + testAddYears5 + self assert: ((DateAndTime year: 2003 month: 4 day: 1) + 1 years) = (DateAndTime year: 2004 month: 4 day: 1)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testAddYears6 (in category 'testing') ----- + testAddYears6 + self assert: ((DateAndTime year: 2011 month: 3 day: 1) + 1 years) = (DateAndTime year: 2012 month: 3 day: 1) + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractDateAndTime1 (in category 'testing') ----- + testSubtractDateAndTime1 + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - (DateAndTime year: 2014 month: 1 day: 31)) = 59 days! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractDateAndTime2 (in category 'testing') ----- + testSubtractDateAndTime2 + self assert: ((DateAndTime year: 2014 month: 1 day: 31) - (DateAndTime year: 2014 month: 3 day: 31)) = 59 days negated! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractDays (in category 'testing') ----- + testSubtractDays + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 days) = (DateAndTime year: 2014 month: 3 day: 29)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractHours (in category 'testing') ----- + testSubtractHours + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 hours) = (DateAndTime year: 2014 month: 3 day: 30 hour: 22 minute: 0)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractIntegers (in category 'testing') ----- + testSubtractIntegers + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2) = (DateAndTime year: 2014 month: 3 day: 30 hour: 23 minute: 59 second: 59 nanoSecond: 999999998 offset: DateAndTime localOffset)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractMinutes (in category 'testing') ----- + testSubtractMinutes + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 minutes) = (DateAndTime year: 2014 month: 3 day: 30 hour: 23 minute: 58)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractMonths1 (in category 'testing') ----- + testSubtractMonths1 + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 1 month) = (DateAndTime year: 2014 month: 2 day: 28)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractMonths2 (in category 'testing') ----- + testSubtractMonths2 + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 months) = (DateAndTime year: 2014 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractMonths3 (in category 'testing') ----- + testSubtractMonths3 + self assert: ((DateAndTime year: 2014 month: 3 day: 14) - 1 month) = (DateAndTime year: 2014 month: 2 day: 14)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractMonths4 (in category 'testing') ----- + testSubtractMonths4 + self assert: ((DateAndTime year: 2004 month: 3 day: 31) - 1 month) = (DateAndTime year: 2004 month: 2 day: 29)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractNanoSeconds (in category 'testing') ----- + testSubtractNanoSeconds + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 nanoSeconds) = (DateAndTime year: 2014 month: 3 day: 30 hour: 23 minute: 59 second: 59 nanoSecond: 999999998 offset: DateAndTime localOffset)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractSeconds (in category 'testing') ----- + testSubtractSeconds + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 seconds) = (DateAndTime year: 2014 month: 3 day: 30 hour: 23 minute: 59 second: 58)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractStrings (in category 'testing') ----- + testSubtractStrings + self assert: ((DateAndTime year: 2014 month: 1 day: 31) - '02:00:00:00') = (DateAndTime year: 2014 month: 1 day: 29)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractTime (in category 'testing') ----- + testSubtractTime + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - ('02:00:00' asTime)) = (DateAndTime year: 2014 month: 3 day: 30 hour: 22 minute: 0)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractTimespan (in category 'testing') ----- + testSubtractTimespan + self assert: ((DateAndTime year: 2014 month: 3 day: 31) + - ((DateAndTime year: 2014 month: 3 day: 1) to: (DateAndTime year: 2024 month: 1 day: 3))) = ('30:00:00:00' asDuration)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractWeeks (in category 'testing') ----- + testSubtractWeeks + self assert: ((DateAndTime year: 2014 month: 3 day: 31) - 2 weeks) = (DateAndTime year: 2014 month: 3 day: 17) + + ! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears1 (in category 'testing') ----- + testSubtractYears1 + self assert: ((DateAndTime year: 2008 month: 1 day: 31) - 2 years) = (DateAndTime year: 2006 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears2 (in category 'testing') ----- + testSubtractYears2 + self assert: ((DateAndTime year: 2009 month: 1 day: 31) - 2 years) = (DateAndTime year: 2007 month: 1 day: 31)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears3 (in category 'testing') ----- + testSubtractYears3 + self assert: ((DateAndTime year: 2005 month: 2 day: 28) - 1 year) = (DateAndTime year: 2004 month: 2 day: 28)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears4 (in category 'testing') ----- + testSubtractYears4 + self assert: ((DateAndTime year: 2005 month: 4 day: 1) - 2 years) = (DateAndTime year: 2003 month: 4 day: 1)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears5 (in category 'testing') ----- + testSubtractYears5 + self assert: ((DateAndTime year: 2004 month: 4 day: 1) - 1 years) = (DateAndTime year: 2003 month: 4 day: 1)! Item was added: + ----- Method: DateAndTimeArithmeticTest>>testSubtractYears6 (in category 'testing') ----- + testSubtractYears6 + self assert: ((DateAndTime year: 2011 month: 3 day: 1) - 1 years) = (DateAndTime year: 2010 month: 3 day: 1)! Item was added: + TestCase subclass: #DurationArithmeticTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'KernelTests-Chronology'! Item was added: + ----- Method: DurationArithmeticTest>>testAddDayDurations (in category 'as yet unclassified') ----- + testAddDayDurations + self assert: (1 day + 2 days = 3 days)! Item was added: + ----- Method: DurationArithmeticTest>>testAddDayHourDurations (in category 'as yet unclassified') ----- + testAddDayHourDurations + self assert: (1 day + 2 hours = '1:02:00:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddDayMonthDurations (in category 'as yet unclassified') ----- + testAddDayMonthDurations + self assert: (1 day + 2 months = (GenericDuration new + 1 day + 2 months))! Item was added: + ----- Method: DurationArithmeticTest>>testAddHourDayDurations (in category 'as yet unclassified') ----- + testAddHourDayDurations + self assert: (1 hour + 2 days = '2:01:00:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddHourMinuteDurations (in category 'as yet unclassified') ----- + testAddHourMinuteDurations + self assert: (1 hour + 2 minutes = '0:01:02:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddMinuteHourDurations (in category 'as yet unclassified') ----- + testAddMinuteHourDurations + self assert: (1 minute + 2 hours = '0:02:01:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddMinuteSecondDurations (in category 'as yet unclassified') ----- + testAddMinuteSecondDurations + self assert: (1 minute + 2 seconds = '0:00:01:02' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddMonthDayDurations (in category 'as yet unclassified') ----- + testAddMonthDayDurations + self assert: (1 month + 2 days = (GenericDuration new + 1 month + 2 days))! Item was added: + ----- Method: DurationArithmeticTest>>testAddMonthYearDurations (in category 'as yet unclassified') ----- + testAddMonthYearDurations + self assert: (1 month + 2 years = (GenericDuration new + 1 month + 2 years))! Item was added: + ----- Method: DurationArithmeticTest>>testAddNanoSecondSecondDurations (in category 'as yet unclassified') ----- + testAddNanoSecondSecondDurations + self assert: (1 nanoSeconds + 2 seconds = '0:00:00:02.000000001' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddSecondMinuteDurations (in category 'as yet unclassified') ----- + testAddSecondMinuteDurations + self assert: (1 second + 2 minutes = '0:00:02:01' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddSecondNanoSecondDurations (in category 'as yet unclassified') ----- + testAddSecondNanoSecondDurations + self assert: (1 second + 2 nanoSeconds = '0:00:00:01.000000002' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testAddYearMonthDurations (in category 'as yet unclassified') ----- + testAddYearMonthDurations + self assert: (1 year + 2 months = (GenericDuration new + 1 year + 2 months))! Item was added: + ----- Method: DurationArithmeticTest>>testDayDurationAssociativeSubtractionWithDateTime (in category 'as yet unclassified') ----- + testDayDurationAssociativeSubtractionWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) - 1 hour - 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) - (1 hour + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testDayDurationAssociativeWithDateTime (in category 'as yet unclassified') ----- + testDayDurationAssociativeWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) + 1 hour + 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) + (1 hour + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testGenericDurationAddition (in category 'as yet unclassified') ----- + testGenericDurationAddition + self assert: (((1 month + 1 month) + (1 year + 1 year)) + = (1 month + 1 month + 1 year + 1 year))! Item was added: + ----- Method: DurationArithmeticTest>>testGenericDurationSubtraction (in category 'as yet unclassified') ----- + testGenericDurationSubtraction + self assert: (((1 month + 1 month) - (1 year + 1 year)) + = (1 month + 1 month - 1 year - 1 year))! Item was added: + ----- Method: DurationArithmeticTest>>testMonthDurationAssociativeSubtractionWithDateTime (in category 'as yet unclassified') ----- + testMonthDurationAssociativeSubtractionWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) - 1 month - 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) - (1 month + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testMonthDurationAssociativeWithDateTime (in category 'as yet unclassified') ----- + testMonthDurationAssociativeWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) + 1 month + 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) + (1 month + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testMonthDurationNotCommutative (in category 'as yet unclassified') ----- + testMonthDurationNotCommutative + self deny: ((1 month + 2 days) = (2 days + 1 month))! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractDayDurations (in category 'as yet unclassified') ----- + testSubtractDayDurations + self assert: (2 days - 1 day = 1 day)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractDayHourDurations (in category 'as yet unclassified') ----- + testSubtractDayHourDurations + self assert: (1 day - 2 hours = '0:22:00:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractDayMonthDurations (in category 'as yet unclassified') ----- + testSubtractDayMonthDurations + self assert: (1 day - 2 months = (GenericDuration new + 1 day - 2 months))! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractHourDayDurations (in category 'as yet unclassified') ----- + testSubtractHourDayDurations + self assert: (1 hour - 2 days = '-1:23:00:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractHourMinuteDurations (in category 'as yet unclassified') ----- + testSubtractHourMinuteDurations + self assert: (1 hour - 2 minutes = '0:00:58:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractMinuteHourDurations (in category 'as yet unclassified') ----- + testSubtractMinuteHourDurations + self assert: (1 minute - 2 hours = '-0:01:59:00' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractMinuteSecondDurations (in category 'as yet unclassified') ----- + testSubtractMinuteSecondDurations + self assert: (1 minute - 2 seconds = '0:00:00:58' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractMonthDayDurations (in category 'as yet unclassified') ----- + testSubtractMonthDayDurations + self assert: (1 month - 2 days = (GenericDuration new + 1 month - 2 days))! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractMonthYearDurations (in category 'as yet unclassified') ----- + testSubtractMonthYearDurations + self assert: (1 month - 2 years = (GenericDuration new + 1 month - 2 years))! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractNanoSecondSecondDurations (in category 'as yet unclassified') ----- + testSubtractNanoSecondSecondDurations + self assert: (1 nanoSeconds - 2 seconds = '-0:00:00:01.999999999' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractSecondMinuteDurations (in category 'as yet unclassified') ----- + testSubtractSecondMinuteDurations + self assert: (1 second - 2 minutes = '-0:00:01:59' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractSecondNanoSecondDurations (in category 'as yet unclassified') ----- + testSubtractSecondNanoSecondDurations + self assert: (1 second - 2 nanoSeconds = '0:00:00:00.999999998' asDuration)! Item was added: + ----- Method: DurationArithmeticTest>>testSubtractYearMonthDurations (in category 'as yet unclassified') ----- + testSubtractYearMonthDurations + self assert: (1 year - 2 months = (GenericDuration new + 1 year - 2 months))! Item was added: + ----- Method: DurationArithmeticTest>>testYearDurationAssociativeSubtractionWithDateTime (in category 'as yet unclassified') ----- + testYearDurationAssociativeSubtractionWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) - 1 year - 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) - (1 year + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testYearDurationAssociativeWithDateTime (in category 'as yet unclassified') ----- + testYearDurationAssociativeWithDateTime + self assert: (((DateAndTime year: 2014 month: 1 day: 31) + 1 year + 1 day) + = ((DateAndTime year: 2014 month: 1 day: 31) + (1 year + 1 day)))! Item was added: + ----- Method: DurationArithmeticTest>>testYearDurationNotCommutative (in category 'as yet unclassified') ----- + testYearDurationNotCommutative + self deny: ((1 year + 2 days) = (2 days + 1 year))! From lewis at mail.msen.com Sat Mar 7 01:00:15 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 7 01:00:17 2015 Subject: [squeak-dev] The Inbox: KernelTests-cbc.291.mcz In-Reply-To: <201503062352.t26NqAVs013195@shell.msen.com> References: <201503062352.t26NqAVs013195@shell.msen.com> Message-ID: <20150307010015.GB11334@shell.msen.com> On Fri, Mar 06, 2015 at 11:52:04PM +0000, commits@source.squeak.org wrote: > A new version of KernelTests was added to project The Inbox: > http://source.squeak.org/inbox/KernelTests-cbc.291.mcz > > ==================== Summary ==================== > > Name: KernelTests-cbc.291 > Author: cbc > Time: 6 March 2015, 3:52:01.005 pm > UUID: 54afce93-39e9-4c4a-92a4-ecbe32540c69 > Ancestors: KernelTests-ul.290, KernelTests-cbc.278 > > Added DateAndTimeArithmeticTest - to test adding things to DateAndTime instances. This includes things like: DateAndTime now + 3 days. This would be a good time to check our tests. In my locale, the springtime daylight savings time change is going to happen this weekend. If I evaluate "DateAndTime now + 3 days" what is the expected result? Dave From commits at source.squeak.org Sat Mar 7 01:19:58 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 01:20:00 2015 Subject: [squeak-dev] The Trunk: TrueType-topa.32.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.32.mcz ==================== Summary ==================== Name: TrueType-topa.32 Author: topa Time: 7 March 2015, 2:19:21.165 am UUID: b69e6550-31b2-40db-8ff2-e5e990b214e7 Ancestors: TrueType-topa.31 Fix TrueType-topa.31 for Microsoft-encoded names and language tags =============== Diff against TrueType-topa.31 =============== Item was changed: ----- Method: TTFileDescription>>processNamingTable: (in category 'ttf tables') ----- processNamingTable: fontFile "copyright CHARPTR The font's copyright notice. familyName CHARPTR The font's family name. subfamilyName CHARPTR The font's subfamily name. uniqueName CHARPTR A unique identifier for this font. fullName CHARPTR The font's full name (a combination of familyName and subfamilyName). versionName CHARPTR The font's version string. " + | nRecords initialOffset storageOffset format | - | nRecords initialOffset storageOffset | initialOffset := fontFile position. + format := fontFile nextNumber: 2. + format = 0 ifFalse: [self error: 'Cannot handle format 1 naming tables']. - fontFile skip: 2. "Skip format selector" "Get the number of name records" nRecords := fontFile nextNumber: 2. "Offset from the beginning of this table" storageOffset := (fontFile nextNumber: 2) + initialOffset. 1 to: nRecords do:[:i| | pID sID lID nID length offset string | fontFile position: initialOffset + 6 + ((i-1) * 12). pID := fontFile nextNumber: 2. sID := fontFile nextNumber: 2. lID := fontFile nextNumber: 2. nID := fontFile nextNumber: 2. length := fontFile nextNumber: 2. offset := fontFile nextNumber: 2. "Read only Macintosh or Microsoft strings" (pID = 1 or:[pID = 3 and:[sID = 1]]) ifTrue:[ "MS uses Unicode all others single byte" "multiBytes := pID = 3." fontFile position: storageOffset+offset. string := (fontFile next: length) asString. pID = 3 ifTrue:[ | keep | keep := true. string := string select:[:ch| keep := keep not]. ]. + "Select only English names, prefer Macintosh" + ((pID = 1 and: [lID = 0]) or: [pID = 3 and: [lID = 16r0409]]) ifTrue: [ + nID caseOf: { + "[0] -> [copyright := string]." + [1] -> [(pID = 1 or:[familyName == nil]) ifTrue:[familyName := string]]. + [2] -> [(pID = 1 or:[subfamilyName == nil]) ifTrue:[subfamilyName := string]]. + "[3] -> [(pID = 1 or:[uniqueName == nil]) ifTrue:[uniqueName := string]]." + "[4] -> [(pID = 1 or:[fullName == nil]) ifTrue:[fullName := string]]." + "[5] -> [(pID = 1 or:[versionName == nil]) ifTrue:[versionName := string]]." + "[6] -> [(pID = 1 or:[postscriptName == ni]) ifTrue:[postscriptName := string]]." + "[7] -> [(pID = 1 or:[trademark == nil]) ifTrue:[trademark := string]]." + } otherwise:["ignore"]. + ] - nID caseOf: { - "Select only English names, prefer Macintosh" - "[0] -> [copyright := string]." - [1] -> [(lID = 0 and: [pID = 1 or:[familyName == nil]]) ifTrue:[familyName := string]]. - [2] -> [(lID = 0 and: [pID = 1 or:[subfamilyName == nil]]) ifTrue:[subfamilyName := string]]. - "[3] -> [(lID = 0 and: [pID = 1 or:[uniqueName == nil]]) ifTrue:[uniqueName := string]]." - "[4] -> [(lID = 0 and: [pID = 1 or:[fullName == nil]]) ifTrue:[fullName := string]]." - "[5] -> [(lID = 0 and: [pID = 1 or:[versionName == nil]]) ifTrue:[versionName := string]]." - "[6] -> [(lID = 0 and: [pID = 1 or:[postscriptName == ni]l]) ifTrue:[postscriptName := string]]." - "[7] -> [lpID = 0 and: [pID = 1 or:[trademark == nil]]) ifTrue:[trademark := string]]." - } otherwise:["ignore"]. ]. ]. ! Item was changed: ----- Method: TTFontReader>>processNamingTable: (in category 'processing') ----- processNamingTable: entry "copyright CHARPTR The font's copyright notice. familyName CHARPTR The font's family name. subfamilyName CHARPTR The font's subfamily name. uniqueName CHARPTR A unique identifier for this font. fullName CHARPTR The font's full name (a combination of familyName and subfamilyName). versionName CHARPTR The font's version string. + " | nRecords initialOffset format storageOffset strings | - " | nRecords initialOffset storageOffset strings | strings := Array new: 8. strings atAllPut:''. initialOffset := entry offset. + format := entry nextUShort. + format = 0 ifFalse: [self error: 'Cannot handle format 1 naming tables']. - entry skip: 2. "Skip format selector" "Get the number of name records" nRecords := entry nextUShort. "Offset from the beginning of this table" storageOffset := entry nextUShort + initialOffset. 1 to: nRecords do:[:i| | pID sID lID nID length offset multiBytes string | pID := entry nextUShort. sID := entry nextUShort. lID := entry nextUShort. nID := entry nextUShort. length := entry nextUShort. offset := entry nextUShort. "Read only Macintosh or Microsoft strings" (pID = 1 or:[pID = 3 and:[sID = 1]]) ifTrue:[ "MS uses Unicode all others single byte" multiBytes := pID = 3. string := entry stringAt: storageOffset + offset length: length multiByte: multiBytes. + + "Select only English names. + Note: We prefer Macintosh strings about everything." + ((pID = 1 and: [lID = 0]) or: [pID = 3 and: [lID = 16r0409]]) ifTrue: [ + "Put the name at the right location." + nID < strings size ifTrue:[ + (pID = 1 or:[(strings at: nID+1) = '']) + ifTrue:[strings at: nID+1 put: string]. + ]. - "Put the name at the right location. - Note: We prefer Macintosh strings about everything else and use only English names." - nID < strings size ifTrue:[ - (lID = 0 and: [pID = 1 or:[(strings at: nID+1) = '']]) - ifTrue:[strings at: nID+1 put: string]. ]. ]. ]. fontDescription setStrings: strings.! From tim at rowledge.org Sat Mar 7 02:16:47 2015 From: tim at rowledge.org (tim Rowledge) Date: Sat Mar 7 02:16:56 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: References: Message-ID: I know we?ve seen this before at least once but can?t recall any more detail. It?s not a new thing, or at least not a totally new thing. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "How many Kzin does it take to change a lightbulb?? "None. You can scream and leap in the dark." From cunningham.cb at gmail.com Sat Mar 7 05:10:13 2015 From: cunningham.cb at gmail.com (Chris) Date: Sat Mar 7 05:10:17 2015 Subject: [squeak-dev] The Inbox: KernelTests-cbc.291.mcz In-Reply-To: <20150307010015.GB11334@shell.msen.com> References: <201503062352.t26NqAVs013195@shell.msen.com> <20150307010015.GB11334@shell.msen.com> Message-ID: It should be three days from now, same hour of the day I think. That was not part of the tests, though. Something to add. This change is part of a set ( including new kernel and be collection packages ). Adding days though was not changed. Sent from my iPhone > On Mar 6, 2015, at 5:00 PM, David T. Lewis wrote: > >> On Fri, Mar 06, 2015 at 11:52:04PM +0000, commits@source.squeak.org wrote: >> A new version of KernelTests was added to project The Inbox: >> http://source.squeak.org/inbox/KernelTests-cbc.291.mcz >> >> ==================== Summary ==================== >> >> Name: KernelTests-cbc.291 >> Author: cbc >> Time: 6 March 2015, 3:52:01.005 pm >> UUID: 54afce93-39e9-4c4a-92a4-ecbe32540c69 >> Ancestors: KernelTests-ul.290, KernelTests-cbc.278 >> >> Added DateAndTimeArithmeticTest - to test adding things to DateAndTime instances. This includes things like: DateAndTime now + 3 days. > > This would be a good time to check our tests. In my locale, the springtime > daylight savings time change is going to happen this weekend. If I evaluate > "DateAndTime now + 3 days" what is the expected result? > > Dave > > From cunningham.cb at gmail.com Sat Mar 7 06:31:16 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Sat Mar 7 06:31:19 2015 Subject: [squeak-dev] Another push of date/time/duration updates Message-ID: Hi. Sorry for the excessively long delay in fixing the bugs in this package. In the inbox are three packages that make a complete update with date/time arithmetic: Kernel-cbc.910 Collections-cbc.604 KernelTests-cbc.291 The first two extend the existing date arithmetic such as Date today + 3 days to include months and years as well. Adding months (or subtracting months) make it be the number of months you add/subtract off, nearest the date of the first month as you can get. So, February 28 + 1 month gives March 28; January 31 + 1 month gives February 28th (or 29 in a leap year). Similarly with year. In addition, the durations can be chained together, such as 1 month + 1 year + 1 month, and then add this to a date (or dateAndTime). Finally, these are covered by test, including additional tests for doing date arithmetic (which previously did not exist). Thanks, cbc -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150306/9c91f831/attachment.htm From edgardec2005 at gmail.com Sat Mar 7 09:28:27 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Sat Mar 7 09:28:36 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: Message-ID: On 3/6/15, 5:24 PM, "Chris Muller" wrote: > "From Cog to Spur" -- we need a snappy codename that makes sense for > this release. I thought about "Cowboy" for a few seconds, but that's > way too awful for marketing.. :) Someone help please. Comeback Edgar From commits at source.squeak.org Sat Mar 7 11:08:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:08:55 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.65.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.65.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.65 Author: mt Time: 7 March 2015, 12:08:48.345 pm UUID: fe29688a-cb67-3a48-980c-01ae7c7cf4dd Ancestors: ToolBuilder-Kernel-bf.64 Pluggable tree specs extended with the concepts of columns, simple selections, custom node classes, and parent selections. Preparation for refactored object explorer. =============== Diff against ToolBuilder-Kernel-bf.64 =============== Item was changed: PluggableWidgetSpec subclass: #PluggableTreeSpec + instanceVariableNames: 'roots getSelectedPath setSelected getSelected setSelectedParent getChildren hasChildren label icon unusedVar menu keyPress wantsDrop dropItem dropAccept autoDeselect dragItem nodeClass columns' - instanceVariableNames: 'roots getSelectedPath setSelected getChildren hasChildren label icon unusedVar menu keyPress wantsDrop dropItem dropAccept autoDeselect dragItem' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !PluggableTreeSpec commentStamp: 'mvdg 3/21/2008 20:59' prior: 0! A pluggable tree widget. PluggableTrees are slightly different from lists in such that they ALWAYS store the actual objects and use the label selector to query for the label of the item. PluggableTrees also behave somewhat differently in such that they do not have a "getSelected" message but only a getSelectedPath message. The difference is that getSelectedPath is used to indicate by the model that the tree should select the appropriate path. This allows disambiguation of items. Because of this, implementations of PluggableTrees must always set their internal selection directly, e.g., rather than sending the model a setSelected message and wait for an update of the #getSelected the implementation must set the selection before sending the #setSelected message. If a client doesn't want this, it can always just signal a change of getSelectedPath to revert to whatever is needed. Instance variables: roots The message to retrieve the roots of the tree. getSelectedPath The message to retrieve the selected path in the tree. setSelected The message to set the selected item in the tree. getChildren The message to retrieve the children of an item hasChildren The message to query for children of an item label The message to query for the label of an item. icon The message to query for the icon of an item. help The message to query for the help of an item. menu The message to query for the tree's menu keyPress The message to process a keystroke. wantsDrop The message to query whether a drop might be accepted. dropItem The message to drop an item. enableDrag Enable dragging from this tree. autoDeselect Whether the tree should allow automatic deselection or not. unusedVar (unused) This variable is a placeholder to fix problems with loading packages in 3.10.! Item was added: + ----- Method: PluggableTreeSpec>>columns (in category 'accessing') ----- + columns + ^ columns! Item was added: + ----- Method: PluggableTreeSpec>>columns: (in category 'accessing') ----- + columns: columnSpecs + columns := columnSpecs.! Item was added: + ----- Method: PluggableTreeSpec>>getSelected (in category 'accessing') ----- + getSelected + ^ getSelected! Item was added: + ----- Method: PluggableTreeSpec>>getSelected: (in category 'accessing') ----- + getSelected: aSymbol + "Indicate a single node in the tree. Only works if that node is visible, too. Use #getSelectedPath otherwise." + + getSelected := aSymbol.! Item was added: + ----- Method: PluggableTreeSpec>>nodeClass (in category 'accessing') ----- + nodeClass + ^ nodeClass! Item was added: + ----- Method: PluggableTreeSpec>>nodeClass: (in category 'accessing') ----- + nodeClass: aListWrapperClass + nodeClass := aListWrapperClass.! Item was added: + ----- Method: PluggableTreeSpec>>setSelectedParent (in category 'accessing') ----- + setSelectedParent + ^ setSelectedParent! Item was added: + ----- Method: PluggableTreeSpec>>setSelectedParent: (in category 'accessing') ----- + setSelectedParent: aSymbol + setSelectedParent := aSymbol! From commits at source.squeak.org Sat Mar 7 11:12:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:12:15 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.95.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.95.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.95 Author: mt Time: 7 March 2015, 12:12:08.671 pm UUID: f31dcf42-ecf7-8f41-9627-091e9f980483 Ancestors: ToolBuilder-Morphic-mt.94 Pluggable tree morph bug-fixed and extended to understand simple selections and custom node classes. Its companion -- PluggableTreeItemNode -- now speaks #parent and has a stub for #refresh. Preparation for refactored object explorer. =============== Diff against ToolBuilder-Morphic-mt.94 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableTree: (in category 'pluggable widgets') ----- buildPluggableTree: aSpec | widget | widget := self treeClass new. self register: widget id: aSpec name. widget model: aSpec model. widget getSelectedPathSelector: aSpec getSelectedPath. widget setSelectedSelector: aSpec setSelected. + widget getSelectedSelector: aSpec getSelected. + widget setSelectedParentSelector: aSpec setSelectedParent. widget getChildrenSelector: aSpec getChildren. widget hasChildrenSelector: aSpec hasChildren. widget getLabelSelector: aSpec label. widget getIconSelector: aSpec icon. widget getHelpSelector: aSpec help. widget getMenuSelector: aSpec menu. widget keystrokeActionSelector: aSpec keyPress. + widget nodeClass: aSpec nodeClass. widget getRootsSelector: aSpec roots. widget autoDeselect: aSpec autoDeselect. widget dropItemSelector: aSpec dropItem. widget wantsDropSelector: aSpec dropAccept. widget dragItemSelector: aSpec dragItem. + widget columns: aSpec columns. self setFrame: aSpec frame in: widget. parent ifNotNil:[self add: widget to: parent]. " panes ifNotNil:[ aSpec roots ifNotNil:[panes add: aSpec roots]. ]. " ^widget! Item was changed: ListItemWrapper subclass: #PluggableTreeItemNode + instanceVariableNames: 'parent' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! + !PluggableTreeItemNode commentStamp: 'mt 3/7/2015 09:15' prior: 0! + Tree item for PluggableTreeMorph. My model is the tree morph.! - !PluggableTreeItemNode commentStamp: 'ar 2/12/2005 04:37' prior: 0! - Tree item for PluggableTreeMorph.! Item was added: + ----- Method: PluggableTreeItemNode>>parent (in category 'accessing') ----- + parent + ^ parent! Item was added: + ----- Method: PluggableTreeItemNode>>parent: (in category 'accessing') ----- + parent: aNode + parent := aNode.! Item was added: + ----- Method: PluggableTreeItemNode>>refresh (in category 'as yet unclassified') ----- + refresh + "Todo. See ObjectExplorerWrapper >> #refresh."! Item was changed: SimpleHierarchicalListMorph subclass: #PluggableTreeMorph + instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass' - instanceVariableNames: 'roots selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! A pluggable tree morph.! Item was changed: ----- Method: PluggableTreeMorph>>contentsOfNode: (in category 'node access') ----- contentsOfNode: node + | children | getChildrenSelector ifNil:[^#()]. children := model perform: getChildrenSelector with: node item. + ^children collect: [:item| + (self nodeClass with: item model: self) parent: node]! - ^children collect:[:item| PluggableTreeItemNode with: item model: self]! Item was added: + ----- Method: PluggableTreeMorph>>getCurrentSelectionItem (in category 'selection') ----- + getCurrentSelectionItem + "Our models are supposed to return real objects, not wrappers. See PluggableTreeItemNode." + + | selectedObject | + selectedObject := self getSelectedSelector + ifNil: [^ nil] + ifNotNil: [:symbol | model perform: symbol]. + ^ scroller submorphs + detect: [:each | each complexContents item = selectedObject] + ifFound: [:each | each complexContents] + ifNone: [nil]! Item was added: + ----- Method: PluggableTreeMorph>>getSelectedSelector (in category 'accessing') ----- + getSelectedSelector + ^getSelectionSelector! Item was added: + ----- Method: PluggableTreeMorph>>getSelectedSelector: (in category 'accessing') ----- + getSelectedSelector: aSymbol + getSelectionSelector := aSymbol.! Item was added: + ----- Method: PluggableTreeMorph>>nodeClass (in category 'accessing') ----- + nodeClass + ^ nodeClass ifNil: [PluggableTreeItemNode]! Item was added: + ----- Method: PluggableTreeMorph>>nodeClass: (in category 'accessing') ----- + nodeClass: aListWrapperClass + nodeClass := aListWrapperClass.! Item was removed: - ----- Method: PluggableTreeMorph>>roots (in category 'accessing') ----- - roots - ^roots! Item was removed: - ----- Method: PluggableTreeMorph>>roots: (in category 'accessing') ----- - roots: anArray - roots := anArray collect:[:item| PluggableTreeItemNode with: item model: self]. - self list: roots.! Item was changed: + ----- Method: PluggableTreeMorph>>selectPath:in: (in category 'selection') ----- - ----- Method: PluggableTreeMorph>>selectPath:in: (in category 'updating') ----- selectPath: path in: listItem path isEmpty ifTrue: [^self setSelectedMorph: nil]. listItem withSiblingsDo: [:each | (each complexContents item = path first) ifTrue: [ each isExpanded ifFalse: [ each toggleExpandedState. self adjustSubmorphPositions. ]. each changed. path size = 1 ifTrue: [ ^self setSelectedMorph: each ]. each firstChild ifNil: [^self setSelectedMorph: nil]. ^self selectPath: path allButFirst in: each firstChild ]. ]. ^self setSelectedMorph: nil ! Item was changed: ----- Method: PluggableTreeMorph>>setSelectedMorph: (in category 'selection') ----- setSelectedMorph: aMorph selectedWrapper := aMorph complexContents. + + "Let the model now about the selected object, not wrapper." + setSelectionSelector ifNotNil: [:symbol | - self selection: selectedWrapper. - setSelectedSelector ifNotNil:[ model + perform: symbol + with: (selectedWrapper ifNotNil: [:w | w item])]. + + "The model may not have access to the parent object in terms of this tree structure." + setSelectedParentSelector ifNotNil: [:symbol | + model + perform: symbol + with: (selectedWrapper ifNotNil: [:w | w parent ifNotNil: [:pw | pw item]])].! - perform: setSelectedSelector - with: (selectedWrapper ifNotNil:[selectedWrapper item]). - ].! Item was added: + ----- Method: PluggableTreeMorph>>setSelectedParentSelector (in category 'accessing') ----- + setSelectedParentSelector + ^ setSelectedParentSelector! Item was added: + ----- Method: PluggableTreeMorph>>setSelectedParentSelector: (in category 'accessing') ----- + setSelectedParentSelector: aSymbol + setSelectedParentSelector := aSymbol.! Item was changed: ----- Method: PluggableTreeMorph>>setSelectedSelector (in category 'accessing') ----- setSelectedSelector + ^setSelectionSelector! - ^setSelectedSelector! Item was changed: ----- Method: PluggableTreeMorph>>setSelectedSelector: (in category 'accessing') ----- setSelectedSelector: aSymbol + setSelectionSelector := aSymbol! - setSelectedSelector := aSymbol! Item was changed: ----- Method: PluggableTreeMorph>>update: (in category 'updating') ----- update: what what ifNil:[^self]. what == getRootsSelector ifTrue:[ + self wrapRoots: (model perform: getRootsSelector). + ^ self]. + - self roots: (model perform: getRootsSelector) - ]. what == getSelectedPathSelector ifTrue:[ + self + selectPath: (model perform: getSelectedPathSelector) + in: (scroller submorphs at: 1 ifAbsent: [^self]). + ^ self]. + + what == #expandRootsRequested ifTrue: [ + self expandRoots. + ^ self]. + + super update: what. + ! - ^self selectPath: (model perform: getSelectedPathSelector) - in: (scroller submorphs at: 1 ifAbsent: [^self]) - ]. - ^super update: what! Item was added: + ----- Method: PluggableTreeMorph>>update:with: (in category 'updating') ----- + update: what with: anObject + + super update: what with: anObject. + + what == #objectChanged ifTrue: [ + self updateFromChangedObject: anObject].! Item was added: + ----- Method: PluggableTreeMorph>>updateFromChangedObject: (in category 'updating') ----- + updateFromChangedObject: anObject + + scroller submorphs + detect: [:morph | morph complexContents item == anObject] + ifFound: [:morph | self updateMorph: morph] + ifNone: ["Ignore the request. Object may not be visible anyway."].! Item was added: + ----- Method: PluggableTreeMorph>>updateMorph: (in category 'updating') ----- + updateMorph: morph + + morph complexContents refresh. + morph refresh. + + morph isExpanded + ifFalse: [self changed] + ifTrue: [ + morph + toggleExpandedState; + toggleExpandedState. + self adjustSubmorphPositions]. + ! Item was added: + ----- Method: PluggableTreeMorph>>updateNode: (in category 'node access') ----- + updateNode: node + ! Item was added: + ----- Method: PluggableTreeMorph>>wrapRoots: (in category 'updating') ----- + wrapRoots: someObjects + + rootWrappers := someObjects collect: [:item| + self nodeClass with: item model: self]. + self list: rootWrappers.! From commits at source.squeak.org Sat Mar 7 11:17:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:17:28 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.774.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.774.mcz ==================== Summary ==================== Name: Morphic-mt.774 Author: mt Time: 7 March 2015, 12:16:53.926 pm UUID: 2bd1bbc8-ce83-3a44-a72a-d514668e3f03 Ancestors: Morphic-topa.773 ObjectExplorerWrapper refactored. It now stores bindings as items because this simplifies the adaptation of ObjectExplorer to use PluggableTreeMorphs. A pluggable tree morph wants to hide all wrappers from the model. To still distinguish, for example, various 'nil' values, it is necessary to work with bindings. Those bindings are not the ones as stored internally in the class object but made up new. Look at #setItem:name:model:. =============== Diff against Morphic-topa.773 =============== Item was added: + ----- Method: ListItemWrapper>>item (in category 'accessing') ----- + item + ^ item! Item was added: + ----- Method: ListItemWrapper>>model (in category 'accessing') ----- + model + ^ model! Item was changed: + ----- Method: ListItemWrapper>>setItem: (in category 'initialization') ----- - ----- Method: ListItemWrapper>>setItem: (in category 'accessing') ----- setItem: anObject item := anObject! Item was changed: + ----- Method: ListItemWrapper>>setItem:model: (in category 'initialization') ----- - ----- Method: ListItemWrapper>>setItem:model: (in category 'accessing') ----- setItem: anObject model: aModel item := anObject. model := aModel.! Item was changed: ----- Method: ObjectExplorerWrapper>>asString (in category 'converting') ----- asString + | explorerString label separator | - | explorerString string separator | explorerString := + [self object asExplorerString] - [item asExplorerString] on: Error + do: ['']. + (explorerString includes: Character cr) + ifTrue: [explorerString := explorerString withSeparatorsCompacted]. + + label := self itemName ifNil: ['']. + (label includes: Character cr) + ifTrue: [label := label withSeparatorsCompacted]. + - do: ['']. separator := self class showContentsInColumns ifTrue: [String tab] + ifFalse: [label ifEmpty: [''] ifNotEmpty: [': ']]. + + ^ '{1}{2}{3}' format: {label. separator. explorerString}! - ifFalse: [': ']. - string := (itemName ifNotNil: [itemName, separator] ifNil: ['']) , explorerString. - (string includes: Character cr) - ifTrue: [^ string withSeparatorsCompacted]. - ^ string! Item was removed: - ----- Method: ObjectExplorerWrapper>>canBeDragged (in category 'as yet unclassified') ----- - canBeDragged - - ^false! Item was changed: ----- Method: ObjectExplorerWrapper>>contents (in category 'accessing') ----- contents + (self object respondsTo: #explorerContents) ifTrue: [^ self object explorerContents]. - (item respondsTo: #explorerContents) ifTrue: [^item explorerContents]. "For all others, show named vars first, then indexed vars" + ^(self object class allInstVarNames asOrderedCollection withIndexCollect: [:each :index | - ^(item class allInstVarNames asOrderedCollection withIndexCollect: [:each :index | self class + with: (self object instVarAt: index) - with: (item instVarAt: index) name: each + model: self object - model: item parent: self]) , + ((1 to: self object basicSize) collect: [:index | - ((1 to: item basicSize) collect: [:index | self class + with: (self object basicAt: index) - with: (item basicAt: index) name: index printString + model: self object - model: item parent: self])! Item was changed: ----- Method: ObjectExplorerWrapper>>hasContents (in category 'accessing') ----- hasContents + ^ self object hasContentsInExplorer - ^item hasContentsInExplorer ! Item was changed: ----- Method: ObjectExplorerWrapper>>icon (in category 'accessing') ----- icon "Answer a form to be used as icon" ^ Preferences visualExplorer + ifTrue: [(self object iconOrThumbnailOfSize: 12) - ifTrue: [(item iconOrThumbnailOfSize: 12) ifNil: [self class showContentsInColumns ifTrue: [ToolIcons iconNamed: #blank] ifFalse: [nil]]] ifFalse: [nil]! Item was changed: + ----- Method: ObjectExplorerWrapper>>itemName (in category 'accessing') ----- - ----- Method: ObjectExplorerWrapper>>itemName (in category 'converting') ----- itemName + + ^ self item key! - ^itemName! Item was added: + ----- Method: ObjectExplorerWrapper>>object (in category 'accessing') ----- + object + + ^ self item value! Item was added: + ----- Method: ObjectExplorerWrapper>>object: (in category 'accessing') ----- + object: anObject + + self item value: anObject.! Item was changed: + ----- Method: ObjectExplorerWrapper>>parent (in category 'accessing') ----- - ----- Method: ObjectExplorerWrapper>>parent (in category 'as yet unclassified') ----- parent + ^ parent! - ^parent! Item was removed: - ----- Method: ObjectExplorerWrapper>>parent: (in category 'as yet unclassified') ----- - parent: anObject - parent := anObject! Item was changed: ----- Method: ObjectExplorerWrapper>>refresh (in category 'monitoring') ----- refresh "hack to refresh item given an object and a string that is either an index or an instance variable name." + + self parent ifNil: [^ self]. [ | index | + (model class allInstVarNames includes: self itemName) + ifTrue: [ self object: (model instVarNamed: self itemName) ] + ifFalse: [ index := self itemName asNumber. + (index between: 1 and: model basicSize) ifTrue: [ self object: (model basicAt: index)]] + ] on: Error do: [ :ex | self object: nil ]! - (model class allInstVarNames includes: itemName) - ifTrue: [ item := model instVarNamed: itemName ] - ifFalse: [ index := itemName asNumber. - (index between: 1 and: model basicSize) ifTrue: [ item := model basicAt: index]] - ] on: Error do: [ :ex | item := nil ]! Item was removed: - ----- Method: ObjectExplorerWrapper>>selector (in category 'as yet unclassified') ----- - selector - parent ifNil: [ ^nil ]. - ^(parent withoutListWrapper class allInstVarNames includes: itemName) ifTrue: [ itemName asSymbol ]! Item was changed: + ----- Method: ObjectExplorerWrapper>>setItem:name:model: (in category 'initialization') ----- - ----- Method: ObjectExplorerWrapper>>setItem:name:model: (in category 'as yet unclassified') ----- setItem: anObject name: aString model: aModel + self setItem: aString -> anObject model: aModel.! - item := anObject. - model := aModel. - itemName := aString.! Item was changed: + ----- Method: ObjectExplorerWrapper>>setItem:name:model:parent: (in category 'initialization') ----- - ----- Method: ObjectExplorerWrapper>>setItem:name:model:parent: (in category 'as yet unclassified') ----- setItem: anObject name: aString model: aModel parent: itemParent + parent := itemParent. self setItem: anObject name: aString model: aModel! From commits at source.squeak.org Sat Mar 7 11:19:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:19:26 2015 Subject: [squeak-dev] The Trunk: Tools-mt.542.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.542.mcz ==================== Summary ==================== Name: Tools-mt.542 Author: mt Time: 7 March 2015, 12:19:04.957 pm UUID: 2474c709-2040-f040-99eb-6144e9acd707 Ancestors: Tools-mt.541 Object explorer now uses tool builder. Includes code clean-up and some fixes. Monitoring entries works again. =============== Diff against Tools-mt.541 =============== Item was added: + ----- Method: IndentingListItemMorph>>refresh (in category 'initialization') ----- + refresh + + self contents: complexContents asString. + icon := complexContents icon.! Item was changed: AbstractHierarchicalList subclass: #ObjectExplorer + instanceVariableNames: 'root currentParent inspector monitorList' - instanceVariableNames: 'rootObject inspector monitorList' classVariableNames: '' poolDictionaries: '' category: 'Tools-Explorer'! !ObjectExplorer commentStamp: '' prior: 0! ObjectExplorer provides a hierarchical alternative to #inspect. Simply evaluate an expression like: World explore and enjoy.! Item was added: + ----- Method: ObjectExplorer class>>nodeClass (in category 'as yet unclassified') ----- + nodeClass + + ^ ObjectExplorerWrapper! Item was added: + ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + + | windowSpec treeSpec textSpec | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + children: OrderedCollection new; + label: #label. + + treeSpec := builder pluggableTreeSpec new. + treeSpec + model: self; + nodeClass: self class nodeClass; + roots: #getList; + keyPress: #explorerKey:from:; + getSelected: #currentSelection; + setSelected: #currentSelection:; + setSelectedParent: #currentParent:; + menu: #genericMenu:; + autoDeselect: false; + columns: (ObjectExplorerWrapper showContentsInColumns + ifTrue: [{ + [:listMorph | (listMorph scroller submorphs collect: [:item | + item preferredWidthOfColumn: 1]) max]. + nil "take all the space"}] + ifFalse: []); + frame: (0@0 corner: 1@0.85). + windowSpec children add: treeSpec. + + textSpec := builder pluggableTextSpec new. + textSpec + model: self; + menu: #codePaneMenu:shifted:; + frame: (0@0.85 corner: 1@1). + windowSpec children add: textSpec. + + ^ builder build: windowSpec! Item was changed: + ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>chasePointers (in category 'menus') ----- chasePointers "Open a PointerFinder on the selected item" | path sel savedRoot saved | path := OrderedCollection new. sel := currentSelection. [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. path addFirst: #openPath. path := path asArray. savedRoot := rootObject. saved := self object. [ rootObject := nil. self changed: #getList. (Smalltalk includesKey: #PointerFinder) ifTrue: [PointerFinder on: saved] ifFalse: [self objectReferencesToSelection ]] ensure: [ rootObject := savedRoot. self changed: #getList. self changed: path. ]! Item was removed: - ----- Method: ObjectExplorer>>contentsSelection (in category 'accessing') ----- - contentsSelection - "Return the interval of text in the code pane to select when I set the pane's contents" - - ^ 1 to: 0 "null selection"! Item was added: + ----- Method: ObjectExplorer>>currentParent (in category 'accessing') ----- + currentParent + ^ currentParent! Item was added: + ----- Method: ObjectExplorer>>currentParent: (in category 'accessing') ----- + currentParent: anObject + currentParent := anObject.! Item was added: + ----- Method: ObjectExplorer>>currentSelection (in category 'accessing') ----- + currentSelection + + ^ currentSelection! Item was added: + ----- Method: ObjectExplorer>>currentSelection: (in category 'accessing') ----- + currentSelection: anObject + + self currentSelection == anObject ifTrue: [^ self]. + currentSelection := anObject. + self changed: #currentSelection.! Item was changed: + ----- Method: ObjectExplorer>>defsOfSelection (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>defsOfSelection (in category 'menus') ----- defsOfSelection "Open a browser on all defining references to the selected instance variable, if that's what's currently selected." | aClass sel | (aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash]. sel := self selector. self systemNavigation browseAllStoresInto: sel from: aClass! Item was changed: ----- Method: ObjectExplorer>>doItReceiver (in category 'accessing') ----- doItReceiver "Answer the object that should be informed of the result of evaluating a text selection." + ^ self object! - currentSelection ifNil: [^rootObject]. - ^currentSelection withoutListWrapper - ! Item was changed: + ----- Method: ObjectExplorer>>explorePointers (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>explorePointers (in category 'menus') ----- explorePointers "Open a PointerExplorer on the current selection" PointerExplorer new openExplorerFor: self object! Item was changed: + ----- Method: ObjectExplorer>>exploreSelection (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>exploreSelection (in category 'menus') ----- exploreSelection "Open an ObjectExplorer on the current selection" self object explore! Item was removed: - ----- Method: ObjectExplorer>>explorerFor: (in category 'user interface') ----- - explorerFor: anObject - | window view | - rootObject := anObject. - window := (SystemWindow labelled: self label) model: self. - window addMorph: (view := (SimpleHierarchicalListMorph - on: self - list: #getList - selected: #getCurrentSelection - changeSelected: #noteNewSelection: - menu: #genericMenu: - keystroke: #explorerKey:from:) - columns: (ObjectExplorerWrapper showContentsInColumns - ifTrue: [{ - [:listMorph | (listMorph scroller submorphs collect: [:item | - item preferredWidthOfColumn: 1]) max]. - nil "take all the space"}] - ifFalse: []); - yourself) - frame: (0@0 corner: 1@0.8). - window addMorph: ((PluggableTextMorph on: self text: #trash accept: #trash: - readSelection: #contentsSelection menu: #codePaneMenu:shifted:) - askBeforeDiscardingEdits: false) - frame: (0@0.8 corner: 1@1). - view - autoDeselect: false. - ^ window! Item was removed: - ----- Method: ObjectExplorer>>explorerFor:withLabel: (in category 'user interface') ----- - explorerFor: anObject withLabel: label - | window view | - rootObject := anObject. - window := (SystemWindow labelled: label) - model: self. - - window - addMorph: (view := (SimpleHierarchicalListMorph - on: self - list: #getList - selected: #getCurrentSelection - changeSelected: #noteNewSelection: - menu: #genericMenu: - keystroke: nil) - columns: (ObjectExplorerWrapper showContentsInColumns - ifTrue: [{ - [:listMorph | (listMorph scroller submorphs collect: [:item | - item preferredWidthOfColumn: 1]) max]. - nil "take all the space"}] - ifFalse: []); - yourself) - frame: (0 @ 0 corner: 1 @ 0.8). - window - addMorph: ((PluggableTextMorph - on: self - text: #trash - accept: #trash: - readSelection: #contentsSelection - menu: #codePaneMenu:shifted:) - askBeforeDiscardingEdits: false) - frame: (0 @ 0.8 corner: 1 @ 1). - view autoDeselect: false. - ^ window! Item was changed: ----- Method: ObjectExplorer>>explorerKey:from: (in category 'menus') ----- explorerKey: aChar from: view "Similar to #genericMenu:..." | insideObject parentObject | currentSelection ifNotNil: [ insideObject := self object. parentObject := self parentObject. inspector ifNil: [inspector := Inspector new]. inspector inspect: parentObject; object: insideObject. aChar == $i ifTrue: [^ self inspectSelection]. aChar == $I ifTrue: [^ self exploreSelection]. aChar == $b ifTrue: [^ inspector browseMethodFull]. aChar == $h ifTrue: [^ inspector classHierarchy]. + aChar == $c ifTrue: [^ Clipboard clipboardText: self currentSelection key]. - aChar == $c ifTrue: [^ inspector copyName]. aChar == $p ifTrue: [^ inspector browseFullProtocol]. aChar == $N ifTrue: [^ inspector browseClassRefs]. aChar == $t ifTrue: [^ inspector tearOffTile]. aChar == $v ifTrue: [^ inspector viewerForValue]]. ^ self arrowKey: aChar from: view! Item was changed: ----- Method: ObjectExplorer>>getList (in category 'accessing') ----- getList + "This explorer shows bindings in a tree structure. Create the root binding here." + + ^ {self root}! - - ^Array with: (ObjectExplorerWrapper with: rootObject name: 'root' model: self parent: nil) - ! Item was changed: ----- Method: ObjectExplorer>>initialExtent (in category 'user interface') ----- initialExtent + ^400@400! - ^300@500! Item was changed: + ----- Method: ObjectExplorer>>inspectSelection (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>inspectSelection (in category 'menus') ----- inspectSelection "Open an Inspector on the current selection" self object inspect! Item was changed: ----- Method: ObjectExplorer>>label (in category 'accessing') ----- label + ^ self rootObject printStringLimitedTo: 32! - ^ rootObject printStringLimitedTo: 32! Item was changed: + ----- Method: ObjectExplorer>>monitor: (in category 'menus - callbacks') ----- + monitor: aBinding + "Start stepping and watching the given binding for changes." + + aBinding ifNil: [ ^self ]. - ----- Method: ObjectExplorer>>monitor: (in category 'monitoring') ----- - monitor: anObjectExplorerWrapper - "Start stepping and watching the given wrapper for changes." - anObjectExplorerWrapper ifNil: [ ^self ]. self world ifNil: [ ^self ]. + self monitorList add: aBinding. + + self world startStepping: self at: Time millisecondClockValue selector: #step arguments: #() stepTime: 2000.! - self monitorList at: anObjectExplorerWrapper put: anObjectExplorerWrapper asString. - self world startStepping: self at: Time millisecondClockValue selector: #step arguments: #() stepTime: 200.! Item was changed: ----- Method: ObjectExplorer>>monitorList (in category 'monitoring') ----- monitorList + ^monitorList ifNil: [ monitorList := WeakOrderedCollection new ].! - ^monitorList ifNil: [ monitorList := WeakIdentityKeyDictionary new ].! Item was changed: + ----- Method: ObjectExplorer>>object (in category 'accessing - objects') ----- - ----- Method: ObjectExplorer>>object (in category 'accessing') ----- object + + ^ self currentSelection value! - ^currentSelection ifNotNil: [ :cs | cs withoutListWrapper ]! Item was changed: + ----- Method: ObjectExplorer>>objectReferencesToSelection (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>objectReferencesToSelection (in category 'menus') ----- objectReferencesToSelection "Open a browser on all references to the selected instance variable, if that's what currently selected. " self systemNavigation browseAllObjectReferencesTo: self object except: (Array with: self parentObject with: currentSelection with: inspector) ifNone: [:obj | self changed: #flash]. ! Item was removed: - ----- Method: ObjectExplorer>>openBrowser: (in category 'user interface') ----- - openBrowser: aClass - - ^ToolSet browseClass: aClass! Item was changed: ----- Method: ObjectExplorer>>openExplorerFor: (in category 'user interface') ----- openExplorerFor: anObject + "ObjectExplorer new openExplorerFor: Smalltalk." - " - ObjectExplorer new openExplorerFor: Smalltalk - " + ^ self openExplorerFor: anObject withLabel: nil! - | win | - win := (self explorerFor: anObject) openInWorld. - Cursor wait showWhile: - [win submorphs do: - [:sm| - (sm respondsTo: #expandRoots) ifTrue: - [sm expandRoots]]]. - ^self - ! Item was changed: ----- Method: ObjectExplorer>>openExplorerFor:withLabel: (in category 'user interface') ----- openExplorerFor: anObject withLabel: label "ObjectExplorer new openExplorerFor: Smalltalk withLabel: 'Smalltalk'" + ToolBuilder open: self label: label. + self rootObject: anObject.! - (self explorerFor: anObject withLabel: label) - openInWorld! Item was changed: + ----- Method: ObjectExplorer>>parentObject (in category 'accessing - objects') ----- - ----- Method: ObjectExplorer>>parentObject (in category 'accessing') ----- parentObject + + ^ self currentParent value! - currentSelection ifNil: [ ^nil ]. - currentSelection parent ifNil: [ ^rootObject ]. - ^currentSelection parent withoutListWrapper! Item was changed: + ----- Method: ObjectExplorer>>referencesToSelection (in category 'menus - callbacks') ----- - ----- Method: ObjectExplorer>>referencesToSelection (in category 'menus') ----- referencesToSelection "Open a browser on all references to the selected instance variable, if that's what's currently selected." | aClass sel | (aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash]. sel := self selector. self systemNavigation browseAllAccessesTo: sel from: aClass! Item was added: + ----- Method: ObjectExplorer>>root (in category 'accessing') ----- + root + + ^ root ifNil: [root := 'root' -> nil]! Item was changed: + ----- Method: ObjectExplorer>>rootObject (in category 'accessing - objects') ----- - ----- Method: ObjectExplorer>>rootObject (in category 'accessing') ----- rootObject + + ^ self root value! - ^ rootObject! Item was added: + ----- Method: ObjectExplorer>>rootObject: (in category 'accessing - objects') ----- + rootObject: anObject + + self root value: anObject. + + self changed: #label. + self changed: #getList. + self changed: #expandRootsRequested. + + self currentSelection: self getList first.! Item was changed: + ----- Method: ObjectExplorer>>selectedClass (in category 'accessing - other') ----- - ----- Method: ObjectExplorer>>selectedClass (in category 'menus') ----- selectedClass "Answer the class of the receiver's current selection" ^self doItReceiver class ! Item was changed: + ----- Method: ObjectExplorer>>selector (in category 'accessing - other') ----- - ----- Method: ObjectExplorer>>selector (in category 'accessing') ----- selector + + self flag: #deprecated. "mt: Who uses this? And why?" + self parentObject ifNil: [^ nil]. + (self parentObject class allInstVarNames includes: self currentSelection key) + ifTrue: [^ self currentSelection key asSymbol]. + ^ nil! - ^currentSelection ifNotNil: [ :cs | cs selector ]! Item was changed: ----- Method: ObjectExplorer>>step (in category 'monitoring') ----- step + "Let all views know that some of my objects need to be updated." + + self monitorList do: [ :object | + object ifNotNil: [self changed: #objectChanged with: object]]. + self monitorList ifEmpty: [ + ActiveWorld stopStepping: self selector: #step ].! - "If there's anything in my monitor list, see if the strings have changed." - | changes | - changes := false. - self monitorList keysAndValuesDo: [ :k :v | - k ifNotNil: [ - | string | - k refresh. - (string := k asString) ~= v ifTrue: [ self monitorList at: k put: string. changes := true ]. - ] - ]. - changes ifTrue: [ | sel | - sel := currentSelection. - self changed: #getList. - self noteNewSelection: sel. - ]. - self monitorList isEmpty ifTrue: [ ActiveWorld stopStepping: self selector: #step ].! Item was removed: - ----- Method: ObjectExplorer>>trash (in category 'menus') ----- - trash - "What goes in the bottom pane" - ^ ''! Item was removed: - ----- Method: ObjectExplorer>>trash: (in category 'menus') ----- - trash: newText - "Don't save it" - ^ true! Item was added: + ----- Method: PointerExplorer class>>nodeClass (in category 'as yet unclassified') ----- + nodeClass + + ^ PointerExplorerWrapper! Item was removed: - ----- Method: PointerExplorer>>getList (in category 'accessing') ----- - getList - ^Array with: (PointerExplorerWrapper with: rootObject name: rootObject identityHash asString model: self) - ! Item was added: + ----- Method: PointerExplorer>>rootObject: (in category 'accessing') ----- + rootObject: anObject + + self root key: anObject identityHash asString. + super rootObject: anObject.! From commits at source.squeak.org Sat Mar 7 11:20:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:20:09 2015 Subject: [squeak-dev] The Trunk: Tools-mt.543.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.543.mcz ==================== Summary ==================== Name: Tools-mt.543 Author: mt Time: 7 March 2015, 12:19:49.606 pm UUID: 7bef3495-7dcd-0346-99d7-7c335ced4c3a Ancestors: Tools-mt.542 Browser icons fixed. =============== Diff against Tools-mt.542 =============== Item was changed: ----- Method: ToolIcons class>>iconForClass:selector: (in category 'support') ----- iconForClass: aClassDescription selector: aSelector "Answer an icon to be shown for the selector aSymbol in aClassDescription." | classDescription | classDescription := (aClassDescription isKindOf: PseudoClass) ifTrue: [aClassDescription realClass ifNil: [^ #blank ]] ifFalse: [aClassDescription]. classDescription methodDictionary at: aSelector ifPresent: [ :method | method literalsDo: [ :literal | (literal == #halt or: [ literal == #halt: or: [ literal == #haltIfNil or: [ literal == #haltIf: or: [ literal == #haltOnce or: [ literal == #haltOnce: or: [ literal == #haltOnCount: or: [ literal == #halt:onCount: ] ] ] ] ] ] ]) ifTrue: [^ #breakpoint]. (literal == #flag: or: [ literal == #needsWork or: [ literal == #notYetImplemented ] ]) ifTrue: [^ #flag]. (literal == #shouldBeImplemented or: [literal == #subclassResponsibility]) ifTrue: [^ #abstract] ] ]. ^ (classDescription isSelectorOverride: aSelector) ifTrue: [ (classDescription isSelectorOverridden: aSelector) + ifTrue: [ #arrowUpAndDown ] + ifFalse: [ #arrowUp ] ] - ifTrue: [ #arrowUp ] - ifFalse: [ #arrowUpAndDown ] ] ifFalse: [ (classDescription isSelectorOverridden: aSelector) ifTrue: [ #arrowDown ] ifFalse: [#blank ] ]! From commits at source.squeak.org Sat Mar 7 11:24:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:25:00 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.96.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.96.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.96 Author: mt Time: 7 March 2015, 12:24:54.258 pm UUID: 1fd5e40f-e940-cd43-a5b2-29f67a38e5e4 Ancestors: ToolBuilder-Morphic-mt.95 Fixes current selection where model objects looked the same but where not identical. =============== Diff against ToolBuilder-Morphic-mt.95 =============== Item was changed: ----- Method: PluggableTreeMorph>>getCurrentSelectionItem (in category 'selection') ----- getCurrentSelectionItem "Our models are supposed to return real objects, not wrappers. See PluggableTreeItemNode." | selectedObject | selectedObject := self getSelectedSelector ifNil: [^ nil] ifNotNil: [:symbol | model perform: symbol]. ^ scroller submorphs + detect: [:each | each complexContents item == selectedObject] - detect: [:each | each complexContents item = selectedObject] ifFound: [:each | each complexContents] ifNone: [nil]! From Das.Linux at gmx.de Sat Mar 7 11:39:32 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 7 11:39:42 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.65.mcz Message-ID: <4B39DA8E-74E2-4405-8396-95AD7863F832@gmx.de> Hey, On 07.03.2015, at 11:08, commits@source.squeak.org wrote: > Instance variables: > roots The message to retrieve the roots of the tree. > getSelectedPath The message to retrieve the selected path in the tree. > setSelected The message to set the selected item in the tree. > getChildren The message to retrieve the children of an item > hasChildren The message to query for children of an item > label The message to query for the label of an item. > icon The message to query for the icon of an item. > help The message to query for the help of an item. > menu The message to query for the tree's menu > keyPress The message to process a keystroke. > wantsDrop The message to query whether a drop might be accepted. > dropItem The message to drop an item. > enableDrag Enable dragging from this tree. > autoDeselect Whether the tree should allow automatic deselection or not. > unusedVar (unused) This variable is a placeholder to fix problems with loading packages in 3.10.! You should update the class comment =D From commits at source.squeak.org Sat Mar 7 11:39:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 11:39:52 2015 Subject: [squeak-dev] The Trunk: Tools-mt.544.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.544.mcz ==================== Summary ==================== Name: Tools-mt.544 Author: mt Time: 7 March 2015, 12:39:29.451 pm UUID: e5f6e0d2-f8ba-b042-aed1-49fcb8cb0617 Ancestors: Tools-mt.543 Simple indication for monitored items added to object explorer. In particular, this is an indication for post-init refreshing as triggered by monitoring. =============== Diff against Tools-mt.543 =============== Item was changed: ----- Method: IndentingListItemMorph>>highlight (in category 'private-container protocol') ----- highlight + (self valueOfProperty: #wasRefreshed ifAbsent: [false]) + ifFalse: [self color: complexContents highlightingColor] + ifTrue: [self color: self color negated]. + - self color: complexContents highlightingColor. self changed. ! Item was changed: ----- Method: IndentingListItemMorph>>refresh (in category 'initialization') ----- refresh self contents: complexContents asString. + icon := complexContents icon. + + (self valueOfProperty: #wasRefreshed ifAbsent: [false]) ifFalse: [ + self setProperty: #wasRefreshed toValue: true. + self color: Color yellow. "Indicate refresh operation."].! - icon := complexContents icon.! Item was changed: ----- Method: IndentingListItemMorph>>unhighlight (in category 'drawing') ----- unhighlight + (self valueOfProperty: #wasRefreshed ifAbsent: [false]) + ifFalse: [self color: complexContents preferredColor] + ifTrue: [self color: self color negated]. + - self color: complexContents preferredColor. self changed. ! From marcel.taeumel at student.hpi.uni-potsdam.de Sat Mar 7 11:33:11 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Mar 7 11:41:59 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-mt.65.mcz In-Reply-To: <4B39DA8E-74E2-4405-8396-95AD7863F832@gmx.de> References: <4B39DA8E-74E2-4405-8396-95AD7863F832@gmx.de> Message-ID: <1425727991818-4810216.post@n4.nabble.com> Woah! Isn't this auto-generated somehow? ... ;-) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ToolBuilder-Kernel-mt-65-mcz-tp4810207p4810216.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Sat Mar 7 11:43:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 7 11:43:32 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-mt.65.mcz In-Reply-To: <1425727991818-4810216.post@n4.nabble.com> References: <4B39DA8E-74E2-4405-8396-95AD7863F832@gmx.de> <1425727991818-4810216.post@n4.nabble.com> Message-ID: <61F8511F-2B53-47A2-A83D-FC999B68900E@gmx.de> Hey, On 07.03.2015, at 12:33, Marcel Taeumel wrote: > Woah! Isn't this auto-generated somehow? ... ;-) If by auto-generated you mean handwritten by knowledgeable people, then yes ;) From marcel.taeumel at student.hpi.uni-potsdam.de Sat Mar 7 11:38:21 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Mar 7 11:47:06 2015 Subject: [squeak-dev] Re: 4.6 -- codename In-Reply-To: References: Message-ID: <1425728301555-4810219.post@n4.nabble.com> It's going to be a spring release. What about flower names? :-D Mulberry -- meaning some kind of prudence Here are more: http://www.buzzle.com/articles/list-of-flower-names-and-meanings-of-flowers.html Best, Marcel -- View this message in context: http://forum.world.st/4-6-codename-tp4810105p4810219.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From edgardec2005 at gmail.com Sat Mar 7 14:16:09 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Sat Mar 7 14:16:18 2015 Subject: [squeak-dev] Re: 4.6 -- codename In-Reply-To: <1425728301555-4810219.post@n4.nabble.com> Message-ID: On 3/7/15, 8:38 AM, "Marcel Taeumel" wrote: > It's going to be a spring release Not here !! :=) El Sur tambien existe https://www.youtube.com/watch?v=1ZF6fHU-zEY Edgar From marcel.taeumel at student.hpi.uni-potsdam.de Sat Mar 7 14:23:38 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Mar 7 14:32:25 2015 Subject: [squeak-dev] Re: 4.6 -- codename In-Reply-To: References: <1425728301555-4810219.post@n4.nabble.com> Message-ID: <1425738218830-4810246.post@n4.nabble.com> Ah, sorry. :) You like flowers anyway? ;) Best, Marcel -- View this message in context: http://forum.world.st/4-6-codename-tp4810105p4810246.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From gettimothy at zoho.com Sat Mar 7 17:45:18 2015 From: gettimothy at zoho.com (gettimothy) Date: Sat Mar 7 17:45:22 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: References: Message-ID: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> I think the codename should honor Eliot in some manner. How about naming it "Eliot" ? ---- On Fri, 06 Mar 2015 15:24:39 -0500 Chris Muller <ma.chris.m@gmail.com> wrote ---- "From Cog to Spur" -- we need a snappy codename that makes sense for this release. I thought about "Cowboy" for a few seconds, but that's way too awful for marketing.. :) Someone help please. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150307/a16c4ad3/attachment.htm From Das.Linux at gmx.de Sat Mar 7 17:59:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 7 17:59:09 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> References: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> Message-ID: <7C730CCB-7AFF-4F0F-B1CC-EFA5540A4B76@gmx.de> Hi, On 07.03.2015, at 18:45, gettimothy wrote: > I think the codename should honor Eliot in some manner. How about naming it "Eliot" ? While I share your intent, I think we should refrain from code-naming our releases after people. Best -Tobias > ---- On Fri, 06 Mar 2015 15:24:39 -0500 Chris Muller wrote ---- > "From Cog to Spur" -- we need a snappy codename that makes sense for > this release. I thought about "Cowboy" for a few seconds, but that's > way too awful for marketing.. :) Someone help please. From gettimothy at zoho.com Sat Mar 7 18:01:40 2015 From: gettimothy at zoho.com (gettimothy) Date: Sat Mar 7 18:01:45 2015 Subject: [squeak-dev] Squeak 4.6 release update In-Reply-To: References: Message-ID: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: ---- On Fri, 06 Mar 2015 15:23:00 -0500 Chris Muller<ma.chris.m@gmail.com> wrote ---- Besides welcoming Marcel to the board yesterday, we discussed that we'd like to push for the 4.6 / 5.0 release by April 30th. Somehow my name was the only one to be found on the volunteer list as release manager, but Eliot voiced his willingness to assist, but will be relying on others to chip in as well. So, I've just updated the Squeak 4.5-13686 image from trunk (lo and behold, it worked without a hitch!) to produce a Squeak4.6-14191.zip which is now available at ftp.squeak.org/4.6alpha/. >From this snapshot forward, lets start thinking about the 4.6 release and all that we want to be in it. If you have any low-level changes to the image that would benefit from as much testing as possible, now is the time to get those finalized and committed into the trunk. Controversial changes should start in the Inbox as always, we still have time for one or two more arguments. :) In a few weeks, we'll want to start being more conservative with our changes; only things like tools and cosmetics -- and we'll hammer out the look and UX. 4.6 is a dual release also as 5.0. We'll be releasing two VM's and two images; one each for the Cog and Spur formats. The content of the images will be equivalent. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150307/5c9e30e0/attachment.htm From Das.Linux at gmx.de Sat Mar 7 19:28:55 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 7 19:28:58 2015 Subject: [squeak-dev] Squeak 4.6 release update In-Reply-To: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> Message-ID: Hey, On 07.03.2015, at 19:01, gettimothy wrote: > The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: to which fix do you refer? There is a hack out there calling flush every now and then, but this all calls for a principled solution for streams that read _and_ write. best -Tobias > > ---- On Fri, 06 Mar 2015 15:23:00 -0500 Chris Muller wrote ---- > Besides welcoming Marcel to the board yesterday, we discussed that > we'd like to push for the 4.6 / 5.0 release by April 30th. Somehow my > name was the only one to be found on the volunteer list as release > manager, but Eliot voiced his willingness to assist, but will be > relying on others to chip in as well. > > So, I've just updated the Squeak 4.5-13686 image from trunk (lo and > behold, it worked without a hitch!) to produce a Squeak4.6-14191.zip > which is now available at ftp.squeak.org/4.6alpha/. > >> From this snapshot forward, lets start thinking about the 4.6 release > and all that we want to be in it. If you have any low-level changes > to the image that would benefit from as much testing as possible, now > is the time to get those finalized and committed into the trunk. > Controversial changes should start in the Inbox as always, we still > have time for one or two more arguments. :) > > In a few weeks, we'll want to start being more conservative with our > changes; only things like tools and cosmetics -- and we'll hammer out > the look and UX. > > 4.6 is a dual release also as 5.0. We'll be releasing two VM's and > two images; one each for the Cog and Spur formats. The content of the > images will be equivalent. From lewis at mail.msen.com Sat Mar 7 20:00:10 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 7 20:00:11 2015 Subject: [squeak-dev] Squeak 4.6 release update In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> Message-ID: <20150307200010.GA93412@shell.msen.com> On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: > Hey, > On 07.03.2015, at 19:01, gettimothy wrote: > > > The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: > > to which fix do you refer? > There is a hack out there calling flush every now and then, > but this all calls for a principled solution for streams that > read _and_ write. You are right that it is a hack, but the actual problem is a defect in some C runtime libraries, notably on Ubuntu but possibly others as well. What we really need is a unit test that captures the bug. I was not able to come up with one myself, but it would be quite helpful if someone could do it. In addition to the error saving comments, I also have a large number of failures in my OSProcess and CommandShell tests when running on my Ubuntu laptop with the buggy C runtime. I cannot prove it, but I am fairly sure it is the same underlying Ubuntu bug causing these problems. Dave > > best > -Tobias > > > > > > ---- On Fri, 06 Mar 2015 15:23:00 -0500 Chris Muller wrote ---- > > Besides welcoming Marcel to the board yesterday, we discussed that > > we'd like to push for the 4.6 / 5.0 release by April 30th. Somehow my > > name was the only one to be found on the volunteer list as release > > manager, but Eliot voiced his willingness to assist, but will be > > relying on others to chip in as well. > > > > So, I've just updated the Squeak 4.5-13686 image from trunk (lo and > > behold, it worked without a hitch!) to produce a Squeak4.6-14191.zip > > which is now available at ftp.squeak.org/4.6alpha/. > > > >> From this snapshot forward, lets start thinking about the 4.6 release > > and all that we want to be in it. If you have any low-level changes > > to the image that would benefit from as much testing as possible, now > > is the time to get those finalized and committed into the trunk. > > Controversial changes should start in the Inbox as always, we still > > have time for one or two more arguments. :) > > > > In a few weeks, we'll want to start being more conservative with our > > changes; only things like tools and cosmetics -- and we'll hammer out > > the look and UX. > > > > 4.6 is a dual release also as 5.0. We'll be releasing two VM's and > > two images; one each for the Cog and Spur formats. The content of the > > images will be equivalent. > > From lewis at mail.msen.com Sat Mar 7 21:28:04 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 7 21:28:11 2015 Subject: [squeak-dev] Another push of date/time/duration updates In-Reply-To: References: Message-ID: <20150307212804.GB93412@shell.msen.com> On Fri, Mar 06, 2015 at 10:31:16PM -0800, Chris Cunningham wrote: > Hi. > > Sorry for the excessively long delay in fixing the bugs in this package. > > In the inbox are three packages that make a complete update with date/time > arithmetic: > Kernel-cbc.910 > Collections-cbc.604 > KernelTests-cbc.291 > > The first two extend the existing date arithmetic such as Date today + 3 > days to include months and years as well. Adding months (or subtracting > months) make it be the number of months you add/subtract off, nearest the > date of the first month as you can get. So, February 28 + 1 month gives > March 28; January 31 + 1 month gives February 28th (or 29 in a leap year). > Similarly with year. > In addition, the durations can be chained together, such as 1 month + 1 > year + 1 month, and then add this to a date (or dateAndTime). > Finally, these are covered by test, including additional tests for doing > date arithmetic (which previously did not exist). > > Thanks, > cbc In earlier discussion of this, I think that people were generally positive and thought it was a good idea. The added tests are definitely welcome too. I do have a concern about the overall approach, and would like to hear what others think. The new classes GenericDuration, GenericMonth, and GenericYear are helper classes to support Gregorian calendar arithmetic. Maybe it is just the class names that are bothering me, but this does not seem like a "generic" thing. I think that Java does a good job with its approach to calendar arithmetic. There is an abstract Calendar class that "provides methods for converting between a specific instant in time and a set of calendar fields such as YEAR, MONTH, DAY_OF_MONTH, HOUR, and so on". The concrete implementation most commonly used is class GregorianCalendar, which implements the kinds of month, day and year calculations that we expect in Squeak. In Squeak, we do not do a very good job (mostly for historical reasons) of conceptually representing the difference between "a specific instant in time" versus calendar and time zone presentation of that instant in time. I don't know that added GenericDuration, GenericMonth, and GenericYear make the problem any worse, but somehow it does not quite feel right to me. Maybe it's just the class names? I do think that Chris' packages are useful and convenient, so I hope this does not come across as negative. It's just that when I read the Java class documention, I come away with a better understanding of the time and calendar concepts. When I look at the same things in Squeak, I go away confused. Dave From commits at source.squeak.org Sat Mar 7 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 7 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150307225503.11563.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007604.html Name: TrueType-topa.31 Ancestors: TrueType-topa.30 In Fonts with multilingual names, prefer English ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007605.html Name: TrueType-topa.32 Ancestors: TrueType-topa.31 Fix TrueType-topa.31 for Microsoft-encoded names and language tags ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007606.html Name: ToolBuilder-Kernel-mt.65 Ancestors: ToolBuilder-Kernel-bf.64 Pluggable tree specs extended with the concepts of columns, simple selections, custom node classes, and parent selections. Preparation for refactored object explorer. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007607.html Name: ToolBuilder-Morphic-mt.95 Ancestors: ToolBuilder-Morphic-mt.94 Pluggable tree morph bug-fixed and extended to understand simple selections and custom node classes. Its companion -- PluggableTreeItemNode -- now speaks #parent and has a stub for #refresh. Preparation for refactored object explorer. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007608.html Name: Morphic-mt.774 Ancestors: Morphic-topa.773 ObjectExplorerWrapper refactored. It now stores bindings as items because this simplifies the adaptation of ObjectExplorer to use PluggableTreeMorphs. A pluggable tree morph wants to hide all wrappers from the model. To still distinguish, for example, various 'nil' values, it is necessary to work with bindings. Those bindings are not the ones as stored internally in the class object but made up new. Look at #setItem:name:model:. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007609.html Name: Tools-mt.542 Ancestors: Tools-mt.541 Object explorer now uses tool builder. Includes code clean-up and some fixes. Monitoring entries works again. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007610.html Name: Tools-mt.543 Ancestors: Tools-mt.542 Browser icons fixed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007611.html Name: ToolBuilder-Morphic-mt.96 Ancestors: ToolBuilder-Morphic-mt.95 Fixes current selection where model objects looked the same but where not identical. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007612.html Name: Tools-mt.544 Ancestors: Tools-mt.543 Simple indication for monitored items added to object explorer. In particular, this is an indication for post-init refreshing as triggered by monitoring. ============================================= From btc at openInWorld.com Sun Mar 8 00:06:06 2015 From: btc at openInWorld.com (Ben Coman) Date: Sun Mar 8 00:06:09 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: <7C730CCB-7AFF-4F0F-B1CC-EFA5540A4B76@gmx.de> References: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> <7C730CCB-7AFF-4F0F-B1CC-EFA5540A4B76@gmx.de> Message-ID: On Sun, Mar 8, 2015 at 1:59 AM, Tobias Pape wrote: > Hi, > > On 07.03.2015, at 18:45, gettimothy wrote: > > > I think the codename should honor Eliot in some manner. How about naming > it "Eliot" ? > > While I share your intent, I think we should refrain from code-naming our > releases > after people. > > Best > -Tobias > That could be a slippery precedent :) Now I'm not very involved with Squeak, but just because I like creative brainstorming... continuing with the bicycle theme how about "Rover" after the "Rover Safety - the first model to adopt what we think of as the standard bicycle design...[1]" [1] http://www.mudsweatngears.co.uk/page_2473200.html cheers -ben > > > ---- On Fri, 06 Mar 2015 15:24:39 -0500 Chris Muller < > ma.chris.m@gmail.com> wrote ---- > > "From Cog to Spur" -- we need a snappy codename that makes sense for > > this release. I thought about "Cowboy" for a few seconds, but that's > > way too awful for marketing.. :) Someone help please. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150308/2df70491/attachment.htm From lewis at mail.msen.com Sun Mar 8 00:14:35 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 00:14:38 2015 Subject: [squeak-dev] The Inbox: KernelTests-cbc.291.mcz In-Reply-To: References: <201503062352.t26NqAVs013195@shell.msen.com> <20150307010015.GB11334@shell.msen.com> Message-ID: <20150308001435.GA29830@shell.msen.com> On Fri, Mar 06, 2015 at 09:10:13PM -0800, Chris wrote: > > > On Mar 6, 2015, at 5:00 PM, David T. Lewis wrote: > > > >> On Fri, Mar 06, 2015 at 11:52:04PM +0000, commits@source.squeak.org wrote: > >> A new version of KernelTests was added to project The Inbox: > >> http://source.squeak.org/inbox/KernelTests-cbc.291.mcz > >> > >> ==================== Summary ==================== > >> > >> Name: KernelTests-cbc.291 > >> Author: cbc > >> Time: 6 March 2015, 3:52:01.005 pm > >> UUID: 54afce93-39e9-4c4a-92a4-ecbe32540c69 > >> Ancestors: KernelTests-ul.290, KernelTests-cbc.278 > >> > >> Added DateAndTimeArithmeticTest - to test adding things to DateAndTime instances. This includes things like: DateAndTime now + 3 days. > > > > This would be a good time to check our tests. In my locale, the springtime > > daylight savings time change is going to happen this weekend. If I evaluate > > "DateAndTime now + 3 days" what is the expected result? > > It should be three days from now, same hour of the day I think. That was not part of the tests, though. Something to add. > > This change is part of a set ( including new kernel and be collection packages ). Adding days though was not changed. > Hi Chris, My comment was not meant as a criticism of your changes, it is more a general observation about our murky definitions of time in Squeak. If "3 days" means a duration of 259200 seconds, and if the time in my (Detroit) time zone right now is 2015-03-07T18:00:00-05:00 (6:00 pm), then the DateAndTime that I should see three days from now is 2015-03-10T19:00:00-04:00 (7:00 pm, 259200 seconds from now). On the other hand, if "3 days" means three calendar days (as I think that you are expecting it to mean), then the DateAndTime three days from now would be 2015-03-10T18:00:00-04:00 (still 6:00 pm on the wall clock, but actually an hour earlier in terms of elapsed time). These are two different points in time, separated by 3600 seconds of actual duration. So conceptually, we need to agree if "3 days" is a duration, or if it is a count of days on the calendar. The current implementation of "3 days" in Squeak implies that we mean it to be a duration (259200 seconds). If that is the case, then thinking of "3 days" as an count of calendar days is not the same thing at all, and the question "what DateAndTime will it be be 3 days from now" is ambiguous when a daylight savings transition is involved. The daylight savings time transition illustrates the problem nicely, but IMO the real issue is lack of clear definitions of what we mean by words like "day" and "month" and "year". In everyday spoken language, it is OK for those words to have different meanings in different contexts. But even Squeak is not smart enough to resolve those ambiguities without a little help from us :) Dave From cunningham.cb at gmail.com Sun Mar 8 00:56:52 2015 From: cunningham.cb at gmail.com (Chris) Date: Sun Mar 8 00:56:58 2015 Subject: [squeak-dev] The Inbox: KernelTests-cbc.291.mcz In-Reply-To: <20150308001435.GA29830@shell.msen.com> References: <201503062352.t26NqAVs013195@shell.msen.com> <20150307010015.GB11334@shell.msen.com> <20150308001435.GA29830@shell.msen.com> Message-ID: <70778EF3-D7E6-48B6-BC1B-64D9FA33B0A3@gmail.com> Hi Dave. No offense taken (in either chain). I think I've made my position clear - calendar based intervals. Otherwise 1 year would be 365 days (or worse 365.25 days). So 2 days from now is actually only 47 hours off not 48. If you want 3 intervals of 24 hours I'd propose using 3 * 24 hours instead. Yes my answer doesn't solve every thing. But it is useful in certain areas - common areas. It does need better documentation though. -cbc Sent from my iPhone > On Mar 7, 2015, at 4:14 PM, David T. Lewis wrote: > >> On Fri, Mar 06, 2015 at 09:10:13PM -0800, Chris wrote: >> >>>> On Mar 6, 2015, at 5:00 PM, David T. Lewis wrote: >>>> >>>> On Fri, Mar 06, 2015 at 11:52:04PM +0000, commits@source.squeak.org wrote: >>>> A new version of KernelTests was added to project The Inbox: >>>> http://source.squeak.org/inbox/KernelTests-cbc.291.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: KernelTests-cbc.291 >>>> Author: cbc >>>> Time: 6 March 2015, 3:52:01.005 pm >>>> UUID: 54afce93-39e9-4c4a-92a4-ecbe32540c69 >>>> Ancestors: KernelTests-ul.290, KernelTests-cbc.278 >>>> >>>> Added DateAndTimeArithmeticTest - to test adding things to DateAndTime instances. This includes things like: DateAndTime now + 3 days. >>> >>> This would be a good time to check our tests. In my locale, the springtime >>> daylight savings time change is going to happen this weekend. If I evaluate >>> "DateAndTime now + 3 days" what is the expected result? >> >> It should be three days from now, same hour of the day I think. That was not part of the tests, though. Something to add. >> >> This change is part of a set ( including new kernel and be collection packages ). Adding days though was not changed. >> > > Hi Chris, > > My comment was not meant as a criticism of your changes, it is more a > general observation about our murky definitions of time in Squeak. > > If "3 days" means a duration of 259200 seconds, and if the time in my > (Detroit) time zone right now is 2015-03-07T18:00:00-05:00 (6:00 pm), > then the DateAndTime that I should see three days from now is > 2015-03-10T19:00:00-04:00 (7:00 pm, 259200 seconds from now). > > On the other hand, if "3 days" means three calendar days (as I think that > you are expecting it to mean), then the DateAndTime three days from now > would be 2015-03-10T18:00:00-04:00 (still 6:00 pm on the wall clock, but > actually an hour earlier in terms of elapsed time). > > These are two different points in time, separated by 3600 seconds of > actual duration. > > So conceptually, we need to agree if "3 days" is a duration, or if it is > a count of days on the calendar. The current implementation of "3 days" > in Squeak implies that we mean it to be a duration (259200 seconds). If > that is the case, then thinking of "3 days" as an count of calendar days > is not the same thing at all, and the question "what DateAndTime will it > be be 3 days from now" is ambiguous when a daylight savings transition > is involved. > > The daylight savings time transition illustrates the problem nicely, but > IMO the real issue is lack of clear definitions of what we mean by words > like "day" and "month" and "year". In everyday spoken language, it is OK > for those words to have different meanings in different contexts. But > even Squeak is not smart enough to resolve those ambiguities without a > little help from us :) > > Dave > > From leves at elte.hu Sun Mar 8 03:18:24 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 8 03:18:29 2015 Subject: [squeak-dev] Squeak 4.6 release update In-Reply-To: <20150307200010.GA93412@shell.msen.com> References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> Message-ID: On Sat, 7 Mar 2015, David T. Lewis wrote: > On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: >> Hey, >> On 07.03.2015, at 19:01, gettimothy wrote: >> >>> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: >> >> to which fix do you refer? >> There is a hack out there calling flush every now and then, >> but this all calls for a principled solution for streams that >> read _and_ write. > > You are right that it is a hack, but the actual problem is a defect > in some C runtime libraries, notably on Ubuntu but possibly others > as well. Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush behavior? https://en.wikipedia.org/wiki/Allocate-on-flush Levente > > What we really need is a unit test that captures the bug. I was not able > to come up with one myself, but it would be quite helpful if someone > could do it. > > In addition to the error saving comments, I also have a large number > of failures in my OSProcess and CommandShell tests when running on > my Ubuntu laptop with the buggy C runtime. I cannot prove it, but I > am fairly sure it is the same underlying Ubuntu bug causing these > problems. > > Dave > > >> >> best >> -Tobias >> >> >>> >>> ---- On Fri, 06 Mar 2015 15:23:00 -0500 Chris Muller wrote ---- >>> Besides welcoming Marcel to the board yesterday, we discussed that >>> we'd like to push for the 4.6 / 5.0 release by April 30th. Somehow my >>> name was the only one to be found on the volunteer list as release >>> manager, but Eliot voiced his willingness to assist, but will be >>> relying on others to chip in as well. >>> >>> So, I've just updated the Squeak 4.5-13686 image from trunk (lo and >>> behold, it worked without a hitch!) to produce a Squeak4.6-14191.zip >>> which is now available at ftp.squeak.org/4.6alpha/. >>> >>>> From this snapshot forward, lets start thinking about the 4.6 release >>> and all that we want to be in it. If you have any low-level changes >>> to the image that would benefit from as much testing as possible, now >>> is the time to get those finalized and committed into the trunk. >>> Controversial changes should start in the Inbox as always, we still >>> have time for one or two more arguments. :) >>> >>> In a few weeks, we'll want to start being more conservative with our >>> changes; only things like tools and cosmetics -- and we'll hammer out >>> the look and UX. >>> >>> 4.6 is a dual release also as 5.0. We'll be releasing two VM's and >>> two images; one each for the Cog and Spur formats. The content of the >>> images will be equivalent. >> >> > > From mbaehr at email.archlab.tuwien.ac.at Sun Mar 8 03:38:33 2015 From: mbaehr at email.archlab.tuwien.ac.at (=?utf-8?q?Martin_B=C3=A4hr?=) Date: Sun Mar 8 03:38:39 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: References: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> <7C730CCB-7AFF-4F0F-B1CC-EFA5540A4B76@gmx.de> Message-ID: <1425783109-sup-5979@email.archlab.tuwien.ac.at> Excerpts from Ben Coman's message of 2015-03-08 01:06:06 +0100: > Now I'm not very involved with > Squeak, but just because I like creative brainstorming... continuing with > the bicycle theme how about "Rover" after the "Rover Safety - the first > model to adopt what we think of as the standard bicycle design...[1]" and while the squeak-devs discuss the bike, others like me can discuss the color of the bikeshed ;-) greetings, martin. ps: this is not a stab at bens suggestion, just that since it involves bikes i could not resist the pun! apologies to everyone for the off-topic message. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org secretary beijinglug.org mentor fossasia.org foresight developer foresightlinux.org realss.com unix sysadmin Martin B?hr working in china http://societyserver.org/mbaehr/ From casey.obrien.r at gmail.com Sun Mar 8 03:48:22 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Sun Mar 8 03:48:28 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: References: Message-ID: <61B4D402-230B-44A9-B662-471CDB189410@gmail.com> My idea was Ratio, when I looked at the subject. Since gear ratios are a thing, and we do fractions well, I thought it might be cute. Then I read down to Gear Box. That made me think of Music Box, too. Anyway I think Gear Box is pretty good. Ratio is more optimal, however, by a number of bytes;) --C > On Mar 6, 2015, at 12:24 PM, Chris Muller wrote: > > "From Cog to Spur" -- we need a snappy codename that makes sense for > this release. I thought about "Cowboy" for a few seconds, but that's > way too awful for marketing.. :) Someone help please. > From edgardec2005 at gmail.com Sun Mar 8 09:46:58 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Sun Mar 8 09:47:07 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: <61B4D402-230B-44A9-B662-471CDB189410@gmail.com> Message-ID: On 3/8/15, 12:48 AM, "Casey Ransberger" wrote: > My idea was Ratio, when I looked at the subject. Since gear ratios are a > thing, and we do fractions well, I thought it might be cute. > > Then I read down to Gear Box. That made me think of Music Box, too. Anyway I > think Gear Box is pretty good. Ratio is more optimal, however, by a number of > bytes;) > > --C > >> On Mar 6, 2015, at 12:24 PM, Chris Muller wrote: >> >> "From Cog to Spur" -- we need a snappy codename that makes sense for >> this release. I thought about "Cowboy" for a few seconds, but that's >> way too awful for marketing.. :) Someone help please. >> > Ratio seems a good name.. ? the relative value of silver and gold in a bimetallic system of currency. ORIGIN mid 17th cent.: from Latin, literally ?reckoning,? from rat- ?reckoned,? from the verb reri . Edgar From Das.Linux at gmx.de Sun Mar 8 10:44:18 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 8 10:44:27 2015 Subject: [squeak-dev] Squeak 4.6 release update In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> Message-ID: <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> Hi, On 08.03.2015, at 04:18, Levente Uzonyi wrote: > On Sat, 7 Mar 2015, David T. Lewis wrote: > >> On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: >>> Hey, >>> On 07.03.2015, at 19:01, gettimothy wrote: >>> >>>> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: >>> >>> to which fix do you refer? >>> There is a hack out there calling flush every now and then, >>> but this all calls for a principled solution for streams that >>> read _and_ write. >> >> You are right that it is a hack, but the actual problem is a defect >> in some C runtime libraries, notably on Ubuntu but possibly others >> as well. > > Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush behavior?https://en.wikipedia.org/wiki/Allocate-on-flush I too doubt an OS bug. Someone (i don't remember) said to me, that the behavior of the c calls make clear not to rely on certain thing. I plan to investigate the issue soonish. best -tobias From lewis at mail.msen.com Sun Mar 8 15:29:18 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 15:29:20 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> Message-ID: <20150308152918.GA76625@shell.msen.com> On Sun, Mar 08, 2015 at 11:44:18AM +0100, Tobias Pape wrote: > Hi, > > On 08.03.2015, at 04:18, Levente Uzonyi wrote: > > > On Sat, 7 Mar 2015, David T. Lewis wrote: > > > >> On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: > >>> Hey, > >>> On 07.03.2015, at 19:01, gettimothy wrote: > >>> > >>>> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: > >>> > >>> to which fix do you refer? > >>> There is a hack out there calling flush every now and then, > >>> but this all calls for a principled solution for streams that > >>> read _and_ write. > >> > >> You are right that it is a hack, but the actual problem is a defect > >> in some C runtime libraries, notably on Ubuntu but possibly others > >> as well. > > > > Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush behavior?https://en.wikipedia.org/wiki/Allocate-on-flush No, I am not sure. I had convinced myself that it was a libc issue, but I may be wrong. > > I too doubt an OS bug. > Someone (i don't remember) said to me, that the behavior of the c calls > make clear not to rely on certain thing. > I plan to investigate the issue soonish. > > best > -tobias That would be great. The workaround that "fixes" the comment problem is in WriteStream>>nextChunkPut:, so if you remove the #flush at the end of this method, the problem can be reproduced. At the time, I was not able to come up with a unit test that would reproduce the problem, but my best guess as to what was happening is in the update comment: Name: Collections-dtl.568 Author: dtl Time: 5 May 2014, 12:39:30.026 pm Add a flush to WriteStream>>nextChunkPut: This is a workaround for a bug in the runtime library of some versions of Ubuntu. The symptom is that creation of a class comment for a class that previously had no comment leads to a file size error in the new RemoteStream that points to the class comment. Actual file size and contents of the changes file are not affected by this bug, and the error occurs when reading contents of the changes file immediately following the initial save, Flushing the stream after writing a chunk to the changes file prevents the problem. Dave From lewis at mail.msen.com Sun Mar 8 15:59:24 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 15:59:27 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: <20150308152918.GA76625@shell.msen.com> References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> Message-ID: <20150308155924.GA80978@shell.msen.com> On Sun, Mar 08, 2015 at 11:29:18AM -0400, David T. Lewis wrote: > On Sun, Mar 08, 2015 at 11:44:18AM +0100, Tobias Pape wrote: > > Hi, > > > > On 08.03.2015, at 04:18, Levente Uzonyi wrote: > > > > > On Sat, 7 Mar 2015, David T. Lewis wrote: > > > > > >> On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: > > >>> Hey, > > >>> On 07.03.2015, at 19:01, gettimothy wrote: > > >>> > > >>>> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: > > >>> > > >>> to which fix do you refer? > > >>> There is a hack out there calling flush every now and then, > > >>> but this all calls for a principled solution for streams that > > >>> read _and_ write. > > >> > > >> You are right that it is a hack, but the actual problem is a defect > > >> in some C runtime libraries, notably on Ubuntu but possibly others > > >> as well. > > > > > > Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush behavior?https://en.wikipedia.org/wiki/Allocate-on-flush > > No, I am not sure. I had convinced myself that it was a libc issue, but I may be wrong. > To check this, I tried running an image from a thumb drive with vfat file system, which presumably does not have the allocate-on-flush feature. The bug is still present (confirmed by reverting WriteStream>>nextChunkPut: to the earlier version). So the problem does not appear to be associated with the file system. Dave > > > > I too doubt an OS bug. > > Someone (i don't remember) said to me, that the behavior of the c calls > > make clear not to rely on certain thing. > > I plan to investigate the issue soonish. > > > > best > > -tobias > > That would be great. > > The workaround that "fixes" the comment problem is in WriteStream>>nextChunkPut:, > so if you remove the #flush at the end of this method, the problem can be > reproduced. At the time, I was not able to come up with a unit test that would > reproduce the problem, but my best guess as to what was happening is in the > update comment: > > > Name: Collections-dtl.568 > Author: dtl > Time: 5 May 2014, 12:39:30.026 pm > > Add a flush to WriteStream>>nextChunkPut: > > This is a workaround for a bug in the runtime library of some versions of > Ubuntu. The symptom is that creation of a class comment for a class that > previously had no comment leads to a file size error in the new RemoteStream > that points to the class comment. Actual file size and contents of the > changes file are not affected by this bug, and the error occurs when reading > contents of the changes file immediately following the initial save, Flushing > the stream after writing a chunk to the changes file prevents the problem. > > Dave > From eliot.miranda at gmail.com Sun Mar 8 16:50:41 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun Mar 8 16:50:46 2015 Subject: [squeak-dev] 4.6 -- codename In-Reply-To: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> References: <14bf5575d72.bfb07ad3155104.498819624427812074@zoho.com> Message-ID: On Mar 7, 2015, at 9:45 AM, gettimothy wrote: > I think the codename should honor Eliot in some manner. How about naming it "Eliot" ? -1 ;) A pun on Spur that implies the inflection and splitting of 4.6 from 5 in the move to the Spur object representation would be "Saddle". > ---- On Fri, 06 Mar 2015 15:24:39 -0500 Chris Muller wrote ---- > "From Cog to Spur" -- we need a snappy codename that makes sense for > this release. I thought about "Cowboy" for a few seconds, but that's > way too awful for marketing.. :) Someone help please. > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150308/9041e100/attachment.htm From asqueaker at gmail.com Sun Mar 8 18:06:39 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 8 18:06:42 2015 Subject: [squeak-dev] The Inbox: Collections-cbc.604.mcz In-Reply-To: <54fa3bf3.d5ed8c0a.5916.595cSMTPIN_ADDED_MISSING@mx.google.com> References: <54fa3bf3.d5ed8c0a.5916.595cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: String casting is typically used to get data into a system, wouldn't it be better for that interface to do the String casting than adding methods to String? On Fri, Mar 6, 2015 at 5:44 PM, wrote: > A new version of Collections was added to project The Inbox: > http://source.squeak.org/inbox/Collections-cbc.604.mcz > > ==================== Summary ==================== > > Name: Collections-cbc.604 > Author: cbc > Time: 6 March 2015, 3:44:37.262 pm > UUID: 0513e699-e650-2340-8505-70e368dd9c64 > Ancestors: Collections-eem.603, Collections-cbc.582 > > Changes to support adding and subtracting strings from DateAndTimes. Supports syntax such as: > DateAndTime now + '02:00:00:00' > and > DateAndTime now - '02:00:00:00' > > =============== Diff against Collections-eem.603 =============== > > Item was added: > + ----- Method: String>>addToDateTime: (in category 'arithmetic') ----- > + addToDateTime: aDateAndTime > + "Utilized when adjusting DateAndTimes. Such as: > + DateAndTime now + '02: 00:00:00' > + Not expected to be used outside of that system." > + ^self asDuration addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: String>>subtractFromDateTime: (in category 'arithmetic') ----- > + subtractFromDateTime: aDateAndTime > + "Utilized when adjusting DateAndTimes. Such as: > + DateAndTime now - '02: 00:00:00' > + Not expected to be used outside of that system." > + ^self asDuration subtractFromDateTime: aDateAndTime > + ! > > From asqueaker at gmail.com Sun Mar 8 18:11:49 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 8 18:11:51 2015 Subject: [squeak-dev] The Inbox: Kernel-cbc.910.mcz In-Reply-To: <54fa3cfc.832a370a.4d63.ffffacfdSMTPIN_ADDED_MISSING@mx.google.com> References: <54fa3cfc.832a370a.4d63.ffffacfdSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I see there is also still the #class testing. This will actually cause any system that uses Proxy's (e.g., Magma) to no longer work reliably with Chronology unless we change those to use new unique messages. This type of change might be a good thing to have more time to test all through a release cycle. On Fri, Mar 6, 2015 at 5:49 PM, wrote: > A new version of Kernel was added to project The Inbox: > http://source.squeak.org/inbox/Kernel-cbc.910.mcz > > ==================== Summary ==================== > > Name: Kernel-cbc.910 > Author: cbc > Time: 6 March 2015, 3:48:56.226 pm > UUID: 6af9b576-3666-7444-ad16-9b84461a4dd0 > Ancestors: Kernel-mt.909, Kernel-cbc.872 > > Changes to support adding months and years to a DateAndTime, such as: > DateAndTime now + 2 months > and > DateAndTimeNow - 5 years > > This requires retro-fitting the + and - in DateAndTime to a double dispatch system, and requires changes in Collections as well (to support + and - with String representations). > > Added support for chaining durations (such as 1 month + 1 day). > > =============== Diff against Kernel-mt.909 =============== > > Item was changed: > ----- Method: DateAndTime>>+ (in category 'ansi protocol') ----- > + + aDuration > + "aDuration is one of: Duration, GenericDuration, GenericMonth, or GenericYear." > + ^aDuration addToDateTime: self > - + operand > - "operand conforms to protocol Duration" > - > - | ticks | > - ticks := self ticks + (operand asDuration ticks) . > - > - ^ self class basicNew > - ticks: ticks > - offset: self offset; > - yourself > ! > > Item was changed: > ----- Method: DateAndTime>>- (in category 'ansi protocol') ----- > - operand > + "operand is one of: Duration, GenericDuration, GenericMonth, or GenericYear; or a DateAndTime or Timespan." > + ^operand subtractFromDateTime: self > - "operand conforms to protocol DateAndTime or protocol Duration" > - > - ^ (operand respondsTo: #asDateAndTime) > - ifTrue: > - [ | lticks rticks | > - lticks := self asLocal ticks. > - > - rticks := operand asDateAndTime asLocal ticks. > - Duration > - seconds: (SecondsInDay *(lticks first - rticks first)) + > - (lticks second - rticks second) > - nanoSeconds: (lticks third - rticks third) ] > - > - ifFalse: > - > - [ self + (operand negated) ] > ! > > Item was added: > + ----- Method: DateAndTime>>addToDateTime: (in category 'ansi protocol') ----- > + addToDateTime: aDateAndTime > + ^self asDuration addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: DateAndTime>>addToDuration: (in category 'ansi protocol') ----- > + addToDuration: aDuration > + ^Duration nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) > + ! > > Item was added: > + ----- Method: DateAndTime>>subtractFromDateTime: (in category 'ansi protocol') ----- > + subtractFromDateTime: aDateAndTime > + | lticks rticks | > + lticks := aDateAndTime asLocal ticks. > + rticks := self asLocal ticks. > + ^Duration > + seconds: (SecondsInDay * (lticks first - rticks first)) + > + (lticks second - rticks second) > + nanoSeconds: (lticks third - rticks third)! > > Item was added: > + ----- Method: DateAndTime>>subtractFromDuration: (in category 'ansi protocol') ----- > + subtractFromDuration: aDuration > + ^Duration nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds)! > > Item was changed: > ----- Method: Duration>>+ (in category 'ansi protocol') ----- > + operand > + "operand is a type of Duration" > + ^operand addToDuration: self > + ! > - > - "operand is a Duration" ^ self class nanoSeconds: (self asNanoSeconds + operand asNanoSeconds)! > > Item was changed: > ----- Method: Duration>>- (in category 'ansi protocol') ----- > - operand > + "operand is a type of Duration" > + ^operand subtractFromDuration: self > + ! > - "operand is a Duration" ^ self + operand negated! > > Item was added: > + ----- Method: Duration>>addToDateTime: (in category 'ansi protocol') ----- > + addToDateTime: aDateAndTime > + | ticks | > + ticks := self ticks + (aDateAndTime ticks) . > + ^ aDateAndTime class basicNew > + ticks: ticks > + offset: aDateAndTime offset; > + yourself > + ! > > Item was added: > + ----- Method: Duration>>addToDuration: (in category 'ansi protocol') ----- > + addToDuration: aDuration > + ^self class nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) > + ! > > Item was added: > + ----- Method: Duration>>subtractFromDateTime: (in category 'ansi protocol') ----- > + subtractFromDateTime: aDateAndTime > + ^self copy negated addToDateTime: aDateAndTime! > > Item was added: > + ----- Method: Duration>>subtractFromDuration: (in category 'ansi protocol') ----- > + subtractFromDuration: aDuration > + ^self class nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds) > + ! > > Item was added: > + Object subclass: #GenericDuration > + instanceVariableNames: 'sequence' > + classVariableNames: '' > + poolDictionaries: '' > + category: 'Kernel-Chronology'! > + > + !GenericDuration commentStamp: 'cbc 9/21/2014 22:07' prior: 0! > + The GenericDuration class exists to support simple DateAndTime arithmetic (also including Timespan, such as Date). This class supports chains of different duration arthmetic with each other, such as: > + 1 year + 2 months + 3 days + 4 hours + 5 minuts + 6 seconds + 7 nanoSeconds > + Instances of GenericDuration should be created by adding (or subtracting)2 or more durations with each other, including other instances of GenericDuration. > + > + You cannot ask a GenericDuration how long it is. This is a nonsensical question if a year or month is involved, as those are only resolvable once it is place into relationship to an actual date. > + > + GenericDuration are associate, but not commutative. That is > + 1 month + 31 days ~= 31 days + 1 month > + but > + ((1 month + 1 year) + 31 days) = (1 month + (1 year + 31 days)) > + ! > > Item was added: > + ----- Method: GenericDuration>>+ (in category 'ansii protocol') ----- > + + aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + aDuration class = self class > + ifTrue: [sequence addAllLast: aDuration sequence] > + ifFalse: [sequence addLast: aDuration copy] > + ! > > Item was added: > + ----- Method: GenericDuration>>- (in category 'ansii protocol') ----- > + - aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + aDuration class = self class > + ifTrue: [sequence addAllLast: (aDuration sequence collect: [:s| s copy negated])] > + ifFalse: [sequence addLast: aDuration copy negated]! > > Item was added: > + ----- Method: GenericDuration>>= (in category 'ansii protocol') ----- > + = aGenericDuration > + ^aGenericDuration hasSameSequence: sequence! > > Item was added: > + ----- Method: GenericDuration>>addToDateTime: (in category 'ansii protocol') ----- > + addToDateTime: aDateAndTime > + ^sequence inject: aDateAndTime into: [:result :duration | result + duration ]! > > Item was added: > + ----- Method: GenericDuration>>addToDuration: (in category 'ansii protocol') ----- > + addToDuration: aDuration > + sequence addFirst: aDuration copy! > > Item was added: > + ----- Method: GenericDuration>>hasSameSequence: (in category 'ansii protocol') ----- > + hasSameSequence: testSequence > + ^sequence hasEqualElements: testSequence! > > Item was added: > + ----- Method: GenericDuration>>hash (in category 'ansii protocol') ----- > + hash > + ^(sequence collect: #hash) sum hash! > > Item was added: > + ----- Method: GenericDuration>>initialize (in category 'initialize-release') ----- > + initialize > + sequence := OrderedCollection new.! > > Item was added: > + ----- Method: GenericDuration>>printOn: (in category 'squeak protocol') ----- > + printOn: stream > + sequence do: [:msg| msg printOn: stream] separatedBy: [stream nextPutAll: ' + ']! > > Item was added: > + ----- Method: GenericDuration>>sequence (in category 'accessing') ----- > + sequence > + > + ^ sequence! > > Item was added: > + ----- Method: GenericDuration>>subtractFromDateTime: (in category 'ansii protocol') ----- > + subtractFromDateTime: aDateAndTime > + ^sequence inject: aDateAndTime into: [:result :duration | result + duration copy negated ]! > > Item was added: > + ----- Method: GenericDuration>>subtractFromDuration: (in category 'ansii protocol') ----- > + subtractFromDuration: aDuration > + sequence addFirst: aDuration copy negated! > > Item was added: > + Object subclass: #GenericMonth > + instanceVariableNames: 'number' > + classVariableNames: '' > + poolDictionaries: '' > + category: 'Kernel-Chronology'! > + > + !GenericMonth commentStamp: 'cbc 9/21/2014 22:01' prior: 0! > + The GenericMonth class exists to support simple DateAndTime arithmetic with months (also including Timespan, such as Date). This class is the mechanism behind: > + DateAndTime now + 3 months > + Instances of this class should be created by sending #month or #months to an integer (other types of number result in unspecified results). > + (note that sending #month to any number will result in either exactly 1 month or -1 month, ignoring the actual number you send it too.) > + > + Thse are the rules about what a 'month' is: > + 1: If you add a month, you want the result to be in the next calendar month, never the following one. > + 2: If you add a month, you want the same day of the month if possible, and if not (becaue the next month has less days), then the closest that you can get to it. > + 4: If you add more than 1 month, you want to end up in the right calendar month that you would expect, and as close to the starting day of the month as you can. > + 3: If you subtract a month, you want it in the previous calendar month, and as close to the starting day of the month as you can get. > + > + So, adding 1 month to August 31 would give September 30th; adding 2 months to August 31 would give October 31st. And adding 1 month to September 30th would give October 30th. > + > + > + ! > > Item was added: > + ----- Method: GenericMonth class>>months: (in category 'as yet unclassified') ----- > + months: aNumber > + ^self new number: aNumber! > > Item was added: > + ----- Method: GenericMonth>>+ (in category 'ansiProtocol') ----- > + + aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + ^GenericDuration new + self + aDuration! > > Item was added: > + ----- Method: GenericMonth>>- (in category 'ansiProtocol') ----- > + - aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + ^GenericDuration new + self - aDuration! > > Item was added: > + ----- Method: GenericMonth>>= (in category 'ansiProtocol') ----- > + = aGenericMonth > + ^aGenericMonth class = GenericMonth > + and: [aGenericMonth number = number]! > > Item was added: > + ----- Method: GenericMonth>>addNegativeToDateTime: (in category 'ansiProtocol') ----- > + addNegativeToDateTime: aDateAndTime > + | next | > + next := (1 to: number abs) inject: aDateAndTime into: [:end :mnth| > + end - end dayOfMonth days. > + ]. > + ^next - (next dayOfMonth - aDateAndTime dayOfMonth max: 0) days! > > Item was added: > + ----- Method: GenericMonth>>addToDateTime: (in category 'ansiProtocol') ----- > + addToDateTime: aDateAndTime > + | next | > + number < 0 ifTrue: [^self addNegativeToDateTime: aDateAndTime]. > + next := (1 to: number) inject: aDateAndTime into: [:end :mnth| > + next := end + end daysInMonth days. > + next dayOfMonth < end dayOfMonth > + ifTrue: [next := next - next dayOfMonth days]. > + next > + ]. > + ^next + ((next daysInMonth min: aDateAndTime dayOfMonth) - next dayOfMonth) days! > > Item was added: > + ----- Method: GenericMonth>>addToDuration: (in category 'ansiProtocol') ----- > + addToDuration: aDuration > + ^GenericDuration new + aDuration + self > + ! > > Item was added: > + ----- Method: GenericMonth>>hash (in category 'ansiProtocol') ----- > + hash > + ^number hash! > > Item was added: > + ----- Method: GenericMonth>>negated (in category 'accessing') ----- > + negated > + number := number negated! > > Item was added: > + ----- Method: GenericMonth>>number (in category 'accessing') ----- > + number > + > + ^ number! > > Item was added: > + ----- Method: GenericMonth>>number: (in category 'accessing') ----- > + number: anObject > + > + number := anObject! > > Item was added: > + ----- Method: GenericMonth>>printOn: (in category 'squeak protocol') ----- > + printOn: stream > + stream nextPutAll: number asString; nextPutAll: ' month'. > + number abs = 1 ifFalse: [stream nextPut: $s].! > > Item was added: > + ----- Method: GenericMonth>>subtractFromDateTime: (in category 'ansiProtocol') ----- > + subtractFromDateTime: aDateAndTime > + ^self copy negated addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: GenericMonth>>subtractFromDuration: (in category 'ansiProtocol') ----- > + subtractFromDuration: aDuration > + ^GenericDuration new + aDuration - self! > > Item was added: > + Object subclass: #GenericYear > + instanceVariableNames: 'number' > + classVariableNames: '' > + poolDictionaries: '' > + category: 'Kernel-Chronology'! > + > + !GenericYear commentStamp: 'cbc 9/21/2014 22:00' prior: 0! > + The GenericYear class exists to support simple DateAndTime arithmetic with years (also including Timespan, such as Date). This class is the mechanism behind: > + DateAndTime now + 3 years > + Instances of this class should be created by sending #year or #years to an integer (other types of number result in unspecified results). > + (note that sending #year to any number will result in either exactly 1 year or -1 year, ignoring the actual number you send it too.) > + > + Thse are the rules about what a 'year' is: > + 1: If you add a year, you want the result to be in the next year, never the following one; it needs to end up in the same month as the starting month; and it needs to be the same day of the month if possible as the starting date, and if not (becaue the next years month has less days such as leap year to non-leap year), then the closest that you can get to it. > + 4: If you add more than 1 year, you want to end up in the right year, same calendar month that you would expect, and as close to the starting day of the month as you can. > + 3: If you subtract a year, you want it in the previous year and same calendar month, and as close to the starting day of the month as you can get.! > > Item was added: > + ----- Method: GenericYear class>>years: (in category 'as yet unclassified') ----- > + years: aNumber > + ^self new number: aNumber! > > Item was added: > + ----- Method: GenericYear>>+ (in category 'ansiProtocol') ----- > + + aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + ^GenericDuration new + self + aDuration! > > Item was added: > + ----- Method: GenericYear>>- (in category 'ansiProtocol') ----- > + - aDuration > + "aDuration is one of the families of Duration. Not that if it isn't, it will fail, but only when addng to a DateAndTime or Timespan, not before!!" > + ^GenericDuration new + self - aDuration! > > Item was added: > + ----- Method: GenericYear>>= (in category 'ansiProtocol') ----- > + = aGenericYear > + ^aGenericYear class = GenericYear > + and: [aGenericYear number = number]! > > Item was added: > + ----- Method: GenericYear>>addNegativeToDateTime: (in category 'ansiProtocol') ----- > + addNegativeToDateTime: aDateAndTime > + | next | > + next := (1 to: number abs) inject: aDateAndTime into: [:end :mnth| > + end - end dayOfYear days. > + ]. > + next := next - (next month - aDateAndTime month) months. > + ^next - (next dayOfMonth - aDateAndTime dayOfMonth max: 0) days! > > Item was added: > + ----- Method: GenericYear>>addToDateTime: (in category 'ansiProtocol') ----- > + addToDateTime: aDateAndTime > + | next | > + number < 0 ifTrue: [^self addNegativeToDateTime: aDateAndTime]. > + ^(1 to: number) inject: aDateAndTime into: [:end :mnth| > + next := end + ((end isLeapYear and: [end month > 2]) > + ifTrue: [end daysInYear - 1] "We've already factored in the extra leap year" > + ifFalse: [end daysInYear] "either not a leap year, or we need the extra day" > + ) days. > + "if we are now in a leap year, we may need to already factor in the extra day" > + (next month > 2 and: [next isLeapYear and: [end dayOfMonth ~= next dayOfMonth]]) ifTrue: [next := next + 1 days]. > + "If we have leaped out of a leap year, and we were on Feb 29th, we need to back up to Feb 28th" > + next month > end month ifTrue: [next := next - next dayOfMonth days]. > + "If we have leeped out of a leap year, and we were on Mar 1st, we need to increment by 1 to get back where we should be" > + next month < end month ifTrue: [next := next + 1 day]. > + next > + ]. > + ! > > Item was added: > + ----- Method: GenericYear>>addToDuration: (in category 'ansiProtocol') ----- > + addToDuration: aDuration > + ^GenericDuration new + aDuration + self > + ! > > Item was added: > + ----- Method: GenericYear>>hash (in category 'ansiProtocol') ----- > + hash > + ^number hash! > > Item was added: > + ----- Method: GenericYear>>negated (in category 'accessing') ----- > + negated > + number := number negated! > > Item was added: > + ----- Method: GenericYear>>number (in category 'accessing') ----- > + number > + > + ^ number! > > Item was added: > + ----- Method: GenericYear>>number: (in category 'accessing') ----- > + number: anObject > + > + number := anObject! > > Item was added: > + ----- Method: GenericYear>>printOn: (in category 'squeak protocol') ----- > + printOn: stream > + stream nextPutAll: number asString; nextPutAll: ' year'. > + number abs = 1 ifFalse: [stream nextPut: $s].! > > Item was added: > + ----- Method: GenericYear>>subtractFromDateTime: (in category 'ansiProtocol') ----- > + subtractFromDateTime: aDateAndTime > + ^self copy negated addToDateTime: aDateAndTime! > > Item was added: > + ----- Method: GenericYear>>subtractFromDuration: (in category 'ansiProtocol') ----- > + subtractFromDuration: aDuration > + ^GenericDuration new + aDuration - self! > > Item was changed: > ----- Method: Month>>previous (in category 'squeak protocol') ----- > previous > > > + ^ self class starting: (self start - 1 month)! > - ^ self class starting: (self start - 1)! > > Item was added: > + ----- Method: Number>>addToDateTime: (in category 'arithmetic') ----- > + addToDateTime: aDateAndTime > + "Utilized when adjusting DateAndTimes. Such as: > + DateAndTime now + 2 > + Not expected to be used outside of that system. > + Note, also, that this keeps the long-standing tradition that we are adding nanoseconds to the DateAndTime." > + ^self asDuration addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: Number>>month (in category 'converting') ----- > + month > + > + ^ self sign months! > > Item was added: > + ----- Method: Number>>months (in category 'converting') ----- > + months > + > + ^ GenericMonth months: self! > > Item was added: > + ----- Method: Number>>subtractFromDateTime: (in category 'arithmetic') ----- > + subtractFromDateTime: aDateAndTime > + "Utilized when adjusting DateAndTimes. Such as: > + DateAndTime now - 2 > + Not expected to be used outside of that system. > + Note, also, that this keeps the long-standing tradition that we are subtracting nanoseconds to the DateAndTime." > + ^self asDuration subtractFromDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: Number>>year (in category 'converting') ----- > + year > + > + ^ self sign years! > > Item was added: > + ----- Method: Number>>years (in category 'converting') ----- > + years > + > + ^ GenericYear years: self! > > Item was added: > + ----- Method: Time>>addToDateTime: (in category 'squeak protocol') ----- > + addToDateTime: aDateAndTime > + ^self asDuration addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: Time>>addToDuration: (in category 'ansi protocol') ----- > + addToDuration: aDuration > + ^Duration nanoSeconds: (self asNanoSeconds + aDuration asNanoSeconds) > + ! > > Item was added: > + ----- Method: Time>>subtractFromDateTime: (in category 'squeak protocol') ----- > + subtractFromDateTime: aDateAndTime > + ^self asDuration subtractFromDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: Time>>subtractFromDuration: (in category 'ansi protocol') ----- > + subtractFromDuration: aDuration > + ^Duration nanoSeconds: (aDuration asNanoSeconds - self asNanoSeconds)! > > Item was changed: > ----- Method: Timespan>>+ (in category 'ansi protocol') ----- > + + aDuration > + "aDuration is one of: Duration, GenericDuration, GenericMonth, or GenericYear." > + ^self class starting: (aDuration addToDateTime: self start) duration: self duration > + ! > - + operand > - "operand conforms to protocol Duration" > - > - > - ^ self class starting: (self start + operand) duration: self duration! > > Item was changed: > ----- Method: Timespan>>- (in category 'ansi protocol') ----- > - operand > + | result | > + "operand is one of: Duration, GenericDuration, GenericMonth, or GenericYear; or a DateAndTime or Timespan." > + result := operand subtractFromDateTime: self start. > + ^result class = DateAndTime > + ifTrue: [ self class starting: result duration: self duration] > + ifFalse: [result] > - "operand conforms to protocol DateAndTime or protocol Duration" > - > - ^ (operand respondsTo: #asDateAndTime) > - > - ifTrue: [ self start - operand ] > - > - ifFalse: [ self + (operand negated) ] > ! > > Item was added: > + ----- Method: Timespan>>addToDateTime: (in category 'squeak protocol') ----- > + addToDateTime: aDateAndTime > + ^duration addToDateTime: aDateAndTime > + ! > > Item was added: > + ----- Method: Timespan>>subtractFromDateTime: (in category 'squeak protocol') ----- > + subtractFromDateTime: aDateAndTime > + ^start subtractFromDateTime: aDateAndTime! > > From asqueaker at gmail.com Sun Mar 8 18:16:11 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 8 18:16:14 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: References: Message-ID: On Fri, Mar 6, 2015 at 5:17 PM, Tobias Pape wrote: > Hey, > > using the current trunk (doest not happen in 4.5), I cannot use the > debugger in a useful way anymore. > Regardless of what I do in the editor view of the Debugger, after > a second or so, I tries to select the current expression (as if I had > clicked 'Where')[1] and scrolls to that place. This is especially annoying > when scrolling around long methods or trying to do a printIt or exploreIt > on other expressions? This issue definitely exists in 4.5 and yes, it is annoying. I believe if you can make the editor dirty (e.g., insert whitespace somewhere), that you'll be able to stop it so you can look at the method. > Any clue? I *think* this is related to a change Frank did a couple of years ago where it was desired to fix updating the method in the debugger, pressing Command+S [Accept] and having the new code be reflected rather than the old.. > Best > -Tobias > > > [1]: I also have the impresison that, when one uses 'toggle break on entry', that > the current expression is off-by-one with the actually current one. From leves at elte.hu Sun Mar 8 19:03:54 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 8 19:03:59 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: <20150308155924.GA80978@shell.msen.com> References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> Message-ID: I checked the code, and came to the conclusion that it's not an OS bug. The cause of the problem is that we're writing the file (the changes file in this case) using one file descriptor, and try to read its contents using other descriptors (the read-only copies of the source files). But the written bytes will only become visible to other file descriptors of the same file after calling the fflush() function (which is what does #flush do). Here are some snippets showing how it works: "This one should fail, because the bytes are not flushed." StandardFileStream newFileNamed: 'test.txt' do: [ :file | | readContents | file nextPutAll: 'test'. readContents := StandardFileStream readOnlyFileNamed: 'test.txt' do: [ :file2 | file2 contents ]. self assert: readContents = 'test' ]. "Sending #flush will make it work." StandardFileStream newFileNamed: 'test.txt' do: [ :file | | readContents | file nextPutAll: 'test'; flush. readContents := StandardFileStream readOnlyFileNamed: 'test.txt' do: [ :file2 | file2 contents ]. self assert: readContents = 'test' ]. "Reading from the same file descriptor always works." StandardFileStream newFileNamed: 'test.txt' do: [ :file | | readContents | file nextPutAll: 'test'. readContents := file reset; next: 4. self assert: readContents = 'test' ] The reason why the old code used to work, is because there was only one file descriptor used to read and write the changes file. #flush is pretty costly, and IMO it's called way too often if it's in #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. I changed the last lines of ClassDescription >> #classComment:stamp: in my image to self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. InMidstOfFileinNotification signal ifFalse: [file flush]. SystemChangeNotifier uniqueInstance classCommented: self. Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. Levente On Sun, 8 Mar 2015, David T. Lewis wrote: > On Sun, Mar 08, 2015 at 11:29:18AM -0400, David T. Lewis wrote: >> On Sun, Mar 08, 2015 at 11:44:18AM +0100, Tobias Pape wrote: >>> Hi, >>> >>> On 08.03.2015, at 04:18, Levente Uzonyi wrote: >>> >>>> On Sat, 7 Mar 2015, David T. Lewis wrote: >>>> >>>>> On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: >>>>>> Hey, >>>>>> On 07.03.2015, at 19:01, gettimothy wrote: >>>>>> >>>>>>> The image fixes the WriteStream>>NextChunkPut error we where getting when trying to modify comments which makes me happy (: >>>>>> >>>>>> to which fix do you refer? >>>>>> There is a hack out there calling flush every now and then, >>>>>> but this all calls for a principled solution for streams that >>>>>> read _and_ write. >>>>> >>>>> You are right that it is a hack, but the actual problem is a defect >>>>> in some C runtime libraries, notably on Ubuntu but possibly others >>>>> as well. >>>> >>>> Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush behavior?https://en.wikipedia.org/wiki/Allocate-on-flush >> >> No, I am not sure. I had convinced myself that it was a libc issue, but I may be wrong. >> > > To check this, I tried running an image from a thumb drive with vfat file > system, which presumably does not have the allocate-on-flush feature. The > bug is still present (confirmed by reverting WriteStream>>nextChunkPut: to > the earlier version). So the problem does not appear to be associated with > the file system. > > Dave > > > >>> >>> I too doubt an OS bug. >>> Someone (i don't remember) said to me, that the behavior of the c calls >>> make clear not to rely on certain thing. >>> I plan to investigate the issue soonish. >>> >>> best >>> -tobias >> >> That would be great. >> >> The workaround that "fixes" the comment problem is in WriteStream>>nextChunkPut:, >> so if you remove the #flush at the end of this method, the problem can be >> reproduced. At the time, I was not able to come up with a unit test that would >> reproduce the problem, but my best guess as to what was happening is in the >> update comment: >> >> >> Name: Collections-dtl.568 >> Author: dtl >> Time: 5 May 2014, 12:39:30.026 pm >> >> Add a flush to WriteStream>>nextChunkPut: >> >> This is a workaround for a bug in the runtime library of some versions of >> Ubuntu. The symptom is that creation of a class comment for a class that >> previously had no comment leads to a file size error in the new RemoteStream >> that points to the class comment. Actual file size and contents of the >> changes file are not affected by this bug, and the error occurs when reading >> contents of the changes file immediately following the initial save, Flushing >> the stream after writing a chunk to the changes file prevents the problem. >> >> Dave >> > > From commits at source.squeak.org Sun Mar 8 19:18:19 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 8 19:18:20 2015 Subject: [squeak-dev] The Inbox: Tests-dtl.312.mcz Message-ID: David T. Lewis uploaded a new version of Tests to project The Inbox: http://source.squeak.org/inbox/Tests-dtl.312.mcz ==================== Summary ==================== Name: Tests-dtl.312 Author: dtl Time: 8 March 2015, 2:18:09.639 pm UUID: fc56f2ba-15d2-4264-a9e6-6faf41650536 Ancestors: Tests-eem.311 FileStream>>testFileSizeWithSharedFileStreams illustrates a problem that is exhibited on some platforms (notably recent Ubuntu). =============== Diff against Tests-eem.311 =============== Item was added: + ----- Method: FileStreamTest>>testFileSizeWithSharedFileStreams (in category 'as yet unclassified') ----- + testFileSizeWithSharedFileStreams + "If two file streams are opened on the same file, then we expect the operating system + to report the file size correctly for either of the two file streams. Some platform runtime + libraries will not honor that convention unless data has been explicitly flushed. This test + will fail if the platform runtime requires an explicit flush. Recent Ubuntu systems are known + to exhibit this problem." + + | fileName fs1 fs2 | + fileName := 'TruncationTest.tmp'. + [ fs1 := FileStream fileNamed: fileName. + fs1 nextPutAll: '1234567890'. + self assert: 10 equals: fs1 size. + fs2 := FileStream readOnlyFileNamed: fileName. + self assert: 10 equals: fs2 size. + ] ensure: [ + fs1 close. + fs2 close. + FileDirectory default deleteFileNamed: fileName. + ]. + ! From lewis at mail.msen.com Sun Mar 8 19:36:25 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 19:36:28 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> Message-ID: <20150308193625.GA12757@shell.msen.com> On Sun, Mar 08, 2015 at 08:03:54PM +0100, Levente Uzonyi wrote: > I checked the code, and came to the conclusion that it's not an OS bug. > The cause of the problem is that we're writing the file (the changes file > in this case) using one file descriptor, and try to read its contents > using other descriptors (the read-only copies of the source files). > But the written bytes will only become visible to other file > descriptors of the same file after calling the fflush() function (which is > what does #flush do). You are right about what is happening, although I'm not sure if it is a bug in the clib, or if it is really just an invalid assumption on our part about how shared FILE streams should behave. I put a test in the inbox that shows the problem. It is very similar to your snippets below. The FilePlugin uses fseek() and ftell() to determine file size and position. Apparently, if the VM process has two FILE streams open on the same file descriptor, some C runtimes will handle the file position tracking differently than others. My Ubuntu runtime is different compared to that of my older SuSE system, or my Windows system. I was assuming that it was a bug, but maybe not. Your InMidstOfFileinNotification fix does look like a better way to handle the problem. Dave > > Here are some snippets showing how it works: > > "This one should fail, because the bytes are not flushed." > StandardFileStream newFileNamed: 'test.txt' do: [ :file | > | readContents | > file nextPutAll: 'test'. > readContents := StandardFileStream readOnlyFileNamed: 'test.txt' do: > [ :file2 | > file2 contents ]. > self assert: readContents = 'test' ]. > > "Sending #flush will make it work." > StandardFileStream newFileNamed: 'test.txt' do: [ :file | > | readContents | > file nextPutAll: 'test'; flush. > readContents := StandardFileStream readOnlyFileNamed: 'test.txt' do: > [ :file2 | > file2 contents ]. > self assert: readContents = 'test' ]. > > "Reading from the same file descriptor always works." > StandardFileStream newFileNamed: 'test.txt' do: [ :file | > | readContents | > file nextPutAll: 'test'. > readContents := file reset; next: 4. > self assert: readContents = 'test' ] > > The reason why the old code used to work, is because there was only one > file descriptor used to read and write the changes file. > > #flush is pretty costly, and IMO it's called way too often if it's in > #nextChunkPut:. The most common workaround to avoid frequent calls is to > use InMidstOfFileinNotification to check if it's a bulk write, and flush > only once in those cases. For some reason this technique is not used in > case of class comments. > I changed the last lines of ClassDescription >> #classComment:stamp: in my > image to > > self organization classComment: (RemoteString newString: aString > onFileNumber: 2) stamp: aStamp. > InMidstOfFileinNotification signal ifFalse: [file flush]. > SystemChangeNotifier uniqueInstance classCommented: self. > > Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems > to me that the problem is gone. > > Levente > > On Sun, 8 Mar 2015, David T. Lewis wrote: > > >On Sun, Mar 08, 2015 at 11:29:18AM -0400, David T. Lewis wrote: > >>On Sun, Mar 08, 2015 at 11:44:18AM +0100, Tobias Pape wrote: > >>>Hi, > >>> > >>>On 08.03.2015, at 04:18, Levente Uzonyi wrote: > >>> > >>>>On Sat, 7 Mar 2015, David T. Lewis wrote: > >>>> > >>>>>On Sat, Mar 07, 2015 at 08:28:55PM +0100, Tobias Pape wrote: > >>>>>>Hey, > >>>>>>On 07.03.2015, at 19:01, gettimothy wrote: > >>>>>> > >>>>>>>The image fixes the WriteStream>>NextChunkPut error we where getting > >>>>>>>when trying to modify comments which makes me happy (: > >>>>>> > >>>>>>to which fix do you refer? > >>>>>>There is a hack out there calling flush every now and then, > >>>>>>but this all calls for a principled solution for streams that > >>>>>>read _and_ write. > >>>>> > >>>>>You are right that it is a hack, but the actual problem is a defect > >>>>>in some C runtime libraries, notably on Ubuntu but possibly others > >>>>>as well. > >>>> > >>>>Are you sure it's a bug in the OS? Isn't it just the allocate-on-flush > >>>>behavior?https://en.wikipedia.org/wiki/Allocate-on-flush > >> > >>No, I am not sure. I had convinced myself that it was a libc issue, but I > >>may be wrong. > >> > > > >To check this, I tried running an image from a thumb drive with vfat file > >system, which presumably does not have the allocate-on-flush feature. The > >bug is still present (confirmed by reverting WriteStream>>nextChunkPut: to > >the earlier version). So the problem does not appear to be associated with > >the file system. > > > >Dave > > > > > > > >>> > >>>I too doubt an OS bug. > >>>Someone (i don't remember) said to me, that the behavior of the c calls > >>>make clear not to rely on certain thing. > >>>I plan to investigate the issue soonish. > >>> > >>>best > >>> -tobias > >> > >>That would be great. > >> > >>The workaround that "fixes" the comment problem is in > >>WriteStream>>nextChunkPut:, > >>so if you remove the #flush at the end of this method, the problem can be > >>reproduced. At the time, I was not able to come up with a unit test that > >>would > >>reproduce the problem, but my best guess as to what was happening is in > >>the > >>update comment: > >> > >> > >> Name: Collections-dtl.568 > >> Author: dtl > >> Time: 5 May 2014, 12:39:30.026 pm > >> > >> Add a flush to WriteStream>>nextChunkPut: > >> > >> This is a workaround for a bug in the runtime library of some versions > >> of > >> Ubuntu. The symptom is that creation of a class comment for a class that > >> previously had no comment leads to a file size error in the new > >> RemoteStream > >> that points to the class comment. Actual file size and contents of the > >> changes file are not affected by this bug, and the error occurs when > >> reading > >> contents of the changes file immediately following the initial save, > >> Flushing > >> the stream after writing a chunk to the changes file prevents the > >> problem. > >> > >>Dave > >> > > > > From Das.Linux at gmx.de Sun Mar 8 19:37:47 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 8 19:37:53 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> Message-ID: Hi, thanks for taking the time to check! On 08.03.2015, at 20:03, Levente Uzonyi wrote: > > #flush is pretty costly, and IMO it's called way too often if it's in > #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. > I changed the last lines of ClassDescription >> #classComment:stamp: in my image to > > self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. > InMidstOfFileinNotification signal ifFalse: [file flush]. > SystemChangeNotifier uniqueInstance classCommented: self. > > Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. Can you tell me whether the Changes file is read/written via one stream or two? I understood its two file descriptors but are these two in different streams or the same stream? Best -Tobias From leves at elte.hu Sun Mar 8 19:43:43 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 8 19:43:49 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> Message-ID: On Sun, 8 Mar 2015, Tobias Pape wrote: > Hi, > > thanks for taking the time to check! > > > On 08.03.2015, at 20:03, Levente Uzonyi wrote: > >> >> #flush is pretty costly, and IMO it's called way too often if it's in >> #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. >> I changed the last lines of ClassDescription >> #classComment:stamp: in my image to >> >> self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. >> InMidstOfFileinNotification signal ifFalse: [file flush]. >> SystemChangeNotifier uniqueInstance classCommented: self. >> >> Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. > > Can you tell me whether the Changes file is read/written via one stream or two? > I understood its two file descriptors but are these two in different streams or > the same stream? Of course, those are two (or more) different streams. We use SourceFiles at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading. Levente > > Best > -Tobias > > > From Das.Linux at gmx.de Sun Mar 8 19:49:40 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 8 19:49:45 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: References: <14bf5665a20.e26f7116155908.6988142676111382578@zoho.com> <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> Message-ID: <54434879-247E-4C6C-BFBD-9610A644CFE4@gmx.de> On 08.03.2015, at 20:43, Levente Uzonyi wrote: > On Sun, 8 Mar 2015, Tobias Pape wrote: > >> Hi, >> >> thanks for taking the time to check! >> >> >> On 08.03.2015, at 20:03, Levente Uzonyi wrote: >> >>> >>> #flush is pretty costly, and IMO it's called way too often if it's in >>> #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. >>> I changed the last lines of ClassDescription >> #classComment:stamp: in my image to >>> >>> self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. >>> InMidstOfFileinNotification signal ifFalse: [file flush]. >>> SystemChangeNotifier uniqueInstance classCommented: self. >>> >>> Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. >> >> Can you tell me whether the Changes file is read/written via one stream or two? >> I understood its two file descriptors but are these two in different streams or >> the same stream? > > Of course, those are two (or more) different streams. We use SourceFiles at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading. Darn; if it had been a ReadWriteStream, one could say that we'd only really needed #flush when we switch from writing to reading mode?. So it is more elaborate. Best -Tobias From lewis at mail.msen.com Sun Mar 8 20:38:34 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 8 20:38:36 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: (was: Squeak 4.6 release update) In-Reply-To: <54434879-247E-4C6C-BFBD-9610A644CFE4@gmx.de> References: <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> <54434879-247E-4C6C-BFBD-9610A644CFE4@gmx.de> Message-ID: <20150308203834.GB23605@shell.msen.com> On Sun, Mar 08, 2015 at 08:49:40PM +0100, Tobias Pape wrote: > > On 08.03.2015, at 20:43, Levente Uzonyi wrote: > > > On Sun, 8 Mar 2015, Tobias Pape wrote: > > > >> Hi, > >> > >> thanks for taking the time to check! > >> > >> > >> On 08.03.2015, at 20:03, Levente Uzonyi wrote: > >> > >>> > >>> #flush is pretty costly, and IMO it's called way too often if it's in > >>> #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. > >>> I changed the last lines of ClassDescription >> #classComment:stamp: in my image to > >>> > >>> self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. > >>> InMidstOfFileinNotification signal ifFalse: [file flush]. > >>> SystemChangeNotifier uniqueInstance classCommented: self. > >>> > >>> Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. > >> > >> Can you tell me whether the Changes file is read/written via one stream or two? > >> I understood its two file descriptors but are these two in different streams or > >> the same stream? > > > > Of course, those are two (or more) different streams. We use SourceFiles at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading. > > Darn; if it had been a ReadWriteStream, one could say that we'd only really needed #flush when > we switch from writing to reading mode?. > So it is more elaborate. > I am attaching a small C program that shows the problem. This uses the same kind of fseek/ftell calls used in the VM FilePlugin. This confirms the different C runtime behaviour. On my Ubuntu system, an explicit flush is required, and on my SuSE box, no flush is required. Levente is probably right in saying that this is not an OS bug. It may just be different behaviour in different versions of libc. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: teststreams.c Type: text/x-csrc Size: 1354 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150308/8e54614b/teststreams-0001.c From A.Wacknitz at gmx.de Sun Mar 8 21:39:32 2015 From: A.Wacknitz at gmx.de (Andreas Wacknitz) Date: Sun Mar 8 21:37:57 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: In-Reply-To: <20150308203834.GB23605@shell.msen.com> References: <20150307200010.GA93412@shell.msen.com> <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> <54434879-247E-4C6C-BFBD-9610A644CFE4@gmx.de> <20150308203834.GB23605@shell.msen.com> Message-ID: <54FCC194.7090102@gmx.de> FWIW, Solaris 10 (SPARC), OpenSolaris (SPARC) and openindiana (x64) print the same as your Ubuntu installation does. Regards, Andreas Am 08.03.15 21:38, schrieb David T. Lewis: > On Sun, Mar 08, 2015 at 08:49:40PM +0100, Tobias Pape wrote: >> On 08.03.2015, at 20:43, Levente Uzonyi wrote: >> >>> On Sun, 8 Mar 2015, Tobias Pape wrote: >>> >>>> Hi, >>>> >>>> thanks for taking the time to check! >>>> >>>> >>>> On 08.03.2015, at 20:03, Levente Uzonyi wrote: >>>> >>>>> #flush is pretty costly, and IMO it's called way too often if it's in >>>>> #nextChunkPut:. The most common workaround to avoid frequent calls is to use InMidstOfFileinNotification to check if it's a bulk write, and flush only once in those cases. For some reason this technique is not used in case of class comments. >>>>> I changed the last lines of ClassDescription >> #classComment:stamp: in my image to >>>>> >>>>> self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. >>>>> InMidstOfFileinNotification signal ifFalse: [file flush]. >>>>> SystemChangeNotifier uniqueInstance classCommented: self. >>>>> >>>>> Then removed the #flush from WriteStream >> #nextChunkPut:, and it seems to me that the problem is gone. >>>> Can you tell me whether the Changes file is read/written via one stream or two? >>>> I understood its two file descriptors but are these two in different streams or >>>> the same stream? >>> Of course, those are two (or more) different streams. We use SourceFiles at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading. >> Darn; if it had been a ReadWriteStream, one could say that we'd only really needed #flush when >> we switch from writing to reading mode?. >> So it is more elaborate. >> > I am attaching a small C program that shows the problem. This uses the > same kind of fseek/ftell calls used in the VM FilePlugin. This confirms > the different C runtime behaviour. On my Ubuntu system, an explicit > flush is required, and on my SuSE box, no flush is required. > > Levente is probably right in saying that this is not an OS bug. It may > just be different behaviour in different versions of libc. > > Dave > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150308/3b7fe0aa/attachment.htm From commits at source.squeak.org Sun Mar 8 22:10:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 8 22:10:14 2015 Subject: [squeak-dev] The Trunk: Tools-topa.545.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.545.mcz ==================== Summary ==================== Name: Tools-topa.545 Author: topa Time: 8 March 2015, 11:07:48.63 pm UUID: 6998ddde-1a82-4e70-b316-44bca20ac1e7 Ancestors: Tools-mt.544 Icons for - abstract but not implemented methods - prmitives - methods that should not be implemented =============== Diff against Tools-mt.544 =============== Item was changed: ----- Method: ToolIcons class>>iconForClass:selector: (in category 'support') ----- iconForClass: aClassDescription selector: aSelector "Answer an icon to be shown for the selector aSymbol in aClassDescription." | classDescription | classDescription := (aClassDescription isKindOf: PseudoClass) ifTrue: [aClassDescription realClass ifNil: [^ #blank ]] ifFalse: [aClassDescription]. classDescription methodDictionary at: aSelector ifPresent: [ :method | method literalsDo: [ :literal | + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) - (literal == #halt or: [ literal == #halt: or: [ literal == #haltIfNil or: [ literal == #haltIf: or: [ literal == #haltOnce or: [ literal == #haltOnce: or: [ literal == #haltOnCount: or: [ literal == #halt:onCount: ] ] ] ] ] ] ]) ifTrue: [^ #breakpoint]. + (#(flag: needsWork notYetImplemented) includes: literal) - (literal == #flag: or: [ literal == #needsWork or: [ literal == #notYetImplemented ] ]) ifTrue: [^ #flag]. + (#(shouldBeImplemented subclassResponsibility) includes: literal) + ifTrue: [ + (classDescription isSelectorOverridden: aSelector) + ifTrue: [^ #abstract] + ifFalse: [^ #notOverridden]]. + literal == #shouldNotImplement + ifTrue: [^ #no]]]. - - (literal == #shouldBeImplemented or: [literal == #subclassResponsibility]) - ifTrue: [^ #abstract] ] ]. + (classDescription isSelectorOverride: aSelector) - ^ (classDescription isSelectorOverride: aSelector) ifTrue: [ (classDescription isSelectorOverridden: aSelector) + ifTrue: [ ^ #arrowUpAndDown ] + ifFalse: [ ^ #arrowUp ] ] - ifTrue: [ #arrowUpAndDown ] - ifFalse: [ #arrowUp ] ] ifFalse: [ (classDescription isSelectorOverridden: aSelector) + ifTrue: [^ #arrowDown ]]. + + classDescription methodDictionary at: aSelector ifPresent: [ :method | + (method primitive ~= 0 and: [method isQuick not]) + ifTrue: [^ #primitive]]. + + + ^ #blank! - ifTrue: [ #arrowDown ] - ifFalse: [#blank ] ]! Item was added: + ----- Method: ToolIcons class>>no (in category 'private') ----- + no + + ^ ((ColorForm + extent: 12@12 + depth: 4 + fromArray: #( 3149642683 3149594624 3137833640 2075852800 2956634794 2746941440 3081263778 2323316736 3097859609 1514864640 3131730326 2863333376 3131709846 2863333376 3097663081 1514864640 3081263781 2323316736 3141184170 2797273088 3149351588 2075852800 3149642683 3149594624) + offset: 0@0) + colorsFromArray: #(#(0.995 0.956 0.96) #(0.972 0.753 0.757) #(0.956 0.63 0.634) #(0.936 0.466 0.47) #(0.933 0.423 0.431) #(0.944 0.548 0.552) #(0.952 0.587 0.591) #(0.96 0.671 0.674) #(0.925 0.384 0.388) #(1 1 1) #(0.921 0.341 0.349) #( ) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) ))! Item was added: + ----- Method: ToolIcons class>>notOverridden (in category 'private') ----- + notOverridden + + ^ ((ColorForm + extent: 12@12 + depth: 4 + fromArray: #( 2863311530 2863267840 2863311530 2863267840 2863311530 2863267840 2863241625 2594832384 2863237248 2594832384 2863235600 2594832384 2863235607 2594832384 2863236471 1252655104 2863241619 1789526016 2863311530 2863267840 2863311530 2863267840 2863311530 2863267840) + offset: 0@0) + colorsFromArray: #(#(1 0.525 0.533) #(1 0.552 0.56) #(1 0.541 0.552) #(0.87 0.305 0.313) #(0.878 0.301 0.313) #(1 0.529 0.541) #(0.839 0.325 0.309) #(0.976 0.415 0.419) #(1 0.591 0.599) #(0.882 0.301 0.313) #( ) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) ))! Item was added: + ----- Method: ToolIcons class>>primitive (in category 'private') ----- + primitive + + ^ ((ColorForm + extent: 12@12 + depth: 4 + fromArray: #( 2004318071 2004287488 2004318071 2004287488 2004318071 2004287488 2004248166 1735852032 2004243796 1735852032 2004242692 1735852032 2004242947 1735852032 2004243507 1735852032 2004248166 1735852032 2004318071 2004287488 2004318071 2004287488 2004318071 2004287488) + offset: 0@0) + colorsFromArray: #(#(0.369 0.369 0.369) #(0.328 0.328 0.328) #(0.325 0.325 0.325) #(0.353 0.353 0.353) #(0.412 0.412 0.412) #(0.345 0.345 0.345) #(0.27 0.27 0.27) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) ))! From commits at source.squeak.org Sun Mar 8 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 8 22:55:02 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150308225502.9298.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007613.html Name: Tools-topa.545 Ancestors: Tools-mt.544 Icons for - abstract but not implemented methods - prmitives - methods that should not be implemented ============================================= From commits at source.squeak.org Sun Mar 8 23:24:36 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 8 23:24:38 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.775.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.775.mcz ==================== Summary ==================== Name: Morphic-topa.775 Author: topa Time: 9 March 2015, 12:22:49.122 am UUID: 781cdc15-b952-46cc-bac8-a3bd04a3307d Ancestors: Morphic-mt.774 Box Button images in SystemWindow and MenuMorph now respect the gradient* preferences. =============== Diff against Morphic-mt.774 =============== Item was changed: AlignmentMorph subclass: #MenuMorph instanceVariableNames: 'defaultTarget selectedItem stayUp popUpOwner activeSubMenu' + classVariableNames: 'CloseBoxImage CloseBoxImageFlat CloseBoxImageGradient GradientMenu PushPinImage RoundedMenuCorners' - classVariableNames: 'CloseBoxImage GradientMenu PushPinImage RoundedMenuCorners' poolDictionaries: '' category: 'Morphic-Menus'! !MenuMorph commentStamp: '' prior: 0! Instance variables: defaultTarget The default target for creating menu items selectedItem The currently selected item in the receiver stayUp True if the receiver should stay up after clicks popUpOwner The menu item that automatically invoked the receiver, if any. activeSubMenu The currently active submenu.! Item was changed: ----- Method: MenuMorph class>>closeBoxImage (in category 'images') ----- closeBoxImage - "Supplied here because we don't necessarily have ComicBold" + ^ self gradientMenu + ifTrue: [self closeBoxImageGradient] + ifFalse: [self closeBoxImageFlat]! - ^ CloseBoxImage ifNil: [CloseBoxImage := SystemWindow closeBoxImage]! Item was added: + ----- Method: MenuMorph class>>closeBoxImageFlat (in category 'images') ----- + closeBoxImageFlat + + ^ CloseBoxImageFlat ifNil: [CloseBoxImageFlat := SystemWindow closeBoxImageFlat]! Item was added: + ----- Method: MenuMorph class>>closeBoxImageGradient (in category 'images') ----- + closeBoxImageGradient + + ^ CloseBoxImageGradient ifNil: [CloseBoxImageGradient := SystemWindow closeBoxImageGradient]! Item was changed: ----- Method: MenuMorph>>addStayUpIcons (in category 'construction') ----- addStayUpIcons | title closeBox pinBox titleBarArea titleString | title := submorphs detect: [:ea | ea hasProperty: #titleString] ifNone: [self setProperty: #needsTitlebarWidgets toValue: true. ^ self]. closeBox := SystemWindowButton new target: self; actionSelector: #delete; labelGraphic: self class closeBoxImage; color: Color transparent; + extent: self class closeBoxImage extent; - extent: 14 @ 16; borderWidth: 0. pinBox := SystemWindowButton new target: self; actionSelector: #stayUp:; arguments: {true}; labelGraphic: self class pushPinImage; color: Color transparent; + extent: self class pushPinImage extent; - extent: 16 @ 16; borderWidth: 0. Preferences noviceMode ifTrue: [closeBox setBalloonText: 'close this menu'. pinBox setBalloonText: 'keep this menu up']. titleBarArea := AlignmentMorph newRow vResizing: #shrinkWrap; layoutInset: 3; color: Preferences menuTitleColor; addMorphBack: closeBox; addMorphBack: title; addMorphBack: pinBox. title color: Color transparent. titleString := title findDeepSubmorphThat: [:each | each respondsTo: #font: ] ifAbsent: [StringMorph contents: String empty]. titleString font: Preferences windowTitleFont. self wantsRoundedCorners ifTrue: [titleBarArea useRoundedCorners]. self addMorphFront: titleBarArea. titleBarArea setProperty: #titleString toValue: (title valueOfProperty: #titleString). title removeProperty: #titleString. self setProperty: #hasTitlebarWidgets toValue: true. self removeProperty: #needsTitlebarWidgets. self removeStayUpItems! Item was changed: MorphicModel subclass: #SystemWindow 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 GradientWindow HideExpandButton MenuBoxFrame MenuBoxImageFlat MenuBoxImageGradient ResizeAlongEdges ReuseWindows TopWindow' - classVariableNames: 'ClickOnLabelToEdit CloseBoxFrame CloseBoxImage CollapseBoxImage DoubleClickOnLabelToExpand ExpandBoxFrame ExpandBoxImage GradientWindow HideExpandButton MenuBoxFrame MenuBoxImage ResizeAlongEdges ReuseWindows TopWindow' 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 changed: ----- Method: SystemWindow class>>closeBoxImage (in category 'initializing') ----- closeBoxImage - "Supplied here because we don't necessarily have ComicBold" + ^ self gradientWindow + ifTrue: [self closeBoxImageGradient] + ifFalse: [self closeBoxImageFlat]. + ! - ^ CloseBoxImage ifNil: [CloseBoxImage := (Form - extent: 14@14 - depth: 32 - fromArray: #(0 0 6032910 288687365 1550655006 2844865845 3450028610 3450028610 2828088372 1550655006 288687365 5967374 0 0 1377027 15091784 844830230 3063889984 4158092147 4294153621 4294681250 4294681250 4294153364 4158091376 3047046718 844764694 14763847 1376770 7742243 861541910 3585164870 4294282123 4294943908 4294943908 4294943651 4294943651 4294943908 4294943908 4294216330 3585099848 844764694 7676450 288098055 3047109684 4294211447 4294939539 4293757578 4293363848 4294939025 4294939282 4293954186 4293560456 4294939539 4294212732 3047110455 288031748 1584209695 4158081610 4294932343 4293753466 4291733929 4291802549 4293164156 4293884281 4291666594 4291670192 4293294457 4294933885 4158018130 1567432222 2861706541 4294136145 4294924376 4292761945 4292198592 4294704894 4292064950 4291403679 4294375158 4293057499 4291846497 4294925147 4294136659 2844863789 3483644980 4294660947 4294923605 4294857555 4292566879 4292658886 4294770173 4294704380 4293452000 4291981681 4294595154 4294923605 4294660947 3466867764 3500422196 4294726483 4294923605 4294923605 4293742415 4291402908 4294836223 4294967295 4292198592 4292760660 4294923348 4294923605 4294660947 3483644980 2878484014 4294136145 4294923605 4293939794 4291728018 4294375158 4293452257 4292793042 4294704637 4292128944 4293154390 4294923605 4294136145 2878484014 1617830177 4174923591 4294923862 4292957011 4292000442 4293386721 4291915888 4292238685 4292659400 4292595406 4292303450 4294923605 4158146375 1617829920 305072650 3097572147 4294267217 4294923348 4292631901 4291781989 4294595154 4294857555 4292435036 4292238942 4294857812 4294267217 3097506611 305007114 8070437 912005658 3635624249 4294333010 4294923605 4294857555 4294923605 4294923605 4294923348 4294923348 4294333010 3635624249 895228442 8004901 1639428 16735838 912071451 3131126579 4191766343 4294267217 4294726740 4294726740 4294201681 4191766343 3131126579 895293978 16735067 1573892 0 0 6888733 322506254 1651515681 2945723950 3550885173 3550885173 2945723950 1651515681 322440718 6822940 0 0) - offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>closeBoxImageFlat (in category 'initializing') ----- + closeBoxImageFlat + + ^ CloseBoxImageFlat ifNil: [CloseBoxImageFlat := (Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 552294233 2683000665 4025177945 4293613401 4293613401 4025177945 2683000665 552294233 0 0 0 1089165145 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2683000665 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 4025177945 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 3756742489 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2162906969 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 0 820729689 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 0 0 283858777 2683000665 4025177945 4293613401 4293613401 3756742489 2162906969 283858777 0 0) + offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>closeBoxImageGradient (in category 'initializing') ----- + closeBoxImageGradient + + ^ CloseBoxImageGradient ifNil: [CloseBoxImageGradient := (Form + extent: 14@14 + depth: 32 + fromArray: #(0 0 6032910 288687365 1550655006 2844865845 3450028610 3450028610 2828088372 1550655006 288687365 5967374 0 0 1377027 15091784 844830230 3063889984 4158092147 4294153621 4294681250 4294681250 4294153364 4158091376 3047046718 844764694 14763847 1376770 7742243 861541910 3585164870 4294282123 4294943908 4294943908 4294943651 4294943651 4294943908 4294943908 4294216330 3585099848 844764694 7676450 288098055 3047109684 4294211447 4294939539 4293757578 4293363848 4294939025 4294939282 4293954186 4293560456 4294939539 4294212732 3047110455 288031748 1584209695 4158081610 4294932343 4293753466 4291733929 4291802549 4293164156 4293884281 4291666594 4291670192 4293294457 4294933885 4158018130 1567432222 2861706541 4294136145 4294924376 4292761945 4292198592 4294704894 4292064950 4291403679 4294375158 4293057499 4291846497 4294925147 4294136659 2844863789 3483644980 4294660947 4294923605 4294857555 4292566879 4292658886 4294770173 4294704380 4293452000 4291981681 4294595154 4294923605 4294660947 3466867764 3500422196 4294726483 4294923605 4294923605 4293742415 4291402908 4294836223 4294967295 4292198592 4292760660 4294923348 4294923605 4294660947 3483644980 2878484014 4294136145 4294923605 4293939794 4291728018 4294375158 4293452257 4292793042 4294704637 4292128944 4293154390 4294923605 4294136145 2878484014 1617830177 4174923591 4294923862 4292957011 4292000442 4293386721 4291915888 4292238685 4292659400 4292595406 4292303450 4294923605 4158146375 1617829920 305072650 3097572147 4294267217 4294923348 4292631901 4291781989 4294595154 4294857555 4292435036 4292238942 4294857812 4294267217 3097506611 305007114 8070437 912005658 3635624249 4294333010 4294923605 4294857555 4294923605 4294923605 4294923348 4294923348 4294333010 3635624249 895228442 8004901 1639428 16735838 912071451 3131126579 4191766343 4294267217 4294726740 4294726740 4294201681 4191766343 3131126579 895293978 16735067 1573892 0 0 6888733 322506254 1651515681 2945723950 3550885173 3550885173 2945723950 1651515681 322440718 6822940 0 0) + offset: 0@0)]! Item was changed: ----- Method: SystemWindow class>>collapseBoxImage (in category 'initializing') ----- collapseBoxImage - "Supplied here because we don't necessarily have ComicBold" + ^ self gradientWindow + ifTrue: [self collapseBoxImageGradient] + ifFalse: [self collapseBoxImageFlat]. + ! - ^ CollapseBoxImage ifNil: [CollapseBoxImage := (Form - extent: 14@14 - depth: 32 - fromArray: #(0 768 5853184 288569344 1550537988 2844748052 3449976096 3449976096 2827970835 1550537731 288569600 5787392 768 0 1256960 15043082 844713216 3063837470 4158037328 4294162549 4294689156 4294689156 4294162292 4158036813 3046994460 844713216 14714890 1256704 7690756 861424896 3585112609 4294226279 4294952069 4294952069 4294951812 4294951812 4294952069 4294952068 4294226278 3585047331 844647680 7625220 287914752 3047058190 4294222924 4294949230 4294948716 4294948716 4294948716 4294948716 4294948716 4294948717 4294949231 4294223955 3047058707 287914240 1584092675 4158030361 4294944327 4294945619 4294945877 4294946134 4294946134 4294945877 4294945619 4294945102 4294944587 4294945360 4158031652 1567315202 2861589770 4294150937 4294938911 4294217252 4293955628 4294021937 4294021938 4294021421 4294020390 4293954079 4294084893 4294873892 4294151196 2844812298 3483593741 4294741530 4294478360 4291271017 4292461743 4292461485 4292461485 4292461485 4292461485 4292527535 4291340680 4293625630 4294807066 3466816525 3500370957 4294741530 4294347032 4291669904 4294112759 4294112244 4294112244 4294112244 4294112244 4294243831 4292200893 4293428769 4294807066 3483593741 2878432779 4294150937 4294806810 4292511536 4292382532 4292382531 4292382531 4292382531 4292382531 4292382532 4292249912 4294347548 4294216473 2878432523 1617712902 4174872597 4294938651 4294938393 4294938136 4294938136 4294938136 4294938136 4294938136 4294938136 4294938393 4294938651 4158095381 1617712902 304955136 3097520909 4294282265 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294282009 3097455373 304889600 7953671 911888388 3635573264 4294347801 4294938651 4294938395 4294938395 4294938395 4294938395 4294938651 4294347801 3635573264 895111172 7888135 1520128 16753431 911954180 3131075341 4191781141 4294216473 4294741530 4294741530 4294216473 4191781141 3131075341 895176964 16752406 1454592 0 3072 6708483 322388481 1651398919 2945607436 3550833934 3550833934 2945607436 1651398919 322322945 6642947 2816 0) - offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>collapseBoxImageFlat (in category 'initializing') ----- + collapseBoxImageFlat + + ^ CollapseBoxImageFlat ifNil: [CollapseBoxImageFlat := (Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 552699410 2683405842 4025583122 4294018578 4294018578 4025583122 2683405842 552699410 0 0 0 1089570322 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4025583122 821134866 0 552699410 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4025583122 284263954 2683405842 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 2683405842 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4025583122 4294018578 4294221118 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294221118 4294018578 4294018578 4294221118 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294762948 4294221118 4294018578 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 3757147666 2683405842 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 2163312146 552699410 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4025583122 284263954 0 821134866 4025583122 4294018578 4294018578 4294018578 4294018578 4294018578 4294018578 4025583122 821134866 0 0 0 284263954 2683405842 4025583122 4294018578 4294018578 3757147666 2163312146 284263954 0 0) + offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>collapseBoxImageGradient (in category 'initializing') ----- + collapseBoxImageGradient + + ^ CollapseBoxImageGradient ifNil: [CollapseBoxImageGradient := (Form + extent: 14@14 + depth: 32 + fromArray: #(0 768 5853184 288569344 1550537988 2844748052 3449976096 3449976096 2827970835 1550537731 288569600 5787392 768 0 1256960 15043082 844713216 3063837470 4158037328 4294162549 4294689156 4294689156 4294162292 4158036813 3046994460 844713216 14714890 1256704 7690756 861424896 3585112609 4294226279 4294952069 4294952069 4294951812 4294951812 4294952069 4294952068 4294226278 3585047331 844647680 7625220 287914752 3047058190 4294222924 4294949230 4294948716 4294948716 4294948716 4294948716 4294948716 4294948717 4294949231 4294223955 3047058707 287914240 1584092675 4158030361 4294944327 4294945619 4294945877 4294946134 4294946134 4294945877 4294945619 4294945102 4294944587 4294945360 4158031652 1567315202 2861589770 4294150937 4294938911 4294217252 4293955628 4294021937 4294021938 4294021421 4294020390 4293954079 4294084893 4294873892 4294151196 2844812298 3483593741 4294741530 4294478360 4291271017 4292461743 4292461485 4292461485 4292461485 4292461485 4292527535 4291340680 4293625630 4294807066 3466816525 3500370957 4294741530 4294347032 4291669904 4294112759 4294112244 4294112244 4294112244 4294112244 4294243831 4292200893 4293428769 4294807066 3483593741 2878432779 4294150937 4294806810 4292511536 4292382532 4292382531 4292382531 4292382531 4292382531 4292382532 4292249912 4294347548 4294216473 2878432523 1617712902 4174872597 4294938651 4294938393 4294938136 4294938136 4294938136 4294938136 4294938136 4294938136 4294938393 4294938651 4158095381 1617712902 304955136 3097520909 4294282265 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294938395 4294282009 3097455373 304889600 7953671 911888388 3635573264 4294347801 4294938651 4294938395 4294938395 4294938395 4294938395 4294938651 4294347801 3635573264 895111172 7888135 1520128 16753431 911954180 3131075341 4191781141 4294216473 4294741530 4294741530 4294216473 4191781141 3131075341 895176964 16752406 1454592 0 3072 6708483 322388481 1651398919 2945607436 3550833934 3550833934 2945607436 1651398919 322322945 6642947 2816 0) + offset: 0@0)]! Item was changed: ----- Method: SystemWindow class>>expandBoxImage (in category 'initializing') ----- expandBoxImage + ^ self gradientWindow + ifTrue: [self expandBoxImageGradient] + ifFalse: [self expandBoxImageFlat]. + ! - ^ ExpandBoxImage ifNil: [ExpandBoxImage := (Form - extent: 14@14 - depth: 32 - fromArray: #(0 0 1058562 285544960 1545616142 2838976800 3443812652 3443812652 2822199328 1545550349 285610496 1058562 0 0 197889 5015843 840445449 3057804586 4151680347 4288134782 4288989580 4288989580 4288134525 4151549016 3040961576 840379656 4949796 132352 2441745 857222409 3578360366 4287543665 4289187213 4289121422 4288857993 4288792456 4289121421 4289121677 4287478128 3578491696 840445193 2375953 285740802 3040304923 4286295641 4288070777 4288004983 4287543410 4288524177 4289312671 4287344755 4288004983 4288136313 4286624095 3040502048 285543680 1579236111 4149118761 4286297173 4286822495 4286888545 4286426462 4291679432 4293717227 4286752873 4286560090 4286428504 4286691421 4149578546 1562393102 2855294231 4283865130 4284326448 4284325172 4284718907 4284716865 4291416516 4293651691 4285043786 4284061998 4283996461 4284523316 4283996461 2838517015 3476513307 4284063275 4283865386 4287341947 4290759608 4290693559 4293717483 4294572537 4291153599 4290759607 4288129929 4283864876 4283997739 3459736090 3493290523 4284063275 4283799593 4289312927 4294243316 4294046193 4294769916 4294901502 4294177779 4294243316 4290364338 4283864621 4284063275 3476513306 2872071703 4283865130 4284063275 4284453693 4285176395 4285109069 4291811019 4293849070 4285962336 4285110602 4284585024 4283997227 4283799593 2872071447 1612856592 4165698852 4284195372 4284063786 4284064041 4283864620 4291285440 4293651690 4284782402 4283998248 4284063786 4284195372 4148921636 1612856336 302649860 3090571034 4283865642 4284129580 4284129580 4283930157 4289378465 4291218626 4284519486 4284064042 4284129580 4283865642 3090505498 302649604 2573587 907751437 3627904029 4283865642 4284195372 4284063275 4284060978 4284126260 4283996972 4284195372 4283865642 3627838237 890974221 2573330 263937 6533168 907817229 3124125722 4182476324 4283865386 4284063531 4284063531 4283865386 4182476324 3124125722 891040013 6335279 263937 0 0 1979406 319691015 1646476817 2939246103 3543687963 3543687963 2939246103 1646476817 319691015 1979406 0 0) - offset: 0@0) ]! Item was added: + ----- Method: SystemWindow class>>expandBoxImageFlat (in category 'initializing') ----- + expandBoxImageFlat + + ^ ExpandBoxImageFlat ifNil: [ExpandBoxImageFlat := (Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 542547506 2673253938 4015431218 4283866674 4283866674 4015431218 2673253938 542547506 0 0 0 1079418418 4015431218 4283866674 4283866674 4285968472 4285968472 4283866674 4283866674 4015431218 810982962 0 542547506 4015431218 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4015431218 274112050 2673253938 4283866674 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4283866674 2673253938 4015431218 4283866674 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4283866674 4015431218 4283866674 4285968472 4292208588 4292208588 4292208588 4294244850 4294244850 4292208588 4292208588 4292208588 4285968472 4283866674 4283866674 4285968472 4292208588 4292208588 4292208588 4294244850 4294244850 4292208588 4292208588 4292208588 4285968472 4283866674 4015431218 4283866674 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4283866674 3746995762 2673253938 4283866674 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4283866674 2153160242 542547506 4015431218 4283866674 4283866674 4283866674 4292208588 4292208588 4283866674 4283866674 4283866674 4015431218 274112050 0 810982962 4015431218 4283866674 4283866674 4285968472 4285968472 4283866674 4283866674 4015431218 810982962 0 0 0 274112050 2673253938 4015431218 4283866674 4283866674 3746995762 2153160242 274112050 0 0) + offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>expandBoxImageGradient (in category 'initializing') ----- + expandBoxImageGradient + + ^ ExpandBoxImageGradient ifNil: [ExpandBoxImageGradient := (Form + extent: 14@14 + depth: 32 + fromArray: #(0 0 1058562 285544960 1545616142 2838976800 3443812652 3443812652 2822199328 1545550349 285610496 1058562 0 0 197889 5015843 840445449 3057804586 4151680347 4288134782 4288989580 4288989580 4288134525 4151549016 3040961576 840379656 4949796 132352 2441745 857222409 3578360366 4287543665 4289187213 4289121422 4288857993 4288792456 4289121421 4289121677 4287478128 3578491696 840445193 2375953 285740802 3040304923 4286295641 4288070777 4288004983 4287543410 4288524177 4289312671 4287344755 4288004983 4288136313 4286624095 3040502048 285543680 1579236111 4149118761 4286297173 4286822495 4286888545 4286426462 4291679432 4293717227 4286752873 4286560090 4286428504 4286691421 4149578546 1562393102 2855294231 4283865130 4284326448 4284325172 4284718907 4284716865 4291416516 4293651691 4285043786 4284061998 4283996461 4284523316 4283996461 2838517015 3476513307 4284063275 4283865386 4287341947 4290759608 4290693559 4293717483 4294572537 4291153599 4290759607 4288129929 4283864876 4283997739 3459736090 3493290523 4284063275 4283799593 4289312927 4294243316 4294046193 4294769916 4294901502 4294177779 4294243316 4290364338 4283864621 4284063275 3476513306 2872071703 4283865130 4284063275 4284453693 4285176395 4285109069 4291811019 4293849070 4285962336 4285110602 4284585024 4283997227 4283799593 2872071447 1612856592 4165698852 4284195372 4284063786 4284064041 4283864620 4291285440 4293651690 4284782402 4283998248 4284063786 4284195372 4148921636 1612856336 302649860 3090571034 4283865642 4284129580 4284129580 4283930157 4289378465 4291218626 4284519486 4284064042 4284129580 4283865642 3090505498 302649604 2573587 907751437 3627904029 4283865642 4284195372 4284063275 4284060978 4284126260 4283996972 4284195372 4283865642 3627838237 890974221 2573330 263937 6533168 907817229 3124125722 4182476324 4283865386 4284063531 4284063531 4283865386 4182476324 3124125722 891040013 6335279 263937 0 0 1979406 319691015 1646476817 2939246103 3543687963 3543687963 2939246103 1646476817 319691015 1979406 0 0) + offset: 0@0) ]! Item was changed: ----- Method: SystemWindow class>>initialize (in category 'initializing') ----- initialize "SystemWindow initialize" + CollapseBoxImageGradient := nil. + CloseBoxImageGradient := nil. + ExpandBoxImageGradient := nil. + MenuBoxImageGradient := nil. - CollapseBoxImage := nil. - CloseBoxImage := nil. - ExpandBoxImage := nil. - MenuBoxImage := nil. + CollapseBoxImageFlat := nil. + CloseBoxImageFlat := nil. + ExpandBoxImageFlat := nil. + MenuBoxImageFlat := nil. + self updatePreferences.! Item was changed: ----- Method: SystemWindow class>>menuBoxImage (in category 'initializing') ----- menuBoxImage + ^ self gradientWindow + ifTrue: [self menuBoxImageGradient] + ifFalse: [self menuBoxImageFlat]. + ! - ^ MenuBoxImage ifNil: [MenuBoxImage := (Form - extent: 14@14 - depth: 32 - fromArray: #(0 0 7774 285216318 1544039783 2837267842 3442168720 3442168720 2820490625 1544039782 285216574 7774 0 0 2087 1532860 839001178 3056161165 4150166716 4286817494 4287738079 4287803615 4286751958 4150035131 3039252364 839001178 1467065 1831 668526 855712858 3576584601 4286029012 4287935459 4287935458 4287869666 4287869666 4287935458 4287869923 4285963476 3576715929 838935642 602733 285216827 3038463881 4284517582 4286621149 4286489564 4286489564 4286489564 4286489564 4286489564 4286489820 4286621149 4284911823 3038726794 285216058 1577594471 4147012271 4284387029 4284978391 4285043927 4285109719 4285109719 4285044183 4284978135 4284649685 4284518357 4284912599 4147603633 1560751463 2853453696 4281560257 4281888189 4283200687 4284186808 4284515256 4284515257 4284252600 4283858102 4283529653 4282740653 4282151359 4281757378 2836676480 3474606220 4281757894 4281559740 4285761703 4292993507 4293454315 4293388522 4293388522 4293454315 4292862177 4285432998 4281494205 4281692102 3457829004 3491383436 4281757638 4281758153 4281953722 4288589251 4294835708 4294967295 4294967295 4294769659 4288194752 4281887931 4281823689 4281692102 3474606220 2870296704 4281560257 4281823689 4281758153 4282215861 4289838026 4294967294 4294967038 4289377991 4282084534 4281758153 4281823689 4281560257 2870296704 1611280232 4163592111 4281823946 4281823688 4281692360 4282740914 4291152852 4290758353 4282544051 4281692361 4281823688 4281823946 4146749358 1611214696 301994814 3088664202 4281626050 4281823689 4281823688 4281692103 4282937773 4282806447 4281692360 4281823688 4281823689 4281626050 3088664202 301994814 734577 906307420 3625930390 4281626050 4281823946 4281823689 4281692360 4281692360 4281823689 4281823946 4281626050 3625930390 889530204 734576 2347 2392036 906373213 3122218634 4180369583 4281560257 4281757638 4281757638 4281560257 4180369583 3122218634 889595997 2325471 2346 0 3 76907 318773060 1644834921 2937405569 3541780621 3541780621 2937405569 1644834921 318773059 76906 2 0) - offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>menuBoxImageFlat (in category 'initializing') ----- + menuBoxImageFlat + + ^ MenuBoxImageFlat ifNil: [MenuBoxImageFlat := (Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 540831669 2671538101 4013715381 4282150837 4282150837 4013715381 2671538101 540831669 0 0 0 1077702581 4013715381 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4013715381 809267125 0 540831669 4013715381 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4013715381 272396213 2671538101 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 2671538101 4013715381 4282150837 4284582595 4288591834 4288591834 4288591834 4288591834 4288591834 4288591834 4283728318 4282150837 4013715381 4282150837 4282150837 4282939578 4292535537 4294967295 4294967295 4294967295 4294967295 4292535537 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4284582595 4294967295 4294967295 4294967295 4294178554 4283728318 4282150837 4282150837 4282150837 4013715381 4282150837 4282150837 4282150837 4287737557 4294967295 4294967295 4286948817 4282150837 4282150837 4282150837 3745279925 2671538101 4282150837 4282150837 4282150837 4282150837 4291746797 4290958056 4282150837 4282150837 4282150837 4282150837 2151444405 540831669 4013715381 4282150837 4282150837 4282150837 4282939578 4282939578 4282150837 4282150837 4282150837 4013715381 272396213 0 809267125 4013715381 4282150837 4282150837 4282150837 4282150837 4282150837 4282150837 4013715381 809267125 0 0 0 272396213 2671538101 4013715381 4282150837 4282150837 3745279925 2151444405 272396213 0 0) + offset: 0@0)]! Item was added: + ----- Method: SystemWindow class>>menuBoxImageGradient (in category 'initializing') ----- + menuBoxImageGradient + + ^ MenuBoxImageGradient ifNil: [MenuBoxImageGradient := (Form + extent: 14@14 + depth: 32 + fromArray: #(0 0 7774 285216318 1544039783 2837267842 3442168720 3442168720 2820490625 1544039782 285216574 7774 0 0 2087 1532860 839001178 3056161165 4150166716 4286817494 4287738079 4287803615 4286751958 4150035131 3039252364 839001178 1467065 1831 668526 855712858 3576584601 4286029012 4287935459 4287935458 4287869666 4287869666 4287935458 4287869923 4285963476 3576715929 838935642 602733 285216827 3038463881 4284517582 4286621149 4286489564 4286489564 4286489564 4286489564 4286489564 4286489820 4286621149 4284911823 3038726794 285216058 1577594471 4147012271 4284387029 4284978391 4285043927 4285109719 4285109719 4285044183 4284978135 4284649685 4284518357 4284912599 4147603633 1560751463 2853453696 4281560257 4281888189 4283200687 4284186808 4284515256 4284515257 4284252600 4283858102 4283529653 4282740653 4282151359 4281757378 2836676480 3474606220 4281757894 4281559740 4285761703 4292993507 4293454315 4293388522 4293388522 4293454315 4292862177 4285432998 4281494205 4281692102 3457829004 3491383436 4281757638 4281758153 4281953722 4288589251 4294835708 4294967295 4294967295 4294769659 4288194752 4281887931 4281823689 4281692102 3474606220 2870296704 4281560257 4281823689 4281758153 4282215861 4289838026 4294967294 4294967038 4289377991 4282084534 4281758153 4281823689 4281560257 2870296704 1611280232 4163592111 4281823946 4281823688 4281692360 4282740914 4291152852 4290758353 4282544051 4281692361 4281823688 4281823946 4146749358 1611214696 301994814 3088664202 4281626050 4281823689 4281823688 4281692103 4282937773 4282806447 4281692360 4281823688 4281823689 4281626050 3088664202 301994814 734577 906307420 3625930390 4281626050 4281823946 4281823689 4281692360 4281692360 4281823689 4281823946 4281626050 3625930390 889530204 734576 2347 2392036 906373213 3122218634 4180369583 4281560257 4281757638 4281757638 4281560257 4180369583 3122218634 889595997 2325471 2346 0 3 76907 318773060 1644834921 2937405569 3541780621 3541780621 2937405569 1644834921 318773059 76906 2 0) + offset: 0@0)]! From commits at source.squeak.org Sun Mar 8 23:36:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 8 23:36:57 2015 Subject: [squeak-dev] The Trunk: Tools-topa.546.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.546.mcz ==================== Summary ==================== Name: Tools-topa.546 Author: topa Time: 9 March 2015, 12:35:55.508 am UUID: 26bb0654-288e-4060-891c-8cf9f4ab5584 Ancestors: Tools-topa.545 Make these all simple Forms =============== Diff against Tools-topa.545 =============== Item was changed: ----- Method: ToolIcons class>>abstract (in category 'private') ----- abstract + ^ Form - ^ (Form extent: 12@12 depth: 32 fromArray: #( 165 165 165 165 165 16777215 16777215 165 165 165 165 165 16777215 16777215 165 165 16777215 2712832 2712832 16777215 165 165 165 165 165 165 165 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 165 165 165 165 165 4294967295 4284714821 4284714821 4284714821 4284714821 4284714821 4284714821 4294967295 165 165 165 16777215 4294967295 4284714821 4288074840 4288074840 4288074840 4287677545 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287679828 4287810910 4287677545 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287614291 4287810910 4286361178 4284714821 4294967295 16777215 165 165 16777215 4294967295 4284714821 4288074840 4287677545 4286361178 4286361178 4284714821 4294967295 16777215 165 165 165 4294967295 4284714821 4284714821 4284714821 4284714821 4284714821 4284714821 4294967295 165 165 165 165 165 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 165 165 165 165 165 165 165 16777215 2712832 2712832 16777215 165 165 165 165 165 165 165 165 165 16777215 16777215 165 165 165 165 165) + offset: 0@0! - offset: 0@0)! Item was changed: ----- Method: ToolIcons class>>arrowDown (in category 'private') ----- arrowDown + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 0 0 0 0 0 0 4294967295 4284714821 4284714821 4284714821 4284714821 4294967295 0 0 0 0 0 0 4294967295 4284714821 4287614291 4287810910 4284714821 4294967295 0 0 0 0 4294967295 4294967295 4294967295 4284714821 4287679828 4287810910 4284714821 4294967295 4294967295 4294967295 0 0 4294967295 4284714821 4284714821 4284714821 4288074840 4287677545 4284714821 4284714821 4284714821 4294967295 0 0 0 4294967295 4284714821 4287810910 4288272218 4287876447 4287350105 4284714821 4294967295 0 0 0 0 0 4294967295 4284714821 4287810910 4286361178 4284714821 4294967295 0 0 0 0 0 0 0 4294967295 4284714821 4284714821 4294967295 0 0 0 0 0 0 0 0 0 4294967295 4294967295 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 185273099 185273099 185273099 185273099 185273099 185273099 185273098 168430090 168495883 185273098 151587081 168495883 185273098 151191561 168495883 185207306 151388169 168430091 185207049 151257353 151587339 185272841 328199 151653131 185273098 150997001 168495883 185273099 168364298 185273099 185273099 185207307 185273099 185273099 185273099 185273099) - offset: 0@0) - colorsFromArray: #(#(0.573 0.804 0.369) #(0.565 0.768 0.412) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(0.565 0.804 0.329) #(0.545 0.772 0.349) #(0.486 0.682 0.353) #(0.388 0.561 0.271) #(1.0 1.0 1.0) #( )))! Item was changed: ----- Method: ToolIcons class>>arrowUp (in category 'private') ----- arrowUp + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294967295 4294967295 0 0 0 0 0 0 0 0 0 4294967295 4284714821 4284714821 4294967295 0 0 0 0 0 0 0 4294967295 4284714821 4287810910 4286361178 4284714821 4294967295 0 0 0 0 0 4294967295 4284714821 4287810910 4288272218 4287876447 4287350105 4284714821 4294967295 0 0 0 4294967295 4284714821 4284714821 4284714821 4288074840 4287677545 4284714821 4284714821 4284714821 4294967295 0 0 4294967295 4294967295 4294967295 4284714821 4287679828 4287810910 4284714821 4294967295 4294967295 4294967295 0 0 0 0 4294967295 4284714821 4287614291 4287810910 4284714821 4294967295 0 0 0 0 0 0 4294967295 4284714821 4284714821 4284714821 4284714821 4294967295 0 0 0 0 0 0 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 185273099 185273099 185273099 185273099 185273099 185273099 185273099 185207307 185273099 185273099 168364298 185273099 185273098 150997001 168495883 185272841 328199 151653131 185207049 151257353 151587339 185207306 151388169 168430091 185273098 151191561 168495883 185273098 151587081 168495883 185273098 168430090 168495883 185273099 185273099 185273099) - offset: 0@0) - colorsFromArray: #(#(0.573 0.804 0.369) #(0.565 0.768 0.412) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(0.565 0.804 0.329) #(0.545 0.772 0.349) #(0.486 0.682 0.353) #(0.388 0.561 0.271) #(1.0 1.0 1.0) #( )))! Item was changed: ----- Method: ToolIcons class>>arrowUpAndDown (in category 'private') ----- arrowUpAndDown + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 4294967295 4294967295 0 0 0 0 0 0 0 0 0 4294967295 4284714821 4284714821 4294967295 0 0 0 0 0 0 0 4294967295 4284714821 4287810910 4286361178 4284714821 4294967295 0 0 0 0 0 4294967295 4284714821 4287810910 4288272218 4287876447 4287350105 4284714821 4294967295 0 0 0 4294967295 4284714821 4284714821 4284714821 4288074840 4287677545 4284714821 4284714821 4284714821 4294967295 0 0 4294967295 4294967295 4294967295 4284714821 4287679828 4287810910 4284714821 4294967295 4294967295 4294967295 0 0 4294967295 4294967295 4294967295 4284714821 4287614291 4287810910 4284714821 4294967295 4294967295 4294967295 0 0 4294967295 4284714821 4284714821 4284714821 4288074840 4287677545 4284714821 4284714821 4284714821 4294967295 0 0 0 4294967295 4284714821 4287810910 4288272218 4287876447 4287350105 4284714821 4294967295 0 0 0 0 0 4294967295 4284714821 4287810910 4286361178 4284714821 4294967295 0 0 0 0 0 0 0 4294967295 4284714821 4284714821 4294967295 0 0 0 0 0 0 0 0 0 4294967295 4294967295 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 185273099 185207307 185273099 185273099 167772170 185273099 185273098 262400 168495883 185272832 67699971 658187 185204736 524800 2571 185207306 459776 168430091 185207306 394240 168430091 185204736 524800 2571 185272832 67699971 658187 185273098 262400 168495883 185273099 167772170 185273099 185273099 185207307 185273099) - offset: 0@0) - colorsFromArray: #(#(0.388 0.561 0.271) #(0.486 0.682 0.353) #(0.565 0.768 0.412) #(0.545 0.772 0.349) #(0.573 0.804 0.369) #(0.577 0.804 0.372) #(0.561 0.804 0.326) #(0.565 0.804 0.329) #(0.588 0.831 0.345) #(0.6 0.844 0.353) #(1.0 1.0 1.0) #( )))! Item was changed: ----- Method: ToolIcons class>>breakpoint (in category 'private') ----- breakpoint + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294156190 4294219671 4294085257 4294146939 4294140771 4294138201 4294136145 4284036633 4284036633 4284036633 4294967295 4294967295 4294219671 4294830826 4294697184 4294764005 4294156190 4294156190 4294156190 4291318347 4289820229 4284036633 4294967295 4294967295 4294085257 4294697184 4294140771 4294139229 4294136145 4294136145 4294134860 4291318347 4289820229 4284496668 4294967295 4294967295 4294140771 4294156190 4294138201 4294137173 4294136145 4294134860 4294134860 4288365876 4289820229 4284036633 4294967295 4294967295 4294139229 4294219671 4294136145 4294136145 4294134860 4294134860 4294134860 4288365876 4289820229 4283708184 4294967295 4294967295 4294137173 4294085257 4293619053 4293619053 4293619053 4293619053 4293619053 4287311645 4289820229 4283708184 4294967295 4294967295 4293473589 4292813603 4292418331 4291366414 4290250246 4290250246 4290250246 4284036633 4289820229 4283708184 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4284036633 4289820229 4283708184 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4289820229 4283708184 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4289820229 4284036633 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4284036633 4284036633 4294967295) + offset: 0@0! - depth: 8 - fromArray: #( 437918234 437918234 437918234 437654804 319885069 26 437590295 404100630 100859930 437524241 269290764 100860442 437327375 235736076 67305498 437261581 218893324 67305754 437130258 303174162 84082970 436931081 134678279 196890 437918234 437918234 196890 454761243 454761242 196890 454761243 454761242 196634 454761243 454761242 26) - offset: 0@0) - colorsFromArray: #(#(0.349 0.212 0.098) #(0.329 0.2 0.094) #(0.376 0.232 0.109) #(0.694 0.462 0.271) #(0.608 0.271 0.204) #(0.545 0.185 0.113) #(0.784 0.322 0.294) #(0.721 0.023 0.023) #(0.788 0.055 0.055) #(0.848 0.106 0.106) #(0.875 0.137 0.137) #(0.914 0.208 0.208) #(0.953 0.298 0.298) #(0.953 0.318 0.318) #(0.953 0.333 0.333) #(0.953 0.349 0.349) #(0.953 0.365 0.365) #(0.953 0.388 0.388) #(0.922 0.427 0.427) #(0.953 0.482 0.482) #(0.949 0.542 0.538) #(0.957 0.592 0.592) #(0.953 0.624 0.62) #(0.984 0.879 0.879) #(0.988 0.898 0.898) #(0.992 0.918 0.918) #(1.0 1.0 1.0) #( )))! Item was changed: ----- Method: ToolIcons class>>collection (in category 'private') ----- collection + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 4294964203 4294947198 4294938953 4294947198 4294964203 0 0 0 0 0 0 0 4294946167 4294483041 4293435505 4293693782 4294945395 0 4293916398 4287874445 4285050207 4287874445 4293916398 0 4294939470 4293566834 4292777576 4291988059 4294938953 0 4287545991 4287348353 4288922521 4286558838 4287283332 0 4294946167 4293891161 4292119903 4293035852 4294945395 0 4285247331 4288988570 4288461714 4287606661 4285050207 0 4294963945 4294946426 4294938181 4294946426 4294963945 0 4287545991 4286821753 4287803784 4286031980 4287283332 0 0 0 0 0 0 0 4293785068 4287677321 4284787547 4287677321 4293785068 0 0 0 4294834926 4294238348 4293907294 4294238348 4294834926 0 0 0 0 0 0 0 4294172295 4293777015 4292988807 4293053292 4294172035 0 0 0 0 0 0 0 4293973090 4293186184 4292462206 4291672945 4293907294 0 0 0 0 0 0 0 4294172295 4293184879 4291738741 4292460898 4294172035 0 0 0 0 0 0 0 4294834924 4294238089 4293907034 4294238089 4294834924 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 168952850 171324982 909522486 255008812 271977989 285543990 706029348 70649368 724044854 254681884 271986469 689508662 135534100 137758237 890965046 909522486 909513472 436212534 909508866 151126326 909522486 909511457 807338806 909522486 909521969 841353526 909522486 909511458 504824630 909522486 909511943 755436854 909522486 909522486 909522486 909522486) - offset: 0@0) - colorsFromArray: #(#(0.565 0.764 0.538) #(0.992 0.98 0.934) #(0.957 0.879 0.549) #(0.953 0.867 0.514) #(1.0 0.569 0.286) #(0.577 0.772 0.553) #(0.557 0.761 0.53) #(0.957 0.875 0.538) #(1.0 0.949 0.914) #(0.937 0.827 0.369) #(1.0 0.953 0.922) #(0.953 0.871 0.53) #(0.542 0.753 0.518) #(0.992 0.98 0.926) #(0.937 0.965 0.934) #(1.0 0.678 0.466) #(1.0 0.667 0.451) #(0.408 0.678 0.372) #(1.0 0.694 0.494) #(0.93 0.961 0.926) #(1.0 0.682 0.478) #(0.918 0.631 0.447) #(1.0 0.557 0.271) #(0.848 0.757 0.384) #(0.545 0.745 0.506) #(0.561 0.686 0.522) #(0.392 0.671 0.357) #(0.466 0.659 0.423) #(0.887 0.53 0.298) #(0.514 0.71 0.474) #(0.807 0.737 0.458) #(0.887 0.796 0.423) #(0.91 0.628 0.443) #(0.93 0.84 0.466) #(0.894 0.804 0.435) #(0.831 0.553 0.372) #(0.823 0.542 0.357) #(0.643 0.772 0.604) #(0.804 0.733 0.443) #(0.871 0.588 0.408) #(0.498 0.698 0.462) #(0.612 0.733 0.573) #(1.0 0.577 0.306) #(0.639 0.764 0.6) #(0.926 0.569 0.337) #(0.937 0.823 0.353) #(0.937 0.581 0.349) #(0.419 0.686 0.388) #(0.883 0.811 0.53) #(0.894 0.823 0.534) #(0.848 0.776 0.494) #(0.973 0.612 0.38) #(0.941 0.831 0.384) #(0.573 0.694 0.534) #( ) ))! Item was changed: ----- Method: ToolIcons class>>exception (in category 'private') ----- exception + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 4294371495 4293908066 4293842277 4293841507 4293775456 4293708891 4293577045 4293378633 4294371516 4294834928 0 0 4294172547 4294106220 4294040432 4294039405 4293973096 4293906533 4293576270 4293245752 4294504141 4294835187 0 4294768349 4293974633 4294634386 4294368606 4294235479 4294301290 4294236810 4293444430 4294636250 0 0 0 4294239131 4294370178 4294368870 4294102843 4294036547 4294236543 4293510488 4294437573 0 0 0 4294834665 4293973866 4294502031 4294169671 4293970487 4294170225 4293840750 4294239413 0 0 0 0 4294371762 4294172025 4294435187 4294168905 4293969724 4294169977 4293246022 4293444706 4293378916 4293246298 4293048405 4293511033 4293577033 4294105718 4294171257 4294038641 4294170495 4294103156 4293970801 4293971324 4293640551 4292915263 4293709969 4294371787 4294239138 4294107034 4294040985 4293842310 4293510493 4294036070 4293969512 4293310802 4293378927 4294437840 0 0 0 0 0 4294635995 4293509979 4293773681 4293113677 4293974434 4294967037 0 0 0 0 0 0 4293180237 4293245257 4293312869 4294702567 0 0 0 0 0 0 0 4294106534 4292849719 4294040744 0 0 0 0 0 0 0 0 0 4294239161 4294570202 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 1583238196 1191577949 759500554 1583225870 390089009 36066088 1578711384 857557019 906518110 1581393173 991970905 1549688414 722677332 570761514 1583242846 1327383559 1091971346 5322527 792346372 337270359 1297099812 1011548469 286015067 654532190 1583242842 941838926 1432247902 1583242763 221384798 1583242846 1583224899 1029594718 1583242846 1583231050 1583242846 1583242846) - offset: 0@0) - colorsFromArray: #(#(0.906 0.764 0.392) #(0.945 0.867 0.6) #(0.918 0.776 0.306) #(0.969 0.922 0.815) #(0.945 0.831 0.443) #(0.953 0.84 0.443) #(0.934 0.823 0.388) #(0.953 0.819 0.286) #(0.98 0.949 0.855) #(0.93 0.815 0.376) #(0.992 0.98 0.941) #(0.894 0.733 0.302) #(0.945 0.792 0.4) #(0.898 0.725 0.286) #(0.949 0.863 0.423) #(0.965 0.91 0.737) #(0.984 0.961 0.906) #(0.914 0.772 0.365) #(0.91 0.768 0.384) #(0.941 0.844 0.415) #(0.953 0.844 0.498) #(0.965 0.871 0.4) #(0.953 0.836 0.474) #(0.945 0.859 0.439) #(0.949 0.867 0.651) #(0.988 0.965 0.867) #(0.949 0.815 0.455) #(0.957 0.855 0.542) #(0.953 0.875 0.514) #(0.957 0.836 0.341) #(0.953 0.867 0.474) #(0.914 0.78 0.474) #(0.945 0.8 0.263) #(0.934 0.811 0.431) #(0.941 0.792 0.216) #(0.93 0.788 0.443) #(0.965 0.914 0.796) #(0.965 0.891 0.51) #(0.898 0.733 0.22) #(0.906 0.764 0.435) #(0.992 0.984 0.953) #(0.898 0.737 0.275) #(0.957 0.894 0.71) #(0.992 0.977 0.914) #(0.926 0.815 0.569) #(0.918 0.788 0.333) #(0.973 0.902 0.561) #(0.918 0.788 0.286) #(0.957 0.891 0.725) #(0.937 0.815 0.396) #(0.902 0.757 0.396) #(0.965 0.867 0.369) #(0.937 0.84 0.384) #(0.934 0.836 0.526) #(0.91 0.764 0.306) #(0.887 0.721 0.333) #(0.914 0.764 0.357) #(0.941 0.855 0.412) #(0.949 0.855 0.462) #(0.949 0.811 0.232) #(0.957 0.891 0.635) #(0.945 0.863 0.659) #(0.941 0.776 0.408) #(0.953 0.855 0.474) #(0.945 0.844 0.427) #(0.941 0.78 0.236) #(0.957 0.891 0.608) #(0.875 0.69 0.216) #(0.969 0.883 0.451) #(0.906 0.761 0.286) #(0.957 0.848 0.498) #(0.934 0.836 0.396) #(0.961 0.84 0.415) #(0.941 0.831 0.408) #(0.977 0.941 0.855) #(0.949 0.875 0.604) #(0.965 0.91 0.655) #(0.922 0.757 0.404) #(0.941 0.851 0.635) #(0.965 0.914 0.698) #(0.879 0.69 0.247) #(0.898 0.741 0.353) #(0.891 0.717 0.302) #(0.973 0.934 0.804) #(0.953 0.831 0.279) #(1.0 0.996 0.992) #(0.941 0.796 0.443) #(0.941 0.804 0.486) #(0.98 0.922 0.573) #(0.914 0.772 0.345) #(0.98 0.945 0.859) #(0.902 0.725 0.322) #(0.969 0.918 0.772) #(0.926 0.8 0.357) #( ) ))! Item was changed: ----- Method: ToolIcons class>>flag (in category 'private') ----- flag + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4288859642 4288400378 4287284473 4286102264 4284132854 4283673334 4283016693 4284036633 4284036633 4284036633 4294967295 4294967295 4288400378 4293259774 4293259774 4293259774 4289188346 4288859642 4288859642 4282294213 4289820229 4284036633 4294967295 4294967295 4287284473 4293259774 4284132854 4283673334 4283016693 4282688501 4282425845 4282023874 4289820229 4284627477 4294967295 4294967295 4284132854 4289188346 4283279606 4283016693 4282425845 4282425845 4282425845 4281886101 4289820229 4284036633 4294967295 4294967295 4283673334 4288400378 4283016693 4282819829 4282425845 4282425845 4282425845 4281886101 4289820229 4283708184 4294967295 4294967295 4283016693 4287284473 4285250295 4285250295 4284856054 4284856054 4284856054 4284627477 4289820229 4283708184 4294967295 4294967295 4282232813 4282232813 4282167001 4282167001 4282034889 4282294213 4281965995 4284036633 4289820229 4283708184 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4294967295 4284036633 4289820229 4283708184 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4289820229 4283708184 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4289820229 4284036633 4294967295 0 0 0 0 0 0 0 4294967295 4284036633 4284036633 4284036633 4294967295) + offset: 0@0! - depth: 8 - fromArray: #( 437918234 437918234 437918234 436470535 101584139 387389210 436404481 17105924 303634202 436666638 218827016 35198490 437126412 185075720 1644314 437060363 168298504 1644570 436930320 269422351 370743322 437326099 320082453 387520538 437918234 437918234 387520538 454761243 454761242 387520538 454761243 454761242 387520282 454761243 454761242 387389210) - offset: 0@0) - colorsFromArray: #(#(0.22 0.396 0.585) #(0.898 0.945 0.996) #(0.228 0.498 0.761) #(0.608 0.796 0.98) #(0.635 0.804 0.98) #(0.655 0.819 0.98) #(0.47 0.729 0.973) #(0.542 0.768 0.977) #(0.251 0.631 0.961) #(0.267 0.639 0.961) #(0.275 0.643 0.961) #(0.286 0.647 0.961) #(0.302 0.659 0.965) #(0.326 0.667 0.965) #(0.353 0.678 0.965) #(0.396 0.714 0.965) #(0.419 0.729 0.969) #(0.239 0.686 0.93) #(0.243 0.624 0.772) #(0.236 0.682 0.851) #(0.228 0.667 0.788) #(0.224 0.616 0.671) #(0.384 0.228 0.082) #(0.349 0.212 0.098) #(0.329 0.2 0.094) #(0.694 0.462 0.271) #(1.0 1.0 1.0) #( )))! Item was changed: ----- Method: ToolIcons class>>magnitude (in category 'private') ----- magnitude + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 4292861919 4286677377 4286479998 4287993237 4288059030 4287598479 4285756275 4285164138 4287072135 0 0 0 0 4288059030 4290690750 4287730065 4289901234 4289703855 4289243304 4289309097 4288322202 0 0 0 0 4293322470 4287335307 4287664272 4292532954 0 0 0 4286611584 0 0 0 0 0 4290295992 4288651167 4286151033 4294309365 0 0 0 0 0 0 0 0 0 4286677377 4288387995 4290164406 0 0 0 0 0 0 0 0 0 4290953922 4284637794 4288124823 0 0 0 0 0 0 0 0 4294309365 4285229931 4285164138 0 0 0 0 0 0 0 0 0 4287269514 4285690482 4288387995 0 0 0 4281611316 0 0 0 0 4290690750 4285493103 4285361517 0 0 4294177779 0 4282137660 0 0 0 4292796126 4283914071 4283782485 4288716960 4288585374 4287598479 4283190348 4281216558 4284440415 0 0 0 4290493371 4285822068 4285558896 4285229931 4285032552 4284835173 4284637794 4284440415 4286940549 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 874447653 738461995 85013556 875824136 573444634 471217204 875826957 607204404 875115572 875836464 489816628 875836468 875836468 50409268 875836468 875836468 268902708 875836468 875836418 101004340 875836468 875836448 167851060 873804852 875825163 204747815 874722356 875763995 321259818 335557684 875042605 102243847 930868 875836468 875836468 875836468) - offset: 0@0) - colorsFromArray: #(#(0.372 0.372 0.372) #(0.608 0.608 0.608) #(0.961 0.961 0.961) #(0.506 0.506 0.506) #(0.588 0.588 0.588) #(0.415 0.415 0.415) #(0.419 0.419 0.419) #(0.384 0.384 0.384) #(0.745 0.745 0.745) #(0.561 0.561 0.561) #(0.447 0.447 0.447) #(0.435 0.435 0.435) #(0.427 0.427 0.427) #(0.545 0.545 0.545) #(0.522 0.522 0.522) #(0.902 0.902 0.902) #(0.761 0.761 0.761) #(0.53 0.53 0.53) #(0.686 0.686 0.686) #(0.628 0.628 0.628) #(0.181 0.181 0.181) #(0.204 0.204 0.204) #(0.604 0.604 0.604) #(0.455 0.455 0.455) #(0.408 0.408 0.408) #(0.341 0.341 0.341) #(0.659 0.659 0.659) #(0.333 0.333 0.333) #(0.663 0.663 0.663) #(0.624 0.624 0.624) #(0.396 0.396 0.396) #(0.875 0.875 0.875) #(0.542 0.542 0.542) #(0.592 0.592 0.592) #(0.569 0.569 0.569) #(0.236 0.236 0.236) #(0.565 0.565 0.565) #(0.494 0.494 0.494) #(0.62 0.62 0.62) #(0.953 0.953 0.953) #(0.733 0.733 0.733) #(0.502 0.502 0.502) #(0.298 0.298 0.298) #(0.451 0.451 0.451) #(0.585 0.585 0.585) #(0.439 0.439 0.439) #(0.698 0.698 0.698) #(0.714 0.714 0.714) #(0.721 0.721 0.721) #(0.855 0.855 0.855) #(0.474 0.474 0.474) #(0.871 0.871 0.871) #( ) ))! Item was changed: ----- Method: ToolIcons class>>morph (in category 'private') ----- morph + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 4289839580 4288331238 4287542498 4287607777 4287475934 4287344604 4287278554 4287146969 4286949590 4287278037 4288525266 4290234076 4287934423 4287543013 4287016930 4287016930 4286950879 4286885086 4286819293 4286753500 4286621914 4286884827 4286751180 4288196048 4286754273 4287214049 4287608033 4287410913 4287345381 4287673834 4287476968 4287279842 4287542498 4287543013 4286161107 4286291404 4288593123 4293719549 4292209405 4293259773 4293587947 4291880146 4292931041 4293916413 4292668925 4293522685 4289708509 4287144908 4289249763 4291159551 4285840895 4289189887 4290435500 4284722775 4288005764 4291947263 4287417087 4290503935 4290234076 4287341514 4288986848 4291684863 4286957055 4290043135 4290830265 4285314924 4288597652 4292209919 4288008191 4290897919 4290036186 4287209670 4288461538 4293850862 4291814867 4293063142 4294767338 4294434247 4294568413 4294638062 4294176722 4294769125 4289576667 4286684358 4288920552 4290436015 4284919642 4287416979 4294953900 4294936894 4294946435 4294307254 4294235741 4294961804 4289445600 4286487243 4288788710 4291421627 4285904999 4288533664 4294956727 4294941008 4294950033 4294899137 4294696554 4294963868 4289642464 4286355142 4287079630 4292469742 4292075239 4292206827 4292468971 4292467684 4292468200 4292337385 4292271331 4292271590 4287932618 4286157760 4287933133 4287671254 4287867353 4287473106 4286882253 4286685904 4286554058 4286552260 4286486986 4286355142 4286617792 4288458446 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 1578631802 292362797 539127618 1895825665 2117994270 1445606482 202325275 1997372285 33573212 859313989 1763509875 1213866361 1064308758 192424752 1645101626 793665883 476466020 85208644 1751792704 621947215 1414349622 527711064 676669009 1346794755 1617375851 1095982919 656635516 1819423020 354700362 1695037706 154613091 420699479 75263577 2139062143 2139062143 2139062143) - offset: 0@0) - colorsFromArray: #(#(0.557 0.714 0.898) #(0.526 0.686 0.887) #(0.557 0.706 0.887) #(0.494 0.604 0.796) #(0.494 0.6 0.792) #(0.585 0.811 1.0) #(0.879 0.93 0.883) #(0.514 0.671 0.867) #(0.84 0.867 0.902) #(0.581 0.667 0.804) #(0.474 0.577 0.753) #(0.729 0.851 0.674) #(0.51 0.678 0.883) #(0.565 0.71 0.918) #(0.733 0.894 1.0) #(0.538 0.694 0.883) #(0.455 0.741 1.0) #(0.553 0.69 0.871) #(0.969 0.867 0.78) #(0.506 0.635 0.815) #(0.757 0.906 1.0) #(0.851 0.879 0.922) #(0.655 0.844 1.0) #(0.836 0.918 0.992) #(0.604 0.741 0.902) #(0.518 0.631 0.804) #(0.542 0.678 0.855) #(0.549 0.698 0.883) #(0.753 0.875 0.725) #(0.815 0.894 0.823) #(0.51 0.667 0.863) #(0.639 0.733 0.91) #(0.522 0.659 0.84) #(0.686 0.757 0.867) #(0.542 0.671 0.836) #(1.0 0.949 0.612) #(0.848 0.859 0.894) #(0.988 0.949 0.918) #(1.0 0.682 0.514) #(0.984 0.871 0.415) #(1.0 0.796 0.674) #(0.977 0.914 0.867) #(0.518 0.671 0.859) #(0.585 0.776 0.518) #(0.836 0.879 0.922) #(0.534 0.671 0.851) #(0.706 0.757 0.855) #(0.643 0.745 0.879) #(0.819 0.918 1.0) #(0.827 0.871 0.906) #(0.458 0.721 0.404) #(0.62 0.737 0.891) #(0.51 0.631 0.8) #(0.577 0.663 0.848) #(0.506 0.612 0.776) #(0.565 0.671 0.84) #(0.926 0.961 0.992) #(0.581 0.659 0.792) #(0.545 0.639 0.792) #(0.4 0.686 0.353) #(0.811 0.898 0.827) #(0.561 0.706 0.883) #(0.518 0.674 0.871) #(0.659 0.757 0.891) #(0.887 0.945 0.902) #(1.0 0.84 0.717) #(0.717 0.776 0.863) #(0.678 0.745 0.859) #(0.538 0.628 0.776) #(0.898 0.945 0.992) #(1.0 0.918 0.549) #(0.996 0.961 0.757) #(0.863 0.93 0.992) #(0.474 0.628 0.827) #(0.844 0.871 0.914) #(0.62 0.807 0.581) #(0.848 0.867 0.91) #(0.988 0.977 0.898) #(0.804 0.914 1.0) #(0.98 0.977 0.934) #(0.957 0.84 0.365) #(0.961 0.93 0.714) #(0.596 0.678 0.815) #(1.0 0.6 0.314) #(0.953 0.937 0.823) #(1.0 0.538 0.243) #(0.502 0.659 0.855) #(0.498 0.596 0.768) #(0.549 0.792 0.577) #(0.612 0.682 0.807) #(0.914 0.957 0.992) #(0.706 0.863 1.0) #(0.482 0.616 0.8) #(0.498 0.624 0.792) #(0.694 0.757 0.863) #(1.0 0.737 0.569) #(0.631 0.721 0.902) #(0.522 0.772 1.0) #(0.549 0.792 1.0) #(0.553 0.647 0.823) #(0.836 0.926 1.0) #(0.84 0.863 0.891) #(0.423 0.717 0.423) #(0.788 0.898 0.733) #(0.612 0.729 0.887) #(0.918 0.953 0.922) #(0.934 0.965 0.934) #(0.616 0.831 0.628) #(0.53 0.643 0.807) #(0.545 0.686 0.863) #(0.502 0.596 0.753) #(0.616 0.702 0.823) #(0.772 0.898 1.0) #(0.581 0.686 0.844) #(0.851 0.891 0.934) #(0.937 0.965 0.992) #(0.729 0.859 0.686) #(0.671 0.745 0.879) #(0.682 0.749 0.879) #(0.545 0.698 0.898) #(0.388 0.682 0.341) #(0.534 0.639 0.8) #(0.561 0.702 0.883) #(0.553 0.706 0.91) #(0.486 0.588 0.776) #(0.542 0.698 0.887) #(0.522 0.678 0.875) #( ) ))! Item was changed: ----- Method: ToolIcons class>>no (in category 'private') ----- no + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 552294233 2683000665 4025177945 4293613401 4293613401 4025177945 2683000665 552294233 0 0 0 1089165145 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2683000665 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 4025177945 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 3756742489 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2162906969 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 0 820729689 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 0 0 283858777 2683000665 4025177945 4293613401 4293613401 3756742489 2162906969 283858777 0 0) + offset: 0@0! - depth: 4 - fromArray: #( 3149642683 3149594624 3137833640 2075852800 2956634794 2746941440 3081263778 2323316736 3097859609 1514864640 3131730326 2863333376 3131709846 2863333376 3097663081 1514864640 3081263781 2323316736 3141184170 2797273088 3149351588 2075852800 3149642683 3149594624) - offset: 0@0) - colorsFromArray: #(#(0.995 0.956 0.96) #(0.972 0.753 0.757) #(0.956 0.63 0.634) #(0.936 0.466 0.47) #(0.933 0.423 0.431) #(0.944 0.548 0.552) #(0.952 0.587 0.591) #(0.96 0.671 0.674) #(0.925 0.384 0.388) #(1 1 1) #(0.921 0.341 0.349) #( ) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) ))! Item was changed: ----- Method: ToolIcons class>>notOverridden (in category 'private') ----- notOverridden + ^ Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4292955472 4292955472 4292955472 4292955472 4292955472 4292955472 0 0 0 0 0 0 4292955472 4294940569 4294940569 4294940569 4294936200 4292955472 0 0 0 0 0 0 4292955472 4294940569 4294937229 4294937999 4294936200 4292955472 0 0 0 0 0 0 4292955472 4294940569 4294937229 4294937999 4294535787 4292955472 0 0 0 0 0 0 4292955472 4294940569 4294936458 4294535787 4294535787 4292889936 0 0 0 0 0 0 4292955472 4292955472 4292955472 4292955472 4292759120 4292236111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - ^ ((ColorForm - extent: 12@12 - depth: 4 - fromArray: #( 2863311530 2863267840 2863311530 2863267840 2863311530 2863267840 2863241625 2594832384 2863237248 2594832384 2863235600 2594832384 2863235607 2594832384 2863236471 1252655104 2863241619 1789526016 2863311530 2863267840 2863311530 2863267840 2863311530 2863267840) - offset: 0@0) - colorsFromArray: #(#(1 0.525 0.533) #(1 0.552 0.56) #(1 0.541 0.552) #(0.87 0.305 0.313) #(0.878 0.301 0.313) #(1 0.529 0.541) #(0.839 0.325 0.309) #(0.976 0.415 0.419) #(1 0.591 0.599) #(0.882 0.301 0.313) #( ) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) #(0.0 0.0 0.0) ))! Item was changed: ----- Method: ToolIcons class>>primitive (in category 'private') ----- primitive + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4282729797 4282729797 4282729797 4282729797 4282729797 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283979864 4283979864 4285098345 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283716692 4284374622 4285098345 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283650899 4284374622 4284111450 4282729797 0 0 0 0 0 0 4282729797 4283979864 4285098345 4284111450 4284111450 4282729797 0 0 0 0 0 0 4282729797 4282729797 4282729797 4282729797 4282729797 4282729797 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! - depth: 4 - fromArray: #( 2004318071 2004287488 2004318071 2004287488 2004318071 2004287488 2004248166 1735852032 2004243796 1735852032 2004242692 1735852032 2004242947 1735852032 2004243507 1735852032 2004248166 1735852032 2004318071 2004287488 2004318071 2004287488 2004318071 2004287488) - offset: 0@0) - colorsFromArray: #(#(0.369 0.369 0.369) #(0.328 0.328 0.328) #(0.325 0.325 0.325) #(0.353 0.353 0.353) #(0.412 0.412 0.412) #(0.345 0.345 0.345) #(0.27 0.27 0.27) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) #( ) ))! Item was changed: ----- Method: ToolIcons class>>string (in category 'private') ----- string + + ^ Form - ^ ((ColorForm extent: 12@12 + depth: 32 + fromArray: #( 0 0 4292077049 4285510895 4285577969 4285577455 4285577199 4285577199 4285577199 4285771759 0 0 0 0 4285249007 4286956786 4287810035 4287218674 4285837807 0 4285771759 4285771503 0 0 0 0 4285577455 4287809779 4287809779 4287152882 4285771759 0 4285705967 4285705965 0 0 0 0 4285838063 4286562033 4287743987 4287152882 4285771503 0 4285705453 4285639661 0 0 0 0 4293981949 4286231022 4285642223 4286495729 4285705453 0 4285639661 4285639149 0 0 0 0 0 0 4293981693 4285377517 4285639661 0 4285638893 4285638892 0 0 0 0 0 0 0 4285639661 4285638893 0 4285638892 4285572844 0 0 0 0 0 0 0 4285638893 4285638892 0 4285572844 4285507052 0 0 0 0 0 0 0 4285638380 4285572844 0 4285507052 4285506540 0 0 0 0 0 0 0 4285507052 4285507052 0 4285506540 4285506284 0 0 0 0 0 0 0 4285506796 4285506540 0 4285506028 4285440492 0 0 0 0 0 0 0 4285506284 4285506284 0 4285440236 4285440234 0 0) + offset: 0@0! - depth: 8 - fromArray: #( 673716502 100672805 623061032 673717016 118757928 587409448 673710082 33825576 354166824 673717518 268698408 19277864 673714447 504037672 638134312 673720360 302655016 606152744 673720360 673588264 555886632 673720360 673456424 572991528 673720360 671621672 656418856 673720360 673654568 538912808 673720360 671948840 84682792 673720360 673128232 320284712) - offset: 0@0) - colorsFromArray: #(#(0.439 0.721 0.937) #(0.447 0.674 0.93) #(0.573 0.784 0.953) #(0.451 0.682 0.937) #(0.534 0.761 0.949) #(0.435 0.631 0.926) #(0.439 0.729 0.945) #(0.573 0.788 0.953) #(0.443 0.651 0.926) #(0.443 0.663 0.93) #(0.427 0.671 0.93) #(0.494 0.733 0.945) #(0.431 0.631 0.926) #(0.435 0.643 0.926) #(0.498 0.745 0.945) #(0.478 0.694 0.934) #(0.569 0.78 0.953) #(0.941 0.965 0.992) #(0.941 0.961 0.992) #(0.431 0.628 0.926) #(0.538 0.764 0.949) #(0.447 0.682 0.937) #(0.435 0.706 0.937) #(0.431 0.628 0.918) #(0.522 0.768 0.949) #(0.827 0.898 0.977) #(0.455 0.694 0.937) #(0.419 0.71 0.937) #(0.447 0.682 0.93) #(0.455 0.698 0.937) #(0.443 0.71 0.937) #(0.435 0.635 0.926) #(0.435 0.639 0.926) #(0.443 0.659 0.926) #(0.439 0.651 0.926) #(0.451 0.686 0.937) #(0.443 0.659 0.93) #(0.439 0.717 0.937) #(0.443 0.671 0.93) #(0.435 0.647 0.926) #( ) ))! From lewis at mail.msen.com Mon Mar 9 00:38:56 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 9 00:38:58 2015 Subject: [squeak-dev] Reassessing the hack in WriteStream>>nextChunkPut: In-Reply-To: <54FCC194.7090102@gmx.de> References: <102707C8-21BB-4391-8F25-5C470841B721@gmx.de> <20150308152918.GA76625@shell.msen.com> <20150308155924.GA80978@shell.msen.com> <54434879-247E-4C6C-BFBD-9610A644CFE4@gmx.de> <20150308203834.GB23605@shell.msen.com> <54FCC194.7090102@gmx.de> Message-ID: <20150309003856.GA62084@shell.msen.com> On Sun, Mar 08, 2015 at 10:39:32PM +0100, Andreas Wacknitz wrote: > Am 08.03.15 21:38, schrieb David T. Lewis: > >On Sun, Mar 08, 2015 at 08:49:40PM +0100, Tobias Pape wrote: > >>On 08.03.2015, at 20:43, Levente Uzonyi wrote: > >>>On Sun, 8 Mar 2015, Tobias Pape wrote: > >>>> > >>>>thanks for taking the time to check! > >>>> > >>>>On 08.03.2015, at 20:03, Levente Uzonyi wrote: > >>>> > >>>>>#flush is pretty costly, and IMO it's called way too often if it's in > >>>>>#nextChunkPut:. The most common workaround to avoid frequent calls is > >>>>>to use InMidstOfFileinNotification to check if it's a bulk write, and > >>>>>flush only once in those cases. For some reason this technique is not > >>>>>used in case of class comments. > >>>>>I changed the last lines of ClassDescription >> #classComment:stamp: > >>>>>in my image to > >>>>> > >>>>> self organization classComment: (RemoteString newString: aString > >>>>> onFileNumber: 2) stamp: aStamp. > >>>>> InMidstOfFileinNotification signal ifFalse: [file flush]. > >>>>> SystemChangeNotifier uniqueInstance classCommented: self. > >>>>> > >>>>>Then removed the #flush from WriteStream >> #nextChunkPut:, and it > >>>>>seems to me that the problem is gone. > >>>>Can you tell me whether the Changes file is read/written via one stream > >>>>or two? > >>>>I understood its two file descriptors but are these two in different > >>>>streams or > >>>>the same stream? > >>>Of course, those are two (or more) different streams. We use SourceFiles > >>>at: 2 for writing and CurrentReadOnlySourceFiles at: 2 for reading. > >>Darn; if it had been a ReadWriteStream, one could say that we'd only > >>really needed #flush when > >>we switch from writing to reading mode?. > >>So it is more elaborate. > >> > >I am attaching a small C program that shows the problem. This uses the > >same kind of fseek/ftell calls used in the VM FilePlugin. This confirms > >the different C runtime behaviour. On my Ubuntu system, an explicit > >flush is required, and on my SuSE box, no flush is required. > > > >Levente is probably right in saying that this is not an OS bug. It may > >just be different behaviour in different versions of libc. > > FWIW, Solaris 10 (SPARC), OpenSolaris (SPARC) and openindiana (x64) > print the same as your Ubuntu installation does. Thanks Andreas, This confirms that it is not an OS bug (my apologies to Ubuntu). I also tried Levente's change to ClassDescription>>classComment:stamp: to use InMidstOfFileinNotification, and reverted WriteStream>>nextChunkPut: back to the original version (yo 8/13/2003) to remove the flush. It works fine on my Ubuntu system. I think Levente's fix is the right thing to do. Levente, do you want to commit the change? Dave From commits at source.squeak.org Mon Mar 9 01:41:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 01:41:45 2015 Subject: [squeak-dev] The Trunk: Kernel-ul.910.mcz Message-ID: Levente Uzonyi uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-ul.910.mcz ==================== Summary ==================== Name: Kernel-ul.910 Author: ul Time: 9 March 2015, 2:24:39.637 am UUID: 8c3e3968-8e23-4e8c-a875-deff467edebb Ancestors: Kernel-mt.909 When saving a class comment, flush the changes file, unless we're doing a file-in. =============== Diff against Kernel-mt.909 =============== Item was changed: ----- Method: ClassDescription>>classComment:stamp: (in category 'fileIn/Out') ----- classComment: aString stamp: aStamp "Store the comment, aString or Text or RemoteString, associated with the class we are organizing. Empty string gets stored only if had a non-empty one before." | ptr header file oldCommentRemoteStr | (aString isKindOf: RemoteString) ifTrue: [SystemChangeNotifier uniqueInstance classCommented: self. ^ self organization classComment: aString stamp: aStamp]. oldCommentRemoteStr := self organization commentRemoteStr. (aString size = 0) & (oldCommentRemoteStr == nil) ifTrue: [^ self organization classComment: nil]. "never had a class comment, no need to write empty string out" ptr := oldCommentRemoteStr ifNil: [0] ifNotNil: [oldCommentRemoteStr sourcePointer]. SourceFiles ifNotNil: [(file := SourceFiles at: 2) ifNotNil: [file setToEnd; cr; nextPut: $!!. "directly" "Should be saying (file command: 'H3') for HTML, but ignoring it here" header := String streamContents: [:strm | strm nextPutAll: self name; nextPutAll: ' commentStamp: '. aStamp storeOn: strm. strm nextPutAll: ' prior: '; nextPutAll: ptr printString]. file nextChunkPut: header]]. self organization classComment: (RemoteString newString: aString onFileNumber: 2) stamp: aStamp. + file ifNotNil: [ InMidstOfFileinNotification signal ifFalse: [ file flush ] ]. SystemChangeNotifier uniqueInstance classCommented: self. ! From commits at source.squeak.org Mon Mar 9 01:44:46 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 01:44:47 2015 Subject: [squeak-dev] The Trunk: Collections-ul.604.mcz Message-ID: Levente Uzonyi uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-ul.604.mcz ==================== Summary ==================== Name: Collections-ul.604 Author: ul Time: 9 March 2015, 2:44:00.566 am UUID: ddf1747a-03bc-4cc1-bb21-a76ff64052df Ancestors: Collections-eem.603 Reverted the previous workaround for the class comment saving bug, because it's enough to flush the changes file after saving the class comment. See Kerneul-ul.910 for the actual fix. =============== Diff against Collections-eem.603 =============== Item was changed: ----- Method: WriteStream>>nextChunkPut: (in category 'fileIn/Out') ----- nextChunkPut: aString "Append the argument, aString, to the receiver, doubling embedded terminators." | i remainder terminator | terminator := $!!. remainder := aString. [(i := remainder indexOf: terminator) = 0] whileFalse: [self nextPutAll: (remainder copyFrom: 1 to: i). self nextPut: terminator. "double imbedded terminators" remainder := remainder copyFrom: i+1 to: remainder size]. self nextPutAll: remainder. aString includesUnifiedCharacter ifTrue: [ self nextPut: terminator. self nextPutAll: ']lang['. aString writeLeadingCharRunsOn: self. ]. self nextPut: terminator. - self flush. "workaround for clib runtime bug on some platforms, affecting initial class comment creation" ! From lewis at mail.msen.com Mon Mar 9 02:10:22 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 9 02:10:23 2015 Subject: [squeak-dev] The Inbox: Tests-dtl.312.mcz In-Reply-To: <201503081918.t28JIMPb014119@shell.msen.com> References: <201503081918.t28JIMPb014119@shell.msen.com> Message-ID: <20150309021022.GA78602@shell.msen.com> On Sun, Mar 08, 2015 at 07:18:16PM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of Tests to project The Inbox: > http://source.squeak.org/inbox/Tests-dtl.312.mcz > > ==================== Summary ==================== > > Name: Tests-dtl.312 > Author: dtl > Time: 8 March 2015, 2:18:09.639 pm > UUID: fc56f2ba-15d2-4264-a9e6-6faf41650536 > Ancestors: Tests-eem.311 > > FileStream>>testFileSizeWithSharedFileStreams illustrates a problem that is exhibited on some platforms (notably recent Ubuntu). > This is moved to the treated inbox since the correct fix is now in Kernel-ul.910.mcz Dave From bert at freudenbergs.de Mon Mar 9 12:44:06 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Mar 9 12:44:10 2015 Subject: [squeak-dev] Removing class PreDebugWindow (was: How to view an old Error in the debugger?) In-Reply-To: <20150306000700.GA88582@shell.msen.com> References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> <20150306000700.GA88582@shell.msen.com> Message-ID: <489880BD-2C47-4073-96B8-26FF40017E6E@freudenbergs.de> On 06.03.2015, at 01:07, David T. Lewis wrote: > > On Tue, Mar 03, 2015 at 07:56:02PM -0800, Bert Freudenberg wrote: >> On 03.03.2015, at 18:59, Chris Muller wrote: >>> >>> On Tue, Mar 3, 2015 at 5:59 PM, Bert Freudenberg wrote: >>>> >>>> You have to suspend the process with the error, and do the error handling in another process. That way you can deal with the error before it is unwound, you can resume etc. >>> >>> That makes sense but I still want my app to handle the error the way >>> it does presenting the messageText, but I want to add a button, >>> "Debug" which will open up what happened in the debugger. The process >>> which the error occurs in is the UI process so I can't suspending it. >>> It seems like I want to somehow clone it. Wait.. A Continuation!? >>> Is that what I need? >> >> What you need is a prettier PreDebugWindow. This used to be what was shown before the actual debugger (in openNotifierContents:label:) but that's now toolbuilderified. >> > > PreDebugWindow is unreferenced since a long time. The debug notifier is now > created with ToolBuilder. Is there any reason that PreDebugWindow should > stay in the image? Can't think of any ... - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150309/6df3cbe9/smime-0001.bin From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 9 13:27:12 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 9 13:36:13 2015 Subject: [squeak-dev] Re: Squeak 4.6 release update In-Reply-To: References: Message-ID: <1425907632442-4810640.post@n4.nabble.com> Nice! Currently, I am finishing tree search for the Object Explorer (i.e. all pluggable tree morphs). I will commit it soonerish. :-) Best, Marcel -- View this message in context: http://forum.world.st/Squeak-4-6-release-update-tp4810104p4810640.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 9 14:15:40 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 9 14:24:40 2015 Subject: [squeak-dev] Re: Removing class PreDebugWindow (was: How to view an old Error in the debugger?) In-Reply-To: <489880BD-2C47-4073-96B8-26FF40017E6E@freudenbergs.de> References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> <20150306000700.GA88582@shell.msen.com> <489880BD-2C47-4073-96B8-26FF40017E6E@freudenbergs.de> Message-ID: <1425910540656-4810662.post@n4.nabble.com> In Vivide, I do it like this: https://github.com/hpi-swa/vivide/blob/master/repository/Vivide.package/ViToolSet.class/class/debug.context.label.contents.fullView..st https://github.com/hpi-swa/vivide/blob/master/repository/Vivide.package/VivideLight.class/instance/openDebugger..st I still use an instance of Debugger for its convenience methods. The error handling stuff might as well be kept on the stack. As you can see, I get rid of them for now. :-) Maybe this helps. Best, Marcel -- View this message in context: http://forum.world.st/How-to-view-an-old-Error-in-the-debugger-tp4809004p4810662.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 9 14:17:00 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 9 14:26:02 2015 Subject: [squeak-dev] Re: Removing class PreDebugWindow (was: How to view an old Error in the debugger?) In-Reply-To: <1425910540656-4810662.post@n4.nabble.com> References: <16B2C776-2AFF-4A5A-82AD-37D53C82D6BD@freudenbergs.de> <20150306000700.GA88582@shell.msen.com> <489880BD-2C47-4073-96B8-26FF40017E6E@freudenbergs.de> <1425910540656-4810662.post@n4.nabble.com> Message-ID: <1425910620675-4810664.post@n4.nabble.com> I think it is preferrable to write a tool for the suspended process. That tool could have full control over stack manipulation. Best, Marcel -- View this message in context: http://forum.world.st/How-to-view-an-old-Error-in-the-debugger-tp4809004p4810664.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Mar 9 15:01:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 15:01:18 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.776.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.776.mcz ==================== Summary ==================== Name: Morphic-mt.776 Author: mt Time: 9 March 2015, 8:00:45.812 am UUID: 7bf57a20-04fc-c646-9e8c-81d876a187f5 Ancestors: Morphic-topa.775 Scrolling/drawing modified to consider visiblilty of items in SimpleHierarchicalListMorph. The implementation of keyboard event handling is now also closer to PluggableListMorph. =============== Diff against Morphic-topa.775 =============== Item was added: + ----- Method: ScrollPane>>offsetToShow: (in category 'scrolling') ----- + offsetToShow: aRectangle + "Calculate the offset necessary to show the rectangle." + + | offset scrollRange | + offset := scroller offset. + scrollRange := self hUnadjustedScrollRange @ self vUnadjustedScrollRange. + + "Vertical Scrolling" + (aRectangle top - offset y) < 0 + ifTrue: [offset := offset x @ ( + (aRectangle top min: scrollRange y - scroller height))]. + + ((aRectangle bottom - offset y) > scroller height and: [aRectangle height <= scroller height]) + ifTrue: [offset := offset x @ ( + (aRectangle top - scroller height + aRectangle height min: scrollRange y - scroller height))]. + + "Horizontal Scrolling" + (aRectangle left - offset x) < 0 + ifTrue: [offset := ( + (aRectangle left min: scrollRange x - scroller width)) @ offset y]. + + ((aRectangle right - offset x) > scroller width and: [aRectangle width <= scroller width]) + ifTrue: [offset := ( + (aRectangle left - scroller width + aRectangle width min: scrollRange x - scroller width)) @ offset y]. + + ^ offset! Item was changed: ----- Method: ScrollPane>>scrollToShow: (in category 'scrolling') ----- scrollToShow: aRectangle - "scroll to include as much of aRectangle as possible, where aRectangle is in the scroller's local space" - | range | - ((aRectangle top - scroller offset y) >= 0 and: [ - (aRectangle bottom - scroller offset y) <= (self innerBounds height) ]) - ifTrue:[ "already visible"^self ]. + scroller offset: (self offsetToShow: aRectangle). + self setScrollDeltas.! - range := self vLeftoverScrollRange. - scrollBar value: (range > 0 - ifTrue: [((aRectangle top) / self vLeftoverScrollRange) - truncateTo: scrollBar scrollDelta] - ifFalse: [0]). - scroller offset: -3 @ (range * scrollBar value).! Item was changed: ----- Method: SimpleHierarchicalListMorph>>adjustSubmorphPositions (in category 'private') ----- adjustSubmorphPositions | p | - p := 0@0. scroller submorphsDo: [ :each | | h | + each visible ifTrue: [ + h := each height. + each privateBounds: (p extent: 9999@h). + p := p + (0@h) ]]. - h := each height. - each privateBounds: (p extent: 9999@h). - p := p + (0@h) - ]. self changed; layoutChanged; setScrollDeltas. ! Item was changed: ----- Method: SimpleHierarchicalListMorph>>arrowKey: (in category 'keyboard navigation') ----- + arrowKey: asciiValue - arrowKey: aChar "Handle a keyboard navigation character. Answer true if handled, false if not." | keyEvent | + keyEvent := asciiValue. - keyEvent := aChar asciiValue. keyEvent = 31 ifTrue:["down" self setSelectionIndex: self getSelectionIndex+1. ^true]. keyEvent = 30 ifTrue:["up" self setSelectionIndex: (self getSelectionIndex-1 max: 1). ^true]. keyEvent = 1 ifTrue: ["home" self setSelectionIndex: 1. ^true]. keyEvent = 4 ifTrue: ["end" self setSelectionIndex: scroller submorphs size. ^true]. keyEvent = 11 ifTrue: ["page up" self setSelectionIndex: (self getSelectionIndex - self numSelectionsInView max: 1). ^true]. keyEvent = 12 ifTrue: ["page down" self setSelectionIndex: self getSelectionIndex + self numSelectionsInView. ^true]. keyEvent = 29 ifTrue:["right" selectedMorph ifNotNil:[ (selectedMorph canExpand and:[selectedMorph isExpanded not]) ifTrue:[self toggleExpandedState: selectedMorph] ifFalse:[self setSelectionIndex: self getSelectionIndex+1]. ]. ^true]. keyEvent = 28 ifTrue:["left" selectedMorph ifNotNil:[ (selectedMorph isExpanded) ifTrue:[self toggleExpandedState: selectedMorph] ifFalse:[self setSelectionIndex: (self getSelectionIndex-1 max: 1)]. ]. ^true]. ^false! Item was changed: ----- Method: SimpleHierarchicalListMorph>>drawLinesOn: (in category 'drawing') ----- drawLinesOn: aCanvas + | lColor | lColor := self lineColor. aCanvas transformBy: scroller transform clippingTo: scroller innerBounds during:[:clippedCanvas | + scroller submorphs + select: [:submorph | submorph visible] + thenDo: [ :submorph | + ((submorph isExpanded + or: [clippedCanvas isVisible: submorph fullBounds] ) + or: [ submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling]]) + ifTrue: [submorph drawLinesOn: clippedCanvas lineColor: lColor] ] ] - scroller submorphs do: [ :submorph | - ( - (submorph isExpanded) or: [ - (clippedCanvas isVisible: submorph fullBounds) or: [ - (submorph nextSibling notNil and: [clippedCanvas isVisible: submorph nextSibling]) ]]) ifTrue:[ - submorph drawLinesOn: clippedCanvas lineColor: lColor. - ] - ]. - ] smoothing: scroller smoothing. ! Item was changed: ----- Method: SimpleHierarchicalListMorph>>itemFromPoint: (in category 'event handling') ----- itemFromPoint: aPoint "Return the list element (morph) at the given point or nil if outside" + | ptY visibleRows | - | ptY | scroller hasSubmorphs ifFalse:[^nil]. (scroller fullBounds containsPoint: aPoint) ifFalse:[^nil]. + + visibleRows := scroller submorphs select: [:m | m visible]. + + ptY := (visibleRows first point: aPoint from: self) y. - ptY := (scroller firstSubmorph point: aPoint from: self) y. "note: following assumes that submorphs are vertical, non-overlapping, and ordered" + visibleRows first top > ptY ifTrue:[^nil]. + visibleRows last bottom < ptY ifTrue:[^nil]. - scroller firstSubmorph top > ptY ifTrue:[^nil]. - scroller lastSubmorph bottom < ptY ifTrue:[^nil]. "now use binary search" + ^visibleRows + findBinary:[:item| - ^scroller - findSubmorphBinary:[:item| (item top <= ptY and:[item bottom >= ptY]) ifTrue:[0] "found" + ifFalse:[ (item top + item bottom // 2) > ptY ifTrue:[-1] ifFalse:[1]]] + ifNone: [nil]! - ifFalse:[ (item top + item bottom // 2) > ptY ifTrue:[-1] ifFalse:[1]]]! Item was changed: ----- Method: SimpleHierarchicalListMorph>>keyStroke: (in category 'event handling') ----- keyStroke: event "Process potential command keys" + (self scrollByKeyboard: event) ifTrue: [^ true]. + + event keyCharacter asciiValue < 32 ifTrue: [ + ^ self specialKeyPressed: event keyCharacter asciiValue]. + + (self keyStrokeAction: event) ifTrue: [^ true]. + + ^ false! - | args aCharacter | - (self scrollByKeyboard: event) ifTrue: [^self]. - aCharacter := event keyCharacter. - (self arrowKey: aCharacter) ifTrue: [^true]. - keystrokeActionSelector isNil ifTrue: [^false]. - (args := keystrokeActionSelector numArgs) = 1 - ifTrue: [^model perform: keystrokeActionSelector with: aCharacter]. - args = 2 - ifTrue: - [^model - perform: keystrokeActionSelector - with: aCharacter - with: self]. - ^self - error: 'The keystrokeActionSelector must be a 1- or 2-keyword symbol'! Item was added: + ----- Method: SimpleHierarchicalListMorph>>keyStrokeAction: (in category 'event handling') ----- + keyStrokeAction: event + + keystrokeActionSelector ifNil: [^false]. + + keystrokeActionSelector numArgs = 1 + ifTrue: + [^model + perform: keystrokeActionSelector + with: event keyCharacter]. + keystrokeActionSelector numArgs = 2 + ifTrue: + [^model + perform: keystrokeActionSelector + with: event keyCharacter + with: self]. + ^self error: 'The keystrokeActionSelector must be a 1- or 2-keyword symbol'! Item was changed: ----- Method: SimpleHierarchicalListMorph>>selectionIndex: (in category 'selection') ----- selectionIndex: idx "Called internally to select the index-th item." + | theMorph index | - | theMorph range index | idx ifNil: [^ self]. index := idx min: scroller submorphs size max: 0. (theMorph := index = 0 ifTrue: [nil] ifFalse: [scroller submorphs at: index]) + ifNotNil: [self scrollToShow: theMorph bounds]. - ifNotNil: - [((theMorph bounds top - scroller offset y) >= 0 - and: [(theMorph bounds bottom - scroller offset y) <= bounds height]) ifFalse: - ["Scroll into view -- should be elsewhere" - range := self vTotalScrollRange. - scrollBar value: (range > 0 - ifTrue: [((index-1 * theMorph height) / self vTotalScrollRange) - truncateTo: scrollBar scrollDelta] - ifFalse: [0]). - scroller offset: -3 @ (range * scrollBar value)]]. self selectedMorph: theMorph! Item was changed: ----- Method: SimpleHierarchicalListMorph>>setSelectionIndex: (in category 'keyboard navigation') ----- setSelectionIndex: idx "Called internally to select the index-th item." + | theMorph index max currentIndex | - | theMorph index | idx ifNil: [^ self]. + max := scroller submorphs size. + currentIndex := self getSelectionIndex. + + index := idx min: max max: 0. - index := idx min: scroller submorphs size max: 0. theMorph := index = 0 ifTrue: [nil] ifFalse: [scroller submorphs at: index]. + + "Skip invisible rows." + [theMorph notNil and: [theMorph visible not]] whileTrue: [ + currentIndex < index + ifTrue: [index := index + 1] + ifFalse: [index := index - 1]. + (index < 1 or: [index > max]) ifTrue: [^ self]. + theMorph := scroller submorphs at: index. + ]. self setSelectedMorph: theMorph.! Item was added: + ----- Method: SimpleHierarchicalListMorph>>specialKeyPressed: (in category 'event handling') ----- + specialKeyPressed: asciiValue + + ^ self arrowKey: asciiValue! From commits at source.squeak.org Mon Mar 9 15:05:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 15:05:58 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.97.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.97.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.97 Author: mt Time: 9 March 2015, 8:05:51.922 am UUID: 9b1ed5c3-36b8-a94a-ac38-8e3166b88aa4 Ancestors: ToolBuilder-Morphic-mt.96 Tree filter added to pluggable tree morphs. =============== Diff against ToolBuilder-Morphic-mt.96 =============== Item was changed: SimpleHierarchicalListMorph subclass: #PluggableTreeMorph + instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass lastKeystrokeTime lastKeystrokes' + classVariableNames: 'MaximumSearchDepth' - instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass' - classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! A pluggable tree morph.! Item was added: + ----- Method: PluggableTreeMorph class>>maximumSearchDepth (in category 'preferences') ----- + maximumSearchDepth + + + ^ MaximumSearchDepth ifNil: [ 3 ]! Item was added: + ----- Method: PluggableTreeMorph class>>maximumSearchDepth: (in category 'preferences') ----- + maximumSearchDepth: anInteger + MaximumSearchDepth := anInteger.! Item was added: + ----- Method: PluggableTreeMorph>>basicKeyPressed: (in category 'event handling') ----- + basicKeyPressed: aChar + + self updateLastKeystrokes: aChar. + + model okToChange ifFalse: [^ false]. + + PluggableListMorph filterableLists + ifTrue: [self filterTree] + ifFalse: [self selectNextMorphByFilter]. + + ^ true! Item was added: + ----- Method: PluggableTreeMorph>>filterTree (in category 'filtering') ----- + filterTree + + self hasFilter ifFalse: [ + self removeFilter. + ^ self]. + + self indicateFiltered. + + "Clean up the tree." + self roots do: [:root | + root applyFilter: lastKeystrokes]. + + self adjustSubmorphPositions.! Item was added: + ----- Method: PluggableTreeMorph>>hasFilter (in category 'filtering') ----- + hasFilter + ^ lastKeystrokes isEmptyOrNil not! Item was added: + ----- Method: PluggableTreeMorph>>indicateFiltered (in category 'filtering') ----- + indicateFiltered + "self color: (Color gray: 0.95)."! Item was added: + ----- Method: PluggableTreeMorph>>indicateUnfiltered (in category 'filtering') ----- + indicateUnfiltered + self color: Color white. + scroller submorphsDo: [:m | + m visible: true; backgroundColor: nil]. + self adjustSubmorphPositions.! Item was added: + ----- Method: PluggableTreeMorph>>initialize (in category 'initialization') ----- + initialize + + super initialize. + + "Filter" + lastKeystrokeTime := 0. + lastKeystrokes := ''! Item was added: + ----- Method: PluggableTreeMorph>>keyStroke: (in category 'event handling') ----- + keyStroke: event + + ^ (super keyStroke: event) + ifTrue: [true] + ifFalse: [self basicKeyPressed: event keyCharacter].! Item was added: + ----- Method: PluggableTreeMorph>>removeFilter (in category 'filtering') ----- + removeFilter + lastKeystrokes := String empty. + self indicateUnfiltered.! Item was added: + ----- Method: PluggableTreeMorph>>selectNextMorphByFilter (in category 'filtering') ----- + selectNextMorphByFilter! Item was added: + ----- Method: PluggableTreeMorph>>specialKeyPressed: (in category 'event handling') ----- + specialKeyPressed: asciiValue + + (super specialKeyPressed: asciiValue) + ifTrue: [^ true]. + + (#(8 13) includes: asciiValue) ifTrue: [ + "backspace key" + self removeFilter. + ^ true]. + + ^ false! Item was added: + ----- Method: PluggableTreeMorph>>updateLastKeystrokes: (in category 'event handling') ----- + updateLastKeystrokes: aChar + + | milliseconds slowKeyStroke | + milliseconds := Time millisecondClockValue. + slowKeyStroke := (Time milliseconds: milliseconds since: lastKeystrokeTime) + > (PluggableListMorph filterableLists ifTrue: [ 500 ] ifFalse: [ 300 ]). + lastKeystrokeTime := milliseconds. + + slowKeyStroke + ifTrue: [lastKeystrokes := aChar asLowercase asString] + ifFalse: [lastKeystrokes := lastKeystrokes , aChar asLowercase asString.].! Item was added: + ----- Method: PluggableTreeMorph>>vUnadjustedScrollRange (in category 'scrolling') ----- + vUnadjustedScrollRange + + | range | + range := 0. + scroller submorphsDo: [:m | m visible ifTrue: [range := range + m height]]. + ^ range! From commits at source.squeak.org Mon Mar 9 15:11:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 15:11:07 2015 Subject: [squeak-dev] The Trunk: Tools-mt.547.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.547.mcz ==================== Summary ==================== Name: Tools-mt.547 Author: mt Time: 9 March 2015, 8:10:42.902 am UUID: 89562b81-465b-2b47-b3d6-765bb2bce618 Ancestors: Tools-topa.546 Tree filtering/searching added (to object explorers and other pluggable trees) =============== Diff against Tools-topa.546 =============== Item was changed: StringMorph subclass: #IndentingListItemMorph + instanceVariableNames: 'indentLevel isExpanded complexContents firstChild container nextSibling icon backgroundColor' - instanceVariableNames: 'indentLevel isExpanded complexContents firstChild container nextSibling icon' classVariableNames: '' poolDictionaries: '' category: 'Tools-Explorer'! !IndentingListItemMorph commentStamp: '' prior: 0! An IndentingListItemMorph is a StringMorph that draws itself with an optional toggle at its left, as part of the display of the SimpleHierarchicalListMorph. It will also display lines around the toggle if the #showLinesInHierarchyViews Preference is set. Instance variables: indentLevel the indent level, from 0 at the root and increasing by 1 at each level of the hierarchy. isExpanded true if this item is expanded (showing its children) complexContents an adapter wrapping my represented item that can answer its children, etc. firstChild my first child, or nil if none container my container nextSibling the next item in the linked list of siblings, or nil if none. Contributed by Bob Arning as part of the ObjectExplorer package. Don't blame him if it's not perfect. We wanted to get it out for people to play with.! Item was added: + ----- Method: IndentingListItemMorph>>applyFilter: (in category 'filtering') ----- + applyFilter: filter + + | selfMatch childMatch | + self isExpanded ifTrue: [self toggleExpandedState]. + + selfMatch := self matches: filter. + childMatch := self matchesAnyChild: filter. + + selfMatch | childMatch ifFalse: [^ self hide]. + + selfMatch ifTrue: [ + self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. + childMatch ifTrue: [ + self toggleExpandedState. + self childrenDo: [:child | child applyFilter: filter]].! Item was added: + ----- Method: IndentingListItemMorph>>backgroundColor (in category 'accessing') ----- + backgroundColor + ^ backgroundColor! Item was added: + ----- Method: IndentingListItemMorph>>backgroundColor: (in category 'accessing') ----- + backgroundColor: aColor + backgroundColor := aColor. + self changed.! Item was changed: ----- Method: IndentingListItemMorph>>drawLinesOn:lineColor: (in category 'drawing') ----- drawLinesOn: aCanvas lineColor: lineColor | hasToggle | hasToggle := self hasToggle. "Draw line from toggle to text" self drawLineToggleToTextOn: aCanvas lineColor: lineColor hasToggle: hasToggle. "Draw the line from my toggle to the nextSibling's toggle" + self nextVisibleSibling ifNotNil: [ self drawLinesToNextSiblingOn: aCanvas lineColor: lineColor hasToggle: hasToggle ]. - self nextSibling ifNotNil: [ self drawLinesToNextSiblingOn: aCanvas lineColor: lineColor hasToggle: hasToggle ]. "If I have children and am expanded, draw a line to my first child" + (self firstVisibleChild notNil and: [ self isExpanded ]) - (self firstChild notNil and: [ self isExpanded ]) ifTrue: [ self drawLinesToFirstChildOn: aCanvas lineColor: lineColor]! Item was changed: ----- Method: IndentingListItemMorph>>drawLinesToFirstChildOn:lineColor: (in category 'drawing') ----- drawLinesToFirstChildOn: aCanvas lineColor: lineColor "Draw line from me to next sibling" + | child vLineX vLineTop vLineBottom childBounds childCenter | + child := self firstVisibleChild. + childBounds := child toggleBounds. - | vLineX vLineTop vLineBottom childBounds childCenter | - childBounds := self firstChild toggleBounds. childCenter := childBounds center. vLineX := childCenter x - 1. vLineTop := bounds bottom. + child hasToggle - self firstChild hasToggle ifTrue: [vLineBottom := childCenter y - 7] ifFalse: [vLineBottom := childCenter y]. aCanvas line: vLineX @ vLineTop to: vLineX @ vLineBottom width: 1 color: lineColor! Item was changed: ----- Method: IndentingListItemMorph>>drawLinesToNextSiblingOn:lineColor:hasToggle: (in category 'drawing') ----- drawLinesToNextSiblingOn: aCanvas lineColor: lineColor hasToggle: hasToggle | myBounds nextSibBounds vLineX myCenter vLineTop vLineBottom | myBounds := self toggleBounds. + nextSibBounds := self nextVisibleSibling toggleBounds. - nextSibBounds := self nextSibling toggleBounds. myCenter := myBounds center. vLineX := myCenter x - 1. vLineTop := myCenter y. vLineBottom := nextSibBounds center y. "Draw line from me to next sibling" aCanvas line: vLineX @ vLineTop to: vLineX @ vLineBottom width: 1 color: lineColor! Item was changed: ----- Method: IndentingListItemMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas - | tRect sRect columnScanner columnLeft | + self backgroundColor ifNotNil: [:c | + aCanvas fillRectangle: self innerBounds color: c]. + tRect := self toggleRectangle. - - tRect := self toggleRectangle. - - sRect := bounds withLeft: tRect right + 4. - sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. self drawToggleOn: aCanvas in: tRect. + sRect := bounds withLeft: tRect right + 4. + sRect := sRect top: sRect top + sRect bottom - self fontToUse height // 2. + (container columns isNil or: [(contents asString indexOf: Character tab) = 0]) ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: sRect left @ (self top + (self height - icon height // 2)). sRect := sRect left: sRect left + icon width + 2. ]. aCanvas drawString: contents asString in: sRect font: self fontToUse color: color. ] ifFalse: [ columnLeft := sRect left. columnScanner := ReadStream on: contents asString. container columns withIndexDo: [ :widthSpec :column | | columnRect columnData columnWidth | "Draw icon." column = self class iconColumnIndex ifTrue: [ icon ifNotNil: [ aCanvas translucentImage: icon at: columnLeft @ (self top + (self height - icon height // 2)). columnLeft := columnLeft + icon width + 2]]. columnWidth := widthSpec isNumber ifTrue: [widthSpec] ifFalse: [widthSpec isBlock ifTrue: [widthSpec cull: container cull: self] ifFalse: [widthSpec ifNil: [self width] ifNotNil: [50 "Fall back"]]]. columnRect := columnLeft @ sRect top extent: columnWidth @ sRect height. columnData := columnScanner upTo: Character tab. "Draw string." columnData ifNotEmpty: [ aCanvas drawString: columnData in: columnRect font: self fontToUse color: color]. "Compute next column offset." columnLeft := columnRect right + 5. column = 1 ifTrue: [columnLeft := columnLeft - tRect right + self left]. ]. ]! Item was added: + ----- Method: IndentingListItemMorph>>firstVisibleChild (in category 'accessing') ----- + firstVisibleChild + + ^ self firstChild ifNotNil: [:c | + c visible ifTrue: [c] ifFalse: [c nextVisibleSibling]]! Item was added: + ----- Method: IndentingListItemMorph>>getChildren (in category 'model access') ----- + getChildren + + ^ self getChildrenFor: complexContents! Item was added: + ----- Method: IndentingListItemMorph>>getChildrenFor: (in category 'model access') ----- + getChildrenFor: model + + ^ model contents! Item was added: + ----- Method: IndentingListItemMorph>>getIcon (in category 'model access') ----- + getIcon + + ^ complexContents icon! Item was added: + ----- Method: IndentingListItemMorph>>getLabel (in category 'model access') ----- + getLabel + + ^ self getLabelFor: complexContents! Item was added: + ----- Method: IndentingListItemMorph>>getLabelFor: (in category 'model access') ----- + getLabelFor: model + + ^ model asString! Item was changed: ----- Method: IndentingListItemMorph>>initWithContents:prior:forList:indentLevel: (in category 'initialization') ----- initWithContents: anObject prior: priorMorph forList: hostList indentLevel: newLevel container := hostList. complexContents := anObject. + self initWithContents: self getLabel font: Preferences standardListFont emphasis: nil. - self initWithContents: anObject asString font: Preferences standardListFont emphasis: nil. indentLevel := 0. isExpanded := false. nextSibling := firstChild := nil. priorMorph ifNotNil: [ priorMorph nextSibling: self. ]. indentLevel := newLevel. + icon := self getIcon. - icon := anObject icon. self extent: self minWidth @ self minHeight! Item was added: + ----- Method: IndentingListItemMorph>>matches: (in category 'filtering') ----- + matches: pattern + + ^ self matches: pattern in: complexContents! Item was added: + ----- Method: IndentingListItemMorph>>matches:in: (in category 'filtering') ----- + matches: pattern in: model + + ^ ((self getLabelFor: model) findString: pattern startingAt: 1 caseSensitive: false) > 0 ! Item was added: + ----- Method: IndentingListItemMorph>>matchesAnyChild: (in category 'filtering') ----- + matchesAnyChild: pattern + + | maxDepth next current | + maxDepth := PluggableTreeMorph maximumSearchDepth - self indentLevel. + maxDepth <= 0 ifTrue: [^ false]. + + next := (self getChildren collect: [:obj | 1 -> obj]) asOrderedCollection. + [next notEmpty] whileTrue: [ + current := next removeFirst. + + (self matches: pattern in: current value) + ifTrue: [^ true]. + + current key < maxDepth ifTrue: [ + next addAll: ((self getChildrenFor: current value) collect: [:obj | (current key + 1) -> obj])]. + ]. + + ^ false! Item was added: + ----- Method: IndentingListItemMorph>>nextVisibleSibling (in category 'accessing') ----- + nextVisibleSibling + + | m | + m := self nextSibling. + [m isNil or: [m visible]] whileFalse: [ + m := m nextSibling]. + ^ m! Item was changed: ----- Method: IndentingListItemMorph>>refresh (in category 'initialization') ----- refresh + self contents: self getLabel. + icon := self getIcon. - self contents: complexContents asString. - icon := complexContents icon. (self valueOfProperty: #wasRefreshed ifAbsent: [false]) ifFalse: [ self setProperty: #wasRefreshed toValue: true. self color: Color yellow. "Indicate refresh operation."].! Item was changed: ----- Method: IndentingListItemMorph>>toggleExpandedState (in category 'private-container protocol') ----- toggleExpandedState | newChildren toDelete c | isExpanded := isExpanded not. toDelete := OrderedCollection new. firstChild ifNotNil: [ firstChild withSiblingsDo: [ :aNode | aNode recursiveAddTo: toDelete]. ]. container noteRemovalOfAll: toDelete. (isExpanded and: [complexContents hasContents]) ifFalse: [ ^self changed ]. + (c := self getChildren) isEmpty ifTrue: [^self changed]. - (c := complexContents contents) isEmpty ifTrue: [^self changed]. newChildren := container addSubmorphsAfter: self fromCollection: c allowSorting: true. firstChild := newChildren first. ! Item was changed: ----- Method: ObjectExplorer>>explorerKey:from: (in category 'menus') ----- explorerKey: aChar from: view + PluggableListMorph filterableLists + ifTrue: [^ false]. + - "Similar to #genericMenu:..." - | insideObject parentObject | currentSelection ifNotNil: [ - insideObject := self object. - parentObject := self parentObject. inspector ifNil: [inspector := Inspector new]. inspector + inspect: self parentObject; + object: self object. - inspect: parentObject; - object: insideObject. + aChar == $i ifTrue: [self inspectSelection. ^ true]. + aChar == $I ifTrue: [self exploreSelection. ^ true]. - aChar == $i ifTrue: [^ self inspectSelection]. - aChar == $I ifTrue: [^ self exploreSelection]. + aChar == $b ifTrue: [inspector browseMethodFull. ^ true]. + aChar == $h ifTrue: [inspector classHierarchy. ^ true]. + aChar == $c ifTrue: [Clipboard clipboardText: self currentSelection key. ^ true]. + aChar == $p ifTrue: [inspector browseFullProtocol. ^ true]. + aChar == $N ifTrue: [inspector browseClassRefs. ^ true]. + aChar == $t ifTrue: [inspector tearOffTile. ^ true]. + aChar == $v ifTrue: [inspector viewerForValue. ^ true]]. - aChar == $b ifTrue: [^ inspector browseMethodFull]. - aChar == $h ifTrue: [^ inspector classHierarchy]. - aChar == $c ifTrue: [^ Clipboard clipboardText: self currentSelection key]. - aChar == $p ifTrue: [^ inspector browseFullProtocol]. - aChar == $N ifTrue: [^ inspector browseClassRefs]. - aChar == $t ifTrue: [^ inspector tearOffTile]. - aChar == $v ifTrue: [^ inspector viewerForValue]]. + ^ false! - ^ self arrowKey: aChar from: view! From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 9 15:03:18 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 9 15:12:18 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.547.mcz In-Reply-To: References: Message-ID: <1425913398727-4810693.post@n4.nabble.com> I have some more ideas to make it a little bit faster. :-) -- View this message in context: http://forum.world.st/The-Trunk-Tools-mt-547-mcz-tp4810692p4810693.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Mar 9 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150309225503.11002.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007614.html Name: Morphic-topa.775 Ancestors: Morphic-mt.774 Box Button images in SystemWindow and MenuMorph now respect the gradient* preferences. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007615.html Name: Tools-topa.546 Ancestors: Tools-topa.545 Make these all simple Forms ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007616.html Name: Kernel-ul.910 Ancestors: Kernel-mt.909 When saving a class comment, flush the changes file, unless we're doing a file-in. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007617.html Name: Collections-ul.604 Ancestors: Collections-eem.603 Reverted the previous workaround for the class comment saving bug, because it's enough to flush the changes file after saving the class comment. See Kerneul-ul.910 for the actual fix. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007618.html Name: Morphic-mt.776 Ancestors: Morphic-topa.775 Scrolling/drawing modified to consider visiblilty of items in SimpleHierarchicalListMorph. The implementation of keyboard event handling is now also closer to PluggableListMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007619.html Name: ToolBuilder-Morphic-mt.97 Ancestors: ToolBuilder-Morphic-mt.96 Tree filter added to pluggable tree morphs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007620.html Name: Tools-mt.547 Ancestors: Tools-topa.546 Tree filtering/searching added (to object explorers and other pluggable trees) ============================================= From commits at source.squeak.org Mon Mar 9 23:37:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 9 23:37:29 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.777.mcz Message-ID: David T. Lewis uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-dtl.777.mcz ==================== Summary ==================== Name: Morphic-dtl.777 Author: dtl Time: 9 March 2015, 7:36:28.204 pm UUID: 29bbab46-e2f3-4cda-bf4b-533ec61eb65a Ancestors: Morphic-mt.776 PreDebugWindow is unreference and no longer required. The debug notifier is now created with ToolBuilder. Remove PreDebugWindow. =============== Diff against Morphic-mt.776 =============== Item was removed: - SystemWindow subclass: #PreDebugWindow - instanceVariableNames: 'proceedButton debugButton' - classVariableNames: '' - poolDictionaries: '' - category: 'Morphic-Windows'! Item was removed: - ----- Method: PreDebugWindow class>>includeInNewMorphMenu (in category 'new-morph participation') ----- - includeInNewMorphMenu - ^ false! Item was removed: - ----- Method: PreDebugWindow>>adjustBookControls (in category 'as yet unclassified') ----- - adjustBookControls - | inner | - proceedButton ifNil: [^ self]. - proceedButton align: proceedButton topLeft with: (inner := self innerBounds) topLeft + (35 @ -4). - debugButton align: debugButton topRight with: inner topRight - (16 @ 4).! Item was removed: - ----- Method: PreDebugWindow>>debug (in category 'as yet unclassified') ----- - debug - model debug! Item was removed: - ----- Method: PreDebugWindow>>extent: (in category 'geometry') ----- - extent: newExtent - super extent: (newExtent max: 100 @ 50). - self adjustBookControls! Item was removed: - ----- Method: PreDebugWindow>>initialize (in category 'initialization') ----- - initialize - | aFont proceedLabel debugLabel aWidth | - super initialize. - true - ifFalse: - ["Preferences optionalMorphicButtons" - - (aWidth := self widthOfFullLabelText) > 280 ifTrue: [^self]. "No proceed/debug buttons if title too long" - debugLabel := aWidth > 210 - ifTrue: - ["Abbreviated buttons if title pretty long" - - proceedLabel := 'p'. - 'd'] - ifFalse: - ["Full buttons if title short enough" - - proceedLabel := 'proceed'. - 'debug']. - aFont := Preferences standardButtonFont. - self addMorph: (proceedButton := (SimpleButtonMorph new) - borderWidth: 0; - label: proceedLabel font: aFont; - color: Color transparent; - actionSelector: #proceed; - target: self). - proceedButton setBalloonText: 'continue execution'. - self addMorph: (debugButton := (SimpleButtonMorph new) - borderWidth: 0; - label: debugLabel font: aFont; - color: Color transparent; - actionSelector: #debug; - target: self). - debugButton setBalloonText: 'bring up a debugger'. - proceedButton submorphs first color: Color blue. - debugButton submorphs first color: Color red]. - self adjustBookControls! Item was removed: - ----- Method: PreDebugWindow>>proceed (in category 'as yet unclassified') ----- - proceed - model proceed! Item was removed: - ----- Method: PreDebugWindow>>setBalloonTextForCloseBox (in category 'as yet unclassified') ----- - setBalloonTextForCloseBox - closeBox ifNotNil: - [closeBox setBalloonText: 'abandon this execution by closing this window' translated]. - ! Item was removed: - ----- Method: PreDebugWindow>>setLabelWidgetAllowance (in category 'label') ----- - setLabelWidgetAllowance - ^ labelWidgetAllowance := (Smalltalk isMorphic | Preferences optionalButtons) - ifTrue: - [super setLabelWidgetAllowance] - ifFalse: - [180]! Item was removed: - ----- Method: PreDebugWindow>>storeLog (in category 'as yet unclassified') ----- - storeLog - model storeLog! From frank.shearar at gmail.com Tue Mar 10 08:00:44 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 10 08:00:48 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: References: Message-ID: On 8 March 2015 at 18:16, Chris Muller wrote: > On Fri, Mar 6, 2015 at 5:17 PM, Tobias Pape wrote: >> Hey, >> >> using the current trunk (doest not happen in 4.5), I cannot use the >> debugger in a useful way anymore. >> Regardless of what I do in the editor view of the Debugger, after >> a second or so, I tries to select the current expression (as if I had >> clicked 'Where')[1] and scrolls to that place. This is especially annoying >> when scrolling around long methods or trying to do a printIt or exploreIt >> on other expressions? > > This issue definitely exists in 4.5 and yes, it is annoying. I > believe if you can make the editor dirty (e.g., insert whitespace > somewhere), that you'll be able to stop it so you can look at the > method. > >> Any clue? > > I *think* this is related to a change Frank did a couple of years ago > where it was desired to fix updating the method in the debugger, > pressing Command+S [Accept] and having the new code be reflected > rather than the old.. It could be, but I remember back then the debugger kind've oscillating between two selections, and I _think_ my change helped mitigate that. But I certainly did monkey around with the Debugger, so might well be implicated :) frank >> Best >> -Tobias >> >> >> [1]: I also have the impresison that, when one uses 'toggle break on entry', that >> the current expression is off-by-one with the actually current one. > From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 10 12:48:09 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 10 12:57:14 2015 Subject: [squeak-dev] Re: The Debugger bugs me In-Reply-To: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> References: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> Message-ID: <1425991689021-4810949.post@n4.nabble.com> Cannot reproduce the bug. Can you give some specific steps to get it? Best, Marcel -- View this message in context: http://forum.world.st/The-Debugger-bugs-me-tp4810142p4810949.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ma.chris.m at gmail.com Tue Mar 10 15:35:49 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Mar 10 15:35:51 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: References: Message-ID: On Tue, Mar 10, 2015 at 3:00 AM, Frank Shearar wrote: > On 8 March 2015 at 18:16, Chris Muller wrote: >> On Fri, Mar 6, 2015 at 5:17 PM, Tobias Pape wrote: >>> Hey, >>> >>> using the current trunk (doest not happen in 4.5), I cannot use the >>> debugger in a useful way anymore. >>> Regardless of what I do in the editor view of the Debugger, after >>> a second or so, I tries to select the current expression (as if I had >>> clicked 'Where')[1] and scrolls to that place. This is especially annoying >>> when scrolling around long methods or trying to do a printIt or exploreIt >>> on other expressions? >> >> This issue definitely exists in 4.5 and yes, it is annoying. I >> believe if you can make the editor dirty (e.g., insert whitespace >> somewhere), that you'll be able to stop it so you can look at the >> method. >> >>> Any clue? >> >> I *think* this is related to a change Frank did a couple of years ago >> where it was desired to fix updating the method in the debugger, >> pressing Command+S [Accept] and having the new code be reflected >> rather than the old.. > > It could be, but I remember back then the debugger kind've oscillating > between two selections, and I _think_ my change helped mitigate that. > But I certainly did monkey around with the Debugger, so might well be > implicated :) Yeah, your fix made it better than it was, I only said "Frank" to try to help zero-in on the cause so we can fix it the rest of the way. :) From asqueaker at gmail.com Tue Mar 10 17:19:30 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 10 17:19:35 2015 Subject: [squeak-dev] Re: The Debugger bugs me In-Reply-To: <1425991689021-4810949.post@n4.nabble.com> References: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> <1425991689021-4810949.post@n4.nabble.com> Message-ID: > Cannot reproduce the bug. Can you give some specific steps to get it? I believe if you halt in a method, then change that method in *another* browser, so that the one in the debugger is the old version, the code pane in the debugger is now on a "refresh" loop such that the user cannot stay scrolled where they want nor select other text and have it stay selected.. > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Debugger-bugs-me-tp4810142p4810949.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From Das.Linux at gmx.de Tue Mar 10 17:47:27 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 10 17:47:31 2015 Subject: [squeak-dev] Re: The Debugger bugs me In-Reply-To: References: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> <1425991689021-4810949.post@n4.nabble.com> Message-ID: On 10.03.2015, at 18:19, Chris Muller wrote: >> Cannot reproduce the bug. Can you give some specific steps to get it? > > I believe if you halt in a method, then change that method in > *another* browser, so that the one in the debugger is the old version, > the code pane in the debugger is now on a "refresh" loop such that the > user cannot stay scrolled where they want nor select other text and > have it stay selected.. Ohhh yes, that was my scenario. I more and more use "toggle break on entry" to provoke a debugger and immediately after disable the break? I shouldn't probably. but then again, the pretty-printed code is not that pretty actually. but that's another discussion :) best -tobias From commits at source.squeak.org Tue Mar 10 22:07:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 10 22:07:19 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-cmm.98.mcz Message-ID: Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.98.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-cmm.98 Author: cmm Time: 10 March 2015, 5:04:25.508 pm UUID: 88500923-b28a-44b7-929a-9c31485f28ea Ancestors: ToolBuilder-Morphic-mt.97 - Introduce "Filterable Lists by labels only" option for hierarchical list filtering so that collections of objects can easily be "collected". - Default the "Maximum tree search depth" to 1 for performance, safety and so that the default behavior of this feature is as a navigation tool rather than like a search-engine tool. =============== Diff against ToolBuilder-Morphic-mt.97 =============== Item was changed: SimpleHierarchicalListMorph subclass: #PluggableTreeMorph instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass lastKeystrokeTime lastKeystrokes' + classVariableNames: 'FilterByLabelsOnly MaximumSearchDepth' - classVariableNames: 'MaximumSearchDepth' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! A pluggable tree morph.! Item was added: + ----- Method: PluggableTreeMorph class>>filterByLabelsOnly (in category 'preferences') ----- + filterByLabelsOnly + + ^ FilterByLabelsOnly ifNil: [ false ]! Item was added: + ----- Method: PluggableTreeMorph class>>filterByLabelsOnly: (in category 'preferences') ----- + filterByLabelsOnly: aBoolean + FilterByLabelsOnly := aBoolean! Item was changed: ----- Method: PluggableTreeMorph class>>maximumSearchDepth (in category 'preferences') ----- maximumSearchDepth - + ^ MaximumSearchDepth ifNil: [ 1 ]! - ^ MaximumSearchDepth ifNil: [ 3 ]! From commits at source.squeak.org Tue Mar 10 22:07:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 10 22:07:21 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.548.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.548.mcz ==================== Summary ==================== Name: Tools-cmm.548 Author: cmm Time: 10 March 2015, 5:06:48.163 pm UUID: 3f13d433-cdc9-4b04-b7fb-ef4ffcb7bdc4 Ancestors: Tools-mt.547 - Support new "Filterable Lists by labels only". - Fix undeclared reference due to renamed inst-var in ObjectExplorer(?). =============== Diff against Tools-mt.547 =============== Item was changed: ----- Method: IndentingListItemMorph>>matches:in: (in category 'filtering') ----- + matches: pattern in: model + ^ ((PluggableTreeMorph filterByLabelsOnly + ifTrue: [ model itemName ] + ifFalse: [ self getLabelFor: model ]) + findString: pattern + startingAt: 1 + caseSensitive: false) > 0! - matches: pattern in: model - - ^ ((self getLabelFor: model) findString: pattern startingAt: 1 caseSensitive: false) > 0 ! Item was changed: ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- chasePointers "Open a PointerFinder on the selected item" | path sel savedRoot saved | path := OrderedCollection new. sel := currentSelection. [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. path addFirst: #openPath. path := path asArray. + savedRoot := root. - savedRoot := rootObject. saved := self object. + [ root := nil. - [ rootObject := nil. self changed: #getList. (Smalltalk includesKey: #PointerFinder) ifTrue: [PointerFinder on: saved] ifFalse: [self objectReferencesToSelection ]] + ensure: [ root := savedRoot. - ensure: [ rootObject := savedRoot. self changed: #getList. self changed: path. ]! Item was removed: - ----- Method: PreDebugWindow>>createImplementingMethod (in category '*Tools-Debugger') ----- - createImplementingMethod - model createImplementingMethod.! Item was removed: - ----- Method: PreDebugWindow>>createMethod (in category '*Tools-Debugger') ----- - createMethod - model createMethod! Item was removed: - ----- Method: PreDebugWindow>>createOverridingMethod (in category '*Tools-Debugger') ----- - createOverridingMethod - model createOverridingMethod! From commits at source.squeak.org Tue Mar 10 22:07:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 10 22:07:58 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.548.mcz Message-ID: Chris Muller uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-cmm.548.mcz ==================== Summary ==================== Name: Tools-cmm.548 Author: cmm Time: 10 March 2015, 5:06:48.163 pm UUID: 3f13d433-cdc9-4b04-b7fb-ef4ffcb7bdc4 Ancestors: Tools-mt.547 - Support new "Filterable Lists by labels only". - Fix undeclared reference due to renamed inst-var in ObjectExplorer(?). =============== Diff against Tools-mt.547 =============== Item was changed: ----- Method: IndentingListItemMorph>>matches:in: (in category 'filtering') ----- + matches: pattern in: model + ^ ((PluggableTreeMorph filterByLabelsOnly + ifTrue: [ model itemName ] + ifFalse: [ self getLabelFor: model ]) + findString: pattern + startingAt: 1 + caseSensitive: false) > 0! - matches: pattern in: model - - ^ ((self getLabelFor: model) findString: pattern startingAt: 1 caseSensitive: false) > 0 ! Item was changed: ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- chasePointers "Open a PointerFinder on the selected item" | path sel savedRoot saved | path := OrderedCollection new. sel := currentSelection. [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. path addFirst: #openPath. path := path asArray. + savedRoot := root. - savedRoot := rootObject. saved := self object. + [ root := nil. - [ rootObject := nil. self changed: #getList. (Smalltalk includesKey: #PointerFinder) ifTrue: [PointerFinder on: saved] ifFalse: [self objectReferencesToSelection ]] + ensure: [ root := savedRoot. - ensure: [ rootObject := savedRoot. self changed: #getList. self changed: path. ]! Item was removed: - ----- Method: PreDebugWindow>>createImplementingMethod (in category '*Tools-Debugger') ----- - createImplementingMethod - model createImplementingMethod.! Item was removed: - ----- Method: PreDebugWindow>>createMethod (in category '*Tools-Debugger') ----- - createMethod - model createMethod! Item was removed: - ----- Method: PreDebugWindow>>createOverridingMethod (in category '*Tools-Debugger') ----- - createOverridingMethod - model createOverridingMethod! From asqueaker at gmail.com Tue Mar 10 22:17:56 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 10 22:17:59 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-cmm.98.mcz In-Reply-To: <54ff6b1b.04e88c0a.309d.ffffc7c1SMTPIN_ADDED_MISSING@mx.google.com> References: <54ff6b1b.04e88c0a.309d.ffffc7c1SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi Marcel, is this adding the "Filterable Lists" capability to SimpleHierarchy's now? Great!! May I collaborate? First, I noticed a giant bug has been introduced. :) It seems all of the command-keys in the object explorer no longer work. For example, I can no longer press Command+h (browse hierarchy) or Command+b (open system browser) or Command+Shift+I (open new explorer on the selected item). These are very important. I hope you don't mind I changed the MaximumSearchDepth default from to 3 to 1. 3 is concerning not only from a performance perspective, but safety too. For example, when I Explore an object from a database, the references directly under the surface are only Proxy's, so accidently pressing a keystroke would invoke DB calls over the network, on every keystroke from the user..! Defaulting the max-depth to 1 mitigates these concerns, while also presenting it as navigation tool (which is what hierarchical list morph is traditionally about). If the user wishes to use it as a "search-engine" type of tool, the depth could be increased. What do you think? Finally, it would be really great if there were some way to invoke the selection in the model based on the first-matching filtered item, like in the normal PluggableListMorphs. I looked at that for about 5 minutes but didn't find a simple and obvious solution, do you think its possible? On Tue, Mar 10, 2015 at 5:07 PM, wrote: > Chris Muller uploaded a new version of ToolBuilder-Morphic to project The Trunk: > http://source.squeak.org/trunk/ToolBuilder-Morphic-cmm.98.mcz > > ==================== Summary ==================== > > Name: ToolBuilder-Morphic-cmm.98 > Author: cmm > Time: 10 March 2015, 5:04:25.508 pm > UUID: 88500923-b28a-44b7-929a-9c31485f28ea > Ancestors: ToolBuilder-Morphic-mt.97 > > - Introduce "Filterable Lists by labels only" option for hierarchical list filtering so that collections of objects can easily be "collected". > - Default the "Maximum tree search depth" to 1 for performance, safety and so that the default behavior of this feature is as a navigation tool rather than like a search-engine tool. > > =============== Diff against ToolBuilder-Morphic-mt.97 =============== > > Item was changed: > SimpleHierarchicalListMorph subclass: #PluggableTreeMorph > instanceVariableNames: 'rootWrappers selectedWrapper getRootsSelector getChildrenSelector hasChildrenSelector getLabelSelector getIconSelector getSelectedPathSelector setSelectedParentSelector getHelpSelector dropItemSelector wantsDropSelector dragItemSelector nodeClass lastKeystrokeTime lastKeystrokes' > + classVariableNames: 'FilterByLabelsOnly MaximumSearchDepth' > - classVariableNames: 'MaximumSearchDepth' > poolDictionaries: '' > category: 'ToolBuilder-Morphic'! > > !PluggableTreeMorph commentStamp: 'ar 2/12/2005 04:38' prior: 0! > A pluggable tree morph.! > > Item was added: > + ----- Method: PluggableTreeMorph class>>filterByLabelsOnly (in category 'preferences') ----- > + filterByLabelsOnly > + + category: 'scrolling' > + description: 'When using the Filterable Lists option, set this to only match the labels, not the contents, of hierarchical lists. Otherwise, search both labels and contents will be matched.' > + type: #Boolean> > + ^ FilterByLabelsOnly ifNil: [ false ]! > > Item was added: > + ----- Method: PluggableTreeMorph class>>filterByLabelsOnly: (in category 'preferences') ----- > + filterByLabelsOnly: aBoolean > + FilterByLabelsOnly := aBoolean! > > Item was changed: > ----- Method: PluggableTreeMorph class>>maximumSearchDepth (in category 'preferences') ----- > maximumSearchDepth > - > category: 'scrolling' > + description: 'When using the Filterable Lists option, this specifies the maximum depth that will be searched below the current selection in of the hierarchy.' > - description: 'When list filtering is active, this will determine the maximum depth where items should be searched for in a tree.' > type: #Number> > + ^ MaximumSearchDepth ifNil: [ 1 ]! > - ^ MaximumSearchDepth ifNil: [ 3 ]! > > From asqueaker at gmail.com Tue Mar 10 22:21:32 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 10 22:21:35 2015 Subject: [squeak-dev] The Trunk: Tools-cmm.548.mcz In-Reply-To: <54ff6b42.d32a370a.4448.fffff842SMTPIN_ADDED_MISSING@mx.google.com> References: <54ff6b42.d32a370a.4448.fffff842SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Something strange with saving packages lately -- I did not have my username and pw set but it seems it still saved to trunk..? Also, when I commit to Inbox it is asking me for user and password again and again? Anyone else see these behaviors? On Tue, Mar 10, 2015 at 5:07 PM, wrote: > Chris Muller uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-cmm.548.mcz > > ==================== Summary ==================== > > Name: Tools-cmm.548 > Author: cmm > Time: 10 March 2015, 5:06:48.163 pm > UUID: 3f13d433-cdc9-4b04-b7fb-ef4ffcb7bdc4 > Ancestors: Tools-mt.547 > > - Support new "Filterable Lists by labels only". > - Fix undeclared reference due to renamed inst-var in ObjectExplorer(?). > > =============== Diff against Tools-mt.547 =============== > > Item was changed: > ----- Method: IndentingListItemMorph>>matches:in: (in category 'filtering') ----- > + matches: pattern in: model > + ^ ((PluggableTreeMorph filterByLabelsOnly > + ifTrue: [ model itemName ] > + ifFalse: [ self getLabelFor: model ]) > + findString: pattern > + startingAt: 1 > + caseSensitive: false) > 0! > - matches: pattern in: model > - > - ^ ((self getLabelFor: model) findString: pattern startingAt: 1 caseSensitive: false) > 0 ! > > Item was changed: > ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- > chasePointers > "Open a PointerFinder on the selected item" > | path sel savedRoot saved | > path := OrderedCollection new. > sel := currentSelection. > [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. > path addFirst: #openPath. > path := path asArray. > + savedRoot := root. > - savedRoot := rootObject. > saved := self object. > + [ root := nil. > - [ rootObject := nil. > self changed: #getList. > (Smalltalk includesKey: #PointerFinder) > ifTrue: [PointerFinder on: saved] > ifFalse: [self objectReferencesToSelection ]] > + ensure: [ root := savedRoot. > - ensure: [ rootObject := savedRoot. > self changed: #getList. > self changed: path. > ]! > > Item was removed: > - ----- Method: PreDebugWindow>>createImplementingMethod (in category '*Tools-Debugger') ----- > - createImplementingMethod > - model createImplementingMethod.! > > Item was removed: > - ----- Method: PreDebugWindow>>createMethod (in category '*Tools-Debugger') ----- > - createMethod > - model createMethod! > > Item was removed: > - ----- Method: PreDebugWindow>>createOverridingMethod (in category '*Tools-Debugger') ----- > - createOverridingMethod > - model createOverridingMethod! > > From commits at source.squeak.org Tue Mar 10 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 10 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150310225503.15455.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007621.html Name: Morphic-dtl.777 Ancestors: Morphic-mt.776 PreDebugWindow is unreference and no longer required. The debug notifier is now created with ToolBuilder. Remove PreDebugWindow. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007622.html Name: ToolBuilder-Morphic-cmm.98 Ancestors: ToolBuilder-Morphic-mt.97 - Introduce "Filterable Lists by labels only" option for hierarchical list filtering so that collections of objects can easily be "collected". - Default the "Maximum tree search depth" to 1 for performance, safety and so that the default behavior of this feature is as a navigation tool rather than like a search-engine tool. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007623.html Name: Tools-cmm.548 Ancestors: Tools-mt.547 - Support new "Filterable Lists by labels only". - Fix undeclared reference due to renamed inst-var in ObjectExplorer(?). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007624.html Name: Tools-cmm.548 Ancestors: Tools-mt.547 - Support new "Filterable Lists by labels only". - Fix undeclared reference due to renamed inst-var in ObjectExplorer(?). ============================================= From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 11 04:06:07 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 11 04:15:19 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Morphic-cmm.98.mcz In-Reply-To: References: Message-ID: <1426046767858-4811134.post@n4.nabble.com> Yes, you may collaborate. :) I am working on the model-based selection like lists can do. There is a hook for that (#selectMorphByFilter or such). Command keys will be back soon. Actually, it were never command keys but simple key presses such as $i for inspect. I want to change them to CMD+i so that both can work at the same time. For the search, I think about considering the current selection and search that subtree after typing stuff. Backspace could remove only the filter for the selected sub-tree. How does that sound? You could use the feature as a whole tree exploration tool. Depth of 1 is fine for me. I did not collect much experience with this feature yet. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ToolBuilder-Morphic-cmm-98-mcz-tp4811116p4811134.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Wed Mar 11 04:21:35 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 04:21:36 2015 Subject: [squeak-dev] The Trunk: Tools-mt.549.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.549.mcz ==================== Summary ==================== Name: Tools-mt.549 Author: mt Time: 10 March 2015, 9:21:15.462 pm UUID: f9b0e046-e25d-7848-89e5-ded3d82e6177 Ancestors: Tools-cmm.548 #chasePointers fixed in object explorer =============== Diff against Tools-cmm.548 =============== Item was changed: ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- chasePointers "Open a PointerFinder on the selected item" | path sel savedRoot saved | path := OrderedCollection new. sel := currentSelection. [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. path addFirst: #openPath. path := path asArray. + savedRoot := self rootObject. - savedRoot := root. saved := self object. + [ self rootObject: nil. - [ root := nil. self changed: #getList. (Smalltalk includesKey: #PointerFinder) ifTrue: [PointerFinder on: saved] ifFalse: [self objectReferencesToSelection ]] + ensure: [ self rootObject: savedRoot. - ensure: [ root := savedRoot. self changed: #getList. self changed: path. ]! From commits at source.squeak.org Wed Mar 11 04:31:41 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 04:31:44 2015 Subject: [squeak-dev] The Trunk: HelpSystem-Core-mt.65.mcz Message-ID: Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-mt.65.mcz ==================== Summary ==================== Name: HelpSystem-Core-mt.65 Author: mt Time: 10 March 2015, 9:31:38.051 pm UUID: 09bd894b-ec8b-fa48-b433-a82a8470510e Ancestors: HelpSystem-Core-dtl.64 Fix help browser to show current selection in pluggable tree morph. =============== Diff against HelpSystem-Core-dtl.64 =============== Item was changed: ----- Method: HelpBrowser>>initWindow (in category 'initialize-release') ----- initWindow window := SystemWindow labelled: 'Help Browser'. window model: self. "Tree" treeMorph := PluggableTreeMorph new. + treeMorph + model: self; + setSelectedSelector: #onItemClicked:; + getSelectedSelector: #topic; + getMenuSelector: #menu:. - treeMorph model: self; setSelectedSelector: #onItemClicked:; getMenuSelector: #menu:. window addMorph: treeMorph frame: (0@0 corner: 0.3@1). "Text" contentMorph := self defaultViewerClass on: self text: nil accept: #accept: readSelection: nil menu: #codePaneMenu:shifted:. window addMorph: contentMorph frame: (0.3@0 corner: 1@1). ! Item was changed: ----- Method: HelpBrowser>>onItemClicked: (in category 'events') ----- onItemClicked: anItem + + anItem ifNil: [^contentMorph setText: rootTopic asHelpTopic contents]. - | classList | - anItem isNil ifTrue: [^contentMorph setText: rootTopic asHelpTopic contents]. contentMorph setText: anItem contents. + self topic: anItem. ! - topic := anItem. - classList := (self find: anItem contents) asOrderedCollection. - classList ifNotEmpty:[ - topicClass := classList first actualClass theNonMetaClass. - topicMethod := classList first selector]. - ! Item was added: + ----- Method: HelpBrowser>>topic (in category 'accessing') ----- + topic + ^ topic! Item was added: + ----- Method: HelpBrowser>>topic: (in category 'accessing') ----- + topic: anItem + + | classList | + topic := anItem. + classList := (self find: anItem contents) asOrderedCollection. + classList ifNotEmpty:[ + topicClass := classList first actualClass theNonMetaClass. + topicMethod := classList first selector]. + self changed: #topic.! From commits at source.squeak.org Wed Mar 11 04:52:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 04:52:08 2015 Subject: [squeak-dev] The Trunk: Tools-mt.550.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.550.mcz ==================== Summary ==================== Name: Tools-mt.550 Author: mt Time: 10 March 2015, 9:51:50.369 pm UUID: df4a6b56-f4bc-c843-a113-401724932ecd Ancestors: Tools-mt.549 Fix/ignore self-updating behavior in Debugger, which it inherits from CodeHolder. Not needed here, because we stick to the compiled methods on the stack. =============== Diff against Tools-mt.549 =============== Item was added: + ----- Method: Debugger>>updateCodePaneIfNeeded (in category 'self-updating') ----- + updateCodePaneIfNeeded + "Ignore. We must not update code but stick to particular compiled methods on the stack."! From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 11 04:44:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 11 04:53:52 2015 Subject: [squeak-dev] Re: The Debugger bugs me In-Reply-To: References: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> <1425991689021-4810949.post@n4.nabble.com> Message-ID: <1426049081292-4811138.post@n4.nabble.com> Fixed: http://forum.world.st/The-Trunk-Tools-mt-550-mcz-td4811137.html Best, Marcel -- View this message in context: http://forum.world.st/The-Debugger-bugs-me-tp4810142p4811138.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Wed Mar 11 06:42:02 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Mar 11 06:42:07 2015 Subject: [squeak-dev] The Debugger bugs me In-Reply-To: <1426049081292-4811138.post@n4.nabble.com> References: <32FF4FD4-1652-4788-8F0A-FC274E36EAD6@gmx.de> <1425991689021-4810949.post@n4.nabble.com> <1426049081292-4811138.post@n4.nabble.com> Message-ID: <114382F5-A530-4D96-A878-21FFDC19E7CB@gmx.de> \o/ | / \ On 11.03.2015, at 05:44, Marcel Taeumel wrote: > Fixed: http://forum.world.st/The-Trunk-Tools-mt-550-mcz-td4811137.html > > Best, > Marcel From asqueaker at gmail.com Wed Mar 11 16:12:24 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 11 16:12:28 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Morphic-cmm.98.mcz In-Reply-To: <1426046767858-4811134.post@n4.nabble.com> References: <1426046767858-4811134.post@n4.nabble.com> Message-ID: > I am working on the model-based selection like lists can do. There is a hook > for that (#selectMorphByFilter or such). That's great! This would allow the user to "navigate" by their fingers from the home row. > Command keys will be back soon. Actually, it were never command keys but > simple key presses such as $i for inspect. I want to change them to CMD+i so > that both can work at the same time. Ha! All these years I was pressing the Command+key unnecessarily. Good so now I've got the right habits established for this new feature. :) > For the search, I think about considering the current selection and search > that subtree after typing stuff. Backspace could remove only the filter for > the selected sub-tree. How does that sound? You could use the feature as a > whole tree exploration tool. That sounds very powerful, I love it! We are dealing with a hierarchy, so there are a couple of different ways to approach this isn't there? For example, another approach I thought about was, it would only search whatever nodes were actually *visible* (the already-expanded subtrees), regardless of what level they were at. This would eliminate the need for the MaxDepth preference, but the shortcoming is that the user would have to expand a bunch of nodes in advance just to "prepare it" for filtering -- so this works against the navigation use-case. So, I think your idea provides the best of all worlds: navigation, subselection, and filtering. Well done! > Depth of 1 is fine for me. I did not collect much experience with this > feature yet. Me neither and maybe we'll want to bump it to 2 but I thought it would be good to start conservative and see how well it works. You are really rocking, thanks! From asqueaker at gmail.com Wed Mar 11 16:14:02 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 11 16:14:04 2015 Subject: [squeak-dev] The Trunk: Tools-mt.549.mcz In-Reply-To: <54ffc2d4.c6618c0a.0136.007fSMTPIN_ADDED_MISSING@mx.google.com> References: <54ffc2d4.c6618c0a.0136.007fSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Oops, thanks..! On Tue, Mar 10, 2015 at 11:21 PM, wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.549.mcz > > ==================== Summary ==================== > > Name: Tools-mt.549 > Author: mt > Time: 10 March 2015, 9:21:15.462 pm > UUID: f9b0e046-e25d-7848-89e5-ded3d82e6177 > Ancestors: Tools-cmm.548 > > #chasePointers fixed in object explorer > > =============== Diff against Tools-cmm.548 =============== > > Item was changed: > ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- > chasePointers > "Open a PointerFinder on the selected item" > | path sel savedRoot saved | > path := OrderedCollection new. > sel := currentSelection. > [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. > path addFirst: #openPath. > path := path asArray. > + savedRoot := self rootObject. > - savedRoot := root. > saved := self object. > + [ self rootObject: nil. > - [ root := nil. > self changed: #getList. > (Smalltalk includesKey: #PointerFinder) > ifTrue: [PointerFinder on: saved] > ifFalse: [self objectReferencesToSelection ]] > + ensure: [ self rootObject: savedRoot. > - ensure: [ root := savedRoot. > self changed: #getList. > self changed: path. > ]! > > From commits at source.squeak.org Wed Mar 11 17:46:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 17:46:08 2015 Subject: [squeak-dev] The Trunk: Graphics-tfel.308.mcz Message-ID: Tim Felgentreff uploaded a new version of Graphics to project The Trunk: http://source.squeak.org/trunk/Graphics-tfel.308.mcz ==================== Summary ==================== Name: Graphics-tfel.308 Author: tfel Time: 11 March 2015, 1:45:49.471 pm UUID: 9ef14231-9bce-8848-b8a7-5d24ad6b8f2b Ancestors: Graphics-mt.307, Graphics-tfel.306 merge change from inbox =============== Diff against Graphics-mt.307 =============== Item was changed: ----- Method: BitBlt>>copyBits (in category 'copying') ----- copyBits "Primitive. Perform the movement of bits from the source form to the destination form. Fail if any variables are not of the right type (Integer, Float, or Form) or if the combination rule is not implemented. In addition to the original 16 combination rules, this BitBlt supports 16 fail (to simulate paint) 17 fail (to simulate mask) 18 sourceWord + destinationWord 19 sourceWord - destinationWord 20 rgbAdd: sourceWord with: destinationWord 21 rgbSub: sourceWord with: destinationWord 22 rgbDiff: sourceWord with: destinationWord 23 tallyIntoMap: destinationWord 24 alphaBlend: sourceWord with: destinationWord 25 pixPaint: sourceWord with: destinationWord 26 pixMask: sourceWord with: destinationWord 27 rgbMax: sourceWord with: destinationWord 28 rgbMin: sourceWord with: destinationWord 29 rgbMin: sourceWord bitInvert32 with: destinationWord " "Check for compressed source, destination or halftone forms" (combinationRule >= 30 and: [combinationRule <= 31]) ifTrue: ["No alpha specified -- re-run with alpha = 1.0" ^ self copyBitsTranslucent: 255]. ((sourceForm isForm) and: [sourceForm unhibernate]) ifTrue: [^ self copyBits]. ((destForm isForm) and: [destForm unhibernate]) ifTrue: [^ self copyBits]. ((halftoneForm isForm) and: [halftoneForm unhibernate]) ifTrue: [^ self copyBits]. "Check for unimplmented rules" combinationRule = Form oldPaint ifTrue: [^ self paintBits]. combinationRule = Form oldErase1bitShape ifTrue: [^ self eraseBits]. "Check if BitBlt doesn't support full color maps" (colorMap notNil and:[colorMap isColormap]) ifTrue:[ colorMap := colorMap colors. ^self copyBits]. "Check if clipping gots us way out of range" self clipRange ifTrue:[self roundVariables. ^self copyBitsAgain]. - self error: 'Bad BitBlt arg (Fraction?); proceed to convert.'. "Convert all numeric parameters to integers and try again." self roundVariables. ^ self copyBitsAgain! From commits at source.squeak.org Wed Mar 11 17:53:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 17:53:08 2015 Subject: [squeak-dev] The Inbox: VMMaker-tfel.359.mcz Message-ID: A new version of VMMaker was added to project The Inbox: http://source.squeak.org/inbox/VMMaker-tfel.359.mcz ==================== Summary ==================== Name: VMMaker-tfel.359 Author: tfel Time: 11 March 2015, 1:52:30.984 pm UUID: ddaf459e-9bc7-a445-99ae-1959ecd29f9b Ancestors: VMMaker-tfel.358 optimize BitBltSimulator to avoid reinitialization on each call to simulatedCopyBits. Makes it roughly 500x faster on RSqueakVM =============== Diff against VMMaker-tfel.358 =============== Item was changed: BitBltSimulation subclass: #BitBltSimulator instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'VMMaker-InterpreterSimulation'! + BitBltSimulator class + instanceVariableNames: 'opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup isInitialised'! !BitBltSimulator commentStamp: 'tpr 5/5/2003 12:22' prior: 0! Provide bitblt support for the vm simulator! + BitBltSimulator class + instanceVariableNames: 'opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup isInitialised'! Item was added: + ----- Method: BitBltSimulator class>>dither8Lookup (in category 'accessing') ----- + dither8Lookup + + ^ dither8Lookup! Item was added: + ----- Method: BitBltSimulator class>>ditherMatrix4x4 (in category 'accessing') ----- + ditherMatrix4x4 + + ^ ditherMatrix4x4! Item was added: + ----- Method: BitBltSimulator class>>ditherThresholds16 (in category 'accessing') ----- + ditherThresholds16 + + ^ ditherThresholds16! Item was added: + ----- Method: BitBltSimulator class>>ditherValues16 (in category 'accessing') ----- + ditherValues16 + + ^ ditherValues16! Item was added: + ----- Method: BitBltSimulator class>>initialize (in category 'class initialization') ----- + initialize + "self initialize" + super initialize. + isInitialised := false. + ! Item was added: + ----- Method: BitBltSimulator class>>isInitialised (in category 'accessing') ----- + isInitialised + + ^ isInitialised! Item was added: + ----- Method: BitBltSimulator class>>maskTable (in category 'accessing') ----- + maskTable + + ^ maskTable! Item was added: + ----- Method: BitBltSimulator class>>setInitialised (in category 'accessing') ----- + setInitialised + + isInitialised := true.! Item was added: + ----- Method: BitBltSimulator class>>warpBitShiftTable (in category 'accessing') ----- + warpBitShiftTable + + ^ warpBitShiftTable! Item was changed: ----- Method: BitBltSimulator>>halftoneAt: (in category 'simulation') ----- halftoneAt: idx + ^ (halftoneBase + (idx \\ halftoneHeight * 4)) long32At: 0! - ^ halftoneForm at: (idx \\ halftoneHeight * 4) + 1! Item was added: + ----- Method: BitBltSimulator>>initialiseModule (in category 'initialize-release') ----- + initialiseModule + + self class isInitialised ifFalse: [| ivars | + ivars := #(opTable maskTable warpBitShiftTable ditherMatrix4x4 ditherThresholds16 ditherValues16 dither8Lookup). + super initialiseModule. + ivars do: [:symbol | self class instVarNamed: symbol put: (self instVarNamed: symbol)]. + self class setInitialised]. + opTable := self class opTable. + maskTable := self class maskTable. + warpBitShiftTable := self class warpBitShiftTable. + ditherMatrix4x4 := self class ditherMatrix4x4. + ditherThresholds16 := self class ditherThresholds16. + ditherValues16 := self class ditherValues16. + dither8Lookup := self class dither8Lookup. + ! Item was changed: ----- Method: BitBltSimulator>>initializeDitherTables (in category 'simulation') ----- initializeDitherTables ditherMatrix4x4 := CArrayAccessor on: #( 0 8 2 10 12 4 14 6 3 11 1 9 15 7 13 5). ditherThresholds16 := CArrayAccessor on:#(0 2 4 6 8 10 12 14 16). ditherValues16 := CArrayAccessor on: #(0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30). + dither8Lookup := CArrayAccessor on: (Array new: 4096).! - dither8Lookup := CArrayAccessor on: (Array new: 4096). - self initDither8Lookup.! From eliot.miranda at gmail.com Wed Mar 11 18:00:57 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 11 18:01:00 2015 Subject: [squeak-dev] changes for breakpoints with source... Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: BreakpointsWithSource.st Type: application/octet-stream Size: 2340 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150311/e31974f9/BreakpointsWithSource.obj From ma.chris.m at gmail.com Wed Mar 11 20:34:26 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Wed Mar 11 20:34:29 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? Message-ID: Hi Eliot and all, for this release I wonder whether we should provide alternate binary's in the bin directory of the VM to help users manage the different image formats. What if, in addition to bin/squeak, Cog would include bin/cog and Spur would include bin/spur. In that case, although bin/squeak would be whoever was installed last, at least users could be explicit about which VM they want to launch which image. I know we also talked about some universal bin/squeak which could id the image format and launch the appropriate binary, which would be great. We should plan on doing _something_ in this area for the release. From trygver at ifi.uio.no Wed Mar 11 20:45:48 2015 From: trygver at ifi.uio.no (Trygve Reenskaug) Date: Wed Mar 11 20:45:53 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: Message-ID: <5500A97C.3020705@ifi.uio.no> What's happened to the "write once, run everywhere" that used to be the hallmark of Smalltalk? On 11.03.2015 21:34, Chris Muller wrote: > Hi Eliot and all, for this release I wonder whether we should provide > alternate binary's in the bin directory of the VM to help users manage > the different image formats. > > What if, in addition to bin/squeak, Cog would include bin/cog and Spur > would include bin/spur. In that case, although bin/squeak would be > whoever was installed last, at least users could be explicit about > which VM they want to launch which image. > > I know we also talked about some universal bin/squeak which could id > the image format and launch the appropriate binary, which would be > great. > > We should plan on doing _something_ in this area for the release. > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150311/e1f43288/attachment.htm From asqueaker at gmail.com Wed Mar 11 21:30:02 2015 From: asqueaker at gmail.com (Chris Muller) Date: Wed Mar 11 21:30:05 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: <5500A97C.3020705@ifi.uio.no> References: <5500A97C.3020705@ifi.uio.no> Message-ID: On Wed, Mar 11, 2015 at 3:45 PM, Trygve Reenskaug wrote: > What's happened to the "write once, run everywhere" that used to be the > hallmark of Smalltalk? LOL, nothing, all the code which has been written once can still be ran everywhere. This thread is about helping users manage the transition to the new image-format of the future for Squeak, Spur. From commits at source.squeak.org Wed Mar 11 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 11 22:55:06 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150311225503.24426.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007625.html Name: Tools-mt.549 Ancestors: Tools-cmm.548 #chasePointers fixed in object explorer ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007626.html Name: HelpSystem-Core-mt.65 Ancestors: HelpSystem-Core-dtl.64 Fix help browser to show current selection in pluggable tree morph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007627.html Name: Tools-mt.550 Ancestors: Tools-mt.549 Fix/ignore self-updating behavior in Debugger, which it inherits from CodeHolder. Not needed here, because we stick to the compiled methods on the stack. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007628.html Name: Graphics-tfel.308 Ancestors: Graphics-mt.307, Graphics-tfel.306 merge change from inbox ============================================= From eliot.miranda at gmail.com Thu Mar 12 02:30:32 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 12 02:30:36 2015 Subject: [squeak-dev] 4.6 -- New .sources and .changes files In-Reply-To: References: Message-ID: On Fri, Mar 6, 2015 at 12:28 PM, Chris Muller wrote: > We really should finally compressChanges and condenseSources for this > release. The last time we spoke about this, I believe we said we want > to: > > 1) current changes merged into .sources. > 2) exclude leaves in history (methods with no descendants) > 3) except the current one of course > 4) all prior history with descendants is kept > > Did I say that right? We need a volunteer to look into this. > That's right. I think another way of saying it is 1) current changes merged into .sources. 2) save unbranched history of each method The additional work is to derive, and merge the history of methods from prior releases. Maybe that's what you mean by 4 above. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150311/c278cfd4/attachment.htm From eliot.miranda at gmail.com Thu Mar 12 05:41:46 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 12 05:41:50 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: ...in http://www.mirandabanda.org/files/Cog/VM/VM.r3268/ CogVM binaries as per VMMaker.oscog-eem.1088/r3268 Squeak 5.0 release candidate. Speed up normalize methods in LargeIntegersPlugin by cacheing result of firstIndexableField. Simplify integer conversion routines by adding byteSizeOfBytes: which assumes argument is byte indexable (as LargeIntegers are). Make sure integer conversion routines consistently answer 0 on failure. Use 4-byte access where possible. Remove use of popInteger in AsFloat and integer comparison primitives (popStack idiom is inefficient since multiplke writes as opposed to the single write in the pop:thenPush: idiom). Revise SpurMemoryManager>>isClassOfNonImm:equalTo:compactClassIndex: for better dead code elimination. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150311/bd9a1a8b/attachment.htm From djm1329 at san.rr.com Thu Mar 12 07:59:24 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Thu Mar 12 07:59:30 2015 Subject: [squeak-dev] Re: [Pharo-dev] New Cog VMs available In-Reply-To: References: Message-ID: <7E81DDBC-007B-4F77-AD91-14EC352F4522@san.rr.com> I?ve also updated ARMv7 v3 and spur stack VMs. Note: I built the v3 and spur VMs on my new RPi2, which has a quad-core ARMv7. As Tim has already pointed out, these work even when building with FAST_BITBLT enhancements enabled. The cool thing is they also work on the BeagleBone Black ARMv7 (but building on the BBB with FAST_BITBLT enabled resulted in a segfault at image startup .. no idea why). And they appear to work on the older ARMv6 RPi too, so I?ll suspend building the v6 versions unless they?re needed. I haven?t tested on the Parallella yet. Doug > On Mar 11, 2015, at 22:41, Eliot Miranda wrote: > > ...in http://www.mirandabanda.org/files/Cog/VM/VM.r3268/ > > CogVM binaries as per VMMaker.oscog-eem.1088/r3268 > > Squeak 5.0 release candidate. > > Speed up normalize methods in LargeIntegersPlugin > by cacheing result of firstIndexableField. > > Simplify integer conversion routines by adding byteSizeOfBytes: which assumes > argument is byte indexable (as LargeIntegers are). Make sure integer conversion > routines consistently answer 0 on failure. Use 4-byte access where possible. > > Remove use of popInteger in AsFloat and integer comparison primitives (popStack > idiom is inefficient since multiplke writes as opposed to the single write in > the pop:thenPush: idiom). > > Revise SpurMemoryManager>>isClassOfNonImm:equalTo:compactClassIndex: for > better dead code elimination. > -- > best, > Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150312/aeceb130/attachment.htm From commits at source.squeak.org Thu Mar 12 13:26:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 12 13:27:00 2015 Subject: [squeak-dev] The Trunk: Balloon-tfel.26.mcz Message-ID: Tim Felgentreff uploaded a new version of Balloon to project The Trunk: http://source.squeak.org/trunk/Balloon-tfel.26.mcz ==================== Summary ==================== Name: Balloon-tfel.26 Author: tfel Time: 12 March 2015, 9:26:51.323 am UUID: 7d7db55f-da29-0948-83c9-f86c8b41e972 Ancestors: Balloon-bf.25 Fix typo in example method =============== Diff against Balloon-bf.25 =============== Item was changed: ----- Method: Bezier3Segment class>>example2 (in category 'examples') ----- example2 "draws a cubic bezier on the screen" | c canvas | c := Bezier3Segment new from: 0 @ 0 via: 0 @ 100 and: 100 @ 0 to: 100 @ 100. + canvas := Display getCanvas asBalloonCanvas. - canvas := Display getCanvas asBalloonCanvas canvas aaLevel: 4. canvas drawBezier3Shape: c asPointArray color: Color transparent borderWidth: 1 borderColor: Color black! From commits at source.squeak.org Thu Mar 12 13:27:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 12 13:27:30 2015 Subject: [squeak-dev] The Trunk: Balloon-tfel.26.mcz Message-ID: Tim Felgentreff uploaded a new version of Balloon to project The Trunk: http://source.squeak.org/trunk/Balloon-tfel.26.mcz ==================== Summary ==================== Name: Balloon-tfel.26 Author: tfel Time: 12 March 2015, 9:26:51.323 am UUID: 7d7db55f-da29-0948-83c9-f86c8b41e972 Ancestors: Balloon-bf.25 Fix typo in example method =============== Diff against Balloon-bf.25 =============== Item was changed: ----- Method: Bezier3Segment class>>example2 (in category 'examples') ----- example2 "draws a cubic bezier on the screen" | c canvas | c := Bezier3Segment new from: 0 @ 0 via: 0 @ 100 and: 100 @ 0 to: 100 @ 100. + canvas := Display getCanvas asBalloonCanvas. - canvas := Display getCanvas asBalloonCanvas canvas aaLevel: 4. canvas drawBezier3Shape: c asPointArray color: Color transparent borderWidth: 1 borderColor: Color black! From commits at source.squeak.org Thu Mar 12 13:29:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 12 13:29:59 2015 Subject: [squeak-dev] The Inbox: VMMaker-tfel.360.mcz Message-ID: A new version of VMMaker was added to project The Inbox: http://source.squeak.org/inbox/VMMaker-tfel.360.mcz ==================== Summary ==================== Name: VMMaker-tfel.360 Author: tfel Time: 12 March 2015, 9:29:26.525 am UUID: b5b5b3ee-1918-194c-b462-b7347d08f929 Ancestors: VMMaker-tfel.359 Add methods to simulate B2DPlugin primitives easily =============== Diff against VMMaker-tfel.359 =============== Item was added: + ----- Method: BalloonEngine>>simulateBalloonPrimitive:args: (in category '*VMMaker-InterpreterSimulation') ----- + simulateBalloonPrimitive: aString args: args + ^ Smalltalk at: #BalloonEngineSimulation ifPresent: [:be | + be simulatePrimitive: aString receiver: self args: args]! Item was added: + ----- Method: BalloonEngineSimulation class>>simulatePrimitive:receiver:args: (in category 'simulation') ----- + simulatePrimitive: aString receiver: rcvr args: args + + | proxy bb | + proxy := InterpreterProxy new. + proxy synthesizeStackFor: rcvr with: args. + bb := self simulatorClass new. + bb setInterpreter: proxy. + bb initialiseModule. + "rendering state is loaded in the primitive implementations" + [bb perform: aString asSymbol] on: Exception do: [:ex| + RSqueak log: 'got an error trying to simulate ', aString. + RSqueak log: ex messageText. + RSqueak log: ex signalerContext shortStack]. + ^ proxy stackValue: 0 + ! Item was added: + ----- Method: InterpreterProxy>>synthesizeStackFor:with: (in category 'initialize') ----- + synthesizeStackFor: receiver with: args + self push: receiver. + argumentCount := args size. + 1 to: argumentCount do: [:i | self push: (args at: i)].! From frank.shearar at gmail.com Thu Mar 12 14:24:54 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Thu Mar 12 14:24:57 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: <5500A97C.3020705@ifi.uio.no> References: <5500A97C.3020705@ifi.uio.no> Message-ID: It's right where we left it. Spur introduces a new object memory format, so we're doing the right thing: we're breaking the format and telling people. When you load packages into a Spur image, things will just work. When you load changesets, things will just work. As far as I know, we've taken care that ImageSegments will also load into Spur, and just work. But sometimes, if you want to actually make progress, you're going to have to bite the bullet and make breaking changes. frank On 11 March 2015 at 20:45, Trygve Reenskaug wrote: > What's happened to the "write once, run everywhere" that used to be the > hallmark of Smalltalk? > > > On 11.03.2015 21:34, Chris Muller wrote: > > Hi Eliot and all, for this release I wonder whether we should provide > alternate binary's in the bin directory of the VM to help users manage > the different image formats. > > What if, in addition to bin/squeak, Cog would include bin/cog and Spur > would include bin/spur. In that case, although bin/squeak would be > whoever was installed last, at least users could be explicit about > which VM they want to launch which image. > > I know we also talked about some universal bin/squeak which could id > the image format and launch the appropriate binary, which would be > great. > > We should plan on doing _something_ in this area for the release. > > > > > > From djm1329 at san.rr.com Thu Mar 12 16:38:51 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Thu Mar 12 16:38:56 2015 Subject: [squeak-dev] [Pharo-dev] New Cog VMs available In-Reply-To: <7E81DDBC-007B-4F77-AD91-14EC352F4522@san.rr.com> References: <7E81DDBC-007B-4F77-AD91-14EC352F4522@san.rr.com> Message-ID: <7F89FA58-F0CE-468C-B9A0-FA9949CE7914@san.rr.com> > On Mar 12, 2015, at 00:59, Douglas McPherson wrote: > > I?ve also updated ARMv7 v3 and spur stack VMs. > > Note: > I built the v3 and spur VMs on my new RPi2, which has a quad-core ARMv7. As Tim has already pointed out, these work even when building with FAST_BITBLT enhancements enabled. The cool thing is they also work on the BeagleBone Black ARMv7 (but building on the BBB with FAST_BITBLT enabled resulted in a segfault at image startup .. no idea why). And they appear to work on the older ARMv6 RPi too, so I?ll suspend building the v6 versions unless they?re needed. I haven?t tested on the Parallella yet. > The new ARMv7 builds are also confirmed to work on Parallella. > Doug > >> On Mar 11, 2015, at 22:41, Eliot Miranda > wrote: >> >> ...in http://www.mirandabanda.org/files/Cog/VM/VM.r3268/ >> >> CogVM binaries as per VMMaker.oscog-eem.1088/r3268 >> >> Squeak 5.0 release candidate. >> >> Speed up normalize methods in LargeIntegersPlugin >> by cacheing result of firstIndexableField. >> >> Simplify integer conversion routines by adding byteSizeOfBytes: which assumes >> argument is byte indexable (as LargeIntegers are). Make sure integer conversion >> routines consistently answer 0 on failure. Use 4-byte access where possible. >> >> Remove use of popInteger in AsFloat and integer comparison primitives (popStack >> idiom is inefficient since multiplke writes as opposed to the single write in >> the pop:thenPush: idiom). >> >> Revise SpurMemoryManager>>isClassOfNonImm:equalTo:compactClassIndex: for >> better dead code elimination. >> -- >> best, >> Eliot > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150312/54173cb0/attachment.htm From eliot.miranda at gmail.com Thu Mar 12 16:44:46 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 12 16:44:49 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: On Thu, Mar 12, 2015 at 7:24 AM, Frank Shearar wrote: > It's right where we left it. Spur introduces a new object memory > format, so we're doing the right thing: we're breaking the format and > telling people. > > When you load packages into a Spur image, things will just work. When > you load changesets, things will just work. As far as I know, we've > taken care that ImageSegments will also load into Spur, and just work. > Ah, not quite. Image segments saved in 32-bit Spur will load in 32-bit Spur. Image segments saved in 64-bit Spur will load in 64-bit Spur. Image segments saved in Cog will load in Cog. But no interoperability is possible (yet!). And indeed I believe that image segments saved in the 64-bit Interpreter VM will only load in that 64-bit VM. The problem with image segments is that they are in the format of the VM's heap objects. However, Bert and I want co co-mentor a project to implement image-level support for loading segments from "foreign" object memories. Alas GSoC did not approve our organization this year. Maybe soon. Or maybe some student at one of the teaching institutions using Squeak or Pharo would be interested in having a go. Note that e.g. Fuel does not have this problem. But sometimes, if you want to actually make progress, you're going to > have to bite the bullet and make breaking changes. > +1. Spur has lots of advantages over the existing system but these can't be introduced without forcing a change to a new image and a new VM. frank > > On 11 March 2015 at 20:45, Trygve Reenskaug wrote: > > What's happened to the "write once, run everywhere" that used to be the > > hallmark of Smalltalk? > > > > > > On 11.03.2015 21:34, Chris Muller wrote: > > > > Hi Eliot and all, for this release I wonder whether we should provide > > alternate binary's in the bin directory of the VM to help users manage > > the different image formats. > > > > What if, in addition to bin/squeak, Cog would include bin/cog and Spur > > would include bin/spur. In that case, although bin/squeak would be > > whoever was installed last, at least users could be explicit about > > which VM they want to launch which image. > > > > I know we also talked about some universal bin/squeak which could id > > the image format and launch the appropriate binary, which would be > > great. > > > > We should plan on doing _something_ in this area for the release. > > > > > > > > > > > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150312/a58893a4/attachment.htm From eliot.miranda at gmail.com Thu Mar 12 16:46:40 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Thu Mar 12 16:46:44 2015 Subject: [Vm-dev] Re: [squeak-dev] [Pharo-dev] New Cog VMs available In-Reply-To: <7F89FA58-F0CE-468C-B9A0-FA9949CE7914@san.rr.com> References: <7E81DDBC-007B-4F77-AD91-14EC352F4522@san.rr.com> <7F89FA58-F0CE-468C-B9A0-FA9949CE7914@san.rr.com> Message-ID: Thanks Doug! On Thu, Mar 12, 2015 at 9:38 AM, Douglas McPherson wrote: > > > On Mar 12, 2015, at 00:59, Douglas McPherson wrote: > > I?ve also updated ARMv7 v3 and spur stack VMs. > > Note: > I built the v3 and spur VMs on my new RPi2, which has a quad-core ARMv7. > As Tim has already pointed out, these work even when building with > FAST_BITBLT enhancements enabled. The cool thing is they also work on the > BeagleBone Black ARMv7 (but building on the BBB with FAST_BITBLT enabled > resulted in a segfault at image startup .. no idea why). And they appear to > work on the older ARMv6 RPi too, so I?ll suspend building the v6 versions > unless they?re needed. I haven?t tested on the Parallella yet. > > > The new ARMv7 builds are also confirmed to work on Parallella. > > > Doug > > On Mar 11, 2015, at 22:41, Eliot Miranda wrote: > > ...in http://www.mirandabanda.org/files/Cog/VM/VM.r3268/ > > CogVM binaries as per VMMaker.oscog-eem.1088/r3268 > > Squeak 5.0 release candidate. > > Speed up normalize methods in LargeIntegersPlugin > by cacheing result of firstIndexableField. > > Simplify integer conversion routines by adding byteSizeOfBytes: which > assumes > argument is byte indexable (as LargeIntegers are). Make sure integer > conversion > routines consistently answer 0 on failure. Use 4-byte access where > possible. > > Remove use of popInteger in AsFloat and integer comparison primitives > (popStack > idiom is inefficient since multiplke writes as opposed to the single write > in > the pop:thenPush: idiom). > > Revise SpurMemoryManager>>isClassOfNonImm:equalTo:compactClassIndex: for > better dead code elimination. > -- > best, > Eliot > > > > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150312/f24a06a2/attachment.htm From lewis at mail.msen.com Thu Mar 12 18:59:49 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 12 18:59:52 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: <18699.136.2.1.102.1426186789.squirrel@webmail.msen.com> At the risk of giving myself an assignment ... One thing we should do for the upcoming release is provide something in a welcome workspace that gives a clear explanation of Spur from an end user perspective. Something along the lines of what it is, why we are doing it now, and what you (the end user) will gain from it now and in the future. This should be at the "elevator speech" level of detail, as opposed to deep technical details (for which we just give a pointer to Eliot's blog). Dave > It's right where we left it. Spur introduces a new object memory > format, so we're doing the right thing: we're breaking the format and > telling people. > > When you load packages into a Spur image, things will just work. When > you load changesets, things will just work. As far as I know, we've > taken care that ImageSegments will also load into Spur, and just work. > > But sometimes, if you want to actually make progress, you're going to > have to bite the bullet and make breaking changes. > > frank > > On 11 March 2015 at 20:45, Trygve Reenskaug wrote: >> What's happened to the "write once, run everywhere" that used to be the >> hallmark of Smalltalk? >> >> >> On 11.03.2015 21:34, Chris Muller wrote: >> >> Hi Eliot and all, for this release I wonder whether we should provide >> alternate binary's in the bin directory of the VM to help users manage >> the different image formats. >> >> What if, in addition to bin/squeak, Cog would include bin/cog and Spur >> would include bin/spur. In that case, although bin/squeak would be >> whoever was installed last, at least users could be explicit about >> which VM they want to launch which image. >> >> I know we also talked about some universal bin/squeak which could id >> the image format and launch the appropriate binary, which would be >> great. >> >> We should plan on doing _something_ in this area for the release. >> >> >> >> >> >> > From asqueaker at gmail.com Thu Mar 12 22:51:31 2015 From: asqueaker at gmail.com (Chris Muller) Date: Thu Mar 12 22:51:33 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: >> It's right where we left it. Spur introduces a new object memory >> format, so we're doing the right thing: we're breaking the format and >> telling people. >> >> When you load packages into a Spur image, things will just work. When >> you load changesets, things will just work. As far as I know, we've >> taken care that ImageSegments will also load into Spur, and just work. > > > Ah, not quite. Image segments saved in 32-bit Spur will load in 32-bit > Spur. Image segments saved in 64-bit Spur will load in 64-bit Spur. Image > segments saved in Cog will load in Cog. But no interoperability is possible > (yet!). And indeed I believe that image segments saved in the 64-bit > Interpreter VM will only load in that 64-bit VM. 64-bit will not be ready in time for 5.0 on 4/30 right? > The problem with image segments is that they are in the format of the VM's > heap objects. However, Bert and I want co co-mentor a project to implement > image-level support for loading segments from "foreign" object memories. > Alas GSoC did not approve our organization this year. Maybe soon. Or maybe > some student at one of the teaching institutions using Squeak or Pharo would > be interested in having a go. > > Note that e.g. Fuel does not have this problem. Nor does Ma Object Serializer. Ma Object Serializer has been updated to be transparently Spur compatible, so for 32-bit systems anyway, one could load ImageSegment file into a Cog image, save it with Ma, go into spur and load it with Ma, and then finally save it as ImageSegment. You could even stay as Ma for a while because I intend to do the same for 64-bit. > +1. Spur has lots of advantages over the existing system but these can't be > introduced without forcing a change to a new image and a new VM. Now that we've answered the troll-style question extensively, may we please talk about ideas to help users manage multiple formats? From commits at source.squeak.org Thu Mar 12 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 12 22:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150312225502.21306.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007629.html Name: Balloon-tfel.26 Ancestors: Balloon-bf.25 Fix typo in example method ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007630.html Name: Balloon-tfel.26 Ancestors: Balloon-bf.25 Fix typo in example method ============================================= From Das.Linux at gmx.de Thu Mar 12 22:56:00 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 12 22:56:04 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: <20CAD324-17CB-4D49-BF65-31806ECE0AB2@gmx.de> Hey Eliot, On 12.03.2015, at 17:44, Eliot Miranda wrote: > > The problem with image segments is that they are in the format of the VM's heap objects. However, Bert and I want co co-mentor a project to implement image-level support for loading segments from "foreign" object memories. Alas GSoC did not approve our organization this year. Maybe soon. Or maybe some student at one of the teaching institutions using Squeak or Pharo would be interested in having a go. Can you or Bert give me an outline or a heads up? (maybe off-list?) Best -Tobias From Das.Linux at gmx.de Fri Mar 13 00:22:50 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 13 00:22:54 2015 Subject: [squeak-dev] _ Message-ID: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> Dear all I request permission to enable 'allow underscore selectors' by default :) Best -Tobias From leves at elte.hu Fri Mar 13 00:29:13 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Mar 13 00:29:18 2015 Subject: [squeak-dev] _ In-Reply-To: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> References: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> Message-ID: I support the idea, because it makes it easier to load external code, but we shouldn't use such names in the Trunk itself. Levente On Fri, 13 Mar 2015, Tobias Pape wrote: > Dear all > > I request permission to enable 'allow underscore selectors' > by default :) > > Best > -Tobias > > From tim at rowledge.org Fri Mar 13 00:33:05 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Mar 13 00:33:08 2015 Subject: [squeak-dev] _ In-Reply-To: References: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> Message-ID: <0D133FD6-90BC-4243-8C3A-E6BC5F9EF381@rowledge.org> On 12-03-2015, at 5:29 PM, Levente Uzonyi wrote: > I support the idea, because it makes it easier to load external code, but we shouldn't use such names in the Trunk itself. Given that it seems to trigger complaints about the state of the method?s source every time you attempt to browse a method with _, I?d say not. Or, of course, fix the problem. Though as everyone knows, using _ in variables is a Mortal Sin. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Press [ESC] to detonate or any other key to explode. From commits at source.squeak.org Fri Mar 13 00:34:40 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 00:34:42 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.295.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.295.mcz ==================== Summary ==================== Name: Compiler-topa.295 Author: topa Time: 13 March 2015, 1:34:26.208 am UUID: f2727a06-5024-4534-bf38-934bcdad9bf9 Ancestors: Compiler-bf.294 Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. =============== Diff against Compiler-bf.294 =============== Item was changed: ----- Method: Parser>>allowUnderscoreAssignments (in category 'private') ----- allowUnderscoreAssignments "Query class + preference" + ^ (encoder ifNotNil: [:e | e classEncoding allowUnderscoreAssignments]) + ifNil: [super allowUnderscoreAssignments]! - ^encoder classEncoding allowUnderscoreAssignments - ifNil:[super allowUnderscoreAssignments]! From asqueaker at gmail.com Fri Mar 13 00:39:15 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 13 00:39:19 2015 Subject: [squeak-dev] _ In-Reply-To: References: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> Message-ID: Why is this preference in the first place instead of simply always allowing them? If we wish to understand well enough to answer Tobias' question, we probably should understand the trade-off to allowing them. So what is the trade-off? Personally, I don't see myself ever using them and I agree with Levente that we wouldn't in trunk but... what is the harm to allow someone to use underscores in selectors if they want to? On Thu, Mar 12, 2015 at 7:29 PM, Levente Uzonyi wrote: > I support the idea, because it makes it easier to load external code, but we > shouldn't use such names in the Trunk itself. > > Levente > > > On Fri, 13 Mar 2015, Tobias Pape wrote: > >> Dear all >> >> I request permission to enable 'allow underscore selectors' >> by default :) >> >> Best >> -Tobias >> >> > From Das.Linux at gmx.de Fri Mar 13 00:41:29 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 13 00:41:35 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.295.mcz Message-ID: <7A594247-C780-4F26-9CA6-B11490B1C846@gmx.de> Hey, On 13.03.2015, at 00:34, commits@source.squeak.org wrote: > Tobias Pape uploaded a new version of Compiler to project The Trunk: > http://source.squeak.org/trunk/Compiler-topa.295.mcz > > ==================== Summary ==================== > > Name: Compiler-topa.295 > Author: topa > Time: 13 March 2015, 1:34:26.208 am > UUID: f2727a06-5024-4534-bf38-934bcdad9bf9 > Ancestors: Compiler-bf.294 > > Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. > > =============== Diff against Compiler-bf.294 =============== > > Item was changed: > ----- Method: Parser>>allowUnderscoreAssignments (in category 'private') ----- > allowUnderscoreAssignments > "Query class + preference" > + ^ (encoder ifNotNil: [:e | e classEncoding allowUnderscoreAssignments]) > + ifNil: [super allowUnderscoreAssignments]! > - ^encoder classEncoding allowUnderscoreAssignments > - ifNil:[super allowUnderscoreAssignments]! To be frank, this is a bit of a hack, because the class's opinion on #allowUnderscoreAssignments is regrettably ignored. But this is better than an MNU on nil I think? Best -Tobias From Das.Linux at gmx.de Fri Mar 13 00:42:19 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 13 00:42:23 2015 Subject: [squeak-dev] _ In-Reply-To: <0D133FD6-90BC-4243-8C3A-E6BC5F9EF381@rowledge.org> References: <1CD9F050-8B6A-486D-B167-726D797C8A35@gmx.de> <0D133FD6-90BC-4243-8C3A-E6BC5F9EF381@rowledge.org> Message-ID: <6760CE79-5626-496B-88E5-CD8F4F56B356@gmx.de> On 13.03.2015, at 01:33, tim Rowledge wrote: > On 12-03-2015, at 5:29 PM, Levente Uzonyi wrote: > >> I support the idea, because it makes it easier to load external code, but we shouldn't use such names in the Trunk itself. > > Given that it seems to trigger complaints about the state of the method?s source every time you attempt to browse a method with _, I?d say not. Or, of course, fix the problem. > I hope my latest commit mitigates? Best -Tobias > Though as everyone knows, using _ in variables is a Mortal Sin. > > tim From ma.chris.m at gmail.com Fri Mar 13 01:58:38 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Fri Mar 13 01:58:40 2015 Subject: [squeak-dev] new intercycle pause Message-ID: Has anyone else gotten the dreaded "This delay is already scheduled!"? The exclaimation suggests the author felt this should never happen; as a possible bug somewhere? I've gotten it a couple of times, this time I had interrupted something (taking longer than I thought?) and a flurry of debuggers with that message, but VM pegged at 100% and could not gain control of the image. Had to kill -9 it. From leves at elte.hu Fri Mar 13 02:34:43 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Mar 13 02:34:47 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.295.mcz In-Reply-To: <7A594247-C780-4F26-9CA6-B11490B1C846@gmx.de> References: <7A594247-C780-4F26-9CA6-B11490B1C846@gmx.de> Message-ID: On Fri, 13 Mar 2015, Tobias Pape wrote: > Hey, > > > On 13.03.2015, at 00:34, commits@source.squeak.org wrote: > >> Tobias Pape uploaded a new version of Compiler to project The Trunk: >> http://source.squeak.org/trunk/Compiler-topa.295.mcz >> >> ==================== Summary ==================== >> >> Name: Compiler-topa.295 >> Author: topa >> Time: 13 March 2015, 1:34:26.208 am >> UUID: f2727a06-5024-4534-bf38-934bcdad9bf9 >> Ancestors: Compiler-bf.294 >> >> Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. >> >> =============== Diff against Compiler-bf.294 =============== >> >> Item was changed: >> ----- Method: Parser>>allowUnderscoreAssignments (in category 'private') ----- >> allowUnderscoreAssignments >> "Query class + preference" >> + ^ (encoder ifNotNil: [:e | e classEncoding allowUnderscoreAssignments]) >> + ifNil: [super allowUnderscoreAssignments]! >> - ^encoder classEncoding allowUnderscoreAssignments >> - ifNil:[super allowUnderscoreAssignments]! > > To be frank, this is a bit of a hack, because the class's opinion on #allowUnderscoreAssignments > is regrettably ignored. But this is better than an MNU on nil I think? That option - letting a class decide if its selectors may or may not contain underscores - should be nuked. It doesn't work, and it won't work. Levente > > Best > -Tobias > From leves at elte.hu Fri Mar 13 02:46:26 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Mar 13 02:46:30 2015 Subject: [squeak-dev] new intercycle pause In-Reply-To: References: Message-ID: I haven't seen this message yet. If you get it again, then please use kill -USR1 and check the stack trace. I've changed #interCyclePause: recently, and I think the error can occur if you use the same WorldState object from multiple UI processes (but doing that is a bad idea). Levente On Thu, 12 Mar 2015, Chris Muller wrote: > Has anyone else gotten the dreaded "This delay is already scheduled!"? > The exclaimation suggests the author felt this should never happen; > as a possible bug somewhere? > > I've gotten it a couple of times, this time I had interrupted > something (taking longer than I thought?) and a flurry of debuggers > with that message, but VM pegged at 100% and could not gain control of > the image. Had to kill -9 it. > > From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 13 04:11:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 13 04:21:08 2015 Subject: [squeak-dev] Re: new intercycle pause In-Reply-To: References: Message-ID: <1426219901602-4811640.post@n4.nabble.com> No problem under Windows 8.1 :) Best, Marcel -- View this message in context: http://forum.world.st/new-intercycle-pause-tp4811633p4811640.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Fri Mar 13 04:40:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 04:40:40 2015 Subject: [squeak-dev] The Trunk: Tools-ul.551.mcz Message-ID: Levente Uzonyi uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-ul.551.mcz ==================== Summary ==================== Name: Tools-ul.551 Author: ul Time: 13 March 2015, 5:39:48.09 am UUID: fe6d3208-411b-4114-b0ad-f3d148797a36 Ancestors: Tools-mt.550 - don't try to show message icons in FileContentsBrowser, because PseudoClass doesn't implement the necessary API to do that. - use the new methods #isSelectorOverride: and #isSelectorOverridden: in CodeHolder. =============== Diff against Tools-mt.550 =============== Item was changed: ----- Method: CodeHolder>>isThereAnOverride (in category 'misc') ----- isThereAnOverride + "Answer whether any subclass of my selected class implements my selected selector" + - "Answer whether any subclass of my selected class implements my - selected selector" | aName aClass | aName := self selectedMessageName ifNil: [^ false]. aClass := self selectedClassOrMetaClass ifNil: [^ false]. + ^aClass isSelectorOverridden: aName! - aClass allSubclassesDo: [ :cls | (cls includesSelector: aName) ifTrue: [ ^true ]]. - ^ false! Item was changed: ----- Method: CodeHolder>>isThisAnOverride (in category 'misc') ----- isThisAnOverride "Answer whether any superclass of my selected class implements my selected selector" + | aName aClass | aName := self selectedMessageName ifNil: [^ false]. aClass := self selectedClassOrMetaClass ifNil: [^ false]. + ^aClass isSelectorOverride: aName! - aClass allSuperclassesDo: [ :cls | (cls includesSelector: aName) ifTrue: [ ^true ]]. - ^ false! Item was added: + ----- Method: FileContentsBrowser class>>showMessageIcons (in category 'preferences') ----- + showMessageIcons + "Remove this method once PseudoClass implements the methods of the class API required to show the icons." + + ^false! From Das.Linux at gmx.de Fri Mar 13 07:30:17 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 13 07:30:22 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.295.mcz In-Reply-To: References: <7A594247-C780-4F26-9CA6-B11490B1C846@gmx.de> Message-ID: <4EAF9BB0-6AFD-4B0C-BD44-5FE26603A0CB@gmx.de> On 13.03.2015, at 03:34, Levente Uzonyi wrote: > On Fri, 13 Mar 2015, Tobias Pape wrote: > >> Hey, >> >> >> On 13.03.2015, at 00:34, commits@source.squeak.org wrote: >> >>> Tobias Pape uploaded a new version of Compiler to project The Trunk: >>> http://source.squeak.org/trunk/Compiler-topa.295.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Compiler-topa.295 >>> Author: topa >>> Time: 13 March 2015, 1:34:26.208 am >>> UUID: f2727a06-5024-4534-bf38-934bcdad9bf9 >>> Ancestors: Compiler-bf.294 >>> >>> Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. >>> >>> =============== Diff against Compiler-bf.294 =============== >>> >>> Item was changed: >>> ----- Method: Parser>>allowUnderscoreAssignments (in category 'private') ----- >>> allowUnderscoreAssignments >>> "Query class + preference" >>> + ^ (encoder ifNotNil: [:e | e classEncoding allowUnderscoreAssignments]) >>> + ifNil: [super allowUnderscoreAssignments]! >>> - ^encoder classEncoding allowUnderscoreAssignments >>> - ifNil:[super allowUnderscoreAssignments]! >> >> To be frank, this is a bit of a hack, because the class's opinion on #allowUnderscoreAssignments >> is regrettably ignored. But this is better than an MNU on nil I think? > > That option - letting a class decide if its selectors may or may not contain underscores - should be nuked. It doesn't work, and it won't work. > Why the former and why the latter? Best -Tobias > Levente > >> >> Best >> -Tobias From Das.Linux at gmx.de Fri Mar 13 07:31:15 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 13 07:31:20 2015 Subject: [squeak-dev] The Trunk: Tools-ul.551.mcz Message-ID: <85CB1085-1F07-4F09-9823-C6768AA7B36C@gmx.de> On 13.03.2015, at 04:40, commits@source.squeak.org wrote: > Levente Uzonyi uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-ul.551.mcz > > ==================== Summary ==================== > > Name: Tools-ul.551 > Author: ul > Time: 13 March 2015, 5:39:48.09 am > UUID: fe6d3208-411b-4114-b0ad-f3d148797a36 > Ancestors: Tools-mt.550 > > - don't try to show message icons in FileContentsBrowser, because PseudoClass doesn't implement the necessary API to do that. ? Ok, I thoght I fixed that in ToolIcons already? Best -Tobias > - use the new methods #isSelectorOverride: and #isSelectorOverridden: in CodeHolder. > > =============== Diff against Tools-mt.550 =============== > > Item was changed: From commits at source.squeak.org Fri Mar 13 14:37:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 14:37:50 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.778.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.778.mcz ==================== Summary ==================== Name: Morphic-mt.778 Author: mt Time: 13 March 2015, 7:37:12.318 am UUID: 78a6aea8-beff-744e-b91a-96efc94bce3e Ancestors: Morphic-dtl.777 Add #itemName to generic list wrapper to support filtering by item name in any kind of tree. =============== Diff against Morphic-dtl.777 =============== Item was added: + ----- Method: ListItemWrapper>>itemName (in category 'accessing') ----- + itemName + + self item asString.! From commits at source.squeak.org Fri Mar 13 14:39:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 14:39:07 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.779.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.779.mcz ==================== Summary ==================== Name: Morphic-mt.779 Author: mt Time: 13 March 2015, 7:38:37.462 am UUID: 7bbabcf5-e9ea-574e-8650-dcb88403cfa8 Ancestors: Morphic-mt.778 *sigh* It's too early. Fixes #itemName in ListItemWrapper. =============== Diff against Morphic-mt.778 =============== Item was changed: ----- Method: ListItemWrapper>>itemName (in category 'accessing') ----- itemName + ^ self item asString! - self item asString.! From commits at source.squeak.org Fri Mar 13 16:46:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 16:46:39 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.780.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.780.mcz ==================== Summary ==================== Name: Morphic-mt.780 Author: mt Time: 13 March 2015, 9:46:07.469 am UUID: f9279251-e8ab-8248-9c2f-1c47cce7e701 Ancestors: Morphic-mt.779 Keystrokes in tree morphs: Possibility to get access to event (and pressed modifiers) in the model. =============== Diff against Morphic-mt.779 =============== Item was changed: ----- Method: SimpleHierarchicalListMorph>>keyStrokeAction: (in category 'event handling') ----- keyStrokeAction: event + | numArgs | keystrokeActionSelector ifNil: [^false]. + numArgs := keystrokeActionSelector numArgs. + + numArgs = 1 ifTrue: [ + ^ model + perform: keystrokeActionSelector + with: event keyCharacter]. + numArgs = 2 ifTrue: [ + ^ model + perform: keystrokeActionSelector + with: event keyCharacter + with: self]. + numArgs = 3 ifTrue: [ + ^ model + perform: keystrokeActionSelector + with: event keyCharacter + with: self + with: event]. + ^self error: 'The keystrokeActionSelector must be a 1-, 2-, or 3-keyword symbol'! - keystrokeActionSelector numArgs = 1 - ifTrue: - [^model - perform: keystrokeActionSelector - with: event keyCharacter]. - keystrokeActionSelector numArgs = 2 - ifTrue: - [^model - perform: keystrokeActionSelector - with: event keyCharacter - with: self]. - ^self error: 'The keystrokeActionSelector must be a 1- or 2-keyword symbol'! From commits at source.squeak.org Fri Mar 13 16:48:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 16:48:14 2015 Subject: [squeak-dev] The Trunk: Tools-mt.552.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.552.mcz ==================== Summary ==================== Name: Tools-mt.552 Author: mt Time: 13 March 2015, 9:47:55.046 am UUID: bae0184d-17d8-844e-b43b-be880504cbbf Ancestors: Tools-ul.551 Inspect/explore/browse/... shortcuts work again in object explorer BUT with modifier key (e.g. CMD) pressed. =============== Diff against Tools-ul.551 =============== Item was changed: ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') ----- buildWith: builder | windowSpec treeSpec textSpec | windowSpec := builder pluggableWindowSpec new. windowSpec model: self; children: OrderedCollection new; label: #label. treeSpec := builder pluggableTreeSpec new. treeSpec model: self; nodeClass: self class nodeClass; roots: #getList; + keyPress: #explorerKey:from:event:; - keyPress: #explorerKey:from:; getSelected: #currentSelection; setSelected: #currentSelection:; setSelectedParent: #currentParent:; menu: #genericMenu:; autoDeselect: false; columns: (ObjectExplorerWrapper showContentsInColumns ifTrue: [{ [:listMorph | (listMorph scroller submorphs collect: [:item | item preferredWidthOfColumn: 1]) max]. nil "take all the space"}] ifFalse: []); frame: (0@0 corner: 1@0.85). windowSpec children add: treeSpec. textSpec := builder pluggableTextSpec new. textSpec model: self; menu: #codePaneMenu:shifted:; frame: (0@0.85 corner: 1@1). windowSpec children add: textSpec. ^ builder build: windowSpec! Item was removed: - ----- Method: ObjectExplorer>>explorerKey:from: (in category 'menus') ----- - explorerKey: aChar from: view - - PluggableListMorph filterableLists - ifTrue: [^ false]. - - currentSelection ifNotNil: [ - inspector ifNil: [inspector := Inspector new]. - inspector - inspect: self parentObject; - object: self object. - - aChar == $i ifTrue: [self inspectSelection. ^ true]. - aChar == $I ifTrue: [self exploreSelection. ^ true]. - - aChar == $b ifTrue: [inspector browseMethodFull. ^ true]. - aChar == $h ifTrue: [inspector classHierarchy. ^ true]. - aChar == $c ifTrue: [Clipboard clipboardText: self currentSelection key. ^ true]. - aChar == $p ifTrue: [inspector browseFullProtocol. ^ true]. - aChar == $N ifTrue: [inspector browseClassRefs. ^ true]. - aChar == $t ifTrue: [inspector tearOffTile. ^ true]. - aChar == $v ifTrue: [inspector viewerForValue. ^ true]]. - - ^ false! Item was added: + ----- Method: ObjectExplorer>>explorerKey:from:event: (in category 'menus') ----- + explorerKey: aChar from: view event: event + + event anyModifierKeyPressed ifFalse: [^ false]. + + currentSelection ifNotNil: [ + inspector ifNil: [inspector := Inspector new]. + inspector + inspect: self parentObject; + object: self object. + + aChar == $i ifTrue: [self inspectSelection. ^ true]. + aChar == $I ifTrue: [self exploreSelection. ^ true]. + + aChar == $b ifTrue: [inspector browseMethodFull. ^ true]. + aChar == $h ifTrue: [inspector classHierarchy. ^ true]. + aChar == $c ifTrue: [Clipboard clipboardText: self currentSelection key. ^ true]. + aChar == $p ifTrue: [inspector browseFullProtocol. ^ true]. + aChar == $N ifTrue: [inspector browseClassRefs. ^ true]. + aChar == $t ifTrue: [inspector tearOffTile. ^ true]. + aChar == $v ifTrue: [inspector viewerForValue. ^ true]]. + + ^ false! From commits at source.squeak.org Fri Mar 13 17:31:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 17:31:27 2015 Subject: [squeak-dev] The Trunk: Tools-mt.553.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.553.mcz ==================== Summary ==================== Name: Tools-mt.553 Author: mt Time: 13 March 2015, 10:31:03.81 am UUID: 8a53e27d-a4d2-1b4d-b899-7433bf6d5424 Ancestors: Tools-mt.552 Filtering changed to support a depth offset. Will be used to filter subtrees and support separate exploration activities in a large tree structure. The depth-limit will then be applied together with the offset. =============== Diff against Tools-mt.552 =============== Item was changed: ----- Method: IndentingListItemMorph>>applyFilter: (in category 'filtering') ----- applyFilter: filter + self + applyFilter: filter + depthOffset: self indentLevel.! - | selfMatch childMatch | - self isExpanded ifTrue: [self toggleExpandedState]. - - selfMatch := self matches: filter. - childMatch := self matchesAnyChild: filter. - - selfMatch | childMatch ifFalse: [^ self hide]. - - selfMatch ifTrue: [ - self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. - childMatch ifTrue: [ - self toggleExpandedState. - self childrenDo: [:child | child applyFilter: filter]].! Item was added: + ----- Method: IndentingListItemMorph>>applyFilter:depthOffset: (in category 'filtering') ----- + applyFilter: filter depthOffset: offset + + | selfMatch childMatch | + self isExpanded ifTrue: [self toggleExpandedState]. + + selfMatch := self matches: filter. + childMatch := self matchesAnyChild: filter depthOffset: offset. + + selfMatch | childMatch ifFalse: [^ self hide]. + + selfMatch ifTrue: [ + self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. + childMatch ifTrue: [ + self toggleExpandedState. + self childrenDo: [:child | child applyFilter: filter depthOffset: offset]].! Item was removed: - ----- Method: IndentingListItemMorph>>matchesAnyChild: (in category 'filtering') ----- - matchesAnyChild: pattern - - | maxDepth next current | - maxDepth := PluggableTreeMorph maximumSearchDepth - self indentLevel. - maxDepth <= 0 ifTrue: [^ false]. - - next := (self getChildren collect: [:obj | 1 -> obj]) asOrderedCollection. - [next notEmpty] whileTrue: [ - current := next removeFirst. - - (self matches: pattern in: current value) - ifTrue: [^ true]. - - current key < maxDepth ifTrue: [ - next addAll: ((self getChildrenFor: current value) collect: [:obj | (current key + 1) -> obj])]. - ]. - - ^ false! Item was added: + ----- Method: IndentingListItemMorph>>matchesAnyChild:depthOffset: (in category 'filtering') ----- + matchesAnyChild: pattern depthOffset: offset + + | maxDepth next current | + maxDepth := PluggableTreeMorph maximumSearchDepth - self indentLevel + offset. + maxDepth <= 0 ifTrue: [^ false]. + + next := (self getChildren collect: [:obj | 1 -> obj]) asOrderedCollection. + [next notEmpty] whileTrue: [ + current := next removeFirst. + + (self matches: pattern in: current value) + ifTrue: [^ true]. + + current key < maxDepth ifTrue: [ + next addAll: ((self getChildrenFor: current value) collect: [:obj | (current key + 1) -> obj])]. + ]. + + ^ false! From commits at source.squeak.org Fri Mar 13 17:33:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 13 17:33:54 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.99.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.99.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.99 Author: mt Time: 13 March 2015, 10:33:47.95 am UUID: 7fbe0317-9cd3-5640-9c1d-467986d1f7e9 Ancestors: ToolBuilder-Morphic-cmm.98 Tree will only filter after a timeout and not after each key press. Tree filtering considers current selection and its sub-tree now. Supports separate exploartion activities in a large tree structure. (Backspace key will still make all hidden nodes visible again) =============== Diff against ToolBuilder-Morphic-cmm.98 =============== Item was changed: ----- Method: PluggableTreeMorph>>basicKeyPressed: (in category 'event handling') ----- basicKeyPressed: aChar self updateLastKeystrokes: aChar. model okToChange ifFalse: [^ false]. PluggableListMorph filterableLists + ifTrue: [self triggerFilterTree] - ifTrue: [self filterTree] ifFalse: [self selectNextMorphByFilter]. ^ true! Item was changed: ----- Method: PluggableTreeMorph>>filterTree (in category 'filtering') ----- filterTree self hasFilter ifFalse: [ self removeFilter. ^ self]. self indicateFiltered. "Clean up the tree." + (self selectedMorph + ifNil: [self roots] + ifNotNil: [:m | {m}]) do: [:item | + item applyFilter: lastKeystrokes. + item visible ifFalse: [ + "Do not hide the item where the filter is based on." + item show. + item isExpanded ifTrue: [item toggleExpandedState]]]. + - self roots do: [:root | - root applyFilter: lastKeystrokes]. - self adjustSubmorphPositions.! Item was added: + ----- Method: PluggableTreeMorph>>triggerFilterTree (in category 'filtering') ----- + triggerFilterTree + + self removeAlarm: #filterTree. + self addAlarm: #filterTree after: 300.! From asqueaker at gmail.com Fri Mar 13 20:22:50 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 13 20:22:55 2015 Subject: [squeak-dev] new intercycle pause In-Reply-To: References: Message-ID: It just happened again, here's the stacks from kill -USR1: SIGUSR1 Fri Mar 13 15:19:17 2015 /usr/local/lib/squeak/5.0-3264/squeak Squeak VM version: 5.0-3264 #2 Wed Mar 4 10:06:52 PST 2015 gcc 4.4.7 [Production Spur VM] Built from: CoInterpreter VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8 Mar 3 2015 With: StackToRegisterMappingCogit VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8 Mar 3 2015 Revision: VM: r3264 http://www.squeakvm.org/svn/squeak/branches/Cog Date: 2015-03-03 13:29:31 -0800 Plugins: r3243 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins Build host: Linux mclinux32 2.6.32-431.el6.i686 #1 SMP Fri Nov 22 00:26:36 UTC 2013 i686 i686 i386 GNU/Linux plugin path: /usr/local/bin/../lib/squeak/5.0-3264 [default: /usr/local/lib/squeak/5.0-3264/] C stack backtrace & registers: eax 0xff7c8754 ebx 0xff7c8670 ecx 0xff7c8708 edx 0xff7c86bc edi 0xff7c8540 esi 0xff7c8540 ebp 0xff7c85d8 esp 0xff7c8624 eip 0xff7c8838 *[0xff7c8838] /usr/local/bin/../lib/squeak/5.0-3264/squeak[0x805ef00] /usr/local/bin/../lib/squeak/5.0-3264/squeak[0x805f14e] [0xf77dc410] /usr/local/bin/../lib/squeak/5.0-3264/squeak[0x80d8f6a] [0x8b00c28] /usr/local/bin/../lib/squeak/5.0-3264/squeak(interpret+0x86e)[0x809c2ce] /usr/local/bin/../lib/squeak/5.0-3264/squeak(main+0x2ae)[0x805f97e] /lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0xf75d74d3] [0x2d] All Smalltalk process stacks (active first): Process 0xd5fc480 priority 60 0xff7d6868 M GrafPort(BitBlt)>basicDisplayString:from:to:at:strikeFont:kern: 0x8f3dfa0: a(n) GrafPort 0xff7d68a4 M GrafPort(BitBlt)>displayString:from:to:at:strikeFont:kern: 0x8f3dfa0: a(n) GrafPort 0xff7d68d8 M StrikeFont>displayString:on:from:to:at:kern: 0x9609078: a(n) StrikeFont 0xff7d6910 M FormCanvas>drawString:from:to:in:font:color: 0x8f3deb8: a(n) FormCanvas 0xff7d6940 M FormCanvas(Canvas)>drawString:in:font:color: 0x8f3deb8: a(n) FormCanvas 0xff7d6980 M LazyListMorph>display:atRow:on: 0xe96fb18: a(n) LazyListMorph 0xff7d69ac M LazyListMorph>drawOn: 0xe96fb18: a(n) LazyListMorph 0xff7d589c M FormCanvas(Canvas)>draw: 0x8f3deb8: a(n) FormCanvas 0xff7d58b8 M FormCanvas(Canvas)>drawMorph: 0x8f3deb8: a(n) FormCanvas 0xff7d58d4 M LazyListMorph(Morph)>fullDrawOn: 0xe96fb18: a(n) LazyListMorph 0xff7d58f0 M FormCanvas(Canvas)>fullDraw: 0x8f3deb8: a(n) FormCanvas 0xff7d590c M FormCanvas(Canvas)>fullDrawMorph: 0x8f3deb8: a(n) FormCanvas 0xff7d592c M [] in TransformMorph>drawSubmorphsOn: 0xe96fa68: a(n) TransformMorph 0xff7d594c M Array(SequenceableCollection)>reverseDo: 0xe99b1d8: a(n) Array 0xff7d5968 M [] in TransformMorph>drawSubmorphsOn: 0xe96fa68: a(n) TransformMorph 0xff7d59a0 M FormCanvas>transformBy:clippingTo:during:smoothing: 0x8c03748: a(n) FormCanvas 0xff7d9888 M TransformMorph>drawSubmorphsOn: 0xe96fa68: a(n) TransformMorph 0xff7d98a4 M TransformMorph(Morph)>fullDrawOn: 0xe96fa68: a(n) TransformMorph 0xff7d98c0 M FormCanvas(Canvas)>fullDraw: 0x8c03748: a(n) FormCanvas 0xff7d98dc M FormCanvas(Canvas)>fullDrawMorph: 0x8c03748: a(n) FormCanvas 0xff7d98fc M [] in PluggableListMorphPlus(Morph)>drawSubmorphsOn: 0xe961850: a(n) PluggableListMorphPlus 0xff7d991c M Array(SequenceableCollection)>reverseDo: 0xe96f990: a(n) Array 0xff7d9938 M [] in PluggableListMorphPlus(Morph)>drawSubmorphsOn: 0xe961850: a(n) PluggableListMorphPlus 0xff7d9958 M PluggableListMorphPlus(Morph)>drawSubmorphsOn: 0xe961850: a(n) PluggableListMorphPlus 0xff7d9974 M PluggableListMorphPlus(Morph)>fullDrawOn: 0xe961850: a(n) PluggableListMorphPlus 0xff7d9990 M FormCanvas(Canvas)>fullDraw: 0x8c03748: a(n) FormCanvas 0xff7d99ac M FormCanvas(Canvas)>fullDrawMorph: 0x8c03748: a(n) FormCanvas 0xff7ca8ac M [] in PluggableSystemWindow(Morph)>drawSubmorphsOn: 0xe950338: a(n) PluggableSystemWindow 0xff7ca8cc M Array(SequenceableCollection)>reverseDo: 0xe95d1f0: a(n) Array 0xff7ca8e8 M [] in PluggableSystemWindow(Morph)>drawSubmorphsOn: 0xe950338: a(n) PluggableSystemWindow 0xff7ca908 M PluggableSystemWindow(Morph)>drawSubmorphsOn: 0xe950338: a(n) PluggableSystemWindow 0xff7ca924 M PluggableSystemWindow(Morph)>fullDrawOn: 0xe950338: a(n) PluggableSystemWindow 0xff7ca940 M FormCanvas(Canvas)>fullDraw: 0x8c03748: a(n) FormCanvas 0xff7ca95c M FormCanvas(Canvas)>fullDrawMorph: 0x8c03748: a(n) FormCanvas 0xff7ca9ac M [] in WorldState>drawWorld:submorphs:invalidAreasOn: 0xa908d88: a(n) WorldState 0xff7d48a4 M Rectangle>allAreasOutsideList:startingAt:do: 0x8c038c0: a(n) Rectangle 0xff7d48c8 M Rectangle>allAreasOutsideList:do: 0x8c038c0: a(n) Rectangle 0xff7d4904 M [] in WorldState>drawWorld:submorphs:invalidAreasOn: 0xa908d88: a(n) WorldState 0xff7d4928 M Array(SequenceableCollection)>do: 0x8c03dc0: a(n) Array 0xff7d4958 M WorldState>drawWorld:submorphs:invalidAreasOn: 0xa908d88: a(n) WorldState 0xff7d4990 M WorldState>displayWorld:submorphs: 0xa908d88: a(n) WorldState 0xff7d49b0 M PasteUpMorph>privateOuterDisplayWorld 0x95fc980: a(n) PasteUpMorph 0xff7d2890 M PasteUpMorph>displayWorld 0x95fc980: a(n) PasteUpMorph 0xff7d28ac M [] in WorldState>displayWorldSafely: 0xa908d88: a(n) WorldState 0xff7d28c8 M BlockClosure>on:do: 0x8c03b18: a(n) BlockClosure 0xff7d28e8 M BlockClosure>ifError: 0x8c03b18: a(n) BlockClosure 0xff7d2904 M WorldState>displayWorldSafely: 0xa908d88: a(n) WorldState 0xff7d2924 M WorldState>doOneCycleNowFor: 0xa908d88: a(n) WorldState 0xff7d2940 M WorldState>doOneCycleFor: 0xa908d88: a(n) WorldState 0xff7d2960 M WorldState>doOneSubCycleFor: 0xa908d88: a(n) WorldState 0xff7d297c M PasteUpMorph>doOneSubCycle 0x95fc980: a(n) PasteUpMorph 0xff7d29a4 I MenuMorph>invokeAt:in:allowKeyboard: 0xd66b568: a(n) MenuMorph 0xd6e93f8 s MenuMorph class>chooseFrom:values:lines:title: 0xd6f2e18 s MorphicUIManager>chooseFrom:values:lines:title: 0xd6fb8e0 s MorphicUIManager(UIManager)>chooseFrom:values:title: 0xd745070 s SoundService class(AppRegistry class)>askForDefault 0xd74c8f8 s SoundService class(AppRegistry class)>default 0xd7535d8 s EventSensor(InputSensor)>userInterruptWatcher 0xd75aa28 s [] in EventSensor(InputSensor)>installInterruptWatcher 0xd760a90 s [] in BlockClosure>newProcess processes at priority 60 Process 0xc137f68 priority 60 0xff7d78b8 M [] in Delay>schedule 0xd5f4f30: a(n) Delay 0xff7d78d8 M [] in Semaphore>critical: 0x956ece0: a(n) Semaphore 0xff7d78f8 M BlockClosure>ensure: 0x8c03fd8: a(n) BlockClosure 0xff7d7918 M Semaphore>critical: 0x956ece0: a(n) Semaphore 0xff7d7934 M Delay>schedule 0xd5f4f30: a(n) Delay 0xff7d794c M Delay>wait 0xd5f4f30: a(n) Delay 0xff7d796c M [] in EventSensor>eventTickler 0x956ee90: a(n) EventSensor 0xff7d7988 M BlockClosure>on:do: 0x8c040e0: a(n) BlockClosure 0xff7d79b0 M EventSensor>eventTickler 0x956ee90: a(n) EventSensor 0xd6fb420 s [] in EventSensor>installEventTickler 0xd744d38 s [] in BlockClosure>newProcess processes at priority 50 Process 0xab54e40 priority 50 0xd6672a0 s WeakArray class>finalizationProcess 0xd66b1a8 s [] in WeakArray class>restartFinalizationProcess 0xd6d2168 s [] in BlockClosure>newProcess processes at priority 40 Process 0x11f08340 priority 40 0xff7c98b4 M UndefinedObject>handleSignal: 0x9179d00: a(n) UndefinedObject 0xff7c98d0 M Error(Exception)>signal 0x11f5c478: a(n) Error 0xff7c98e8 M Error(Exception)>signal: 0x11f5c478: a(n) Error 0xff7c9904 M Delay(Object)>error: 0xa7b2f48: a(n) Delay 0xff7c9920 M Delay>delayDuration: 0xa7b2f48: a(n) Delay 0xff7c9940 M WorldState>interCyclePause: 0xa908d88: a(n) WorldState 0xff7c995c M WorldState>doOneCycleFor: 0xa908d88: a(n) WorldState 0xff7c9978 M PasteUpMorph>doOneCycle 0x95fc980: a(n) PasteUpMorph 0xff7c9990 M [] in MorphicProject>spawnNewProcess 0x96e8c30: a(n) MorphicProject 0xff7c99b0 I [] in BlockClosure>newProcess 0x11faf7c0: a(n) BlockClosure processes at priority 10 Process 0xab55008 priority 10 0xd666e90 s ProcessorScheduler class>idleProcess 0xd66afb8 s [] in ProcessorScheduler class>startUp 0xd6d0ed0 s [] in BlockClosure>newProcess suspended processes Process 0x9f3b598 priority 80 0xff7cb998 M Delay class>handleTimerEvent 0x94c9008: a(n) Delay class 0xff7cb9b0 M Delay class>(nil) 0x94c9008: a(n) Delay class 0x956ecf8 s [] in Delay class>(nil) 0x956ee30 s [] in BlockClosure>(nil) Process 0x96d8df0 priority 49 0x9f651a8 s [] in Delay>wait 0xb064a78 s BlockClosure>ifCurtailed: 0xa929500 s Delay>wait 0x96d9838 s [] in MaTimer>in:do: 0xa5e4220 s [] in BlockClosure>newProcess Process 0x9f4d3c0 priority 49 0x9f4d798 s [] in Delay>wait 0xb057ad0 s BlockClosure>ifCurtailed: 0x9f65208 s Delay>wait 0x96a1ff8 s [] in MaTimer>in:do: 0x9539758 s [] in BlockClosure>newProcess Process 0xb05cb80 priority 49 0xab55590 s [] in Delay>wait 0xd277a30 s BlockClosure>ifCurtailed: 0x9d8ac98 s Delay>wait 0x96dc080 s [] in MaTimer>in:do: 0xa5e4400 s [] in BlockClosure>newProcess Process 0x96d9788 priority 49 0x9f63ae0 s [] in Delay>wait 0xb05cb08 s BlockClosure>ifCurtailed: 0xa9278b8 s Delay>wait 0x96d8e80 s [] in MaTimer>in:do: 0xa344b40 s [] in BlockClosure>newProcess Process 0x96d8dc0 priority 49 0x9f65148 s [] in Delay>wait 0xb064a18 s BlockClosure>ifCurtailed: 0xa9291c0 s Delay>wait 0x96d9688 s [] in MaTimer>in:do: 0xa5e41c0 s [] in BlockClosure>newProcess Process 0x9f49a50 priority 49 0x9f4dc30 s [] in Delay>wait 0xb0595b8 s BlockClosure>ifCurtailed: 0xa839c58 s Delay>wait 0x96d5500 s [] in MaTimer>in:do: 0x96a1888 s [] in BlockClosure>newProcess Process 0xd5664e0 priority 49 0xab3d430 s [] in Delay>wait 0xb1fc978 s BlockClosure>ifCurtailed: 0x9f4a020 s Delay>wait 0x96d9d78 s [] in MaTimer>in:do: 0xa5e4280 s [] in BlockClosure>newProcess Process 0x9f49a80 priority 49 0x9f4dc90 s [] in Delay>wait 0xb0596c0 s BlockClosure>ifCurtailed: 0xa8eef08 s Delay>wait 0x96d6db0 s [] in MaTimer>in:do: 0x9f4ae40 s [] in BlockClosure>newProcess Process 0x9e62c20 priority 49 0xab57288 s [] in Delay>wait 0xd3cc7c0 s BlockClosure>ifCurtailed: 0x9e983d8 s Delay>wait 0x9894fd0 s [] in MaTimer>in:do: 0xa5e4520 s [] in BlockClosure>newProcess Process 0xd3cc030 priority 49 0xab4d1f8 s [] in Delay>wait 0xbf902c8 s BlockClosure>ifCurtailed: 0x9f49f68 s Delay>wait 0x96db380 s [] in MaTimer>in:do: 0xa5e4340 s [] in BlockClosure>newProcess Process 0xab2e720 priority 49 0xab55630 s [] in Delay>wait 0xd310a88 s BlockClosure>ifCurtailed: 0x9d8b400 s Delay>wait 0x96dcaf0 s [] in MaTimer>in:do: 0xa5e4460 s [] in BlockClosure>newProcess Process 0xba74ca8 priority 49 0xab4e7b8 s [] in Delay>wait 0xbfe65c0 s BlockClosure>ifCurtailed: 0xa0854b0 s Delay>wait 0x96db4b8 s [] in MaTimer>in:do: 0xa5e43a0 s [] in BlockClosure>newProcess Process 0xd562d38 priority 49 0xab4c188 s [] in Delay>wait 0xba74c48 s BlockClosure>ifCurtailed: 0x9f499f0 s Delay>wait 0x96da6c0 s [] in MaTimer>in:do: 0xa5e42e0 s [] in BlockClosure>newProcess Process 0x9e08360 priority 49 0xab575d8 s [] in Delay>wait 0xd3ef7f8 s BlockClosure>ifCurtailed: 0x9f422d8 s Delay>wait 0x9cdf1c8 s [] in MaTimer>in:do: 0xa5e4580 s [] in BlockClosure>newProcess Process 0xa5fcf20 priority 49 0xab556e0 s [] in Delay>wait 0xd3cbfd0 s BlockClosure>ifCurtailed: 0x9e97d20 s Delay>wait 0x9887af8 s [] in MaTimer>in:do: 0xa5e44c0 s [] in BlockClosure>newProcess Process 0x9e07de0 priority 49 0xab579f8 s [] in Delay>wait 0xd3f9820 s BlockClosure>ifCurtailed: 0x9f495a0 s Delay>wait 0x9d850b8 s [] in MaTimer>in:do: 0xa5e45e0 s [] in BlockClosure>newProcess Process 0x96d9758 priority 49 0x9f4dcf0 s [] in Delay>wait 0xb059720 s BlockClosure>ifCurtailed: 0xa8f88a8 s Delay>wait 0x96d6e10 s [] in MaTimer>in:do: 0xa295720 s [] in BlockClosure>newProcess Process 0x9e07d30 priority 49 0xab5afa0 s [] in Delay>wait 0xd560e08 s BlockClosure>ifCurtailed: 0xa083c68 s Delay>wait 0x9f4d720 s [] in MaTimer>in:do: 0xa5e4640 s [] in BlockClosure>newProcess Process 0xab4eb40 priority 40 0xd667570 s [] in UnixOSProcessAccessor>grimReaperProcess 0xd66b3c8 s [] in BlockClosure>newProcess Process 0xaf2a100 priority 60 0xd666e30 s SmalltalkImage>lowSpaceWatcher 0xd66af58 s [] in SmalltalkImage>installLowSpaceWatcher 0xd6d0e70 s [] in BlockClosure>newProcess Most recent primitives @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ perform:with: @ @ perform:with: @ @ @ @ perform:with: @ @ perform:with: @ copyBits @ @ @ copyBits @ clone @ @ wait tempAt: tempAt:put: tempAt: terminateTo: findNextUnwindContextUpTo: tempAt: tempAt:put: tempAt: terminateTo: signal findNextUnwindContextUpTo: terminateTo: @ @ @ perform:with: @ @ perform:with: @ copyBits wait tempAt: tempAt:put: tempAt: terminateTo: findNextUnwindContextUpTo: tempAt: tempAt:put: tempAt: terminateTo: signal findNextUnwindContextUpTo: terminateTo: @ perform:with: @ @ perform:with: @ @ @ @ perform:with: @ @ perform:with: @ copyBits @ @ @ perform:with: @ @ perform:with: @ @ @ @ @ @ @ copyBits copyBits copyBits copyBits @ @ copyBits copyBits @ perform:with: @ @ perform:with: @ @ @ @ perform:with: @ @ perform:with: @ copyBits @ @ @ perform:with: @ @ perform:with: @ @ @ @ @ @ @ copyBits copyBits copyBits copyBits @ @ copyBits copyBits @ perform:with: @ @ perform:with: @ @ @ @ @ @ @ clone @ @ fractionPart truncated fractionPart truncated fractionPart truncated @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: @ @ @ @ @ @ @ @ @ @ primDisplayString:from:to:map:xTable:kern: @ primDisplayString:from:to:map:xTable:kern: stack page bytes 4096 available headroom 3300 minimum unused headroom 3508 (SIGUSR1) On Thu, Mar 12, 2015 at 9:46 PM, Levente Uzonyi wrote: > I haven't seen this message yet. If you get it again, then please use kill > -USR1 and check the stack trace. > > I've changed #interCyclePause: recently, and I think the error can occur if > you use the same WorldState object from multiple UI processes (but doing > that is a bad idea). > > Levente > > > On Thu, 12 Mar 2015, Chris Muller wrote: > >> Has anyone else gotten the dreaded "This delay is already scheduled!"? >> The exclaimation suggests the author felt this should never happen; >> as a possible bug somewhere? >> >> I've gotten it a couple of times, this time I had interrupted >> something (taking longer than I thought?) and a flurry of debuggers >> with that message, but VM pegged at 100% and could not gain control of >> the image. Had to kill -9 it. >> >> > From commits at source.squeak.org Sat Mar 14 01:48:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 14 01:48:22 2015 Subject: [squeak-dev] The Trunk: Compiler.spur-topa.295.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler.spur-topa.295.mcz ==================== Summary ==================== Name: Compiler.spur-topa.295 Author: eem Time: 13 March 2015, 6:47:43.293 pm UUID: dd917e98-e643-413b-8698-6d2c7cc5b479 Ancestors: Compiler-topa.295, Compiler.spur-bf.294 Compiler-topa.295 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.241 Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. =============== Diff against Compiler-topa.295 =============== Item was changed: ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex + numArgs > 15 ifTrue: + [^self error: 'Cannot compile -- too many arguments']. + numTemps > 63 ifTrue: + [^self error: 'Cannot compile -- too many temporary variables']. + numLits > 65535 ifTrue: + [^self error: 'Cannot compile -- too many literals']. + ^(CompiledMethod headerFlagForEncoder: self) + + (numArgs bitShift: 24) + + (numTemps bitShift: 18) + "+ (largeBit bitShift: 17)" "largeBit gets filled in later" + + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + + numLits! - "Compute the compiled method header that encodes the arguments - in the receiver's header format (see CompiledMehtod's class comment)." - self subclassResponsibility! Item was removed: - ----- Method: EncoderForV3>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- - computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex - | primBits | - numTemps > 63 ifTrue: - [^self error: 'Cannot compile -- too many temporary variables']. - numLits > 255 ifTrue: - [^self error: 'Cannot compile -- too many literals']. - primBits := primitiveIndex <= 16r1FF - ifTrue: [primitiveIndex] - ifFalse: "For now the high bit of primitive no. is in the 29th bit of header" - [primitiveIndex > 16r3FF ifTrue: [self error: 'prim num too large']. - (primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r200) bitShift: 19)]. - ^(numArgs bitShift: 24) - + (numTemps bitShift: 18) - "+ (largeBit bitShift: 17)" "largeBit gets filled in later" - + (numLits bitShift: 9) - + primBits! Item was changed: ----- Method: EncoderForV3PlusClosures class>>bytecodeSize: (in category 'instruction stream support') ----- bytecodeSize: bytecode "Answer the number of bytes in the bytecode." bytecode <= 125 ifTrue: [^1]. bytecode >= 176 ifTrue: [^1]. bytecode >= 160 ifTrue: "long jumps" [^2]. bytecode >= 144 ifTrue: "short jumps" [^1]. "extensions" bytecode >= 128 ifTrue: + [^#(2 2 2 2 3 2 2 1 1 1 2 3 3 3 3 4) at: bytecode - 127]. - [^#(2 2 2 2 3 2 2 1 1 1 2 nil 3 3 3 4) at: bytecode - 127]. ^nil! Item was added: + ----- Method: EncoderForV3PlusClosures class>>callPrimitiveCode (in category 'bytecode decoding') ----- + callPrimitiveCode + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + ^139! Item was added: + ----- Method: EncoderForV3PlusClosures>>genCallPrimitive: (in category 'bytecode generation') ----- + genCallPrimitive: primitiveIndex + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + (primitiveIndex < 1 or: [primitiveIndex > 65535]) ifTrue: + [self outOfRangeError: 'primitive index' index: primitiveIndex range: 1 to: 65535]. + stream + nextPut: 139; + nextPut: (primitiveIndex bitAnd: 255); + nextPut: (primitiveIndex bitShift: -8)! Item was changed: ----- Method: MethodNode>>generate:using: (in category 'code generation') ----- generate: trailer using: aCompiledMethodClass "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass. The argument, trailer, is arbitrary but is typically either the reference to the source code that is stored with every CompiledMethod, or an encoding of the method's temporary names." + | primErrNode blkSize nLits locals literals stack header method | - | primErrNode blkSize nLits literals stack method | self generate: trailer using: aCompiledMethodClass ifQuick: [:m | encoder noteBlockExtent: (0 to: 2) hasLocals: arguments. m literalAt: 2 put: encoder associationForClass; properties: properties. ^m]. primErrNode := self primitiveErrorVariableName ifNotNil: [encoder fixTemp: self primitiveErrorVariableName]. + self ensureClosureAnalysisDone. + encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:" - encoder supportsClosureOpcodes ifTrue: - [self ensureClosureAnalysisDone. - encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:"]. blkSize := (block sizeCodeForEvaluatedValue: encoder) + + (primitive > 0 + ifTrue: [encoder sizeCallPrimitive: primitive] + ifFalse: [0]) + (primErrNode ifNil: [0] ifNotNil: [primErrNode index: arguments size + temporaries size; sizeCodeForStore: encoder "The VM relies on storeIntoTemp: (129)"]). + locals := arguments, temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]). + encoder noteBlockExtent: block blockExtent hasLocals: locals. + header := encoder computeMethodHeaderForNumArgs: arguments size + numTemps: locals size + numLits: (nLits := (literals := encoder allLiterals) size) + primitive: primitive. + method := trailer + createMethod: blkSize + class: aCompiledMethodClass + header: header. - method := aCompiledMethodClass - newBytes: blkSize - trailerBytes: trailer - nArgs: arguments size - nTemps: (encoder supportsClosureOpcodes - ifTrue: [| locals | - locals := arguments, - temporaries, - (primErrNode - ifNil: [#()] - ifNotNil: [{primErrNode}]). - encoder - noteBlockExtent: block blockExtent - hasLocals: locals. - locals size] - ifFalse: [encoder maxTemp]) - nStack: 0 - nLits: (nLits := (literals := encoder allLiterals) size) - primitive: primitive. - nLits > 255 ifTrue: - [^self error: 'Too many literals referenced']. 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)]. encoder streamToMethod: method. stack := ParseStack new init. + primitive > 0 ifTrue: + [encoder genCallPrimitive: primitive. + primErrNode ifNotNil: + [primErrNode emitCodeForStore: stack encoder: encoder]]. - primErrNode ifNotNil: [primErrNode emitCodeForStore: stack encoder: encoder]. stack position: method numTemps. [block emitCodeForEvaluatedValue: stack encoder: encoder] on: Error "If an attempt is made to write too much code the method will be asked" do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:" ex signalerContext sender method = (CompiledMethod class>>#new:) ifTrue: [^self error: 'Compiler code size discrepancy'] ifFalse: [ex pass]]. stack position ~= (method numTemps + 1) ifTrue: [^self error: 'Compiler stack discrepancy']. encoder methodStreamPosition ~= (method size - trailer size) ifTrue: [^self error: 'Compiler code size discrepancy']. method needsFrameSize: stack size - method numTemps. method properties: properties. ^method! From commits at source.squeak.org Sat Mar 14 01:48:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 14 01:48:34 2015 Subject: [squeak-dev] The Trunk: Collections.spur-ul.604.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections.spur-ul.604.mcz ==================== Summary ==================== Name: Collections.spur-ul.604 Author: eem Time: 13 March 2015, 6:47:31.562 pm UUID: 8b9cbdcf-593d-4418-8244-21be7687b7e2 Ancestors: Collections-ul.604, Collections.spur-eem.603 Collections-ul.604 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.241 Reverted the previous workaround for the class comment saving bug, because it's enough to flush the changes file after saving the class comment. See Kerneul-ul.910 for the actual fix. =============== Diff against Collections-ul.604 =============== Item was changed: ----- Method: Array>>elementsExchangeIdentityWith: (in category 'converting') ----- elementsExchangeIdentityWith: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + At the same time, all pointers to the elements of otherArray are replaced by + pointers to the corresponding elements of this array. The identityHashes remain + with the pointers rather than with the objects so that objects in hashed structures + should still be properly indexed after the mutation." - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. At the same time, all pointers to the elements of otherArray are replaced by pointers to the corresponding elements of this array. The identityHashes remain with the pointers rather than with the objects so that objects in hashed structures should still be properly indexed after the mutation." + + ec == #'bad receiver' ifTrue: + [^self error: 'receiver must be of class Array']. + ec == #'bad argument' ifTrue: + [^self error: (otherArray class == Array + ifTrue: ['arg must be of class Array'] + ifFalse: ['receiver and argument must have the same size'])]. + ec == #'inappropriate operation' ifTrue: + [^self error: 'can''t become immediates such as SmallIntegers or Characters']. + ec == #'no modification' ifTrue: + [^self error: 'can''t become immutable objects']. + ec == #'object is pinned' ifTrue: + [^self error: 'can''t become pinned objects']. + ec == #'insufficient object memory' ifTrue: + [Smalltalk garbageCollect < 1048576 ifTrue: + [Smalltalk growMemoryByAtLeast: 1048576]. + ^self elementsExchangeIdentityWith: otherArray]. + self primitiveFailed! - - otherArray class == Array ifFalse: [^ self error: 'arg must be array']. - self size = otherArray size ifFalse: [^ self error: 'arrays must be same size']. - (self anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - (otherArray anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - self with: otherArray do:[:a :b| a == b ifTrue:[^self error:'can''t become yourself']]. - - "Must have failed because not enough space in forwarding table (see ObjectMemory-prepareForwardingTableForBecoming:with:twoWay:). Do GC and try again only once" - (Smalltalk bytesLeft: true) = Smalltalk primitiveGarbageCollect - ifTrue: [^ self primitiveFailed]. - ^ self elementsExchangeIdentityWith: otherArray! Item was changed: ----- Method: Array>>elementsForwardIdentityTo: (in category 'converting') ----- elementsForwardIdentityTo: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + The identityHashes remain with the pointers rather than with the objects so that + the objects in this array should still be properly indexed in any existing hashed + structures after the mutation." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') ----- elementsForwardIdentityTo: otherArray copyHash: copyHash + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + If copyHash is true, the identityHashes remain with the pointers rather than with the + objects so that the objects in the receiver should still be properly indexed in any + existing hashed structures after the mutation. If copyHash is false, then the hashes + of the objects in otherArray remain unchanged. If you know what you're doing this + may indeed be what you want." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ==== ERROR === Error: Unrecognized class type 14 March 2015 1:48:17.12 am VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(Character) Arguments and temporary variables: Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(Character) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeModification: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Sat Mar 14 01:56:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 14 01:56:36 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.781.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.781.mcz ==================== Summary ==================== Name: Morphic-mt.781 Author: mt Time: 13 March 2015, 6:55:50.217 pm UUID: e5a019dd-0e02-1b49-8013-85d44ef42f61 Ancestors: Morphic-mt.780 Fixes open windows/tools and a bug with old transform morphs. =============== Diff against Morphic-mt.780 =============== Item was changed: (PackageInfo named: 'Morphic') postscript: '(Preferences dictionaryOfPreferences at: #alternativeWindowBoxesLook) defaultValue: false. "Force SystemProgressMorph to be reset" SystemProgressMorph initialize; reset. "Initialize the key bindings and menus" Editor initialize. "Retain scrollBar look now that the pref actually does something" Preferences enable: #gradientScrollBars. "apply the new icons" MenuIcons initializeIcons. TheWorldMainDockingBar updateInstances. "Cleanup old-style preferences here. Remove before new release." Preferences removePreference: #gradientMenu. "Now in MenuMorph." + Preferences removePreference: #roundedMenuCorners. "Now in MenuMorph." + + "Fix clipping bug of open windows. New ones are not affected." + TransformMorph allInstances do: [:ea | ea clipSubmorphs: true].'! - Preferences removePreference: #roundedMenuCorners. "Now in MenuMorph."'! From eliot.miranda at gmail.com Sat Mar 14 12:23:03 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 14 12:23:07 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: On Thu, Mar 12, 2015 at 3:51 PM, Chris Muller wrote: > >> It's right where we left it. Spur introduces a new object memory > >> format, so we're doing the right thing: we're breaking the format and > >> telling people. > >> > >> When you load packages into a Spur image, things will just work. When > >> you load changesets, things will just work. As far as I know, we've > >> taken care that ImageSegments will also load into Spur, and just work. > > > > > > Ah, not quite. Image segments saved in 32-bit Spur will load in 32-bit > > Spur. Image segments saved in 64-bit Spur will load in 64-bit Spur. > Image > > segments saved in Cog will load in Cog. But no interoperability is > possible > > (yet!). And indeed I believe that image segments saved in the 64-bit > > Interpreter VM will only load in that 64-bit VM. > > 64-bit will not be ready in time for 5.0 on 4/30 right? > Right. I don't even have the optimized 64-bit Spur StackInterpreter working on Mac. The assert VM works fine, but optimized crashes on start-up. Let alone having a working 64-bit Spur StackInterpreter on Windows and Mac. And let alone having a 64-bit Spur Cog JIT. > The problem with image segments is that they are in the format of the VM's > > heap objects. However, Bert and I want co co-mentor a project to > implement > > image-level support for loading segments from "foreign" object memories. > > Alas GSoC did not approve our organization this year. Maybe soon. Or > maybe > > some student at one of the teaching institutions using Squeak or Pharo > would > > be interested in having a go. > > > > Note that e.g. Fuel does not have this problem. > > Nor does Ma Object Serializer. Ma Object Serializer has been updated > to be transparently Spur compatible, so for 32-bit systems anyway, one > could load ImageSegment file into a Cog image, save it with Ma, go > into spur and load it with Ma, and then finally save it as > ImageSegment. You could even stay as Ma for a while because I intend > to do the same for 64-bit. > > > +1. Spur has lots of advantages over the existing system but these > can't be > > introduced without forcing a change to a new image and a new VM. > > Now that we've answered the troll-style question extensively, may we > please talk about ideas to help users manage multiple formats? > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150314/c6c63e98/attachment.htm From eliot.miranda at gmail.com Sat Mar 14 12:32:10 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 14 12:32:15 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: <20CAD324-17CB-4D49-BF65-31806ECE0AB2@gmx.de> References: <5500A97C.3020705@ifi.uio.no> <20CAD324-17CB-4D49-BF65-31806ECE0AB2@gmx.de> Message-ID: On Thu, Mar 12, 2015 at 3:56 PM, Tobias Pape wrote: > Hey Eliot, > > On 12.03.2015, at 17:44, Eliot Miranda wrote: > > > > > The problem with image segments is that they are in the format of the > VM's heap objects. However, Bert and I want co co-mentor a project to > implement image-level support for loading segments from "foreign" object > memories. Alas GSoC did not approve our organization this year. Maybe > soon. Or maybe some student at one of the teaching institutions using > Squeak or Pharo would be interested in having a go. > > Can you or Bert give me an outline or a heads up? > An ImageSegment is a WordArray whose contents are a sequence of heap objects in the VM's native object format. A segment is loaded by invoking a primitive that swizzles the pointers in the word array so that they become valid objects, and then shortening the word array, leaving the objects behind in memory. Since the contents of the WordArray are specific to a given VM architecture one cannot use the primitive loading mechanism to load segments from VMs with different object representations. Here different means - 32-bit V3 vs 64-bit V3 - the contents of the CompactClassesArray (if they're not the same in the saving and loading system, objects could be loaded with the wrong class, which could crash the VM) - V3 vs Spur - Spur 32-bit vs Spur 64-bit But there is no reason why Smalltalk code could not parse the contents of the WordArray and hence load objects by creating them based on the data in the WordArray. This would allow image segments to be loaded in any format the Smalltalk code supported (and it would be interesting to compare performance and see how much slower "synthesized" loading would be). This would provide legacy support for segments from "old" versions, and maybe even provide a oath to adopting a more neutral format such as Fuel. To implement such a system one would have to understand the object formats of each system, using the VM source code as a guide, both the object representation and the load and save primitives themselves. Does this answer your question? > (maybe off-list?) > > Best > -Tobias > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150314/9d59f4f3/attachment.htm From Das.Linux at gmx.de Sat Mar 14 15:15:54 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sat Mar 14 15:15:58 2015 Subject: [squeak-dev] 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> <20CAD324-17CB-4D49-BF65-31806ECE0AB2@gmx.de> Message-ID: Hi eliot On 14.03.2015, at 13:32, Eliot Miranda wrote: > On Thu, Mar 12, 2015 at 3:56 PM, Tobias Pape wrote: > Hey Eliot, > > On 12.03.2015, at 17:44, Eliot Miranda wrote: > > > > > The problem with image segments is that they are in the format of the VM's heap objects. However, Bert and I want co co-mentor a project to implement image-level support for loading segments from "foreign" object memories. Alas GSoC did not approve our organization this year. Maybe soon. Or maybe some student at one of the teaching institutions using Squeak or Pharo would be interested in having a go. > > Can you or Bert give me an outline or a heads up? > An ImageSegment is a WordArray whose contents are a sequence of heap objects in the VM's native object format. A segment is loaded by invoking a primitive that swizzles the pointers in the word array so that they become valid objects, and then shortening the word array, leaving the objects behind in memory. Since the contents of the WordArray are specific to a given VM architecture one cannot use the primitive loading mechanism to load segments from VMs with different object representations. Here different means > - 32-bit V3 vs 64-bit V3 > - the contents of the CompactClassesArray (if they're not the same in the saving and loading system, objects could be loaded with the wrong class, which could crash the VM) > - V3 vs Spur > - Spur 32-bit vs Spur 64-bit > > But there is no reason why Smalltalk code could not parse the contents of the WordArray and hence load objects by creating them based on the data in the WordArray. This would allow image segments to be loaded in any format the Smalltalk code supported (and it would be interesting to compare performance and see how much slower "synthesized" loading would be). This would provide legacy support for segments from "old" versions, and maybe even provide a oath to adopting a more neutral format such as Fuel. > > To implement such a system one would have to understand the object formats of each system, using the VM source code as a guide, both the object representation and the load and save primitives themselves. > > Does this answer your question? > Yes. Thank you :) I'll see whether some students could work with that? (no promise tho) Best -Tobias > > (maybe off-list?) > > Best > -Tobias From sean at clipperadams.com Sat Mar 14 15:35:28 2015 From: sean at clipperadams.com (Sean DeNigris) Date: Sat Mar 14 15:35:34 2015 Subject: [squeak-dev] [OT]: Fwd: Why GSoC? Why me? References: Message-ID: <9E95021E-A3A4-4E8C-91A4-616036C1C244@clipperadams.com> Writing the following message, which I wrote as an introduction to Fossasia?s prospective Smalltalk GSoC students, vividly reminded me of why I love Smalltalk. So naturally, I want to share it with our community? - Sean > Congratulations on finding Smalltalk. I doubt you have any idea how important this could be for you. > > You may not realize it, but you have opened a portal to some of the greatest minds in the history of our industry. In the beginning, for many of our heroes - Doug Engelbart, Alan Kay, Seymour Papert - computing was about the possibility of evolving the general level of human thought for the benefit of mankind. Effective critical thinking is vital to modern life e.g. the proper functioning of democratic governments. Yet traditional media have been ineffective at improving our thought on a large scale. Today, we?re mostly glorified "caveman with briefcases", reacting to the same human universals as our distant ancestors - Fantasies, Stories, Superstition, Religion/Magic, Vendetta. > > So what does this have to do with computing?! > > I?m glad you asked :) In 1972, Alan Kay envisioned a "dynamic medium for creative thought" which he called a Dynabook [2]. It was an answer to the problem described above - a computer to support and guide minds to the level required to overcome our uglier instincts, and replace them with our highest ideas, like Equal Rights, Democracy, Slow Deep Thinking, Legal System over Vendetta, Theory of Harmony - ideas which do not take seed on their own, but must be actively nurtured. > > So what does this have to do with programming?! > > I?m glad you asked that, too :) Smalltalk is interim[3] Dynabook software! You have in your hands, not a programming language, but a live, dynamic, turtles-all-the-way-down environment designed to provide "support for the creative spirit in everyone". > > More practically, Smalltalk is a programming tool that allows productivity unimaginable in most systems. And, if you put in enough time and effort to actually think in it, it will help you program better in any language you use. But, I think it would be a great waste if you left Smalltalk "a better programmer", when the questions before you are: > - What really matters? > - How can computers fulfill on that? > - How can I, as a programmer, contribute to that? > > Ideas for research: > - Dynabook. Any of the original documents can be found easily online, but particularly: > - Afterword: What is a Dynabook > - Personal Dynamic Media > - Smalltalk: Design Principles Behind Smalltalk > - Ivan Sutherland?s Sketchpad > - Doug Engelbart & "The Mother of All Demos" > - Self?s Morphic papers > > > [1] Although few answers to date have been as thoughtful and daring as LISP and Smalltalk > [2] http://en.wikipedia.org/wiki/Dynabook > [3] The Dynabook is a Platonic ideal, as so any implementation is just a step along the way in an infinite game From sean at clipperadams.com Sat Mar 14 15:40:28 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Sat Mar 14 15:50:07 2015 Subject: [squeak-dev] Re: 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> Message-ID: <1426347628299-4811881.post@n4.nabble.com> Chris Muller-3 wrote > Now that we've answered the troll-style question extensively Coincidentally, we just discussed "trolling" on the Pharo list. The consensus was that the key is whether the intention is disruption rather than productivity (and Wikipedia agrees [1]). I interpreted the post rather as a concern about a core value. And I hope we can give the inventor of MVC the benefit of the doubt ;) IMHO is is an honor to have him still a part of our community. [1] "posting? with the deliberate intent of? disrupting normal on-topic discussion" - http://en.wikipedia.org/wiki/Troll_%28Internet%29 ----- Cheers, Sean -- View this message in context: http://forum.world.st/4-6-5-0-how-to-help-users-manage-different-formats-tp4811303p4811881.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Mar 14 22:47:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 14 22:47:29 2015 Subject: [squeak-dev] The Trunk: Tests-nice.312.mcz Message-ID: Nicolas Cellier uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-nice.312.mcz ==================== Summary ==================== Name: Tests-nice.312 Author: nice Time: 14 March 2015, 11:47:08.214 pm UUID: d6cd00f5-76ab-4201-a37f-e880c5e5b2e8 Ancestors: Tests-eem.311 Specify a timeout: for some of the MC tests =============== Diff against Tests-eem.311 =============== Item was changed: ----- Method: MCWorkingCopyTest>>testAncestorMerge (in category 'tests') ----- testAncestorMerge + | base revA revB revC | base := self snapshot. self change: #a toReturn: 'a1'. revA := self snapshot. self change: #b toReturn: 'b1'. revB := self snapshot. self change: #c toReturn: 'c1'. revC := self snapshot. self should: [self basicMerge: revA] raise: MCNoChangesException. ! Item was changed: ----- Method: MCWorkingCopyTest>>testBackport (in category 'tests') ----- testBackport + | inst base final backported | inst := self mockInstanceA. base := self snapshot. self assert: inst one = 1. self change: #one toReturn: 2. self change: #two toReturn: 3. final := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | e resume: e patch]. self assert: inst one = 2. self assert: inst two = 3. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = final info. backported := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | e resume: e patch]. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = backported info. ! Item was changed: ----- Method: MCWorkingCopyTest>>testMergeIntoImageWithNoChanges (in category 'tests') ----- testMergeIntoImageWithNoChanges + | base revB revA1 | self change: #a toReturn: 'a'. base := self snapshot. self change: #b toReturn: 'b'. revB := self snapshot. self load: base. self change: #a toReturn: 'a1'. revA1 := self snapshot. self change: #a toReturn: 'a'. self snapshot. self merge: revB. self assert: (workingCopy ancestors size = 2) ! Item was changed: ----- Method: MCWorkingCopyTest>>testMergeIntoUnmodifiedImage (in category 'tests') ----- testMergeIntoUnmodifiedImage | base revA | + base := self snapshot. self change: #a toReturn: 'a1'. revA := self snapshot. self load: base. self merge: revA. self assert: (workingCopy ancestors size = 1) ! Item was changed: ----- Method: MCWorkingCopyTest>>testOptimizedLoad (in category 'tests') ----- testOptimizedLoad + | inst base diffy | inst := self mockInstanceA. base := self snapshot. self change: #one toReturn: 2. self assert: inst one = 2. diffy := self snapshot asDiffAgainst: base. self deny: diffy canOptimizeLoading. self load: base. self assert: inst one = 1. self assert: diffy canOptimizeLoading. self load: diffy. self assert: inst one = 2. ! Item was changed: ----- Method: MCWorkingCopyTest>>testSelectiveBackport (in category 'tests') ----- testSelectiveBackport + | inst base intermediate final | inst := self mockInstanceA. base := self snapshot. self assert: inst one = 1. self change: #one toReturn: 2. intermediate := self snapshot. self change: #two toReturn: 3. final := self snapshot. [workingCopy backportChangesTo: base info] on: MCChangeSelectionRequest do: [:e | | selected patch | patch := e patch. selected := patch operations select: [:ea | ea definition selector = #two]. e resume: (MCPatch operations: selected)]. self assert: inst one = 1. self assert: inst two = 3. self assert: workingCopy ancestry ancestors size = 1. self assert: workingCopy ancestry ancestors first = base info. self assert: workingCopy ancestry stepChildren size = 1. self assert: workingCopy ancestry stepChildren first = final info! Item was changed: ----- Method: MCWorkingCopyTest>>testSimpleMerge (in category 'tests') ----- testSimpleMerge + | mother base inst | inst := self mockInstanceA. base := self snapshot. self change: #one toReturn: 2. mother := self snapshot. self load: base. self change: #two toReturn: 3. self snapshot. self assert: inst one = 1. self assert: inst two = 3. self merge: mother. self assert: inst one = 2. self assert: inst two = 3.! From commits at source.squeak.org Sat Mar 14 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 14 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150314225502.8223.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007631.html Name: Compiler-topa.295 Ancestors: Compiler-bf.294 Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007632.html Name: Tools-ul.551 Ancestors: Tools-mt.550 - don't try to show message icons in FileContentsBrowser, because PseudoClass doesn't implement the necessary API to do that. - use the new methods #isSelectorOverride: and #isSelectorOverridden: in CodeHolder. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007633.html Name: Morphic-mt.778 Ancestors: Morphic-dtl.777 Add #itemName to generic list wrapper to support filtering by item name in any kind of tree. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007634.html Name: Morphic-mt.779 Ancestors: Morphic-mt.778 *sigh* It's too early. Fixes #itemName in ListItemWrapper. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007635.html Name: Morphic-mt.780 Ancestors: Morphic-mt.779 Keystrokes in tree morphs: Possibility to get access to event (and pressed modifiers) in the model. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007636.html Name: Tools-mt.552 Ancestors: Tools-ul.551 Inspect/explore/browse/... shortcuts work again in object explorer BUT with modifier key (e.g. CMD) pressed. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007637.html Name: Tools-mt.553 Ancestors: Tools-mt.552 Filtering changed to support a depth offset. Will be used to filter subtrees and support separate exploration activities in a large tree structure. The depth-limit will then be applied together with the offset. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007638.html Name: ToolBuilder-Morphic-mt.99 Ancestors: ToolBuilder-Morphic-cmm.98 Tree will only filter after a timeout and not after each key press. Tree filtering considers current selection and its sub-tree now. Supports separate exploartion activities in a large tree structure. (Backspace key will still make all hidden nodes visible again) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007639.html Name: Compiler.spur-topa.295 Ancestors: Compiler-topa.295, Compiler.spur-bf.294 Compiler-topa.295 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.241 Fix underscore message names when the #parseSelector: api of Parser is used and, hence, no encoder is available. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007640.html Name: Collections.spur-ul.604 Ancestors: Collections-ul.604, Collections.spur-eem.603 Collections-ul.604 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.241 Reverted the previous workaround for the class comment saving bug, because it's enough to flush the changes file after saving the class comment. See Kerneul-ul.910 for the actual fix. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007641.html Name: Kernel.spur-ul.910 Ancestors: Kernel-ul.910, Kernel.spur-mt.909 Kernel-ul.910 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.241 When saving a class comment, flush the changes file, unless we're doing a file-in. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007642.html Name: Morphic-mt.781 Ancestors: Morphic-mt.780 Fixes open windows/tools and a bug with old transform morphs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007643.html Name: Tests-nice.312 Ancestors: Tests-eem.311 Specify a timeout: for some of the MC tests ============================================= From jgr.asselin at me.com Sun Mar 15 15:30:35 2015 From: jgr.asselin at me.com (Raymond Asselin) Date: Sun Mar 15 15:30:40 2015 Subject: [squeak-dev] Maui Message-ID: Hi Chris, I want to tell you that the more I use Maui the more I like it. It is a Jewell , fast and very useful. Morphic as it is, seems a mountain to climb. But if I need to do an application I will do it with Maui but let it die if I got to do it with morphic because it is too much work and very too long. So Maui is a must for users of Squeak who just love to do small applications for them, applications they can use in everyday life. I hope it will be of full use in 4.6 in the near futur (serialization of MauiFamily of prototypes) Again this is a gift you did to the community and I wanted to let you know that it is appreciated. Raymond Envoy? de mon iPhone From asqueaker at gmail.com Sun Mar 15 18:48:23 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 15 18:48:25 2015 Subject: [squeak-dev] Re: 4.6/5.0 -- how to help users manage different formats? In-Reply-To: <1426347628299-4811881.post@n4.nabble.com> References: <5500A97C.3020705@ifi.uio.no> <1426347628299-4811881.post@n4.nabble.com> Message-ID: On Sat, Mar 14, 2015 at 10:40 AM, Sean P. DeNigris wrote: > Chris Muller-3 wrote >> Now that we've answered the troll-style question extensively > > Coincidentally, we just discussed "trolling" on the Pharo list. The > consensus was that the key is whether the intention is disruption rather > than productivity (and Wikipedia agrees [1]). I interpreted the post rather > as a concern about a core value. > > And I hope we can give the inventor of MVC the benefit of the doubt ;) IMHO > is is an honor to have him still a part of our community. I have no doubts Trygve was joking, and so was I, while trying to discuss this issue of having multiple formats.. From asqueaker at gmail.com Sun Mar 15 18:54:54 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 15 18:54:58 2015 Subject: [squeak-dev] Maui In-Reply-To: References: Message-ID: Thanks for saying so. I plan to do another iteration on Maui to fix some issues for the 4.6 release. Later this year I want to reinvent it from the ground up as Maui 2, a version that runs in the browser. Maui 1 has been a good learning experiment I'm ready to reinvent it better as Maui 2 in the browser. On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin wrote: > Hi Chris, > I want to tell you that the more I use Maui the more I like it. > It is a Jewell , fast and very useful. Morphic as it is, seems a mountain to climb. But if I need to do an application I will do it with Maui but let it die if I got to do it with morphic because it is too much work and very too long. So Maui is a must for users of Squeak who just love to do small applications for them, applications they can use in everyday life. > > I hope it will be of full use in 4.6 in the near futur (serialization of MauiFamily of prototypes) > > Again this is a gift you did to the community and I wanted to let you know that it is appreciated. > > Raymond > > Envoy? de mon iPhone From sean at clipperadams.com Sun Mar 15 18:50:13 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Sun Mar 15 18:59:59 2015 Subject: [squeak-dev] Where is "Squeak Demo for Blowing Students' Minds"? Message-ID: <1426445413546-4812088.post@n4.nabble.com> I found a reference to that intriguing Demo in "Squeak: Open Personal Computing and Multimedia". The link given was http://minnow.cc.gatech.edu/squeak/52. I followed the redirect to the current Squeak Swiki, but searching turned up nothing. Any ideas where I might find it? Or what it is? An active essay? Text doc? Thanks. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Where-is-Squeak-Demo-for-Blowing-Students-Minds-tp4812088.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Sun Mar 15 19:08:43 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 15 19:08:46 2015 Subject: [squeak-dev] The Trunk: Tests-nice.312.mcz In-Reply-To: <5504ba87.ae14b40a.4b6e.ffffc82aSMTPIN_ADDED_MISSING@mx.google.com> References: <5504ba87.ae14b40a.4b6e.ffffc82aSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Do test timeouts add any value, or do they only subtract value by forcing humans to research non-problems only to discover the timeout value needs to be tweaked? Is there a payoff to continue doing that? On Sat, Mar 14, 2015 at 5:47 PM, wrote: > Nicolas Cellier uploaded a new version of Tests to project The Trunk: > http://source.squeak.org/trunk/Tests-nice.312.mcz > > ==================== Summary ==================== > > Name: Tests-nice.312 > Author: nice > Time: 14 March 2015, 11:47:08.214 pm > UUID: d6cd00f5-76ab-4201-a37f-e880c5e5b2e8 > Ancestors: Tests-eem.311 > > Specify a timeout: for some of the MC tests > > =============== Diff against Tests-eem.311 =============== > > Item was changed: > ----- Method: MCWorkingCopyTest>>testAncestorMerge (in category 'tests') ----- > testAncestorMerge > + > | base revA revB revC | > > base := self snapshot. > self change: #a toReturn: 'a1'. > revA := self snapshot. > self change: #b toReturn: 'b1'. > revB := self snapshot. > self change: #c toReturn: 'c1'. > revC := self snapshot. > > self should: [self basicMerge: revA] raise: MCNoChangesException. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testBackport (in category 'tests') ----- > testBackport > + > | inst base final backported | > inst := self mockInstanceA. > base := self snapshot. > self assert: inst one = 1. > self change: #one toReturn: 2. > self change: #two toReturn: 3. > final := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | e resume: e patch]. > self assert: inst one = 2. > self assert: inst two = 3. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = final info. > backported := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | e resume: e patch]. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = backported info. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testMergeIntoImageWithNoChanges (in category 'tests') ----- > testMergeIntoImageWithNoChanges > + > | base revB revA1 | > > self change: #a toReturn: 'a'. > base := self snapshot. > self change: #b toReturn: 'b'. > revB := self snapshot. > > self load: base. > self change: #a toReturn: 'a1'. > revA1 := self snapshot. > > self change: #a toReturn: 'a'. > self snapshot. > self merge: revB. > > self assert: (workingCopy ancestors size = 2) > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testMergeIntoUnmodifiedImage (in category 'tests') ----- > testMergeIntoUnmodifiedImage > | base revA | > > + > base := self snapshot. > self change: #a toReturn: 'a1'. > revA := self snapshot. > > self load: base. > > self merge: revA. > > self assert: (workingCopy ancestors size = 1) > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testOptimizedLoad (in category 'tests') ----- > testOptimizedLoad > + > | inst base diffy | > inst := self mockInstanceA. > base := self snapshot. > self change: #one toReturn: 2. > self assert: inst one = 2. > diffy := self snapshot asDiffAgainst: base. > self deny: diffy canOptimizeLoading. > self load: base. > self assert: inst one = 1. > self assert: diffy canOptimizeLoading. > self load: diffy. > self assert: inst one = 2. > ! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testSelectiveBackport (in category 'tests') ----- > testSelectiveBackport > + > | inst base intermediate final | > inst := self mockInstanceA. > base := self snapshot. > self assert: inst one = 1. > self change: #one toReturn: 2. > intermediate := self snapshot. > self change: #two toReturn: 3. > final := self snapshot. > [workingCopy backportChangesTo: base info] > on: MCChangeSelectionRequest > do: [:e | | selected patch | > patch := e patch. > selected := patch operations select: [:ea | ea definition selector = #two]. > e resume: (MCPatch operations: selected)]. > self assert: inst one = 1. > self assert: inst two = 3. > self assert: workingCopy ancestry ancestors size = 1. > self assert: workingCopy ancestry ancestors first = base info. > self assert: workingCopy ancestry stepChildren size = 1. > self assert: workingCopy ancestry stepChildren first = final info! > > Item was changed: > ----- Method: MCWorkingCopyTest>>testSimpleMerge (in category 'tests') ----- > testSimpleMerge > + > | mother base inst | > inst := self mockInstanceA. > base := self snapshot. > self change: #one toReturn: 2. > mother := self snapshot. > self load: base. > self change: #two toReturn: 3. > self snapshot. > self assert: inst one = 1. > self assert: inst two = 3. > > self merge: mother. > self assert: inst one = 2. > self assert: inst two = 3.! > > From asqueaker at gmail.com Sun Mar 15 20:21:44 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 15 20:21:46 2015 Subject: [squeak-dev] The Trunk: Tests-nice.312.mcz In-Reply-To: References: <5504ba87.ae14b40a.4b6e.ffffc82aSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: cc: squeak-dev On Sun, Mar 15, 2015 at 3:21 PM, Chris Muller wrote: > On Sun, Mar 15, 2015 at 2:08 PM, Chris Muller wrote: >> Do test timeouts add any value, or do they only subtract value by >> forcing humans to research non-problems only to discover the timeout >> value needs to be tweaked? Is there a payoff to continue doing that? > > I know these timeouts are supposed to solve the case that if some code > is changed to cause one a Test to get stuck in a loop, then the test > will fail after the timeout rather than sitting and spinning in the > Jenkins server forever. > > But whether Jenkins reports a timeout, or reports a crash due to a > stack overflow, or stops producing reports at all because its > spinning; each of these cases requires some kind of human > intervention. Its just that with the individual timeouts solution, > not only are the humans required to intervene when there isn't really > a problem, but such intervention even involves making the code itself > bear a cost too. > > It seems like one 5-minute timeout handler hard-coded at the top would > handle the case equally sufficiently..? 5 minutes is ample long > enough for most any regular test, while short enough to "wait" for > output from Jenkins.. From bert at freudenbergs.de Sun Mar 15 21:13:12 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Sun Mar 15 21:19:35 2015 Subject: [squeak-dev] Where is "Squeak Demo for Blowing Students' Minds"? In-Reply-To: <1426445413546-4812088.post@n4.nabble.com> References: <1426445413546-4812088.post@n4.nabble.com> Message-ID: <03D25227-5A9B-45B9-8170-DE1B1163839C@freudenbergs.de> Maybe the world's smallest drawing program? http://web.archive.org/web/20000709202414/http://minnow.cc.gatech.edu/squeak/52 Some wiki pages were reused, unfortunately. But kudos to Brewster Kahle and his team! - Bert - > On 15.03.2015, at 19:50, Sean P. DeNigris wrote: > > Squeak: Open Personal > Computing and Multimedia -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150315/c2787e1a/smime.bin From sean at clipperadams.com Sun Mar 15 21:33:16 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Sun Mar 15 21:43:00 2015 Subject: [squeak-dev] Re: Where is "Squeak Demo for Blowing Students' Minds"? In-Reply-To: <03D25227-5A9B-45B9-8170-DE1B1163839C@freudenbergs.de> References: <1426445413546-4812088.post@n4.nabble.com> <03D25227-5A9B-45B9-8170-DE1B1163839C@freudenbergs.de> Message-ID: <8180015A-82F0-4C81-A7E6-375FCB932AA7@clipperadams.com> > Maybe the world's smallest drawing program? Thanks! That looks like it. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Where-is-Squeak-Demo-for-Blowing-Students-Minds-tp4812088p4812129.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/20150315/f07def22/attachment.htm From commits at source.squeak.org Sun Mar 15 22:25:14 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 15 22:25:15 2015 Subject: [squeak-dev] The Trunk: Compiler-topa.296.mcz Message-ID: Tobias Pape uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-topa.296.mcz ==================== Summary ==================== Name: Compiler-topa.296 Author: topa Time: 15 March 2015, 11:25:01.745 pm UUID: 79db1261-d436-4832-b794-ab25d7521fd5 Ancestors: Compiler-topa.295 initially, the encoder is self, but does not know about the classEncoding. Guard this, too =============== Diff against Compiler-topa.295 =============== Item was changed: ----- Method: Parser>>allowUnderscoreAssignments (in category 'private') ----- allowUnderscoreAssignments "Query class + preference" + ^ (encoder ifNotNil: [:e | + e == self + ifTrue: [nil] + ifFalse: [e classEncoding allowUnderscoreAssignments]]) - ^ (encoder ifNotNil: [:e | e classEncoding allowUnderscoreAssignments]) ifNil: [super allowUnderscoreAssignments]! From commits at source.squeak.org Sun Mar 15 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 15 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150315225503.21538.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007644.html Name: Compiler-topa.296 Ancestors: Compiler-topa.295 initially, the encoder is self, but does not know about the classEncoding. Guard this, too ============================================= From casey.obrien.r at gmail.com Sun Mar 15 23:23:24 2015 From: casey.obrien.r at gmail.com (Casey Ransberger) Date: Sun Mar 15 23:23:30 2015 Subject: [squeak-dev] Maui In-Reply-To: References: Message-ID: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> Gotta second this motion. Maui really is a gift. Data-directed directly into your brain, nearly tactile user interaction. It's like you're looking directly at the actual object, but with a lens that lets you see more clearly than the standard inspector. In some ways, it reminds me of Self and its Outliners. If you're using Squeak and you haven't checked out Maui, please do. There's a bit of a learning curve, but Chris has documented it well. --C P.S. Also install... What's it called? Maybe Connectors? Help me out here, Chris. Anyway it aids visualization a *whole lot.* Makes the whole network of information really pop out at your eye in a way that's really intuitive. > On Mar 15, 2015, at 11:54 AM, Chris Muller wrote: > > Thanks for saying so. I plan to do another iteration on Maui to fix > some issues for the 4.6 release. Later this year I want to reinvent > it from the ground up as Maui 2, a version that runs in the browser. > Maui 1 has been a good learning experiment I'm ready to reinvent it > better as Maui 2 in the browser. > >> On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin wrote: >> Hi Chris, >> I want to tell you that the more I use Maui the more I like it. >> It is a Jewell , fast and very useful. Morphic as it is, seems a mountain to climb. But if I need to do an application I will do it with Maui but let it die if I got to do it with morphic because it is too much work and very too long. So Maui is a must for users of Squeak who just love to do small applications for them, applications they can use in everyday life. >> >> I hope it will be of full use in 4.6 in the near futur (serialization of MauiFamily of prototypes) >> >> Again this is a gift you did to the community and I wanted to let you know that it is appreciated. >> >> Raymond >> >> Envoy? de mon iPhone > From ma.chris.m at gmail.com Mon Mar 16 01:00:12 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Mar 16 01:00:16 2015 Subject: [squeak-dev] Maui In-Reply-To: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> References: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> Message-ID: On Sun, Mar 15, 2015 at 6:23 PM, Casey Ransberger wrote: > Gotta second this motion. Maui really is a gift. Data-directed directly into your brain, nearly tactile user interaction. It's like you're looking directly at the actual object, but with a lens that lets you see more clearly than the standard inspector. In some ways, it reminds me of Self and its Outliners. Oh, thanks.! In contrast to the standard inspector, its main goal is to expose the behaviors of an object to the user instead of its state, and where the user chooses the particular behaviors she wants. > ... > Also install... What's it called? Maybe Connectors? Upon installation Maui will automatically install Connectors if it isn't already installed. From djm1329 at san.rr.com Mon Mar 16 01:52:12 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Mon Mar 16 01:52:15 2015 Subject: [squeak-dev] Maui In-Reply-To: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> References: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> Message-ID: <777EC21E-4A2C-4F80-B9D7-20D1B3B83487@san.rr.com> +1000 I used Maui for many parts of the UI of a large cellular wireless simulator project I worked on a couple of years ago. It made the task of developing many UI components almost free. Very cool stuff. Doug > On Mar 15, 2015, at 16:23, Casey Ransberger wrote: > > Gotta second this motion. Maui really is a gift. Data-directed directly into your brain, nearly tactile user interaction. It's like you're looking directly at the actual object, but with a lens that lets you see more clearly than the standard inspector. In some ways, it reminds me of Self and its Outliners. > > If you're using Squeak and you haven't checked out Maui, please do. There's a bit of a learning curve, but Chris has documented it well. > > --C > > P.S. > > Also install... What's it called? Maybe Connectors? Help me out here, Chris. Anyway it aids visualization a *whole lot.* Makes the whole network of information really pop out at your eye in a way that's really intuitive. > >> On Mar 15, 2015, at 11:54 AM, Chris Muller wrote: >> >> Thanks for saying so. I plan to do another iteration on Maui to fix >> some issues for the 4.6 release. Later this year I want to reinvent >> it from the ground up as Maui 2, a version that runs in the browser. >> Maui 1 has been a good learning experiment I'm ready to reinvent it >> better as Maui 2 in the browser. >> >>> On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin wrote: >>> Hi Chris, >>> I want to tell you that the more I use Maui the more I like it. >>> It is a Jewell , fast and very useful. Morphic as it is, seems a mountain to climb. But if I need to do an application I will do it with Maui but let it die if I got to do it with morphic because it is too much work and very too long. So Maui is a must for users of Squeak who just love to do small applications for them, applications they can use in everyday life. >>> >>> I hope it will be of full use in 4.6 in the near futur (serialization of MauiFamily of prototypes) >>> >>> Again this is a gift you did to the community and I wanted to let you know that it is appreciated. >>> >>> Raymond >>> >>> Envoy? de mon iPhone >> > From commits at source.squeak.org Mon Mar 16 03:12:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 16 03:12:39 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.911.mcz Message-ID: Chris Muller uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-cmm.911.mcz ==================== Summary ==================== Name: Kernel-cmm.911 Author: cmm Time: 15 March 2015, 10:12:04.602 pm UUID: 0d5cd697-a536-47ec-8c0c-0b8b38bf297a Ancestors: Kernel-ul.910 - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. =============== Diff against Kernel-ul.910 =============== Item was changed: ----- Method: InputSensor>>userInterruptWatcher (in category 'user interrupts') ----- userInterruptWatcher "Wait for user interrupts and open a notifier on the active process when one occurs." - [ InterruptSemaphore wait. Display deferUpdates: false. + SoundService defaultOrNil ifNotNil: [ : soundSystem | soundSystem shutDown ]. - SoundService default shutDown. Smalltalk handleUserInterrupt ] repeat! From asqueaker at gmail.com Mon Mar 16 03:31:25 2015 From: asqueaker at gmail.com (Chris Muller) Date: Mon Mar 16 03:31:28 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.911.mcz In-Reply-To: <55064a2d.064bb40a.2f12.0375SMTPIN_ADDED_MISSING@mx.google.com> References: <55064a2d.064bb40a.2f12.0375SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Levente wrote: > ... I think the error can occur if you use the same WorldState object from multiple UI processes (but doing that is a bad > idea). So there it is, that big stack (from my other post) is the userInterruptWatcher waking up from my pressing the interrupt key. How did it find its way into WorldState to do some drawWorld:submorphs:invalidAreasOn:'ing? It happened before userInterruptWater even attempted to open the debugger, because it first executes: SoundService default shutDown. and even though the SoundService's 'default' instance was nil, it needed to construct one just so it can forthwith tell it to #shutDown. Brilliant! :) It gets better. The system has to know *which kind* of SoundService it should construct before it can construct it and tell it to shutDown. But there are two! BaseSoundSystem and DummySoundSystem. But, oh, which one? Hm, maybe best in this situation to pop up a menu to ask the user (not)! And so to pop up such a menu it is now into the WorldState machinery and image meltdown. I hope papering over it with this simple guard before the insanity starts in lowSpaceWatcher will help, but something feels unsettling about the distance between the cause and the symptom. Accessing WorldState from multiple UI processes is a bad idea, for sure, but IF it happens, the penalty is of a locked image is pretty strict.. On Sun, Mar 15, 2015 at 10:12 PM, wrote: > Chris Muller uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-cmm.911.mcz > > ==================== Summary ==================== > > Name: Kernel-cmm.911 > Author: cmm > Time: 15 March 2015, 10:12:04.602 pm > UUID: 0d5cd697-a536-47ec-8c0c-0b8b38bf297a > Ancestors: Kernel-ul.910 > > - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. > > =============== Diff against Kernel-ul.910 =============== > > Item was changed: > ----- Method: InputSensor>>userInterruptWatcher (in category 'user interrupts') ----- > userInterruptWatcher > "Wait for user interrupts and open a notifier on the active process when one occurs." > - > [ InterruptSemaphore wait. > Display deferUpdates: false. > + SoundService defaultOrNil ifNotNil: [ : soundSystem | soundSystem shutDown ]. > - SoundService default shutDown. > Smalltalk handleUserInterrupt ] repeat! > > From tim at rowledge.org Mon Mar 16 04:39:56 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Mar 16 04:40:04 2015 Subject: [squeak-dev] Where is "Squeak Demo for Blowing Students' Minds"? In-Reply-To: <03D25227-5A9B-45B9-8170-DE1B1163839C@freudenbergs.de> References: <1426445413546-4812088.post@n4.nabble.com> <03D25227-5A9B-45B9-8170-DE1B1163839C@freudenbergs.de> Message-ID: <61ADEB93-17D1-4FF4-9787-05A61291A890@rowledge.org> On 15-03-2015, at 2:13 PM, Bert Freudenberg wrote: > Maybe the world's smallest drawing program? Restored to the swiki as http://wiki.squeak.org/squeak/6201 ?SimplePaintingProgram? tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Calling her stupid would be an insult to stupid people. From bert at freudenbergs.de Mon Mar 16 12:47:05 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Mon Mar 16 12:47:08 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.911.mcz In-Reply-To: References: <55064a2d.064bb40a.2f12.0375SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Great, thank you! This has been really annoying. - Bert - On 16.03.2015, at 04:31, Chris Muller wrote: > > Levente wrote: > >> ... I think the error can occur if you use the same WorldState object from multiple UI processes (but doing that is a bad >> idea). > > So there it is, that big stack (from my other post) is the > userInterruptWatcher waking up from my pressing the interrupt key. > How did it find its way into WorldState to do some > drawWorld:submorphs:invalidAreasOn:'ing? It happened before > userInterruptWater even attempted to open the debugger, because it > first executes: > > SoundService default shutDown. > > and even though the SoundService's 'default' instance was nil, it > needed to construct one just so it can forthwith tell it to #shutDown. > Brilliant! :) > > It gets better. The system has to know *which kind* of SoundService > it should construct before it can construct it and tell it to > shutDown. But there are two! BaseSoundSystem and DummySoundSystem. > But, oh, which one? Hm, maybe best in this situation to pop up a menu > to ask the user (not)! > > And so to pop up such a menu it is now into the WorldState machinery > and image meltdown. > > I hope papering over it with this simple guard before the insanity > starts in lowSpaceWatcher will help, but something feels unsettling > about the distance between the cause and the symptom. > > Accessing WorldState from multiple UI processes is a bad idea, for > sure, but IF it happens, the penalty is of a locked image is pretty > strict.. > > > > On Sun, Mar 15, 2015 at 10:12 PM, wrote: >> Chris Muller uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-cmm.911.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-cmm.911 >> Author: cmm >> Time: 15 March 2015, 10:12:04.602 pm >> UUID: 0d5cd697-a536-47ec-8c0c-0b8b38bf297a >> Ancestors: Kernel-ul.910 >> >> - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. >> >> =============== Diff against Kernel-ul.910 =============== >> >> Item was changed: >> ----- Method: InputSensor>>userInterruptWatcher (in category 'user interrupts') ----- >> userInterruptWatcher >> "Wait for user interrupts and open a notifier on the active process when one occurs." >> - >> [ InterruptSemaphore wait. >> Display deferUpdates: false. >> + SoundService defaultOrNil ifNotNil: [ : soundSystem | soundSystem shutDown ]. >> - SoundService default shutDown. >> Smalltalk handleUserInterrupt ] repeat! >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150316/f976c475/smime.bin From commits at source.squeak.org Mon Mar 16 22:34:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 16 22:34:40 2015 Subject: [squeak-dev] The Trunk: Tools-topa.554.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.554.mcz ==================== Summary ==================== Name: Tools-topa.554 Author: topa Time: 16 March 2015, 11:34:16.536 pm UUID: 08589814-1c33-4bf7-afde-abf466afbbfe Ancestors: Tools-mt.553 Finding Morphs from Tools: Unify two hacks and lose a third. Certain tools _have to_ access the morphs representing them, especially the one representing the code pane of them. Hacks where in place, including duplicated code. This code is now centralized. (pattern is: find a dependent (!) that is a a (e.g.) PluggableTextMorph with a certain getTextSelector). Even more, the debugger relied on the exact layout of the call stack for its "run to here" feature. This now uses the same hack as above. =============== Diff against Tools-mt.553 =============== Item was removed: - ----- Method: Browser>>codeTextMorph (in category 'drag and drop') ----- - codeTextMorph - ^ self dependents - detect: [:dep | (dep isKindOf: PluggableTextMorph) - and: [dep getTextSelector == #contents]] - ifNone: []! Item was changed: ----- Method: CodeHolder>>installTextualCodingPane (in category 'diffs') ----- installTextualCodingPane "Install text into the code pane" | aWindow codePane aPane boundsToUse | (aWindow := self containingWindow) ifNil: [self error: 'where''s that window?']. + codePane := self codeTextMorph ifNil: [self error: 'no code pane']. - codePane := aWindow findDeepSubmorphThat: - [:m | ((m isKindOf: PluggableTextMorph) and: [m getTextSelector == #contents])] - ifAbsent: [self error: 'no code pane']. aPane := self buildMorphicCodePaneWith: nil. boundsToUse := (codePane bounds origin- (1@1)) corner: (codePane owner bounds corner " (1@1"). aWindow replacePane: codePane with: aPane. aPane vResizing: #spaceFill; hResizing: #spaceFill; borderWidth: 0. aPane bounds: boundsToUse. aPane owner clipSubmorphs: false. self contentsChanged! Item was removed: - ----- Method: CodeHolder>>textPaneWithSelector: (in category 'categories & search pane') ----- - textPaneWithSelector: aSelector - "If, among my window's paneMorphs, there is a text pane defined with aSelector as its retriever, answer it, else answer nil" - - | aWindow | - ^ (aWindow := self containingWindow) ifNotNil: - [aWindow paneMorphSatisfying: - [:aMorph | (aMorph isKindOf: PluggableTextMorph) and: - [aMorph getTextSelector == aSelector]]]! Item was changed: ----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') ----- codePaneMenu: aMenu shifted: shifted aMenu + add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; - add: 'run to here' target: self selector: #runToSelection: argument: thisContext sender receiver selectionInterval; add: 'run until...' target: self selector: #runUntil; addLine. super codePaneMenu: aMenu shifted: shifted. + ^aMenu. + ! - ^aMenu.! Item was added: + ----- Method: Debugger>>codePaneSelectionInterval (in category 'code pane') ----- + codePaneSelectionInterval + + ^ self codeTextMorph + ifNotNil: [:cp | cp selectionInterval] + ifNil: [Interval from: 0 to: 0]! Item was changed: ----- Method: Debugger>>getSelectedText (in category 'tally support') ----- getSelectedText | m interval text | + m := self codeTextMorph ifNil: [^ '']. - m := self getTextMorphWithSelection. interval := m selectionInterval. text := m text. ^ text copyFrom: interval first to: interval last ! Item was removed: - ----- Method: Debugger>>getTextMorphWithSelection (in category 'tally support') ----- - getTextMorphWithSelection - "This is extremely ugly... We I need to get a reference of the code pane, which is not easily accessible" - ^self dependents - detect: [:m| (m isKindOf: PluggableTextMorph) - and: [m selectionInterval first > 1]] - ifNone: [nil]! Item was changed: ----- Method: Debugger>>tally (in category 'tally support') ----- tally + self codeTextMorph ifNotNil: [:o| o tallyIt] ifNil: [Beeper beep] - self getTextMorphWithSelection ifNotNil: [:o| o tallyIt] ifNil: [Beeper beep] ! Item was changed: ----- Method: FileList>>availableGraphicsExtent (in category 'private') ----- availableGraphicsExtent + + ^ self codeTextMorph ifNotNil: [:m | m innerBounds extent - (6@22)] + ! - self dependents do: [:each | - ((each isKindOf: PluggableTextMorph) and: [each getTextSelector == #contents]) ifTrue: [^each innerBounds extent - (6@22)]]. - ^nil! Item was changed: ----- Method: StringHolder>>codeTextMorph (in category '*Tools') ----- codeTextMorph + + ^ self someTextPaneWithSelector: #contents! - ^ self dependents - detect: [:dep | (dep isKindOf: PluggableTextMorph) - and: [dep getTextSelector == #contents]] - ifNone: []! Item was added: + ----- Method: StringHolder>>dependentTextPaneWithSelector: (in category '*Tools') ----- + dependentTextPaneWithSelector: aSelector + + ^ self dependents detect: + [:aMorph | (aMorph isKindOf: PluggableTextMorph) and: + [aMorph getTextSelector == aSelector]] + ifNone: [nil] + ! Item was added: + ----- Method: StringHolder>>someTextPaneWithSelector: (in category '*Tools') ----- + someTextPaneWithSelector: aSelector + " Try to find the text pane for aSelector in my dependents or my window. Not beautiful tho" + ^ (self dependentTextPaneWithSelector: aSelector) + ifNil: [self textPaneWithSelector: aSelector]! Item was added: + ----- Method: StringHolder>>textPaneWithSelector: (in category '*Tools') ----- + textPaneWithSelector: aSelector + "If, among my window's paneMorphs, there is a text pane defined with aSelector as its retriever, answer it, else answer nil" + + | aWindow | + ^ (aWindow := self containingWindow) ifNotNil: + [aWindow paneMorphSatisfying: + [:aMorph | (aMorph isKindOf: PluggableTextMorph) and: + [aMorph getTextSelector == aSelector]]]! From commits at source.squeak.org Mon Mar 16 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 16 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150316225503.10872.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007645.html Name: Kernel-cmm.911 Ancestors: Kernel-ul.910 - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007646.html Name: Tools-topa.554 Ancestors: Tools-mt.553 Finding Morphs from Tools: Unify two hacks and lose a third. Certain tools _have to_ access the morphs representing them, especially the one representing the code pane of them. Hacks where in place, including duplicated code. This code is now centralized. (pattern is: find a dependent (!) that is a a (e.g.) PluggableTextMorph with a certain getTextSelector). Even more, the debugger relied on the exact layout of the call stack for its "run to here" feature. This now uses the same hack as above. ============================================= From craig at netjam.org Tue Mar 17 01:09:50 2015 From: craig at netjam.org (Craig Latta) Date: Tue Mar 17 01:10:11 2015 Subject: [squeak-dev] re: 4.6/5.0 -- how to help users manage different formats? In-Reply-To: <18699.136.2.1.102.1426186789.squirrel@webmail.msen.com> References: <5500A97C.3020705@ifi.uio.no> <18699.136.2.1.102.1426186789.squirrel@webmail.msen.com> Message-ID: > At the risk of giving myself an assignment ... Yes, I vote for you to create an issue for this on bugs.squeak.org and assign it to yourself. I'll happily review it. ;) -C -- Craig Latta netjam.org March 2015: + 1 510 480 5860 (SMS ok) +31 20 893 2796 (no SMS) afterward: +31 6 2757 7177 (SMS ok) + 1 415 287 3547 (no SMS) From asqueaker at gmail.com Tue Mar 17 01:18:10 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 17 01:18:13 2015 Subject: [squeak-dev] Re: 4.6/5.0 -- how to help users manage different formats? In-Reply-To: References: <5500A97C.3020705@ifi.uio.no> <1426347628299-4811881.post@n4.nabble.com> Message-ID: A couple of folks have contacted me privately, and suggested that I may have misinterpreted Trygve. Trygve, if you were not making a joke, I apologize. Spur is remarkably backward compatible code-wise, I thought you were giving Eliot a hard time (in fun) about the image format change. My comment was a dumb attempt to play along in the "joke" too. If I've offended you, I apologize, please forgive my misunderstanding. On Sun, Mar 15, 2015 at 1:48 PM, Chris Muller wrote: > On Sat, Mar 14, 2015 at 10:40 AM, Sean P. DeNigris > wrote: >> Chris Muller-3 wrote >>> Now that we've answered the troll-style question extensively >> >> Coincidentally, we just discussed "trolling" on the Pharo list. The >> consensus was that the key is whether the intention is disruption rather >> than productivity (and Wikipedia agrees [1]). I interpreted the post rather >> as a concern about a core value. >> >> And I hope we can give the inventor of MVC the benefit of the doubt ;) IMHO >> is is an honor to have him still a part of our community. > > I have no doubts Trygve was joking, and so was I, while trying to > discuss this issue of having multiple formats.. From commits at source.squeak.org Tue Mar 17 18:53:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 17 18:53:44 2015 Subject: [squeak-dev] The Trunk: Compiler.spur-topa.296.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler.spur-topa.296.mcz ==================== Summary ==================== Name: Compiler.spur-topa.296 Author: eem Time: 17 March 2015, 11:53:27.061 am UUID: 94ae0938-88ac-4bd4-a146-1f9d6217ff5a Ancestors: Compiler-topa.296, Compiler.spur-topa.295 Compiler-topa.296 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.242 initially, the encoder is self, but does not know about the classEncoding. Guard this, too =============== Diff against Compiler-topa.296 =============== Item was changed: ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex + numArgs > 15 ifTrue: + [^self error: 'Cannot compile -- too many arguments']. + numTemps > 63 ifTrue: + [^self error: 'Cannot compile -- too many temporary variables']. + numLits > 65535 ifTrue: + [^self error: 'Cannot compile -- too many literals']. + ^(CompiledMethod headerFlagForEncoder: self) + + (numArgs bitShift: 24) + + (numTemps bitShift: 18) + "+ (largeBit bitShift: 17)" "largeBit gets filled in later" + + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + + numLits! - "Compute the compiled method header that encodes the arguments - in the receiver's header format (see CompiledMehtod's class comment)." - self subclassResponsibility! Item was removed: - ----- Method: EncoderForV3>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- - computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex - | primBits | - numTemps > 63 ifTrue: - [^self error: 'Cannot compile -- too many temporary variables']. - numLits > 255 ifTrue: - [^self error: 'Cannot compile -- too many literals']. - primBits := primitiveIndex <= 16r1FF - ifTrue: [primitiveIndex] - ifFalse: "For now the high bit of primitive no. is in the 29th bit of header" - [primitiveIndex > 16r3FF ifTrue: [self error: 'prim num too large']. - (primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r200) bitShift: 19)]. - ^(numArgs bitShift: 24) - + (numTemps bitShift: 18) - "+ (largeBit bitShift: 17)" "largeBit gets filled in later" - + (numLits bitShift: 9) - + primBits! Item was changed: ----- Method: EncoderForV3PlusClosures class>>bytecodeSize: (in category 'instruction stream support') ----- bytecodeSize: bytecode "Answer the number of bytes in the bytecode." bytecode <= 125 ifTrue: [^1]. bytecode >= 176 ifTrue: [^1]. bytecode >= 160 ifTrue: "long jumps" [^2]. bytecode >= 144 ifTrue: "short jumps" [^1]. "extensions" bytecode >= 128 ifTrue: + [^#(2 2 2 2 3 2 2 1 1 1 2 3 3 3 3 4) at: bytecode - 127]. - [^#(2 2 2 2 3 2 2 1 1 1 2 nil 3 3 3 4) at: bytecode - 127]. ^nil! Item was added: + ----- Method: EncoderForV3PlusClosures class>>callPrimitiveCode (in category 'bytecode decoding') ----- + callPrimitiveCode + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + ^139! Item was added: + ----- Method: EncoderForV3PlusClosures>>genCallPrimitive: (in category 'bytecode generation') ----- + genCallPrimitive: primitiveIndex + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + (primitiveIndex < 1 or: [primitiveIndex > 65535]) ifTrue: + [self outOfRangeError: 'primitive index' index: primitiveIndex range: 1 to: 65535]. + stream + nextPut: 139; + nextPut: (primitiveIndex bitAnd: 255); + nextPut: (primitiveIndex bitShift: -8)! Item was changed: ----- Method: MethodNode>>generate:using: (in category 'code generation') ----- generate: trailer using: aCompiledMethodClass "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass. The argument, trailer, is arbitrary but is typically either the reference to the source code that is stored with every CompiledMethod, or an encoding of the method's temporary names." + | primErrNode blkSize nLits locals literals stack header method | - | primErrNode blkSize nLits literals stack method | self generate: trailer using: aCompiledMethodClass ifQuick: [:m | encoder noteBlockExtent: (0 to: 2) hasLocals: arguments. m literalAt: 2 put: encoder associationForClass; properties: properties. ^m]. primErrNode := self primitiveErrorVariableName ifNotNil: [encoder fixTemp: self primitiveErrorVariableName]. + self ensureClosureAnalysisDone. + encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:" - encoder supportsClosureOpcodes ifTrue: - [self ensureClosureAnalysisDone. - encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:"]. blkSize := (block sizeCodeForEvaluatedValue: encoder) + + (primitive > 0 + ifTrue: [encoder sizeCallPrimitive: primitive] + ifFalse: [0]) + (primErrNode ifNil: [0] ifNotNil: [primErrNode index: arguments size + temporaries size; sizeCodeForStore: encoder "The VM relies on storeIntoTemp: (129)"]). + locals := arguments, temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]). + encoder noteBlockExtent: block blockExtent hasLocals: locals. + header := encoder computeMethodHeaderForNumArgs: arguments size + numTemps: locals size + numLits: (nLits := (literals := encoder allLiterals) size) + primitive: primitive. + method := trailer + createMethod: blkSize + class: aCompiledMethodClass + header: header. - method := aCompiledMethodClass - newBytes: blkSize - trailerBytes: trailer - nArgs: arguments size - nTemps: (encoder supportsClosureOpcodes - ifTrue: [| locals | - locals := arguments, - temporaries, - (primErrNode - ifNil: [#()] - ifNotNil: [{primErrNode}]). - encoder - noteBlockExtent: block blockExtent - hasLocals: locals. - locals size] - ifFalse: [encoder maxTemp]) - nStack: 0 - nLits: (nLits := (literals := encoder allLiterals) size) - primitive: primitive. - nLits > 255 ifTrue: - [^self error: 'Too many literals referenced']. 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)]. encoder streamToMethod: method. stack := ParseStack new init. + primitive > 0 ifTrue: + [encoder genCallPrimitive: primitive. + primErrNode ifNotNil: + [primErrNode emitCodeForStore: stack encoder: encoder]]. - primErrNode ifNotNil: [primErrNode emitCodeForStore: stack encoder: encoder]. stack position: method numTemps. [block emitCodeForEvaluatedValue: stack encoder: encoder] on: Error "If an attempt is made to write too much code the method will be asked" do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:" ex signalerContext sender method = (CompiledMethod class>>#new:) ifTrue: [^self error: 'Compiler code size discrepancy'] ifFalse: [ex pass]]. stack position ~= (method numTemps + 1) ifTrue: [^self error: 'Compiler stack discrepancy']. encoder methodStreamPosition ~= (method size - trailer size) ifTrue: [^self error: 'Compiler code size discrepancy']. method needsFrameSize: stack size - method numTemps. method properties: properties. ^method! From commits at source.squeak.org Tue Mar 17 19:16:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 17 19:16:36 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.782.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.782.mcz ==================== Summary ==================== Name: Morphic-mt.782 Author: mt Time: 17 March 2015, 8:15:39.339 pm UUID: 3c169184-e60f-094b-8076-6f1cd03780ee Ancestors: Morphic-mt.781 Layout for label area in system windows fixed. It is now as tall as its label -- as intended. =============== Diff against Morphic-mt.781 =============== Item was changed: ----- Method: SystemWindow>>setFramesForLabelArea (in category 'initialization') ----- setFramesForLabelArea "an aid to converting old instances, but then I found convertAlignment (jesse welton's note)" | frame windowBorderWidth | labelArea ifNil: [^ self]. labelArea layoutPolicy: TableLayout new; listDirection: #leftToRight; hResizing: #spaceFill; layoutInset: 0. label hResizing: #spaceFill. labelArea ifNotNil: [frame := LayoutFrame new. frame leftFraction: 0; topFraction: 0; rightFraction: 1; + bottomFraction: 0; topOffset: self labelHeight negated. windowBorderWidth := self class borderWidth. frame leftOffset: windowBorderWidth; rightOffset: windowBorderWidth negated; topOffset: self labelHeight negated + windowBorderWidth; bottomOffset: windowBorderWidth negated. labelArea layoutFrame: frame]! From commits at source.squeak.org Tue Mar 17 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 17 22:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150317225502.24736.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007647.html Name: Compiler.spur-topa.296 Ancestors: Compiler-topa.296, Compiler.spur-topa.295 Compiler-topa.296 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.242 initially, the encoder is self, but does not know about the classEncoding. Guard this, too ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007648.html Name: Kernel.spur-cmm.911 Ancestors: Kernel-cmm.911, Kernel.spur-ul.910 Kernel-cmm.911 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.242 - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007649.html Name: Morphic-mt.782 Ancestors: Morphic-mt.781 Layout for label area in system windows fixed. It is now as tall as its label -- as intended. ============================================= From eliot.miranda at gmail.com Wed Mar 18 03:16:11 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 18 03:16:13 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: CogVM binaries as per VMMaker.oscog-eem.1096/r3282 Fix assertClassOf:is: to handle immediates upstream of isClassOfNonImm:equalTo:. Fixes a potential crash when x or y is sent to immediates (bytecodePrimX/Y). Include the GdbARMPlugin on linux (Spur only) & Mac OS X (V3 & Spur). -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150317/0da1527a/attachment.htm From eliot.miranda at gmail.com Wed Mar 18 07:47:09 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 18 07:47:14 2015 Subject: [squeak-dev] please /don't/ mark commit messages as spam... Message-ID: Hi All, I've just found several commit messages in gmail's spam folder. These commits are important to me. Since I think I'm correct in thinking gmail's assessment of what's spam depends on many users I'm guessing that gmail has decoded these messages are spam because subscribers to commits are marking them as so. Doing so means I'm less likely to see the messages but they're important to me; it's how I see that other people have committed to the VM. So please, instead of marking these messages as spam, unsubscribe from commits, or tolerate them. Thanks. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150318/d0889b6c/attachment.htm From bert at freudenbergs.de Wed Mar 18 08:24:02 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 18 08:24:06 2015 Subject: [squeak-dev] Re: please /don't/ mark commit messages as spam... In-Reply-To: References: Message-ID: <4B9D395C-E227-4E7F-8985-046E98ABE92F@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150318/a8889b32/smime.bin From jakob.reschke at student.hpi.de Wed Mar 18 09:26:09 2015 From: jakob.reschke at student.hpi.de (Jakob Reschke) Date: Wed Mar 18 09:26:13 2015 Subject: [squeak-dev] Re: please /don't/ mark commit messages as spam... In-Reply-To: <62140dc055c849429cacf5a5efa56a37@OWA-2012.hpi.uni-potsdam.de> References: <62140dc055c849429cacf5a5efa56a37@OWA-2012.hpi.uni-potsdam.de> Message-ID: To make yourself independend from other people's spam taste you could also define a filter in gmail to never mark these messages as spam. Best regards, Jakob Am 18.03.2015 09:24 schrieb "Bert Freudenberg" : > On 18.03.2015, at 08:47, Eliot Miranda wrote: > > > Hi All, > > I've just found several commit messages in gmail's spam folder. > These commits are important to me. Since I think I'm correct in thinking > gmail's assessment of what's spam depends on many users I'm guessing that > gmail has decoded these messages are spam because subscribers to commits > are marking them as so. Doing so means I'm less likely to see the messages > but they're important to me; it's how I see that other people have > committed to the VM. So please, instead of marking these messages as spam, > unsubscribe from commits, or tolerate them. > > > Even better: filter them. We don't have a separate commits list. Commits > come to the main list. The only way to not see them without marking as spam > would be subject filtering. > > If you go and tell gmail that you don't consider these to be spam, maybe > it will personalize that for you? > > - Bert - > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150318/684c841e/attachment.htm From commits at source.squeak.org Wed Mar 18 09:34:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 09:34:19 2015 Subject: [squeak-dev] The Trunk: Tools-topa.555.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.555.mcz ==================== Summary ==================== Name: Tools-topa.555 Author: topa Time: 18 March 2015, 10:33:54.342 am UUID: 1abeab8b-ed1d-4a14-aaee-8f0c6e25a28d Ancestors: Tools-topa.554 Move methods from Kernel to Tools/Morphic for basic Models (1/3) Load this first =============== Diff against Tools-topa.554 =============== Item was added: + ----- Method: Model>>arrowKey:from: (in category '*Tools-keyboard') ----- + arrowKey: aChar from: view + "backstop; all the PluggableList* classes actually handle arrow keys, and the models handle other keys." + ^false! Item was added: + ----- Method: Model>>perform:orSendTo: (in category '*Tools-menus') ----- + perform: selector orSendTo: otherTarget + "Selector was just chosen from a menu by a user. If can respond, then perform it on myself. If not, send it to otherTarget, presumably the editPane from which the menu was invoked." + + "default is that the editor does all" + ^ otherTarget perform: selector.! Item was added: + ----- Method: Model>>selectedClass (in category '*Tools') ----- + selectedClass + "All owners of TextViews are asked this during a doIt" + ^ nil! Item was added: + ----- Method: Model>>trash (in category '*Tools-menus') ----- + trash + "What should be displayed if a trash pane is restored to initial state" + + ^ ''! Item was added: + ----- Method: Model>>trash: (in category '*Tools-menus') ----- + trash: ignored + "Whatever the user submits to the trash, it need not be saved." + + ^ true! Item was changed: + ----- Method: SelectorBrowser>>buildClassListWith: (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>buildClassListWith: (in category 'as yet unclassified') ----- buildClassListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #classList; getIndex: #classListIndex; setIndex: #classListIndex:; keyPress: #arrowKey:from:. ^listSpec ! Item was changed: + ----- Method: SelectorBrowser>>buildEditViewWith: (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>buildEditViewWith: (in category 'as yet unclassified') ----- buildEditViewWith: builder | textSpec | textSpec := builder pluggableInputFieldSpec new. textSpec model: self; getText: #contents; setText: #contents:notifying:; selection: #contentsSelection; menu: #codePaneMenu:shifted:. ^textSpec! Item was changed: + ----- Method: SelectorBrowser>>buildExamplePaneWith: (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>buildExamplePaneWith: (in category 'as yet unclassified') ----- buildExamplePaneWith: builder | textSpec | textSpec := builder pluggableTextSpec new. textSpec model: self; getText: #byExample; setText: #byExample:; selection: #contentsSelection; menu: #codePaneMenu:shifted:. ^textSpec! Item was changed: + ----- Method: SelectorBrowser>>buildMessageListWith: (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>buildMessageListWith: (in category 'as yet unclassified') ----- buildMessageListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #messageList; getIndex: #messageListIndex; setIndex: #messageListIndex:; menu: #selectorMenu:; keyPress: #messageListKey:from:. ^listSpec ! Item was changed: + ----- Method: SelectorBrowser>>buildWith: (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>buildWith: (in category 'as yet unclassified') ----- buildWith: builder "Create a Browser that lets you type part of a selector, shows a list of selectors, shows the classes of the one you chose, and spawns a full browser on it. Answer the window SelectorBrowser new open " | windowSpec | selectorIndex := classListIndex := 0. windowSpec := self buildWindowWith: builder specs: { (0@0 corner: 0.5@0.14) -> [self buildEditViewWith: builder]. (0@0.14 corner: 0.5@0.6) -> [self buildMessageListWith: builder]. (0.5@0 corner: 1@0.6) -> [self buildClassListWith: builder]. (0@0.6 corner: 1@1) -> [self buildExamplePaneWith: builder]. }. ^builder build: windowSpec! Item was changed: + ----- Method: SelectorBrowser>>byExample (in category 'example pane') ----- - ----- Method: SelectorBrowser>>byExample (in category 'as yet unclassified') ----- byExample "The comment in the bottom pane" false ifTrue: [MethodFinder methodFor: #( (4 3) 7 (0 5) 5 (5 5) 10)]. "to keep the method methodFor: from being removed from the system" ^ 'Type a fragment of a selector in the top pane. Accept it. Or, use an example to find a method in the system. Type receiver, args, and answer in the top pane with periods between the items. 3. 4. 7 Or, in this pane, use examples to find a method in the system. Select the line of code and choose "print it". MethodFinder methodFor: #( (4 3) 7 (0 5) 5 (5 5) 10). This will discover (data1 + data2). You supply inputs and answers and the system will find the method. Each inner array is a list of inputs. It contains the receiver and zero or more arguments. For Booleans and any computed arguments, use brace notation. MethodFinder methodFor: { {1. 3}. true. {20. 10}. false}. This will discover the expressions (data1 < data2), (data2 > data1), and many others. MethodFinder methodFor: { {''29 Apr 1999'' asDate}. ''Thursday''. {''30 Apr 1999'' asDate}. ''Friday'' }. This will discover the expression (data1 weekday) Receiver and arguments do not have to be in the right order. See MethodFinder.verify for more examples.'! Item was changed: + ----- Method: SelectorBrowser>>byExample: (in category 'example pane') ----- - ----- Method: SelectorBrowser>>byExample: (in category 'as yet unclassified') ----- byExample: newText "Don't save it" ^ true! Item was changed: + ----- Method: SelectorBrowser>>classList (in category 'class list') ----- - ----- Method: SelectorBrowser>>classList (in category 'as yet unclassified') ----- classList ^ classList! Item was changed: + ----- Method: SelectorBrowser>>classListIndex (in category 'class list') ----- - ----- Method: SelectorBrowser>>classListIndex (in category 'as yet unclassified') ----- classListIndex ^ classListIndex! Item was changed: + ----- Method: SelectorBrowser>>classListIndex: (in category 'class list') ----- - ----- Method: SelectorBrowser>>classListIndex: (in category 'as yet unclassified') ----- classListIndex: anInteger classListIndex := anInteger. classListIndex > 0 ifTrue: [self changed: #startNewBrowser. "MVC view will terminate control to prepare for new browser" Browser fullOnClass: self selectedClass selector: self selectedMessageName. "classListIndex := 0"] ! Item was changed: + ----- Method: SelectorBrowser>>classListSelectorTitle (in category 'class list') ----- - ----- Method: SelectorBrowser>>classListSelectorTitle (in category 'as yet unclassified') ----- classListSelectorTitle ^ 'Class List Menu'! Item was changed: + ----- Method: SelectorBrowser>>contents:notifying: (in category 'example pane') ----- - ----- Method: SelectorBrowser>>contents:notifying: (in category 'as yet unclassified') ----- contents: aString notifying: aController "Take what the user typed and find all selectors containing it" | tokens | contents := aString. classList := #(). classListIndex := 0. selectorIndex := 0. tokens := contents asString findTokens: ' .'. selectorList := Cursor wait showWhile: [ tokens size = 1 ifTrue: [(Symbol selectorsContaining: contents asString) asArray sort: [:x :y | x asLowercase <= y asLowercase]] ifFalse: [self quickList]]. "find selectors from a single example of data" self changed: #messageList. self changed: #classList. ^ true! Item was changed: + ----- Method: SelectorBrowser>>implementors (in category 'selector functions') ----- - ----- Method: SelectorBrowser>>implementors (in category 'as yet unclassified') ----- implementors | aSelector | (aSelector := self selectedMessageName) ifNotNil: [self systemNavigation browseAllImplementorsOf: aSelector]! Item was changed: + ----- Method: SelectorBrowser>>initialExtent (in category 'message list') ----- - ----- Method: SelectorBrowser>>initialExtent (in category 'as yet unclassified') ----- initialExtent ^ 350@250 ! Item was changed: + ----- Method: SelectorBrowser>>listFromResult: (in category 'selector finding') ----- - ----- Method: SelectorBrowser>>listFromResult: (in category 'as yet unclassified') ----- listFromResult: resultOC "ResultOC is of the form #('(data1 op data2)' '(...)'). Answer a sorted array." (resultOC first beginsWith: 'no single method') ifTrue: [^ #()]. ^ resultOC sortBy: [:a :b | (a copyFrom: 6 to: a size) < (b copyFrom: 6 to: b size)]. ! Item was changed: + ----- Method: SelectorBrowser>>markMatchingClasses (in category 'message list') ----- - ----- Method: SelectorBrowser>>markMatchingClasses (in category 'as yet unclassified') ----- markMatchingClasses "If an example is used, mark classes matching the example instance with an asterisk." | unmarkedClassList firstPartOfSelector receiverString receiver | self flag: #mref. "allows for old-fashioned style" "Only 'example' queries can be marked." (contents asString includes: $.) ifFalse: [^ self]. unmarkedClassList := classList copy. "Get the receiver object of the selected statement in the message list." firstPartOfSelector := (Scanner new scanTokens: (selectorList at: selectorIndex)) second. receiverString := (ReadStream on: (selectorList at: selectorIndex)) upToAll: firstPartOfSelector. receiver := Compiler evaluate: receiverString. unmarkedClassList do: [ :classAndMethod | | class | (classAndMethod isKindOf: MethodReference) ifTrue: [ (receiver isKindOf: classAndMethod actualClass) ifTrue: [ classAndMethod stringVersion: '*', classAndMethod stringVersionDefault. ] ] ifFalse: [ class := Compiler evaluate: ((ReadStream on: classAndMethod) upToAll: firstPartOfSelector). (receiver isKindOf: class) ifTrue: [ classList add: '*', classAndMethod. classList remove: classAndMethod ] ]. ]. ! Item was changed: + ----- Method: SelectorBrowser>>messageList (in category 'message list') ----- - ----- Method: SelectorBrowser>>messageList (in category 'as yet unclassified') ----- messageList "Find all the selectors containing what the user typed in." ^ selectorList! Item was changed: + ----- Method: SelectorBrowser>>messageListIndex (in category 'message list') ----- - ----- Method: SelectorBrowser>>messageListIndex (in category 'as yet unclassified') ----- messageListIndex "Answer the index of the selected message selector." ^ selectorIndex! Item was changed: + ----- Method: SelectorBrowser>>messageListIndex: (in category 'message list') ----- - ----- Method: SelectorBrowser>>messageListIndex: (in category 'as yet unclassified') ----- messageListIndex: anInteger "Set the selected message selector to be the one indexed by anInteger. Find all classes it is in." selectorIndex := anInteger. selectorIndex = 0 ifTrue: [^ self]. classList := self systemNavigation allImplementorsOf: self selectedMessageName. self markMatchingClasses. classListIndex := 0. self changed: #messageListIndex. "update my selection" self changed: #classList! Item was changed: + ----- Method: SelectorBrowser>>messageListKey:from: (in category 'message list') ----- - ----- Method: SelectorBrowser>>messageListKey:from: (in category 'as yet unclassified') ----- messageListKey: aChar from: view "Respond to a command key. Handle (m) and (n) here, else defer to the StringHolder behaviour." aChar == $m ifTrue: [^ self implementors]. aChar == $n ifTrue: [^ self senders]. super messageListKey: aChar from: view ! Item was changed: + ----- Method: SelectorBrowser>>open (in category 'toolbuilder') ----- - ----- Method: SelectorBrowser>>open (in category 'as yet unclassified') ----- open "Create a Browser that lets you type part of a selector, shows a list of selectors, shows the classes of the one you chose, and spwns a full browser on it. SelectorBrowser new open " ^ToolBuilder open: self! Item was changed: + ----- Method: SelectorBrowser>>quickList (in category 'selector finding') ----- - ----- Method: SelectorBrowser>>quickList (in category 'as yet unclassified') ----- quickList "Compute the selectors for the single example of receiver and args, in the very top pane" | data result resultArray dataStrings mf dataObjects aa statements | data := contents asString withBlanksTrimmed. mf := MethodFinder new. data := mf cleanInputs: data. "remove common mistakes" dataObjects := Compiler evaluate: '{', data, '}'. "#( data1 data2 result )" statements := (Compiler new parse: 'zort ' , data in: Object notifying: nil) body statements select: [:each | (each isKindOf: ReturnNode) not]. dataStrings := statements collect: [:node | String streamContents: [:strm | (node isMessage) ifTrue: [strm nextPut: $(]. node shortPrintOn: strm. (node isMessage) ifTrue: [strm nextPut: $)].]]. dataObjects size < 2 ifTrue: [self inform: 'If you are giving an example of receiver, \args, and result, please put periods between the parts.\Otherwise just type one selector fragment' withCRs. ^#()]. dataObjects := Array with: dataObjects allButLast with: dataObjects last. "#( (data1 data2) result )" result := mf load: dataObjects; findMessage. (result first beginsWith: 'no single method') ifFalse: [ aa := self testObjects: dataObjects strings: dataStrings. dataObjects := aa second. dataStrings := aa third]. resultArray := self listFromResult: result. resultArray isEmpty ifTrue: [self inform: result first]. dataStrings size = (dataObjects first size + 1) ifTrue: [resultArray := resultArray collect: [:expression | | newExp | newExp := expression. dataObjects first withIndexDo: [:lit :i | newExp := newExp copyReplaceAll: 'data', i printString with: (dataStrings at: i)]. newExp, ' --> ', dataStrings last]]. ^ resultArray! Item was changed: + ----- Method: SelectorBrowser>>searchResult: (in category 'example pane') ----- - ----- Method: SelectorBrowser>>searchResult: (in category 'as yet unclassified') ----- searchResult: anExternalSearchResult self contents: ''. classList := #(). classListIndex := 0. selectorIndex := 0. selectorList := self listFromResult: anExternalSearchResult. self changed: #messageList. self changed: #classList. self changed: #contents ! Item was changed: + ----- Method: SelectorBrowser>>selectedClass (in category 'class list') ----- - ----- Method: SelectorBrowser>>selectedClass (in category 'as yet unclassified') ----- selectedClass "Answer the currently selected class." | pairString | self flag: #mref. "allows for old-fashioned style" classListIndex = 0 ifTrue: [^nil]. pairString := classList at: classListIndex. (pairString isKindOf: MethodReference) ifTrue: [ ^pairString actualClass ]. (pairString includes: $*) ifTrue: [pairString := pairString allButFirst]. MessageSet parse: pairString toClassAndSelector: [:cls :sel | ^ cls].! Item was changed: + ----- Method: SelectorBrowser>>selectedClassName (in category 'accessing') ----- - ----- Method: SelectorBrowser>>selectedClassName (in category 'as yet unclassified') ----- selectedClassName "Answer the name of the currently selected class." classListIndex = 0 ifTrue: [^nil]. ^ self selectedClass name! Item was changed: + ----- Method: SelectorBrowser>>selectedMessageName (in category 'accessing') ----- - ----- Method: SelectorBrowser>>selectedMessageName (in category 'as yet unclassified') ----- selectedMessageName "Answer the name of the currently selected message." | example tokens | selectorIndex = 0 ifTrue: [^nil]. example := selectorList at: selectorIndex. tokens := Scanner new scanTokens: example. tokens size = 1 ifTrue: [^ tokens first]. tokens first == #'^' ifTrue: [^ nil]. (tokens second includes: $:) ifTrue: [^ example findSelector]. Symbol hasInterned: tokens second ifTrue: [:aSymbol | ^ aSymbol]. ^ nil! Item was changed: + ----- Method: SelectorBrowser>>selectorList: (in category 'selector list') ----- - ----- Method: SelectorBrowser>>selectorList: (in category 'as yet unclassified') ----- selectorList: anExternalList self contents: ''. classList := #(). classListIndex := 0. selectorIndex := 0. selectorList := anExternalList. self changed: #messageList. self changed: #classList. self changed: #contents ! Item was changed: + ----- Method: SelectorBrowser>>selectorMenu: (in category 'selector list') ----- - ----- Method: SelectorBrowser>>selectorMenu: (in category 'as yet unclassified') ----- selectorMenu: aMenu ^ aMenu labels: 'senders (n) implementors (m) copy selector to clipboard' lines: #() selections: #(senders implementors copyName)! Item was changed: + ----- Method: SelectorBrowser>>selectorMenuTitle (in category 'selector list') ----- - ----- Method: SelectorBrowser>>selectorMenuTitle (in category 'as yet unclassified') ----- selectorMenuTitle ^ self selectedMessageName ifNil: ['']! Item was changed: + ----- Method: SelectorBrowser>>senders (in category 'selector functions') ----- - ----- Method: SelectorBrowser>>senders (in category 'as yet unclassified') ----- senders | aSelector | (aSelector := self selectedMessageName) ifNotNil: [self systemNavigation browseAllCallsOn: aSelector]! Item was changed: + ----- Method: SelectorBrowser>>testObjects:strings: (in category 'selector finding') ----- - ----- Method: SelectorBrowser>>testObjects:strings: (in category 'as yet unclassified') ----- testObjects: dataObjects strings: dataStrings | dataObjs dataStrs selectors classes didUnmodifiedAnswer | "Try to make substitutions in the user's inputs and search for the selector again. 1 no change to answer. 2 answer Array -> OrderedCollection. 2 answer Character -> String 4 answer Symbol or String of len 1 -> Character For each of these, try straight, and try converting args: Character -> String Symbol or String of len 1 -> Character Return array with result, dataObjects, dataStrings. Don't ever do a find on the same set of data twice." dataObjs := dataObjects. dataStrs := dataStrings. selectors := {#asString. #first. #asOrderedCollection}. classes := {Character. String. Array}. didUnmodifiedAnswer := false. selectors withIndexDo: [:ansSel :ansInd | | ds do result answerMod | "Modify the answer object" answerMod := false. do := dataObjs copyTwoLevel. ds := dataStrs copy. (dataObjs last isKindOf: (classes at: ansInd)) ifTrue: [ ((ansSel ~~ #first) or: [dataObjs last size = 1]) ifTrue: [ do at: do size put: (do last perform: ansSel). "asString" ds at: ds size put: ds last, ' ', ansSel. result := MethodFinder new load: do; findMessage. (result first beginsWith: 'no single method') ifFalse: [ "found a selector!!" ^ Array with: result first with: do with: ds]. answerMod := true]]. selectors allButLast withIndexDo: [:argSel :argInd | | ddo dds | "Modify an argument object" "for args, no reason to do Array -> OrderedCollection. Identical protocol." didUnmodifiedAnswer not | answerMod ifTrue: [ ddo := do copyTwoLevel. dds := ds copy. dataObjs first withIndexDo: [:arg :ind | (arg isKindOf: (classes at: argInd)) ifTrue: [ ((argSel ~~ #first) or: [arg size = 1]) ifTrue: [ ddo first at: ind put: ((ddo first at: ind) perform: argSel). "asString" dds at: ind put: (dds at: ind), ' ', argSel. result := MethodFinder new load: ddo; findMessage. (result first beginsWith: 'no single method') ifFalse: [ "found a selector!!" ^ Array with: result first with: ddo with: dds] . didUnmodifiedAnswer not & answerMod not ifTrue: [ didUnmodifiedAnswer := true]. ]]]]]. ]. ^ Array with: 'no single method does that function' with: dataObjs with: dataStrs! Item was added: + ----- Method: StringHolder class>>codePaneMenu:shifted: (in category '*Tools-yellow button menu') ----- + codePaneMenu: aMenu shifted: shifted + "Utility method for the 'standard' codePane menu" + aMenu addList: (shifted + ifTrue:[self shiftedYellowButtonMenuItems] + ifFalse:[self yellowButtonMenuItems]). + ^aMenu! Item was added: + ----- Method: StringHolder class>>shiftedYellowButtonMenuItems (in category '*Tools-yellow button menu') ----- + shiftedYellowButtonMenuItems + "Returns the standard yellow button menu items" + | entries | + entries := OrderedCollection withAll: + { + {'explain' translated. #explain}. + {'pretty print' translated. #prettyPrint}. + {'pretty print with color' translated. #prettyPrintWithColor}. + {'file it in (G)' translated. #fileItIn}. + {'spawn (o)' translated. #spawn}. + #-. + {'browse it (b)' translated. #browseIt}. + {'senders of it (n)' translated. #sendersOfIt}. + {'implementors of it (m)' translated. #implementorsOfIt}. + {'references to it (N)' translated. #referencesToIt}. + #-. + {'selectors containing it (W)' translated. #methodNamesContainingIt}. + {'method strings with it (E)' translated. #methodStringsContainingit}. + {'method source with it' translated. #methodSourceContainingIt}. + {'class names containing it' translated. #classNamesContainingIt}. + {'class comments with it' translated. #classCommentsContainingIt}. + {'change sets with it' translated. #browseChangeSetsWithSelector}. + #-. + {'save contents to file...' translated. #saveContentsInFile}. + {'send contents to printer' translated. #sendContentsToPrinter}. + {'printer setup' translated. #printerSetup}. + #-. + }. + Smalltalk isMorphic ifFalse: [ entries add: + {'special menu...' translated. #presentSpecialMenu}.]. + entries add: + {'more...' translated. #yellowButtonActivity}. + ^ entries! Item was added: + ----- Method: StringHolder class>>yellowButtonMenuItems (in category '*Tools-yellow button menu') ----- + yellowButtonMenuItems + "Returns the standard yellow button menu items" + ^{ + {'set font... (k)' translated. #offerFontMenu}. + {'set style... (K)' translated. #changeStyle}. + {'set alignment... (u)' translated. #chooseAlignment}. + #-. + {'make project link (P)' translated. #makeProjectLink}. + #-. + {'find...(f)' translated. #find}. + {'find again (g)' translated. #findAgain}. + {'set search string (h)' translated. #setSearchString}. + #-. + {'do again (j)' translated. #again}. + {'undo (z)' translated. #undo}. + #-. + {'copy (c)' translated. #copySelection}. + {'cut (x)' translated. #cut}. + {'paste (v)' translated. #paste}. + {'paste...' translated. #pasteRecent}. + #-. + {'do it (d)' translated. #doIt}. + {'print it (p)' translated. #printIt}. + {'inspect it (i)' translated. #inspectIt}. + {'explore it (I)' translated. #exploreIt}. + {'debug it' translated. #debugIt}. + {'button for it' translated. #buttonForIt}. + {'tally it' translated. #tallyIt}. + #-. + {'accept (s)' translated. #accept}. + {'cancel (l)' translated. #cancel}. + #-. + {'show bytecodes' translated. #showBytecodes}. + #-. + {'copy html' translated. #copyHtml}. + #-. + {'more...' translated. #shiftedTextPaneMenuRequest}. + }! Item was added: + ----- Method: StringHolder>>codePaneMenu:shifted: (in category '*Tools-code pane menu') ----- + codePaneMenu: aMenu shifted: shifted + "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" + ^self class codePaneMenu: aMenu shifted: shifted! Item was added: + ----- Method: StringHolder>>contents:notifying: (in category '*Tools-code pane menu') ----- + contents: aString notifying: aController + "Accept text" + ^self acceptContents: aString! Item was added: + ----- Method: StringHolder>>menuHook:named:shifted: (in category '*Tools-code pane menu') ----- + menuHook: aMenu named: aSymbol shifted: aBool + "Provide a hook for supplemental menu items. Answer the appropriately-enhanced menu." + ^ aMenu! Item was added: + ----- Method: StringHolder>>perform:orSendTo: (in category '*Tools-code pane menu') ----- + perform: selector orSendTo: otherTarget + "Selector was just chosen from a menu by a user. If can respond, then + perform it on myself. If not, send it to otherTarget, presumably the + editPane from which the menu was invoked." + + (self respondsTo: selector) + ifTrue: [^ self perform: selector] + ifFalse: [^ otherTarget perform: selector]! Item was added: + ----- Method: StringHolder>>showBytecodes (in category '*Tools-code pane menu') ----- + showBytecodes + "We don't know how to do this" + + ^ self changed: #flash! Item was added: + ----- Method: StringHolder>>wantsAnnotationPane (in category '*Tools-optional panes') ----- + wantsAnnotationPane + "Answer whether the receiver, seen in some browser window, would like to have the so-called annotationpane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary." + + ^ Preferences annotationPanes! Item was added: + ----- Method: StringHolder>>wantsOptionalButtons (in category '*Tools-optional panes') ----- + wantsOptionalButtons + "Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary." + + ^ Preferences optionalButtons! From commits at source.squeak.org Wed Mar 18 09:35:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 09:35:43 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.783.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.783.mcz ==================== Summary ==================== Name: Morphic-topa.783 Author: topa Time: 18 March 2015, 10:35:02.3 am UUID: d408d8c0-536d-4277-8e30-9d8e7c002d6b Ancestors: Morphic-mt.782 Move methods from Kernel to Tools/Morphic for basic Models (2/3) Load this second =============== Diff against Morphic-mt.782 =============== Item was added: + ----- Method: Model>>step (in category '*morphic') ----- + step + "Default for morphic models is no-op"! From commits at source.squeak.org Wed Mar 18 09:36:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 09:36:54 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.912.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.912.mcz ==================== Summary ==================== Name: Kernel-topa.912 Author: topa Time: 18 March 2015, 10:36:24.019 am UUID: 959778ec-8547-43f1-89a5-6f0f93238617 Ancestors: Kernel-cmm.911 Move methods from Kernel to Tools/Morphic for basic Models (3/3) Load this last. =============== Diff against Kernel-cmm.911 =============== Item was removed: - ----- Method: Model>>arrowKey:from: (in category 'keyboard') ----- - arrowKey: aChar from: view - "backstop; all the PluggableList* classes actually handle arrow keys, and the models handle other keys." - ^false! Item was removed: - ----- Method: Model>>perform:orSendTo: (in category 'menus') ----- - perform: selector orSendTo: otherTarget - "Selector was just chosen from a menu by a user. If can respond, then perform it on myself. If not, send it to otherTarget, presumably the editPane from which the menu was invoked." - - "default is that the editor does all" - ^ otherTarget perform: selector.! Item was removed: - ----- Method: Model>>selectedClass (in category 'menus') ----- - selectedClass - "All owners of TextViews are asked this during a doIt" - ^ nil! Item was removed: - ----- Method: Model>>step (in category 'menus') ----- - step - "Default for morphic models is no-op"! Item was removed: - ----- Method: Model>>trash (in category 'menus') ----- - trash - "What should be displayed if a trash pane is restored to initial state" - - ^ ''! Item was removed: - ----- Method: Model>>trash: (in category 'menus') ----- - trash: ignored - "Whatever the user submits to the trash, it need not be saved." - - ^ true! Item was removed: - ----- Method: StringHolder class>>codePaneMenu:shifted: (in category 'yellow button menu') ----- - codePaneMenu: aMenu shifted: shifted - "Utility method for the 'standard' codePane menu" - aMenu addList: (shifted - ifTrue:[self shiftedYellowButtonMenuItems] - ifFalse:[self yellowButtonMenuItems]). - ^aMenu! Item was removed: - ----- Method: StringHolder class>>shiftedYellowButtonMenuItems (in category 'yellow button menu') ----- - shiftedYellowButtonMenuItems - "Returns the standard yellow button menu items" - | entries | - entries := OrderedCollection withAll: - { - {'explain' translated. #explain}. - {'pretty print' translated. #prettyPrint}. - {'pretty print with color' translated. #prettyPrintWithColor}. - {'file it in (G)' translated. #fileItIn}. - {'spawn (o)' translated. #spawn}. - #-. - {'browse it (b)' translated. #browseIt}. - {'senders of it (n)' translated. #sendersOfIt}. - {'implementors of it (m)' translated. #implementorsOfIt}. - {'references to it (N)' translated. #referencesToIt}. - #-. - {'selectors containing it (W)' translated. #methodNamesContainingIt}. - {'method strings with it (E)' translated. #methodStringsContainingit}. - {'method source with it' translated. #methodSourceContainingIt}. - {'class names containing it' translated. #classNamesContainingIt}. - {'class comments with it' translated. #classCommentsContainingIt}. - {'change sets with it' translated. #browseChangeSetsWithSelector}. - #-. - {'save contents to file...' translated. #saveContentsInFile}. - {'send contents to printer' translated. #sendContentsToPrinter}. - {'printer setup' translated. #printerSetup}. - #-. - }. - Smalltalk isMorphic ifFalse: [ entries add: - {'special menu...' translated. #presentSpecialMenu}.]. - entries add: - {'more...' translated. #yellowButtonActivity}. - ^ entries! Item was removed: - ----- Method: StringHolder class>>yellowButtonMenuItems (in category 'yellow button menu') ----- - yellowButtonMenuItems - "Returns the standard yellow button menu items" - ^{ - {'set font... (k)' translated. #offerFontMenu}. - {'set style... (K)' translated. #changeStyle}. - {'set alignment... (u)' translated. #chooseAlignment}. - #-. - {'make project link (P)' translated. #makeProjectLink}. - #-. - {'find...(f)' translated. #find}. - {'find again (g)' translated. #findAgain}. - {'set search string (h)' translated. #setSearchString}. - #-. - {'do again (j)' translated. #again}. - {'undo (z)' translated. #undo}. - #-. - {'copy (c)' translated. #copySelection}. - {'cut (x)' translated. #cut}. - {'paste (v)' translated. #paste}. - {'paste...' translated. #pasteRecent}. - #-. - {'do it (d)' translated. #doIt}. - {'print it (p)' translated. #printIt}. - {'inspect it (i)' translated. #inspectIt}. - {'explore it (I)' translated. #exploreIt}. - {'debug it' translated. #debugIt}. - {'button for it' translated. #buttonForIt}. - {'tally it' translated. #tallyIt}. - #-. - {'accept (s)' translated. #accept}. - {'cancel (l)' translated. #cancel}. - #-. - {'show bytecodes' translated. #showBytecodes}. - #-. - {'copy html' translated. #copyHtml}. - #-. - {'more...' translated. #shiftedTextPaneMenuRequest}. - }! Item was removed: - ----- Method: StringHolder>>codePaneMenu:shifted: (in category 'code pane menu') ----- - codePaneMenu: aMenu shifted: shifted - "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" - ^self class codePaneMenu: aMenu shifted: shifted! Item was removed: - ----- Method: StringHolder>>contents:notifying: (in category 'code pane menu') ----- - contents: aString notifying: aController - "Accept text" - ^self acceptContents: aString! Item was removed: - ----- Method: StringHolder>>menuHook:named:shifted: (in category 'code pane menu') ----- - menuHook: aMenu named: aSymbol shifted: aBool - "Provide a hook for supplemental menu items. Answer the appropriately-enhanced menu." - ^ aMenu! Item was removed: - ----- Method: StringHolder>>perform:orSendTo: (in category 'code pane menu') ----- - perform: selector orSendTo: otherTarget - "Selector was just chosen from a menu by a user. If can respond, then - perform it on myself. If not, send it to otherTarget, presumably the - editPane from which the menu was invoked." - - (self respondsTo: selector) - ifTrue: [^ self perform: selector] - ifFalse: [^ otherTarget perform: selector]! Item was removed: - ----- Method: StringHolder>>showBytecodes (in category 'code pane menu') ----- - showBytecodes - "We don't know how to do this" - - ^ self changed: #flash! Item was removed: - ----- Method: StringHolder>>wantsAnnotationPane (in category 'optional panes') ----- - wantsAnnotationPane - "Answer whether the receiver, seen in some browser window, would like to have the so-called annotationpane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary." - - ^ Preferences annotationPanes! Item was removed: - ----- Method: StringHolder>>wantsOptionalButtons (in category 'optional panes') ----- - wantsOptionalButtons - "Answer whether the receiver, seen in some browser window, would like to have the so-called optional button pane included. By default, various browsers defer to the global preference 'optionalButtons' -- but individual subclasses can insist to the contrary." - - ^ Preferences optionalButtons! From bert at freudenbergs.de Wed Mar 18 10:29:29 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Wed Mar 18 10:29:32 2015 Subject: [squeak-dev] Load order dependency (was: The Trunk: Kernel-topa.912.mcz) In-Reply-To: References: Message-ID: <5E845C16-EA75-4826-AAB9-70FE0576F8F0@freudenbergs.de> On 18.03.2015, at 09:36, commits@source.squeak.org wrote: > > Tobias Pape uploaded a new version of Kernel to project The Trunk: > http://source.squeak.org/trunk/Kernel-topa.912.mcz > > ==================== Summary ==================== > > Name: Kernel-topa.912 > Author: topa > Time: 18 March 2015, 10:36:24.019 am > UUID: 959778ec-8547-43f1-89a5-6f0f93238617 > Ancestors: Kernel-cmm.911 > > Move methods from Kernel to Tools/Morphic for basic Models (3/3) > > Load this last. When updating via config map, this actually got loaded first, before Tools-topa.555 and Morphic-topa.783. But even before that, MCReorganizationPreloader kicked in and saved the day. You can see its work by checking the "mcPreload" changeset afterwards :) - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150318/208aba4e/smime.bin From commits at source.squeak.org Wed Mar 18 15:11:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 15:11:29 2015 Subject: [squeak-dev] The Inbox: Services-Base-topa.54.mcz Message-ID: A new version of Services-Base was added to project The Inbox: http://source.squeak.org/inbox/Services-Base-topa.54.mcz ==================== Summary ==================== Name: Services-Base-topa.54 Author: topa Time: 18 March 2015, 4:10:41.166 pm UUID: 81229201-d099-4bfc-81a2-269743063d2c Ancestors: Services-Base-cmm.53 Adapt to Pluggable menus (Tools-topa.556) =============== Diff against Services-Base-cmm.53 =============== Item was added: + ----- Method: Browser>>classCategoryMenuServices: (in category '*services-base') ----- + classCategoryMenuServices: aMenu + + + ServiceGui browser: self classCategoryMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was added: + ----- Method: Browser>>classListMenuServices: (in category '*services-base') ----- + classListMenuServices: aMenu + + + ServiceGui browser: self classMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was removed: - ----- Method: Browser>>menuHook:named:shifted: (in category '*services-base') ----- - menuHook: aMenu named: aSymbol shifted: aBool - "Enhance aMenu with registered services." - aSymbol - caseOf: - { [ #classListMenu ] -> [ ServiceGui browser: self classMenu: aMenu ]. - [ #codePaneMenu ] -> [ ServiceGui browser: self codePaneMenu: aMenu ]. - [ #messageCategoryMenu] -> [ ServiceGui browser: self messageCategoryMenu: aMenu ]. - [ #messageListMenu ] -> [ ServiceGui browser: self messageListMenu: aMenu ]. - [ #systemCategoryMenu ] -> [ ServiceGui browser: self classCategoryMenu: aMenu ] } - otherwise: [ "do nothing" ]! Item was added: + ----- Method: Browser>>messageCategoryMenuServices: (in category '*services-base') ----- + messageCategoryMenuServices: aMenu + + + ServiceGui browser: self messageCategoryMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was removed: - ----- Method: CodeHolder>>menuHook:named:shifted: (in category '*services-base') ----- - menuHook: aMenu named: aSymbol shifted: aBool - "Enhance aMenu with registered services." - aSymbol == #messageListMenu ifTrue: - [ServiceGui browser: self messageListMenu: aMenu]. - ^aMenu! Item was added: + ----- Method: CodeHolder>>messageListMenuServices: (in category '*services-base') ----- + messageListMenuServices: aMenu + + + + ServiceGui browser: self messageListMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was added: + ----- Method: StringHolder>>codePaneMenuServices: (in category '*services-base') ----- + codePaneMenuServices: aMenu + + + ServiceGui browser: self codePaneMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! From commits at source.squeak.org Wed Mar 18 15:11:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 15:11:30 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz Message-ID: A new version of Tools was added to project The Inbox: http://source.squeak.org/inbox/Tools-topa.556.mcz ==================== Summary ==================== Name: Tools-topa.556 Author: topa Time: 18 March 2015, 4:09:54.221 pm UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d Ancestors: Tools-topa.555 Pluggable Menus for many tools ============================== A lot of tools, especially the Browser, rely on context menus (aka yellow button menus). Dynamically extending these is possible but requires a lot of care. The Pluggable Menus allow to add menu entries easily via extension methods. The Services package serves as example here. Simple Usage ------------ * As tool writer, you want a menu somewhere in your tool 1. Create an instance of `MenuMorph` or similar. 2. Create a method that should build the menu entries: someMenu: aMenu ^ aMenu addList: #( ('use' use) ('remove' remove) ('copy' copyName)); yourself 3. Send `self menu: aMorph for: #myMenu` * As a tool extender, you want to extend an existing menu 1. Find the menu you want to extend, for example the Browser's message list menu. This is defined via `ToolBuilder` to be constructed in `Browser>>#messageListMenu:shifted:` as messageListMenu: aMenu shifted: shifted "Answer the message-list menu" ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted So the menu identifier is `#messageListMenu` 2. Create an _extension method_ in `Browser` and categorize it as, for example, `*MyPackage-message list`. myMenu: aMenu ^ aMenu addList: #( ('use' use) ('remove' remove) ('copy' copyName)); yourself 3. The entries should show up now the next time you open the context menu on the message list in a Browser. Examples -------- The `Services-Base` package now uses this approach to add services to several menus. For example, to add the class service entries to the class list menu in the browser, it adds this extension method in the category `*services-base` in the `Browser` class: classListMenuServices: aMenu ServiceGui browser: self classMenu: aMenu. ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu] This invokes the `ServiceGui` functionality to create the menu and * ensures the entries show up in the class list context menu (``), * make sure they appear near the top (``), * (actually build the menu (`ServiceGui browser: self classMenu: aMenu.`)), * and indicate whether or not the system should continue with the menue building, depending on a preference (`^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]`). Reference --------- * Menu creation * `StringHolder >> menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean` Collect all menu-building methods as defined by `aMenuSymbolOrCollection`, possibly reacting to the shifted `aBoolean` modifier. The `aMenuSymbolOrCollection` specification denotes the method annotation(s) (or Pragma(s)) to search the current class and all superclasses for. Then, all collected method _selectors_ are performed on `self`. * `StringHolder >> menu: aMenu for: aMenuSymbolOrCollection` Delegates to `#menu:for:shifted:` with shifted being `false`. * Menu identifiers and annotations/pragmas All senders of `#menu:for:shifted:` are free to choose what to use for the menu identifier(s) which can then be used as annotation/pragma in menu-building methods. The methods with these annotations/pragmas get called with the menu to build and (optionally) with the shift state boolean. However, indentifiers that can take an argument in a method annotation/pragma are expected to have this argument being either `true` or `false`. They are only included for menu building if the shifted state corresponds to the argument. **Examples** The message list context menu for Browsers is build using self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted with the two identifiers `#messageListMenu` and `#messageListMenuShifted:`. * The following method would be called when the shifted argument is `false` only: myMessageListMenuAdditiontTo: aMenu "..." * The following method would be called when the shifted argument is `true` only: myShiftedMessageListMenuAdditiontTo: aMenu "..." * The following method would be called regardless of the shift state: myGeneralMessageListMenuAdditiontTo: aMenu "..." * The following method would be called regardless of the shift state, but with the shift state as additional argument: myGeneralMessageListMenuAdditiontTo: aMenu shifted: aBoolean aBoolean ifTrue: ["..."]. "..." * Menu priorities (optional) Menu-building methods are typically sorted by selector name first and inheritance order second (for example, `StringHolder` before `Browser`, but `Browser>>#aMenu:` before `StringHolder>>#bMenu:`). It is optionally possible to influence the menu ordering by including an annotation/pragma `` defining a numeric priority that takes precedence over the default ordering. **The higher the number, the later it comes.** The following menu-building method would hence be sorted rather late in the menu. myMessageListMenuAdditiontTo: aMenu "..." If no priority is given, 500 is assumed. Appendix: Affected Menus ------------------------ _Note:_ For evey menu identifier in this list, a second exists with 'Shifted:' appended to make it easy for tool exteders. - StringHolder 1. code pane menu (codePaneMenu) - CodeHolder - Browser 1. class list menu (classListMenu) 2. message category menu (messageCategoryMenu) 3. message list menu (messageListMenu) 4. class/system category menu (systemCategoryMenu) - PackagePaneBrowser 1. package list menu (packageListMenu) - FileContentsBrowser 1. class list menu (fileClassListMenu) 2. message category menu (fileMessageCategoryMenu) 3. message list menu (fileMessageListMenu) 4. package list menu (filePackageListMenu) - ChangeList 1. change list menu (changeListMenu) - VersionsBrowser 1. versions menu (versionsMenu) - ChangeSorter 1. change set menu (changeSetMenu) 2. class list menu (classListMenu) 3. message list menu (messageListMenu) - Debugger 1. stack menu (contextStackMenu) - MessageSet 1. message list menu (messageListMenu) - MessageNames 1. selectors menu (selectorListMenu) - Lexicon 1. category menu (categoryListMenu) - FileList 1. contents pane menu (fileContentsMenu) 2. files menu (fileListMenu) 3. directory menu (volumeMenu) - Inspector 1. fields menu (fieldListMenu) - SelectorBrowser 1. selector list menu (selectorListMenu) =============== Diff against Tools-topa.555 =============== Item was changed: ----- Method: Browser>>classListMenu: (in category 'class functions') ----- classListMenu: aMenu + "Conveniently fit for backward compatibility with old browers stored in image segments" + + aMenu addList: #( + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('show hierarchy' hierarchy) + ('show definition' editClass) + ('show comment' editComment) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('rename class ...' renameClass) + ('copy class' copyClass) + ('remove class (x)' removeClass) + - + ('find method...' findMethod) + - + ('more...' offerShiftedClassListMenu)). + ^ aMenu + ! - "For backward compatibility with old browers stored in image segments" - - ^ self classListMenu: aMenu shifted: false! Item was changed: ----- Method: Browser>>classListMenu:shifted: (in category 'class functions') ----- classListMenu: aMenu shifted: shifted "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted. - self - menuHook: aMenu - named: #classListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue:[^ self shiftedClassListMenu: aMenu]. - aMenu addList: #( - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('show hierarchy' hierarchy) - ('show definition' editClass) - ('show comment' editComment) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('rename class ...' renameClass) - ('copy class' copyClass) - ('remove class (x)' removeClass) - - - ('find method...' findMethod) - - - ('more...' offerShiftedClassListMenu)). - ^ aMenu ! Item was added: + ----- Method: Browser>>classListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + classListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #classListMenu shifted: aBoolean. + ! Item was removed: - ----- Method: Browser>>codePaneMenu:shifted: (in category 'code pane') ----- - codePaneMenu: aMenu shifted: shifted - self - menuHook: aMenu - named: #codePaneMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^super codePaneMenu: aMenu shifted: shifted.! Item was added: + ----- Method: Browser>>mainMessageCategoryMenu: (in category 'message category functions') ----- + mainMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('browse' buildMessageCategoryBrowser) + ('print out' printOutMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + ('alphabetize' alphabetizeMessageCategories) + ('remove empty categories' removeEmptyCategories) + ('categorize all uncategorized' categorizeAllUncategorizedMethods) + ('new category...' addCategory) + - + ('rename...' renameCategory) + ('remove' removeMessageCategory)); + yourself + ! Item was added: + ----- Method: Browser>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + + ^ aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)); + yourself + ! Item was added: + ----- Method: Browser>>mainSystemCategoryMenu: (in category 'system category functions') ----- + mainSystemCategoryMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + ('back... (b)' recent) + - + ('browse all' browseAllClasses) + ('browse' buildSystemCategoryBrowser) + - + ('printOut' printOutSystemCategory) + ('fileOut' fileOutSystemCategory) + - + ('reorganize' editSystemCategories) + ('alphabetize' alphabetizeSystemCategories) + - + ('update' updateSystemCategories) + ('add item...' addSystemCategory) + ('rename...' renameSystemCategory) + ('remove' removeSystemCategory)); + yourself + ! Item was changed: ----- Method: Browser>>messageCategoryMenu: (in category 'message category functions') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(messageCategoryMenu messageCategoryMenuShifted:) - self - menuHook: aMenu - named: #messageCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^ aMenu labels: - 'browse - printOut - fileOut - reorganize - alphabetize - remove empty categories - categorize all uncategorized - new category... - rename... - remove' - lines: #(3 8) - selections: - #(buildMessageCategoryBrowser printOutMessageCategories fileOutMessageCategories - editMessageCategories alphabetizeMessageCategories removeEmptyCategories - categorizeAllUncategorizedMethods addCategory renameCategory removeMessageCategory) ! Item was added: + ----- Method: Browser>>messageCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: Browser>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>shiftedClassListMenu: (in category 'class functions') ----- shiftedClassListMenu: aMenu + "Set up the menu to apply to the receiver's class list when the shift key is down" ^ aMenu addList: #( - ('unsent methods' browseUnusedMethods 'browse all methods defined by this class that have no senders') ('unreferenced inst vars' showUnreferencedInstVars 'show a list of all instance variables that are not referenced in methods') ('unreferenced class vars' showUnreferencedClassVars 'show a list of all class variables that are not referenced in methods') ('subclass template' makeNewSubclass 'put a template into the code pane for defining of a subclass of this class') - ('sample instance' makeSampleInstance 'give me a sample instance of this class, if possible') ('inspect instances' inspectInstances 'open an inspector on all the extant instances of this class') ('inspect subinstances' inspectSubInstances 'open an inspector on all the extant instances of this class and of all of its subclasses') - ('add all meths to current chgs' addAllMethodsToCurrentChangeSet 'place all the methods defined by this class into the current change set') ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them') - ('more...' offerUnshiftedClassListMenu 'return to the standard class-list menu'))! Item was changed: ----- Method: Browser>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu + "Fill aMenu with the items appropriate when the shift key is held down" aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: Browser>>systemCategoryMenu: (in category 'system category functions') ----- systemCategoryMenu: aMenu + ^ self menu: aMenu for: #(systemCategoryMenu systemCategoryMenuShifted:) + ! - self - menuHook: aMenu - named: #systemCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - - ^ aMenu labels: - 'find class... (f) - back... (b) - browse all - browse - printOut - fileOut - reorganize - alphabetize - update - add item... - rename... - remove' - lines: #(2 4 6 8) - selections: - #(findClass recent browseAllClasses buildSystemCategoryBrowser - printOutSystemCategory fileOutSystemCategory - editSystemCategories alphabetizeSystemCategories updateSystemCategories - addSystemCategory renameSystemCategory removeSystemCategory )! Item was added: + ----- Method: Browser>>systemCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + systemCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #systemCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: ChangeList>>changeListMenu: (in category 'menu actions') ----- changeListMenu: aMenu + ^ self menu: aMenu for: #(changeListMenu changeListMenuShifted) - "Fill aMenu up so that it comprises the primary changelist-browser menu" - - aMenu addTitle: 'change list'. - aMenu addStayUpItemSpecial. - - aMenu addList: #( - - ('fileIn selections' fileInSelections 'import the selected items into the image') - ('fileOut selections... ' fileOutSelections 'create a new file containing the selected items') - - - ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) - ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') - - - ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') - ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') - ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') - - - ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') - ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') - ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') - ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') - - - - ('select all (a)' selectAll 'select all the items in the list') - ('deselect all' deselectAll 'deselect all the items in the list') - ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') - - - ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') - ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') - ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') - ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') - - - ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') - ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') - ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') - ('remove selected items' removeSelections 'remove the selected items from the change-list') - ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). - - ^ aMenu - ! Item was added: + ----- Method: ChangeList>>mainChangeListMenu: (in category 'menu actions') ----- + mainChangeListMenu: aMenu + "Fill aMenu up so that it comprises the primary changelist-browser menu" + + + aMenu addTitle: 'change list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + + ('fileIn selections' fileInSelections 'import the selected items into the image') + ('fileOut selections...' fileOutSelections 'create a new file containing the selected items') + - + ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) + ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') + - + ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') + ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') + ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') + - + ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') + ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') + ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') + ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') + + - + ('select all (a)' selectAll 'select all the items in the list') + ('deselect all' deselectAll 'deselect all the items in the list') + ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') + - + ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') + ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') + ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') + ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') + - + ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') + ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') + ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') + ('remove selected items' removeSelections 'remove the selected items from the change-list') + ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). + + ^ aMenu + + ! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForDropInClassCats: (in category 'menu') ----- + changeSetMenuForDropInClassCats: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForModification: (in category 'menu') ----- + changeSetMenuForModification: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForOpposite: (in category 'menu') ----- + changeSetMenuForOpposite: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForPromote: (in category 'menu') ----- + changeSetMenuForPromote: aMenu + + ^ aMenu! Item was removed: - ----- Method: ChangeSetBrowser>>shiftedChangeSetMenu: (in category 'menu') ----- - shiftedChangeSetMenu: aMenu - "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" - - aMenu title: 'Change set (shifted)'. - aMenu addStayUpItemSpecial. - aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in at least one other change set.'. - - aMenu addLine. - aMenu add: 'check for slips' action: #lookForSlips. - aMenu balloonTextForLastItem: - 'Check this change set for halts and references to Transcript.'. - - aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. - aMenu balloonTextForLastItem: - 'Check this change set for messages that are not sent anywhere in the system'. - - aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. - aMenu balloonTextForLastItem: - 'Check this change set for methods that do not have comments'. - - aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. - aMenu balloonTextForLastItem: - 'Check for classes with code in this changeset which lack class comments'. - - - Utilities authorInitialsPerSe isEmptyOrNil ifFalse: - [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. - - aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods any of whose previous authoring stamps do not start with "', Utilities authorInitials, '"']. - - aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. - aMenu balloonTextForLastItem: - 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. - aMenu addLine. - - aMenu add: 'inspect change set' action: #inspectChangeSet. - aMenu balloonTextForLastItem: - 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. - - aMenu add: 'update' action: #update. - aMenu balloonTextForLastItem: - 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. - - aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. - aMenu balloonTextForLastItem: - 'If this change set is currently associated with a Project, go to that project right now.'. - - aMenu add: 'trim history' action: #trimHistory. - aMenu balloonTextForLastItem: - ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. - - aMenu add: 'clear this change set' action: #clearChangeSet. - aMenu balloonTextForLastItem: - 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. - aMenu add: 'expunge uniclasses' action: #expungeUniclasses. - aMenu balloonTextForLastItem: - 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. - - aMenu add: 'uninstall this change set' action: #uninstallChangeSet. - aMenu balloonTextForLastItem: - 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. - - aMenu addLine. - - aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. - aMenu balloonTextForLastItem: - 'Takes you back to the primary change-set menu.'. - - ^ aMenu! Item was changed: ----- Method: ChangeSorter>>changeSetMenu:shifted: (in category 'changeSet menu') ----- changeSetMenu: aMenu shifted: isShifted - "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + ^ self menu: aMenu for: #( changeSetMenu changeSetMenuShifted: ) shifted: isShifted + ! - isShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu]. - Smalltalk isMorphic - ifTrue: - [aMenu title: 'Change Set'] - ifFalse: - [aMenu title: 'Change Set: - ' , myChangeSet name]. - aMenu addStayUpItemSpecial. - - aMenu add: 'make changes go to me (m)' action: #newCurrent. - aMenu addLine. - aMenu add: 'new change set... (n)' action: #newSet. - aMenu add: 'find...(f)' action: #findCngSet. - aMenu add: 'select change set...' action: #chooseCngSet. - aMenu addLine. - aMenu add: 'rename change set (r)' action: #rename. - aMenu add: 'file out (o)' action: #fileOut. - aMenu add: 'mail to list' action: #mailOut. - aMenu add: 'browse methods (b)' action: #browseChangeSet. - aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. - aMenu addLine. - parent - ifNotNil: - [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. - aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. - aMenu add: 'subtract other side (-)' action: #subtractOtherSide. - aMenu addLine]. - myChangeSet hasPreamble - ifTrue: - [aMenu add: 'edit preamble (p)' action: #addPreamble. - aMenu add: 'remove preamble' action: #removePreamble] - ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. - myChangeSet hasPostscript - ifTrue: - [aMenu add: 'edit postscript...' action: #editPostscript. - aMenu add: 'remove postscript' action: #removePostscript] - ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. - aMenu addLine. - - aMenu add: 'destroy change set (x)' action: #remove. - aMenu addLine. - aMenu add: 'more...' action: #offerShiftedChangeSetMenu. - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForDropInClassCats: (in category 'changeSet menu') ----- + changeSetMenuForDropInClassCats: aMenu + + aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. + aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. + + ^ aMenu + ! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForModification: (in category 'changeSet menu') ----- + changeSetMenuForModification: aMenu + + aMenu addLine. + + aMenu add: 'file into new...' action: #fileIntoNewChangeSet. + aMenu balloonTextForLastItem: + 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. + + aMenu add: 'reorder all change sets' action: #reorderChangeSets. + aMenu balloonTextForLastItem: + 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. + + + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForOpposite: (in category 'changeSet menu') ----- + changeSetMenuForOpposite: aMenu + + parent ifNotNil: + [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. + aMenu balloonTextForLastItem: + 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForPromote: (in category 'changeSet menu') ----- + changeSetMenuForPromote: aMenu + + aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. + aMenu balloonTextForLastItem: + 'Make this change set appear first in change-set lists in all change sorters.'. + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>classListMenu:shifted: (in category 'class list') ----- classListMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the class list" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted + ! - - aMenu title: 'class list'. - aMenu addStayUpItemSpecial. - (parent notNil and: [shifted not]) - ifTrue: [aMenu addList: #( "These two only apply to dual change sorters" - ('copy class chgs to other side' copyClassToOther) - ('move class chgs to other side' moveClassToOther))]. - - aMenu addList: (shifted - ifFalse: [#( - - - ('delete class from change set (d)' forgetClass) - ('remove class from system (x)' removeClass) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('more...' offerShiftedClassListMenu))] - - ifTrue: [#( - - - ('unsent methods' browseUnusedMethods) - ('unreferenced inst vars' showUnreferencedInstVars) - ('unreferenced class vars' showUnreferencedClassVars) - - - ('sample instance' makeSampleInstance) - ('inspect instances' inspectInstances) - ('inspect subinstances' inspectSubInstances) - - - ('more...' offerUnshiftedClassListMenu ))]). - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>mainClassListMenu: (in category 'class list') ----- + mainClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + parent ifNotNil: [ + aMenu addList: #( "These two only apply to dual change sorters" + ('copy class chgs to other side' copyClassToOther) + ('move class chgs to other side' moveClassToOther))]. + + aMenu addList: #( + - + ('delete class from change set (d)' forgetClass) + ('remove class from system (x)' removeClass) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('more...' offerShiftedClassListMenu)). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>messageMenu:shifted: (in category 'message list') ----- messageMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted! - shifted ifTrue: [^ self shiftedMessageMenu: aMenu]. - - aMenu title: 'message list'. - aMenu addStayUpItemSpecial. - - parent ifNotNil: - [aMenu addList: #( - ('copy method to other side' copyMethodToOther) - ('move method to other side' moveMethodToOther))]. - - aMenu addList: #( - ('delete method from changeSet (d)' forget) - - - ('remove method from system (x)' removeMessage) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu - ! Item was changed: ----- Method: ChangeSorter>>shiftedChangeSetMenu: (in category 'changeSet menu') ----- shiftedChangeSetMenu: aMenu "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" + + aMenu title: 'Change set (shifted)'. aMenu addStayUpItemSpecial. "CONFLICTS SECTION" aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. aMenu balloonTextForLastItem: 'Browse all methods that occur both in this change set and in at least one other change set.'. + self changeSetMenuForOpposite: aMenu. - parent ifNotNil: - [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. aMenu addLine. "CHECKS SECTION" aMenu add: 'check for slips' action: #lookForSlips. aMenu balloonTextForLastItem: 'Check this change set for halts and references to Transcript.'. aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. aMenu balloonTextForLastItem: 'Check this change set for messages that are not sent anywhere in the system'. aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. aMenu balloonTextForLastItem: 'Check this change set for methods that do not have comments'. aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. aMenu balloonTextForLastItem: 'Check for classes with code in this changeset which lack class comments'. Utilities authorInitialsPerSe isEmptyOrNil ifFalse: [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods any of whose authoring stamps do not start with "', Utilities authorInitials, '"']. aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. aMenu balloonTextForLastItem: 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. aMenu addLine. aMenu add: 'inspect change set' action: #inspectChangeSet. aMenu balloonTextForLastItem: 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. aMenu add: 'update' action: #update. aMenu balloonTextForLastItem: 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. aMenu balloonTextForLastItem: 'If this change set is currently associated with a Project, go to that project right now.'. + self changeSetMenuForPromote: aMenu. - aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. - aMenu balloonTextForLastItem: - 'Make this change set appear first in change-set lists in all change sorters.'. aMenu add: 'trim history' action: #trimHistory. aMenu balloonTextForLastItem: ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. + self changeSetMenuForDropInClassCats: aMenu. + - aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. - aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. - aMenu add: 'clear this change set' action: #clearChangeSet. aMenu balloonTextForLastItem: 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. aMenu add: 'expunge uniclasses' action: #expungeUniclasses. aMenu balloonTextForLastItem: 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. aMenu add: 'uninstall this change set' action: #uninstallChangeSet. aMenu balloonTextForLastItem: 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. + self changeSetMenuForModification: aMenu. - aMenu addLine. - aMenu add: 'file into new...' action: #fileIntoNewChangeSet. - aMenu balloonTextForLastItem: - 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. - aMenu add: 'reorder all change sets' action: #reorderChangeSets. - aMenu balloonTextForLastItem: - 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. - aMenu addLine. aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. aMenu balloonTextForLastItem: 'Takes you back to the primary change-set menu.'. ^ aMenu! Item was added: + ----- Method: ChangeSorter>>shiftedClassListMenu: (in category 'class list') ----- + shiftedClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + - + ('unsent methods' browseUnusedMethods) + ('unreferenced inst vars' showUnreferencedInstVars) + ('unreferenced class vars' showUnreferencedClassVars) + - + ('sample instance' makeSampleInstance) + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('more...' offerUnshiftedClassListMenu )). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>shiftedMessageMenu: (in category 'message list') ----- shiftedMessageMenu: aMenu "Arm the menu so that it holds items appropriate to the message-list while the shift key is down. Answer the menu." + - ^ aMenu addList: #( - ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) ('change category...' changeCategory) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances) - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) + ('revert & remove from changes' revertAndForget)); + yourself + ! - ('revert & remove from changes' revertAndForget) - - - ('more...' unshiftedYellowButtonActivity))! Item was added: + ----- Method: ChangeSorter>>unshiftedChangeSetMenu: (in category 'changeSet menu') ----- + unshiftedChangeSetMenu: aMenu + "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + + Smalltalk isMorphic + ifTrue: + [aMenu title: 'Change Set'] + ifFalse: + [aMenu title: 'Change Set: + ' , myChangeSet name]. + aMenu addStayUpItemSpecial. + + aMenu add: 'make changes go to me (m)' action: #newCurrent. + aMenu addLine. + aMenu add: 'new change set... (n)' action: #newSet. + aMenu add: 'find...(f)' action: #findCngSet. + aMenu add: 'select change set...' action: #chooseCngSet. + aMenu addLine. + aMenu add: 'rename change set (r)' action: #rename. + aMenu add: 'file out (o)' action: #fileOut. + aMenu add: 'mail to list' action: #mailOut. + aMenu add: 'browse methods (b)' action: #browseChangeSet. + aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. + aMenu addLine. + parent + ifNotNil: + [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. + aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. + aMenu add: 'subtract other side (-)' action: #subtractOtherSide. + aMenu addLine]. + myChangeSet hasPreamble + ifTrue: + [aMenu add: 'edit preamble (p)' action: #addPreamble. + aMenu add: 'remove preamble' action: #removePreamble] + ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. + myChangeSet hasPostscript + ifTrue: + [aMenu add: 'edit postscript...' action: #editPostscript. + aMenu add: 'remove postscript' action: #removePostscript] + ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. + aMenu addLine. + + aMenu add: 'destroy change set (x)' action: #remove. + aMenu addLine. + aMenu add: 'more...' action: #offerShiftedChangeSetMenu. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>unshiftedMessageMenu: (in category 'message list') ----- + unshiftedMessageMenu: aMenu + "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + + + + aMenu title: 'message list'. + aMenu addStayUpItemSpecial. + + parent ifNotNil: + [aMenu addList: #( + ('copy method to other side' copyMethodToOther) + ('move method to other side' moveMethodToOther))]. + + aMenu addList: #( + ('delete method from changeSet (d)' forget) + - + ('remove method from system (x)' removeMessage) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions)). + ^ aMenu + ! Item was added: + ----- Method: ClassCommentVersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version')); + yourself + ! Item was removed: - ----- Method: ClassCommentVersionsBrowser>>versionsMenu: (in category 'menu') ----- - versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" - - aMenu title: 'versions'. - aMenu addStayUpItemSpecial. - ^ aMenu addList: #( - - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')) - ! Item was added: + ----- Method: CodeHolder>>messageListMenuMore: (in category 'message list menu') ----- + messageListMenuMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: CodeHolder>>shiftedMessageListMore: (in category 'message list menu') ----- + shiftedMessageListMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' unshiftedYellowButtonActivity)); + yourself + ! Item was removed: - ----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') ----- - codePaneMenu: aMenu shifted: shifted - aMenu - add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; - add: 'run until...' target: self selector: #runUntil; - addLine. - super codePaneMenu: aMenu shifted: shifted. - ^aMenu. - ! Item was changed: ----- Method: Debugger>>contextStackMenu:shifted: (in category 'context stack menu') ----- contextStackMenu: aMenu shifted: shifted "Set up the menu appropriately for the context-stack-list, either shifted or unshifted as per the parameter provided" + ^ self menu: aMenu for: #(contextStackMenu contextStackMenuShifted:) shifted: shifted + ! - ^ shifted ifFalse:[ - aMenu addList: { - {'fullStack (f)'. #fullStack}. - {'restart (r)'. #restart}. - {'proceed (p)'. #proceed}. - {'step (t)'. #doStep}. - {'step through (T)'. #stepIntoBlock}. - {'send (e)'. #send}. - {'where (w)'. #where}. - {'peel to first like this'. #peelToFirst}. - #-. - {'return entered value'. #returnValue}. - #-. - {'toggle break on entry'. #toggleBreakOnEntry}. - {'senders of... (n)'. #browseSendersOfMessages}. - {'implementors of... (m)'. #browseMessages}. - {'inheritance (i)'. #methodHierarchy}. - #-. - {'versions (v)'. #browseVersions}. - #-. - {'references... (r)'. #browseVariableReferences}. - {'assignments... (a)'. #browseVariableAssignments}. - #-. - {'class refs (N)'. #browseClassRefs}. - {'browse full (b)'. #browseMethodFull}. - {'file out '. #fileOutMessage}. - #-. - {'mail out bug report'. #mailOutBugReport}. - {'more...'. #shiftedYellowButtonActivity}. - }. - ] ifTrue: [ - aMenu addList: { - {'browse class hierarchy'. #classHierarchy}. - {'browse class'. #browseClass}. - {'browse method (O)'. #openSingleMessageBrowser}. - {'implementors of sent messages'. #browseAllMessages}. - {'change sets with this method'. #findMethodInChangeSets}. - #-. - {'inspect instances'. #inspectInstances}. - {'inspect subinstances'. #inspectSubInstances}. - #-. - {'revert to previous version'. #revertToPreviousVersion}. - {'remove from current change set'. #removeFromCurrentChanges}. - {'revert & remove from changes'. #revertAndForget}. - #-. - {'more...'. #unshiftedYellowButtonActivity}. - } - ].! Item was added: + ----- Method: Debugger>>debuggerCodePaneMenu: (in category 'code pane menu') ----- + debuggerCodePaneMenu: aMenu + + + ^ aMenu + add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; + add: 'run until...' target: self selector: #runUntil; + addLine; + yourself + ! Item was added: + ----- Method: Debugger>>mainContextStackMenu: (in category 'context stack menu') ----- + mainContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, unshifted" + + ^ aMenu addList: #( + ('fullStack (f)' fullStack) + ('restart (r)' restart) + ('proceed (p)' proceed) + ('step (t)' doStep) + ('step through (T)' stepIntoBlock) + ('send (e)' send) + ('where (w)' where) + ('peel to first like this' peelToFirst) + - + ('return entered value' returnValue) + - + ('toggle break on entry' toggleBreakOnEntry) + ('senders of (n)' browseSendersOfMessages) + ('implementors of (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + - + ('versions (v)' browseVersions) + - + ('references (r)' browseVariableReferences) + ('assignments (a)' browseVariableAssignments) + - + ('class refs (N)' browseClassRefs) + ('browse full (b)' browseMethodFull) + ('file out ' fileOutMessage) + - + ('mail out bug report' mailOutBugReport)); + yourself + ! Item was added: + ----- Method: Debugger>>shiftedContextStackMenu: (in category 'context stack menu') ----- + shiftedContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, shifted" + + ^ aMenu addList: #( + ('browse class hierarchy' classHierarchy) + ('browse class' browseClass) + ('browse method (O)' openSingleMessageBrowser) + ('implementors of sent messages' browseAllMessages) + ('change sets with this method' findMethodInChangeSets) + - + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('revert to previous version' revertToPreviousVersion) + ('remove from current change set' removeFromCurrentChanges) + ('revert & remove from changes' revertAndForget)); + yourself + ! Item was removed: - ----- Method: DictionaryInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - inspect key - copy name - references - objects pointing to this value - senders of this key - refresh view - add key - rename key - remove - basic inspect' - lines: #(6 9) - selections: #(inspectSelection inspectKey copyName selectionReferences objectReferencesToSelection sendersOfSelectedKey refreshView addEntry renameEntry removeSelection inspectBasic) - ! Item was added: + ----- Method: DictionaryInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu addList: #( + ('inspect' inspectSelection) + ('inspect key' inspectKey) + ('copy name' copyName) + ('references' selectionReferences) + ('objects pointing to this value' objectReferencesToSelection) + ('senders of this key' sendersOfSelectedKey) + - + ('refresh view' refreshView) + ('add key' addEntry) + ('rename key' renameEntry) + - + ('remove' removeSelection) + ('basifc inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCatListSingletonWith: (in category 'toolbuilder') ----- buildSystemCatListSingletonWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategorySingleton; getIndex: #indexIsOne; setIndex: #indexIsOne:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCategoryListWith: (in category 'toolbuilder') ----- buildSystemCategoryListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategoryList; getIndex: #systemCategoryListIndex; setIndex: #systemCategoryListIndex:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was removed: - ----- Method: FileContentsBrowser>>classListMenu: (in category 'menus') ----- - classListMenu: aMenu - - ^ aMenu - labels: - 'definition - comment - browse full (b) - class refs (N) - fileIn - fileOut - rename... - remove - remove existing' - lines: #(2 4 6 8) - selections: #(editClass editComment browseMethodFull browseClassRefs fileInClass fileOutClass renameClass removeClass removeUnmodifiedCategories) - - ! Item was changed: ----- Method: FileContentsBrowser>>classListMenu:shifted: (in category 'menus') ----- + classListMenu: aMenu shifted: aBool - classListMenu: aMenu shifted: ignored - "Answer the class list menu, ignoring the state of the shift key in this case" + ^ self menu: aMenu for: #(fileClassListMenu fileClassListMenuShifted:) shifted: aBool + ! - ^ self classListMenu: aMenu! Item was added: + ----- Method: FileContentsBrowser>>fileClassListMenu: (in category 'menus') ----- + fileClassListMenu: aMenu + "Answer the class list menu, ignoring the state of the shift key in this case" + + aMenu addList: #( + ('definition' editClass) + ('comment' editComment) + - + ('browse full (b)' browseMethodFull) + ('class refs (N)' browseClassRefs) + - + ('fileIn' fileInClass) + ('fileOut' fileOutClass) + - + ('rename...' renameClass) + ('remove' removeClass) + ('remove existing' removeUnmodifiedCategories)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageCategoryMenu: (in category 'menus') ----- + fileMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('file in' fileInMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + - + ('add item...' addCategory) + ('rename...' renameCategory) + ('remove' removeMessageCategory) + - + ('remove existing' removeUnmodifiedMethods)); + yourself + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageListMenu: (in category 'menus') ----- + fileMessageListMenu: aMenu + + aMenu addList: #( + ('fileIn' fileInMessage) + ('fileOut' fileOutMessage) + - + ('senders (n)' browseSenders) + ('implementors (m)' browseImplementors) + ('method inheritance (h)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('remove' removeMessage)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>filePackageListMenu: (in category 'menus') ----- + filePackageListMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + - + ('file in' fileInPackage) + ('file into new changeset' fileIntoNewChangeSet) + ('file out' fileOutPackage) + - + ('remove' removePackage) + - + ('remove existing' removeUnmodifiedClasses)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>messageCategoryMenu: (in category 'menus') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(fileMessageCategoryMenu fileMessageCategoryMenuShifted:) + ! - - ^ aMenu - labels: - 'fileIn - fileOut - reorganize - add item... - rename... - remove - remove existing' - lines: #(2 3 6) - selections: #(fileInMessageCategories fileOutMessageCategories editMessageCategories addCategory renameCategory removeMessageCategory removeUnmodifiedMethods)! Item was changed: ----- Method: FileContentsBrowser>>messageListMenu:shifted: (in category 'menus') ----- messageListMenu: aMenu shifted: aBool + ^ self menu: aMenu for: #(fileMessageListMenu fileMessageListMenuShifted:) shifted: aBool - ^ aMenu - labels: - 'fileIn - fileOut - senders (n) - implementors (m) - method inheritance (h) - versions (v) - remove' - lines: #(2 6) - selections: #(fileInMessage fileOutMessage - browseSenders browseImplementors methodHierarchy browseVersions - removeMessage). ! Item was removed: - ----- Method: FileContentsBrowser>>packageListMenu: (in category 'menus') ----- - packageListMenu: aMenu - ^ aMenu - labels: - 'find class... (f) - fileIn - file into new changeset - fileOut - remove - remove existing' - lines: #(1 4 5) - selections: #(findClass fileInPackage fileIntoNewChangeSet fileOutPackage removePackage removeUnmodifiedClasses)! Item was added: + ----- Method: FileContentsBrowser>>packageListMenu:shifted: (in category 'menus') ----- + packageListMenu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(filePackageListMenu filePackageListMenuShifted:) shifted: shifted + ! Item was changed: ----- Method: FileList>>fileContentsMenu:shifted: (in category 'file list menu') ----- fileContentsMenu: aMenu shifted: shifted "Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided" + ^ self menu: aMenu for: #(fileContentsMenu fileContentsMenuShifted:) shifted: shifted! - - | services maybeLine extraLines | - shifted ifTrue: - [^ aMenu addList: StringHolder shiftedYellowButtonMenuItems]. - fileName ifNotNil: - [services := OrderedCollection new. - (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: - [services add: self serviceGet]. - (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: - [services add: self serviceGetHex]. - (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: - [services add: self serviceGetEncodedText]. - maybeLine := services size. - (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: - [services addAll: - (self servicesFromSelectorSpecs: - #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. - - extraLines := OrderedCollection new. - maybeLine > 0 ifTrue: [extraLines add: maybeLine]. - services size > maybeLine ifTrue: [extraLines add: services size]. - aMenu - addServices: services - for: self - extraLines: extraLines]. - - aMenu addList: { - {'find...(f)' translated. #find}. - {'find again (g)' translated. #findAgain}. - {'set search string (h)' translated. #setSearchString}. - #-. - {'do again (j)' translated. #again}. - {'undo (z)' translated. #undo}. - #-. - {'copy (c)' translated. #copySelection}. - {'cut (x)' translated. #cut}. - {'paste (v)' translated. #paste}. - {'paste...' translated. #pasteRecent}. - #-. - {'do it (d)' translated. #doIt}. - {'print it (p)' translated. #printIt}. - {'inspect it (i)' translated. #inspectIt}. - {'fileIn selection (G)' translated. #fileItIn}. - #-. - {'accept (s)' translated. #accept}. - {'cancel (l)' translated. #cancel}. - #-. - {'more...' translated. #shiftedYellowButtonActivity}}. - - - ^ aMenu - ! Item was changed: ----- Method: FileList>>fileListMenu: (in category 'file list menu') ----- fileListMenu: aMenu + ^ self menu: aMenu for: #(fileListMenu fileListMenuShifted:) - - fileName - ifNil: [^ self noFileSelectedMenu: aMenu] - ifNotNil: [^ self fileSelectedMenu: aMenu]. ! Item was added: + ----- Method: FileList>>mainFileContentsMenu: (in category 'file list menu') ----- + mainFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + ^ aMenu addTranslatedList: #( + ('find...(f)' find) + ('find again (g)' findAgain) + ('set search string (h)' setSearchString) + - + ('do again (j)' again) + ('undo (z)' undo) + - + ('copy (c)' copySelection) + ('cut (x)' cut) + ('paste (v)' paste) + ('paste...' pasteRecent) + - + ('do it (d)' doIt) + ('print it (p)' printIt) + ('inspect it (i)' inspectIt) + ('fileIn selection (G)' fileItIn) + - + ('accept (s)' accept) + ('cancel (l)' cancel) + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: FileList>>mainFileListMenu: (in category 'file list menu') ----- + mainFileListMenu: aMenu + + fileName + ifNil: [^ self noFileSelectedMenu: aMenu] + ifNotNil: [^ self fileSelectedMenu: aMenu]. + ! Item was added: + ----- Method: FileList>>mainVolumeMenu: (in category 'volume menu') ----- + mainVolumeMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('recent...' recentDirs) + - + ('add server...' askServerInfo) + ('remove server...' removeServer) + - + ('delete directory...' deleteDirectory) + -); + yourself! Item was added: + ----- Method: FileList>>servicesFileContentsMenu: (in category 'file list menu') ----- + servicesFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + + fileName ifNotNil: [| services maybeLine extraLines | + services := OrderedCollection new. + (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: + [services add: self serviceGet]. + (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: + [services add: self serviceGetHex]. + (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: + [services add: self serviceGetEncodedText]. + maybeLine := services size. + (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: + [services addAll: + (self servicesFromSelectorSpecs: + #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. + + extraLines := OrderedCollection new. + maybeLine > 0 ifTrue: [extraLines add: maybeLine]. + services size > maybeLine ifTrue: [extraLines add: services size]. + aMenu + addServices: services + for: self + extraLines: extraLines]. + ^ aMenu + ! Item was added: + ----- Method: FileList>>servicesVolumeMenu: (in category 'volume menu') ----- + servicesVolumeMenu: aMenu + + aMenu + addServices: (self itemsForDirectory: self directory) + for: self + extraLines: #(). + ^aMenu.! Item was added: + ----- Method: FileList>>shiftedFileContentsMenu: (in category 'file list menu') ----- + shiftedFileContentsMenu: aMenu + "Delegate the shifted menu to the default shifted menu" + + ^ aMenu addList: self class shiftedYellowButtonMenuItems; yourself + ! Item was changed: ----- Method: FileList>>volumeMenu: (in category 'volume menu') ----- volumeMenu: aMenu + ^ self menu: aMenu for: #(volumeMenu volumeMenuShifted:) + ! - aMenu addList: { - {'recent...' translated. #recentDirs}. - #-. - {'add server...' translated. #askServerInfo}. - {'remove server...' translated. #removeServer}. - #-. - {'delete directory...' translated. #deleteDirectory}. - #-}. - aMenu - addServices: (self itemsForDirectory: self directory) - for: self - extraLines: #(). - ^aMenu.! Item was changed: ----- Method: Inspector>>fieldListMenu: (in category 'menu commands') ----- fieldListMenu: aMenu "Arm the supplied menu with items for the field-list of the receiver" + ^ self menu: aMenu for: #(fieldListMenu fieldListMenuShifted:) - - aMenu addStayUpItemSpecial. - - aMenu addList: #( - ('inspect (i)' inspectSelection) - ('explore (I)' exploreSelection)). - - self addCollectionItemsTo: aMenu. - - aMenu addList: #( - - - ('method refs to this inst var' referencesToSelection) - ('methods storing into this inst var' defsOfSelection) - ('objects pointing to this value' objectReferencesToSelection) - ('chase pointers' chasePointers) - ('explore pointers' explorePointers) - - - ('browse full (b)' browseMethodFull) - ('browse class' browseClass) - ('browse hierarchy (h)' classHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('copy name (c)' copyName) - ('basic inspect' inspectBasic)). - - Smalltalk isMorphic ifTrue: - [aMenu addList: #( - - - ('tile for this value (t)' tearOffTile) - ('viewer for this value (v)' viewerForValue))]. - - ^ aMenu - - - " - - ('alias for this value' aliasForValue) - ('watcher for this slot' watcherForSlot)" - ! Item was added: + ----- Method: Inspector>>mainFieldListMenu: (in category 'menu commands') ----- + mainFieldListMenu: aMenu + "Arm the supplied menu with items for the field-list of the receiver" + + "gets overriden by subclasses, _whithout_ the " + aMenu addStayUpItemSpecial. + + aMenu addList: #( + ('inspect (i)' inspectSelection) + ('explore (I)' exploreSelection)). + + self addCollectionItemsTo: aMenu. + + aMenu addList: #( + - + ('method refs to this inst var' referencesToSelection) + ('methods storing into this inst var' defsOfSelection) + ('objects pointing to this value' objectReferencesToSelection) + ('chase pointers' chasePointers) + ('explore pointers' explorePointers) + - + ('browse full (b)' browseMethodFull) + ('browse class' browseClass) + ('browse hierarchy (h)' classHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('copy name (c)' copyName) + ('basic inspect' inspectBasic)). + + Smalltalk isMorphic ifTrue: + [aMenu addList: #( + - + ('tile for this value (t)' tearOffTile) + ('viewer for this value (v)' viewerForValue))]. + + ^ aMenu + + + " - + ('alias for this value' aliasForValue) + ('watcher for this slot' watcherForSlot)" + + ! Item was added: + ----- Method: MessageNames>>mainSelectorListMenu: (in category 'selector list') ----- + mainSelectorListMenu: aMenu + "Answer the menu associated with the selectorList" + + aMenu addList: #( + ('senders (n)' browseSenders 'browse senders of the chosen selector') + ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') + - + ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). + + ^ aMenu! Item was changed: ----- Method: MessageNames>>selectorListMenu: (in category 'selector list') ----- selectorListMenu: aMenu "Answer the menu associated with the selectorList" + ^ self menu: aMenu for: #(selectorListMenu selectorListMenuShifted:) + ! - - aMenu addList: #( - ('senders (n)' browseSenders 'browse senders of the chosen selector') - ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') - - - ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). - - ^ aMenu! Item was added: + ----- Method: MessageSet>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + "Answer the message-list menu" + + aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)). + ^ aMenu! Item was changed: ----- Method: MessageSet>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: MessageSet>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: MessageSet>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu "Fill aMenu with the items appropriate when the shift key is held down" + aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: ObjectExplorer>>codePaneMenu:shifted: (in category 'menus') ----- codePaneMenu: aMenu shifted: shifted "Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items" + ^ StringHolder codePaneMenu: aMenu shifted: shifted - ^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted ! Item was added: + ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category 'package list') ----- + mainPackageMenu: aMenu + "Answer a Menu of operations on class packages to be + displayed when the operate menu button is pressed." + + ^aMenu addList: #( + ('find class...' findClass) + ('recent classes...' recent) + - + ('reorganize' editSystemCategories) + ('update' updatePackages)); + yourself. + ! Item was changed: ----- Method: PackagePaneBrowser>>packageMenu: (in category 'package list') ----- packageMenu: aMenu - "Answer a Menu of operations on class packages to be - displayed when the operate menu button is pressed." + ^ self menu: aMenu for: #(packageListMenu packageListMenuShifted:)! - ^aMenu - labels: 'find class...\recent classes...\reorganize\update' withCRs - lines: #(2) - selections: #(#findClass #recent #editSystemCategories #updatePackages)! Item was changed: ----- Method: PointerFinder>>menu:shifted: (in category 'pointer-list') ----- menu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(pointerListMenu pointerListMenuShifted:) shifted: shifted! - ^ aMenu - addList: #( - ('Inspect (i)' #inspectObject 'Live long and prosper!!') - - - ('Search again' #searchAgain 'Search again\for the same object' withCRs)); - yourself.! Item was added: + ----- Method: PointerFinder>>pointerListMenu: (in category 'pointer-list') ----- + pointerListMenu: aMenu + + + ^ aMenu + addList: #( + ('Inspect (i)' #inspectObject 'Live long and prosper!!') + - + ('Search again' #searchAgain 'Search again\for the same object' withCRs)); + yourself.! Item was removed: - ----- Method: RecentMessageSet>>messageListMenu:shifted: (in category 'message functions') ----- - messageListMenu: aMenu shifted: shifted - "Answer the message-list menu" - - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList:#( - ('what to show...' offerWhatToShowMenu) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut (o)' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('remove from RecentSubmissions' removeFromRecentSubmissions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: RecentMessageSet>>messageListMenuForRecentSubmission: (in category 'message functions') ----- + messageListMenuForRecentSubmission: aMenu + + aMenu addList:#( + ('remove from RecentSubmissions' removeFromRecentSubmissions)). + ^ aMenu! Item was added: + ----- Method: SelectorBrowser>>mainSelectorMenu: (in category 'selector list') ----- + mainSelectorMenu: aMenu + + + ^ aMenu addList: #( + ('senders (n)' senders) + ('implementors (m)' implementors) + ('copy selector to clipboard' copyName)); + yourself + ! Item was changed: ----- Method: SelectorBrowser>>selectorMenu: (in category 'selector list') ----- selectorMenu: aMenu + ^ self menu: aMenu for: #(selectorMenu selectorMenuShifted:) + ! - ^ aMenu labels: - 'senders (n) - implementors (m) - copy selector to clipboard' - lines: #() - selections: #(senders implementors copyName)! Item was removed: - ----- Method: SetInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - copy name - objects pointing to this value - refresh view - remove - basic inspect' - lines: #( 5 8) - selections: #(inspectSelection copyName objectReferencesToSelection update removeSelection inspectBasic) - ! Item was added: + ----- Method: SetInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu labels: #( + ('inspect' inspectSelection) + ('copy name' copyName) + ('objects pointing to this value' objectReferencesToSelection) + ('refresh view' update) + ('remove' removeSelection) + - + ('basic inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: StringHolder class>>open (in category '*Tools') ----- open ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace' + ! - "Not to be confused with our own class var 'Workspace'"! Item was added: + ----- Method: StringHolder>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- + buildMenu: aMenu withBuilders: builders shifted: aBoolean + " We let every builder modify the menu. + The builder should indicate whether to abort by returning nil." + | menu | + menu := aMenu. + builders do: [:builder | + menu := self perform: builder method selector withEnoughArguments: { aMenu . aBoolean }. + menu ifNil: [^ aMenu]]. + ^ menu + ! Item was changed: ----- Method: StringHolder>>codePaneMenu:shifted: (in category '*Tools-code pane menu') ----- codePaneMenu: aMenu shifted: shifted + ^ self menu: aMenu for: #(codePaneMenu codePaneMenuShifted:) shifted: shifted + ! - "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" - ^self class codePaneMenu: aMenu shifted: shifted! Item was added: + ----- Method: StringHolder>>codePaneMenuHook:shifted: (in category '*Tools-pluggable menus - hooks') ----- + codePaneMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #codePaneMenu shifted: aBoolean. + ! Item was added: + ----- Method: StringHolder>>mainCodePaneMenu:shifted: (in category '*Tools-code pane menu') ----- + mainCodePaneMenu: aMenu shifted: shifted + + "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" + ^ self class codePaneMenu: aMenu shifted: shifted. + ! Item was added: + ----- Method: StringHolder>>menu:for: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection + + ^ self menu: aMenu for: aMenuSymbolOrCollection shifted: false! Item was added: + ----- Method: StringHolder>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean + + | builders | + builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class. + builders := aBoolean + ifTrue: [builders reject: [:builder | builder arguments = #(false)]] + ifFalse: [builders reject: [:builder | builder arguments = #(true)]]. + + ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean + ! Item was added: + ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- + menuBuildersFor: someMenus in: aClass + "Find all builders and sort them by + 1. Priority (default 500) + 2. selector name + 3. inheritance + " + ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | + |ma mb pa pb| + ma := a method. + mb := b method. + pa := self methodMenuPriority: ma. + pb := self methodMenuPriority: mb. + pa < pb or: [ + pa = pb and: [ + ma selector <= mb selector and: [ + mb methodClass inheritsFrom: ma methodClass]]]] + ! Item was added: + ----- Method: StringHolder>>menuPragmasFor:in: (in category '*Tools-pluggable menus') ----- + menuPragmasFor: aMenuSymbolOrCollection in: aClass + + ^ aMenuSymbolOrCollection isCollection + ifTrue: [aMenuSymbolOrCollection gather: [:aMenuSymbol | + Pragma allNamed: aMenuSymbol from: aClass to: Object]] + ifFalse: [Pragma allNamed: aMenuSymbolOrCollection from: aClass to: Object]! Item was added: + ----- Method: StringHolder>>methodMenuPriority: (in category '*Tools-pluggable menus') ----- + methodMenuPriority: aMethod + "The pirority of a menu method indicated by a pragma. + Defaults to 500" + ^ (aMethod pragmas detect: [:p | p keyword == #menuPriority: ] ifNone: [^ 500]) + argumentAt: 1 + ! Item was added: + ----- Method: VersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + listIndex > 0 ifTrue:[ + (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. + "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" + aMenu addTranslatedList: #( + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') + ('fileOut selected version' fileOutSelection 'file out the selected version') )]. + ^ aMenu! Item was added: + ----- Method: VersionsBrowser>>mainVersionsMenu: (in category 'menu') ----- + mainVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + aMenu addTranslatedList: #( + ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') + ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') + ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') + - + ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') + ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') + - + ('senders (n)' browseSenders 'browse all senders of this selector') + ('implementors (m)' browseImplementors 'browse all implementors of this selector') + - + ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). + + ^aMenu! Item was added: + ----- Method: VersionsBrowser>>titleVersionsMenu: (in category 'menu') ----- + titleVersionsMenu: aMenu + "Add a menu title atop aMenu" + + + aMenu title: 'Versions' translated. + aMenu addStayUpItemSpecial. + ^ aMenu! Item was changed: ----- Method: VersionsBrowser>>versionsMenu: (in category 'menu') ----- versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" + ^ self menu: aMenu for: #(versionsMenu versionsMenuShifted:) + ! - aMenu title: 'Versions' translated. - aMenu addStayUpItemSpecial. - - listIndex > 0 ifTrue:[ - (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. - "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" - aMenu addTranslatedList: #( - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('fileOut selected version' fileOutSelection 'file out the selected version') )]. - - aMenu addTranslatedList: #( - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('senders (n)' browseSenders 'browse all senders of this selector') - ('implementors (m)' browseImplementors 'browse all implementors of this selector') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). - - ^aMenu! From commits at source.squeak.org Wed Mar 18 15:11:37 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 15:11:39 2015 Subject: [squeak-dev] The Inbox: Protocols-topa.48.mcz Message-ID: A new version of Protocols was added to project The Inbox: http://source.squeak.org/inbox/Protocols-topa.48.mcz ==================== Summary ==================== Name: Protocols-topa.48 Author: topa Time: 18 March 2015, 4:11:03.322 pm UUID: ea03703f-6b96-4212-bb99-bc4c3089ba9d Ancestors: Protocols-bf.47 Adapt to Pluggable menus (Tools-topa.556) =============== Diff against Protocols-bf.47 =============== Item was changed: ----- Method: Lexicon>>categoryListMenu:shifted: (in category 'category list') ----- categoryListMenu: aMenu shifted: aBoolean "Answer the menu for the category list" + ^ self menu: aMenu for: #(categoryListMenu categoryListMenuShifted:) shifted: aBoolean + ! - - ^ aMenu labels: 'find...(f)' lines: #() selections: #(obtainNewSearchString)! Item was added: + ----- Method: Lexicon>>mainCategoryListMenu: (in category 'category list') ----- + mainCategoryListMenu: aMenu + "Answer the menu for the category list" + + ^ aMenu addList: #('find...(f)' obtainNewSearchString); yourself! From Das.Linux at gmx.de Wed Mar 18 15:14:54 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Mar 18 15:14:58 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz Message-ID: Hi, On 18.03.2015, at 15:11, commits@source.squeak.org wrote: > A new version of Tools was added to project The Inbox: > http://source.squeak.org/inbox/Tools-topa.556.mcz > > ==================== Summary ==================== > > Name: Tools-topa.556 > Author: topa > Time: 18 March 2015, 4:09:54.221 pm > UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d > Ancestors: Tools-topa.555 > > Pluggable Menus for many tools > ============================== > > A lot of tools, especially the Browser, rely on context menus > (aka yellow button menus). Dynamically extending these is possible > but requires a lot of care. The Pluggable Menus allow to add menu > entries easily via extension methods. The Services package serves > as example here. An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. If nobody objects, I move this to trunk on friday :) Best -Tobias From maxleske at gmail.com Wed Mar 18 20:50:05 2015 From: maxleske at gmail.com (Max Leske) Date: Wed Mar 18 20:50:09 2015 Subject: [squeak-dev] Metacello load error Message-ID: <9FC81BD2-3A60-4801-9028-B744DC96CD06@gmail.com> Hi. ConfigurationOfMetacello loads ConfigurationOfMetacello-dkh.800.mcz for 4.6alpha. That version is damaged (the zip is invalid). It would be great if that could be fixed (I can?t load Fuel into 4.6 at the moment). Cheers, Max From dale.henrichs at gemtalksystems.com Wed Mar 18 21:20:08 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Wed Mar 18 21:20:13 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: <9FC81BD2-3A60-4801-9028-B744DC96CD06@gmail.com> References: <9FC81BD2-3A60-4801-9028-B744DC96CD06@gmail.com> Message-ID: <5509EC08.6050609@gemtalksystems.com> Max, Where are you getting that package from? I just checked and the version available from GemSource[1] loads (unzips) in both GemStone/GsDevKit and Pharo3.0...it's almost certain that the Metacello and that package has been tested against Squeak4.5 and a couple of earlier versions as I've just run a test against the latest Metacello up on Travis .. I am not testing against Squeak4.6 ... yet ... but I have been testing regularly against the Squeak-Trunk and those tests passed today[3][4] So perhaps the problem with the mcz file is in how Squeak 4.6 unzips things? I suppose I should add Squeak4.6 to my Metacello lineup, but I've been waiting for a PR from Frank[2] and it looks like he is waiting for the Squeak 4.6 release. Dale [1] http://seaside.gemtalksystems.com/ss/metacello [2] https://github.com/dalehenrich/builderCI/issues/71 [3] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910423 [4] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910425 On 03/18/2015 01:50 PM, Max Leske wrote: > Hi. > > ConfigurationOfMetacello loads ConfigurationOfMetacello-dkh.800.mcz for 4.6alpha. That version is damaged (the zip is invalid). It would be great if that could be fixed (I can?t load Fuel into 4.6 at the moment). > > Cheers, > Max From Das.Linux at gmx.de Wed Mar 18 21:53:50 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Wed Mar 18 21:53:55 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: <5509EC08.6050609@gemtalksystems.com> References: <9FC81BD2-3A60-4801-9028-B744DC96CD06@gmail.com> <5509EC08.6050609@gemtalksystems.com> Message-ID: <401B21D7-AD08-428B-A350-E599ED351045@gmx.de> Hey, On 18.03.2015, at 22:20, Dale Henrichs wrote: > Max, > > Where are you getting that package from? > > I just checked and the version available from GemSource[1] loads (unzips) in both GemStone/GsDevKit and Pharo3.0...it's almost certain that the Metacello and that package has been tested against Squeak4.5 and a couple of earlier versions as I've just run a test against the latest Metacello up on Travis .. I am not testing against Squeak4.6 ... yet ... but I have been testing regularly against the Squeak-Trunk and those tests passed today[3][4] > > So perhaps the problem with the mcz file is in how Squeak 4.6 unzips things? > > I suppose I should add Squeak4.6 to my Metacello lineup, but I've been waiting for a PR from Frank[2] and it looks like he is waiting for the Squeak 4.6 release. FWIW, trunk is equivalent to 4.6 util the release. > > Dale > > [1] http://seaside.gemtalksystems.com/ss/metacello > [2] https://github.com/dalehenrich/builderCI/issues/71 > [3] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910423 > [4] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910425 > > On 03/18/2015 01:50 PM, Max Leske wrote: >> Hi. >> >> ConfigurationOfMetacello loads ConfigurationOfMetacello-dkh.800.mcz for 4.6alpha. That version is damaged (the zip is invalid). It would be great if that could be fixed (I can?t load Fuel into 4.6 at the moment). >> >> Cheers, >> Max From dale.henrichs at gemtalksystems.com Wed Mar 18 22:13:37 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Wed Mar 18 22:13:41 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: <401B21D7-AD08-428B-A350-E599ED351045@gmx.de> References: <9FC81BD2-3A60-4801-9028-B744DC96CD06@gmail.com> <5509EC08.6050609@gemtalksystems.com> <401B21D7-AD08-428B-A350-E599ED351045@gmx.de> Message-ID: <5509F891.2040303@gemtalksystems.com> Thanks Tobias, I was thinking that that was why Frank was going to wait until the release ... Dale On 03/18/2015 02:53 PM, Tobias Pape wrote: > Hey, > > On 18.03.2015, at 22:20, Dale Henrichs wrote: > >> Max, >> >> Where are you getting that package from? >> >> I just checked and the version available from GemSource[1] loads (unzips) in both GemStone/GsDevKit and Pharo3.0...it's almost certain that the Metacello and that package has been tested against Squeak4.5 and a couple of earlier versions as I've just run a test against the latest Metacello up on Travis .. I am not testing against Squeak4.6 ... yet ... but I have been testing regularly against the Squeak-Trunk and those tests passed today[3][4] >> >> So perhaps the problem with the mcz file is in how Squeak 4.6 unzips things? >> >> I suppose I should add Squeak4.6 to my Metacello lineup, but I've been waiting for a PR from Frank[2] and it looks like he is waiting for the Squeak 4.6 release. > FWIW, trunk is equivalent to 4.6 util the release. > > >> Dale >> >> [1] http://seaside.gemtalksystems.com/ss/metacello >> [2] https://github.com/dalehenrich/builderCI/issues/71 >> [3] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910423 >> [4] https://travis-ci.org/dalehenrich/metacello-work/jobs/54910425 >> >> On 03/18/2015 01:50 PM, Max Leske wrote: >>> Hi. >>> >>> ConfigurationOfMetacello loads ConfigurationOfMetacello-dkh.800.mcz for 4.6alpha. That version is damaged (the zip is invalid). It would be great if that could be fixed (I can?t load Fuel into 4.6 at the moment). >>> >>> Cheers, >>> Max > > From commits at source.squeak.org Wed Mar 18 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 18 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150318225503.24480.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007650.html Name: Tools-topa.555 Ancestors: Tools-topa.554 Move methods from Kernel to Tools/Morphic for basic Models (1/3) Load this first ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007651.html Name: Morphic-topa.783 Ancestors: Morphic-mt.782 Move methods from Kernel to Tools/Morphic for basic Models (2/3) Load this second ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007652.html Name: Kernel-topa.912 Ancestors: Kernel-cmm.911 Move methods from Kernel to Tools/Morphic for basic Models (3/3) Load this last. ============================================= From eliot.miranda at gmail.com Wed Mar 18 22:58:13 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Wed Mar 18 22:58:16 2015 Subject: [squeak-dev] MorphicToolBuilder holds onto stuff... Message-ID: Hi All, if one looks at UIManager default toolBuilder one sees the widgets dictionary inside the tool builder can hold onto garbage. It would be nice if the widgets were cleaned out when ToolBuilder is done opening. Where's the right point to do this? -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150318/970f376a/attachment.htm From lewis at mail.msen.com Thu Mar 19 02:13:31 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Thu Mar 19 02:13:33 2015 Subject: [squeak-dev] MorphicToolBuilder holds onto stuff... In-Reply-To: References: Message-ID: <20150319021331.GA57626@shell.msen.com> On Wed, Mar 18, 2015 at 03:58:13PM -0700, Eliot Miranda wrote: > Hi All, > > if one looks at UIManager default toolBuilder one sees the widgets > dictionary inside the tool builder can hold onto garbage. It would be nice > if the widgets were cleaned out when ToolBuilder is done opening. Where's > the right point to do this? At first glance, I'm inclined to think that the garbage collector should do it. The current Project has a UIManager, and that UIManager has a ToolBuilder. But I don't see an obvious reason why a UIManager needs to have a dedicated instance of ToolBuilder, as opposed to creating new instances as needed. Maybe there is some reason that it needs to be set up this way, but my first inclination would be to see if we can get rid of the toolBuilder instance variable in UIManager, after which the garbage in the widget registry would take care of itself. Dave From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 09:28:26 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 09:38:38 2015 Subject: [squeak-dev] Re: MorphicToolBuilder holds onto stuff... In-Reply-To: <20150319021331.GA57626@shell.msen.com> References: <20150319021331.GA57626@shell.msen.com> Message-ID: <1426757306015-4813091.post@n4.nabble.com> Right, there is no need for a UIManager to hold an instance of a tool builder. In particular, the following code is sufficient to build a tool with the morphic tool builder: ObjectExplorer new buildWith: MorphicToolBuilder new. The builder is shared along the control flow of #buildWith: in any standard tool. There is no real speedup achieved by saving the instance of a builder for later use. I am not aware of any code that relies on it anyway. We should do this: - remove #toolBuilder and instance variable from UIManager - change ToolBuilder >> #default to always create a new instance - remove #default: from ToolBuilder Then GC might work. :) Best, Marcel -- View this message in context: http://forum.world.st/MorphicToolBuilder-holds-onto-stuff-tp4813024p4813091.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 09:42:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 09:52:53 2015 Subject: [squeak-dev] Re: MorphicToolBuilder holds onto stuff... In-Reply-To: <1426757306015-4813091.post@n4.nabble.com> References: <20150319021331.GA57626@shell.msen.com> <1426757306015-4813091.post@n4.nabble.com> Message-ID: <1426758161978-4813109.post@n4.nabble.com> I just did a quick benchmark: | model | model := ObjectExplorer new. [(ToolBuilder open: model) delete] bench. And could not measure any difference for both implementations. Seems that opening and closing windows is much more resource intensive than creating and initializing the GUI structures. Even worse: My mental model for a tool builder actually was that it is *empty* when working with it in #buildWith: code. Best, Marcel -- View this message in context: http://forum.world.st/MorphicToolBuilder-holds-onto-stuff-tp4813024p4813109.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Mar 19 10:36:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 10:36:59 2015 Subject: [squeak-dev] The Trunk: TrueType-topa.33.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.33.mcz ==================== Summary ==================== Name: TrueType-topa.33 Author: topa Time: 19 March 2015, 11:36:32.936 am UUID: df5a73e1-3741-40e4-9307-b92b59b3ef52 Ancestors: TrueType-topa.32 Improve TrueType handling, if ever so slightly. - Pick up some imporvements from Etoys. - Improves Unicode cmaps - Unifies TTFontDescription and TTCFontDescription a bit more - Add support for some newer Apple OS X Font idiosyncracies (like Post-Script OpenType in ttc fonts or proprietary kern tables) - polymorphize (?) TTFileDescription a bit more with TTFontDescription =============== Diff against TrueType-topa.32 =============== Item was changed: + ----- Method: LinedTTCFont>>emphasis (in category 'accessing') ----- - ----- Method: LinedTTCFont>>emphasis (in category 'as yet unclassified') ----- emphasis ^ emphasis. ! Item was changed: + ----- Method: LinedTTCFont>>emphasis: (in category 'accessing') ----- - ----- Method: LinedTTCFont>>emphasis: (in category 'as yet unclassified') ----- emphasis: code emphasis := code. ! Item was changed: + ----- Method: LinedTTCFont>>lineGlyph: (in category 'initialize') ----- - ----- Method: LinedTTCFont>>lineGlyph: (in category 'as yet unclassified') ----- lineGlyph: aGlyph lineGlyph := aGlyph. contourWidth := aGlyph calculateWidth. ! Item was changed: TTCFont subclass: #MultiTTCFont + instanceVariableNames: 'map cacheIndex' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'TrueType-Fonts'! Item was changed: + ----- Method: MultiTTCFont>>at:put: (in category 'all') ----- - ----- Method: MultiTTCFont>>at:put: (in category 'as yet unclassified') ----- at: char put: form + | ind triplet | + triplet := Array with: char asciiValue with: foregroundColor with: form. + GlyphCacheData at: (GlyphCacheIndex := GlyphCacheIndex \\ GlyphCacheSize + 1) put: triplet. + + ind := self indexFor: char. + map at: char asciiValue put: ind. + self cache at: ind put: triplet. - | wcache | - wcache := self cache. - wcache replaceFrom: 1 to: wcache size - 1 with: wcache startingAt: 2. - wcache at: wcache size - put: (Array with: char asciiValue with: foregroundColor with: form). - ^form ! Item was added: + ----- Method: MultiTTCFont>>cache (in category 'all') ----- + cache + (cache isNil or: [cache size ~= 512]) ifTrue: [self recreateCache]. "old weak-array caching" + ^cache! Item was added: + ----- Method: MultiTTCFont>>flushCache (in category 'all') ----- + flushCache + + super flushCache. + map := IdentityDictionary new: 512. + ! Item was added: + ----- Method: MultiTTCFont>>foregroundColor: (in category 'all') ----- + foregroundColor: fgColor + "Install the given foreground color" + foregroundColor := fgColor.! Item was changed: + ----- Method: MultiTTCFont>>formOf: (in category 'all') ----- - ----- Method: MultiTTCFont>>formOf: (in category 'as yet unclassified') ----- formOf: char | newForm | + cache ifNil: [ self recreateCache ]. + foregroundColor ifNil: [ self foregroundColor: Color black ]. + + self hasCached: char ifTrue: [:form | - self hasCached: char ifTrue: [:form :index | - self access: char at: index. ^ form. ]. newForm := self computeForm: char. self at: char put: newForm. ^ newForm. ! Item was changed: + ----- Method: MultiTTCFont>>glyphInfoOf:into: (in category 'all') ----- - ----- Method: MultiTTCFont>>glyphInfoOf:into: (in category 'as yet unclassified') ----- glyphInfoOf: char into: glyphInfoArray + - "return glyph info for char; I may have cached info to work from" | newForm | + self hasCached: char ifTrue: [:form | - self hasCached: char ifTrue: [:form :index | - self access: char at: index. glyphInfoArray at: 1 put: form; at: 2 put: 0; at: 3 put: form width; at: 4 put: (self ascentOf: char); at: 5 put: self. ^ glyphInfoArray. ]. newForm := self computeForm: char. self at: char put: newForm. glyphInfoArray at: 1 put: newForm; at: 2 put: 0; at: 3 put: newForm width; at: 4 put: (self ascentOf: char); at: 5 put: self. ^ glyphInfoArray. ! Item was changed: + ----- Method: MultiTTCFont>>hasCached:ifTrue: (in category 'all') ----- + hasCached: char ifTrue: aBlock - ----- Method: MultiTTCFont>>hasCached:ifTrue: (in category 'as yet unclassified') ----- - hasCached: char ifTrue: twoArgBlock + | value triplet | - | value elem | value := char asciiValue. + triplet := cache at: (map at: value ifAbsent: [^ false]). + triplet ifNil: [^ false]. + (triplet at: 1) ~= value ifTrue: [^ false]. + (triplet at: 2) ~= foregroundColor ifTrue: [^ false]. + ^ aBlock value: (triplet at: 3). - - self cache size to: 1 by: -1 do: [:i | - elem := self cache at: i. - (elem first = value and: [elem second = foregroundColor]) ifTrue: [ - ^ twoArgBlock value: elem third value: i. - ]. - ]. - ^ false. ! Item was added: + ----- Method: MultiTTCFont>>indexFor: (in category 'all') ----- + indexFor: char + + | triplet | + map size > 511 ifTrue: [ + cacheIndex _ 512 atRandom. + triplet := self cache at: cacheIndex. + triplet ifNotNil: [map removeKey: (triplet at: 1) ifAbsent: []]. + ^ cacheIndex + ]. + ^ (cacheIndex := cacheIndex + 1 \\ 512) + 1. + ! Item was added: + ----- Method: MultiTTCFont>>initialize (in category 'all') ----- + initialize + + super initialize. + cacheIndex := 511. + ! Item was added: + ----- Method: MultiTTCFont>>recreateCache (in category 'all') ----- + recreateCache + + cache := WeakArray new: 512. + map := IdentityDictionary new: 512. + ! Item was changed: + ----- Method: MultiTTCFont>>widthOf: (in category 'all') ----- - ----- Method: MultiTTCFont>>widthOf: (in category 'as yet unclassified') ----- widthOf: char + ^ (self formOf: char) width. - "This method cannot use #formOf: because formOf: discriminates the color and causes unnecessary bitmap creation." - - | newForm | - self hasCached: char ifTrue: [:form :index | - self access: char at: index. - ^ form width. - ]. - - newForm := self computeForm: char. - self at: char put: newForm. - ^ newForm width. - ! Item was added: + ----- Method: TTCFont class>>indexOfSubfamilyName: (in category 'other') ----- + indexOfSubfamilyName: aName + | decoded | + + "decodeStyleName will consume all the modifiers and leave nothing if everything was recognized." + decoded := TextStyle decodeStyleName: aName. + decoded second isEmpty ifTrue: [ ^decoded first ]. + + "If you get a halt here - please add the missing synonym to the lookup table in TextStyle>>decodeStyleName: ." + + self error: 'please add the missing synonym ', aName, ' to the lookup table in TextStyle>>decodeStyleName:'. + + ^0.! Item was changed: ----- Method: TTCFont class>>reorganizeForNewFontArray:name: (in category 'instance creation') ----- reorganizeForNewFontArray: array name: styleName | style existings regular altName | (TextConstants includesKey: styleName) ifFalse: [ TextConstants at: styleName put: (TextStyle fontArray: array). ^ TextConstants at: styleName. ]. "There is a text style with the name I want to use. See if it is a TTC font..." style := TextConstants at: styleName. style isTTCStyle ifFalse: [ altName := ((array at: 1) name, 'TT') asSymbol. ^ self reorganizeForNewFontArray: array name: altName. ]. existings := (self getExistings: style fontArray), (Array with: array). regular := existings detect: [:e | (e at: 1) isRegular] ifNone: [existings at: 1]. regular do: [:r | r addLined: r. ]. "The existing array may be different in size than the new one." existings do: [:e | (e at: 1) isRegular ifFalse: [ regular do: [ :r | | f | f := e detect: [ :ea | ea pointSize = r pointSize ] ifNone: [ ]. f ifNotNil: [ r derivativeFont: f ]. ]. ]. ]. style newFontArray: regular. self register: regular at: styleName. self recreateCache. ^ style. ! Item was changed: ----- Method: TTCFont>>indexOfSubfamilyName: (in category 'private') ----- indexOfSubfamilyName: aName - | decoded | - - "decodeStyleName will consume all the modifiers and leave nothing if everything was recognized." - decoded := TextStyle decodeStyleName: aName. - decoded second isEmpty ifTrue: [ ^decoded first ]. - - "If you get a halt here - please add the missing synonym to the lookup table in TextStyle>>decodeStyleName: ." + ^ self class indexOfSubfamilyName: aName! - self error: 'please add the missing synonym ', aName, ' to the lookup table in TextStyle>>decodeStyleName:'. - - ^0.! Item was changed: ----- Method: TTCFont>>installOn:foregroundColor:backgroundColor: (in category 'friend') ----- installOn: aDisplayContext foregroundColor: fgColor backgroundColor: bgColor self foregroundColor: fgColor. "install color" + (self fallbackFont notNil and: [ self fallbackFont class = TTCFontSet ]) ifTrue: [ + self fallbackFont fontArray do: [:font | + font ifNotNil: [ font foregroundColor: fgColor ] + ] + ]. "install color for fallbackFont" aDisplayContext installTTCFont: self foregroundColor: foregroundColor backgroundColor: bgColor ! Item was added: + ----- Method: TTCFont>>recreateCache (in category 'friend') ----- + recreateCache + + cache := WeakArray new: 256.! Item was changed: ----- Method: TTCFont>>textStyle (in category 'accessing') ----- textStyle + + ^ TextStyle actualTextStyles + detect: [:aStyle | (aStyle fontArray collect: [:s | s name]) includes: self name] + ifNone: [nil]! - ^ TextStyle actualTextStyles detect: - [:aStyle | aStyle fontArray includes: self] ifNone: [nil]! Item was changed: + ----- Method: TTCFontDescription class>>addFromTTFile: (in category 'instance creations') ----- - ----- Method: TTCFontDescription class>>addFromTTFile: (in category 'as yet unclassified') ----- addFromTTFile: fileName " Execute the following only if you know what you are doing. self addFromTTFile: 'C:\WINDOWS\Fonts\msgothic.TTC' " + | tt | - | tt old | (fileName asLowercase endsWith: 'ttf') ifTrue: [ tt := TTCFontReader readTTFFrom: (FileStream readOnlyFileNamed: fileName). ] ifFalse: [ tt := TTCFontReader readFrom: (FileStream readOnlyFileNamed: fileName). ]. + + self addToDescription: tt. - - old := TTCDescriptions detect: [:f | f first name = tt first name] ifNone: [nil]. - old ifNotNil: [TTCDescriptions remove: old]. - TTCDescriptions add: tt. ^ tt. ! Item was removed: - ----- Method: TTCFontDescription class>>clearDefault (in category 'as yet unclassified') ----- - clearDefault - " - self clearDefault - " - - TTCDefault := nil. - ! Item was removed: - ----- Method: TTCFontDescription class>>clearDescriptions (in category 'as yet unclassified') ----- - clearDescriptions - " - self clearDescriptions - " - - TTCDescriptions := Set new. - TTCDefault ifNotNil: [TTCDescriptions add: TTCDefault]. - ! Item was removed: - ----- Method: TTCFontDescription class>>default (in category 'as yet unclassified') ----- - default - - ^ TTCDefault. - ! Item was removed: - ----- Method: TTCFontDescription class>>descriptionNamed: (in category 'as yet unclassified') ----- - descriptionNamed: descriptionName - - ^ TTCDescriptions detect: [:f | f first name = descriptionName] ifNone: [TTCDefault]. - ! Item was changed: + ----- Method: TTCFontDescription class>>descriptionNamed:at: (in category 'accessing') ----- - ----- Method: TTCFontDescription class>>descriptionNamed:at: (in category 'as yet unclassified') ----- descriptionNamed: descriptionName at: index | array | (array := self descriptionNamed: descriptionName) ifNil: [^ nil]. ^ array at: index. ! Item was removed: - ----- Method: TTCFontDescription class>>initialize (in category 'as yet unclassified') ----- - initialize - " - self initialize - " - - self clearDescriptions. - ! Item was removed: - ----- Method: TTCFontDescription class>>removeDescriptionNamed: (in category 'as yet unclassified') ----- - removeDescriptionNamed: descriptionName - - | tt | - TTCDescriptions ifNil: [^ self]. - [(tt := TTCDescriptions detect: [:f | ('Multi', f first name) = descriptionName] ifNone: [nil]) notNil] whileTrue:[ - TTCDescriptions remove: tt - ]. - ! Item was removed: - ----- Method: TTCFontDescription class>>setDefault (in category 'as yet unclassified') ----- - setDefault - " - self setDefault - " - - TTCDefault := TTCFontReader readFrom: (FileStream readOnlyFileNamed: 'C:\WINDOWS\Fonts\msgothic.ttc'). - self clearDescriptions. - - ! Item was removed: - ----- Method: TTCFontDescription>>name (in category 'accessing') ----- - name - - ^ self familyName copyWithout: Character space. - ! Item was removed: - ----- Method: TTCFontDescription>>veryDeepCopyWith: (in category 'copying') ----- - veryDeepCopyWith: deepCopier - "Return self. I am shared. Do not record me." - ! Item was removed: - ----- Method: TTCFontReader>>decodeCmapFmtTable: (in category 'as yet unclassified') ----- - decodeCmapFmtTable: entry - | cmapFmt length entryCount segCount segments offset cmap firstCode | - cmapFmt := entry nextUShort. - length := entry nextUShort. - entry skip: 2. "skip version" - - cmapFmt = 0 ifTrue: "byte encoded table" - [length := length - 6. "should be always 256" - length <= 0 ifTrue: [^ nil]. "but sometimes, this table is empty" - cmap := Array new: length. - entry nextBytes: length into: cmap startingAt: entry offset. - ^ cmap]. - - cmapFmt = 4 ifTrue: "segment mapping to deltavalues" - [segCount := entry nextUShort // 2. - entry skip: 6. "skip searchRange, entrySelector, rangeShift" - segments := Array new: segCount. - segments := (1 to: segCount) collect: [:e | Array new: 4]. - 1 to: segCount do: [:i | (segments at: i) at: 2 put: entry nextUShort]. "endCount" - entry skip: 2. "skip reservedPad" - 1 to: segCount do: [:i | (segments at: i) at: 1 put: entry nextUShort]. "startCount" - 1 to: segCount do: [:i | (segments at: i) at: 3 put: entry nextShort]. "idDelta" - offset := entry offset. - 1 to: segCount do: [:i | (segments at: i) at: 4 put: entry nextUShort]. "idRangeOffset" - cmap := Array new: 65536 withAll: 0. - segments withIndexDo: - [:seg :si | | code | - seg first to: seg second do: - [:i | - seg last > 0 ifTrue: - ["offset to glypthIdArray - this is really C-magic!!" - entry offset: i - seg first - 1 * 2 + seg last + si + si + offset. - code := entry nextUShort. - code > 0 ifTrue: [code := code + seg third]] - ifFalse: - ["simple offset" - code := i + seg third]. - cmap at: i + 1 put: (code \\ 16r10000)]]. - ^ cmap]. - - cmapFmt = 6 ifTrue: "trimmed table" - [firstCode := entry nextUShort. - entryCount := entry nextUShort. - cmap := Array new: entryCount + firstCode withAll: 0. - entryCount timesRepeat: - [cmap at: (firstCode := firstCode + 1) put: entry nextUShort]. - ^ cmap]. - ^ nil! Item was changed: ----- Method: TTCFontReader>>processCharMap: (in category 'as yet unclassified') ----- processCharMap: assoc "Process the given character map" | glyph cmap encode0 encode1 char value null | cmap := assoc value. null := (glyphs at: (cmap at: Character space asUnicode + 1) + 1) copy. null contours: #(). encode0 := Array new: 256 withAll: glyphs first. encode1 := Array new: 65536 withAll: glyphs first. 0 to: 255 do: [:i | char := Character value: i. glyph := glyphs at: (cmap at: char asUnicode + 1) + 1. encode0 at: i+1 put: glyph. ]. Character separators do: [:c | encode0 at: (c asciiValue + 1) put: null. ]. 0 to: 65536 - 1 do: [:i | value := cmap at: i+1. value = 65535 ifFalse: [ "???" + | g | + g := glyphs at: value+1. + (g isKindOf: TTCompositeGlyph) ifFalse: [ + encode1 at: i+1 put: g. + ] ifTrue: [ + g basicGlyphs: (((glyphs at: value+1) basicGlyphs) collect: [:t | t key->(glyphs at: (t value glyphIndex+1))]). + encode1 at: i+1 put: g + ]. - encode1 at: i+1 put: (glyphs at: value+1). ] ]. ^ {encode0. encode1}. ! Item was changed: ----- Method: TTCFontReader>>processCharacterMappingTable: (in category 'as yet unclassified') ----- processCharacterMappingTable: entry "Read the font's character to glyph index mapping table. If an appropriate mapping can be found then return an association with the format identifier and the contents of the table" | copy initialOffset nSubTables pID sID offset cmap assoc | initialOffset := entry offset. entry skip: 2. "Skip table version" nSubTables := entry nextUShort. 1 to: nSubTables do:[:i| pID := entry nextUShort. sID := entry nextUShort. offset := entry nextULong. "Check if this is either a Macintosh encoded table or a Windows encoded table" + (#(0 1 3) includes: pID) ifTrue: [ + (assoc notNil and: [assoc key = pID]) ifFalse: [ + "Go to the beginning of the table" + copy := entry copy. + copy offset: initialOffset + offset. + cmap := self decodeCmapFmtTable: copy. + (pID = 0 and: [cmap notNil]) "Prefer Unicode encoding over everything else" + ifTrue: [^ pID -> cmap]. + "(pID = 1 and: [cmap notNil])" "Prefer Macintosh encoding over everything else" + "ifTrue: [pID -> cmap]." + assoc := pID -> cmap. "Keep it in case we don't find a better table" + ]. - (pID = 1 or:[pID = 3]) ifTrue:[ - "Go to the beginning of the table" - copy := entry copy. - copy offset: initialOffset + offset. - cmap := self decodeCmapFmtTable: copy. - "(pID = 1 and: [cmap notNil])" "Prefer Macintosh encoding over everything else" - "ifTrue: [pID -> cmap]." - assoc := pID -> cmap. "Keep it in case we don't find a Mac encoded table" ]. ]. ^assoc! Item was changed: ----- Method: TTCFontReader>>readFrom: (in category 'as yet unclassified') ----- readFrom: aStream "Read the raw font byte data" | fontData | (aStream respondsTo: #binary) ifTrue:[aStream binary]. fontData := aStream contents asByteArray. fonts := self parseTTCHeaderFrom: fontData. + ^ fonts gather: [:offset | - ^ ((Array with: fonts first) collect: [:offset | fontDescription := TTCFontDescription new. + self readFrom: fontData fromOffset: offset at: EncodingTag]! - self readFrom: fontData fromOffset: offset at: EncodingTag. - ]) at: 1. - ! Item was changed: ----- Method: TTCFontReader>>readFrom:fromOffset:at: (in category 'as yet unclassified') ----- readFrom: fontData fromOffset: offset at: encodingTag | headerEntry maxProfileEntry nameEntry indexLocEntry charMapEntry glyphEntry horzHeaderEntry horzMetricsEntry kerningEntry glyphOffset cmap numHMetrics indexToLocFormat fontDescription0 fontDescription1 array result | "Search the tables required to build the font" (headerEntry := self getTableDirEntry: 'head' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a header table']. (maxProfileEntry := self getTableDirEntry: 'maxp' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a maximum profile table']. (nameEntry := self getTableDirEntry: 'name' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a name table']. (indexLocEntry := self getTableDirEntry: 'loca' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a relocation table']. (charMapEntry := self getTableDirEntry: 'cmap' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a character map table']. (glyphEntry := self getTableDirEntry: 'glyf' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a glyph table']. (horzHeaderEntry := self getTableDirEntry: 'hhea' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a horizontal header table']. (horzMetricsEntry := self getTableDirEntry: 'hmtx' from: fontData offset: offset) == nil ifTrue:[ ^self error:'This font does not have a horizontal metrics table']. (kerningEntry := self getTableDirEntry: 'kern' from: fontData offset: offset) == nil ifTrue:[ Transcript cr; show:'This font does not have a kerning table';endEntry]. "Process the data" indexToLocFormat := self processFontHeaderTable: headerEntry. self processMaximumProfileTable: maxProfileEntry. self processNamingTable: nameEntry. glyphOffset := self processIndexToLocationTable: indexLocEntry format: indexToLocFormat. cmap := self processCharacterMappingTable: charMapEntry. (cmap == nil or:[cmap value == nil]) ifTrue:[^self error:'This font has no suitable character mappings']. self processGlyphDataTable: glyphEntry offsets: glyphOffset. numHMetrics := self processHorizontalHeaderTable: horzHeaderEntry. self processHorizontalMetricsTable: horzMetricsEntry length: numHMetrics. kerningEntry isNil ifTrue:[kernPairs := #()] ifFalse:[self processKerningTable: kerningEntry]. array := self processCharMap: cmap. fontDescription0 := fontDescription clone. fontDescription1 := fontDescription clone. + fontDescription0 setGlyphs: (array at: 1) mapping: (array at: 1).. + fontDescription1 setGlyphs: (array at: 2) mapping: (array at: 2).. + fontDescription0 setKernPairs: kernPairs. + fontDescription1 setKernPairs: kernPairs. - fontDescription0 setGlyphs: (array at: 1) mapping: nil. - fontDescription1 setGlyphs: (array at: 2) mapping: nil. - "fontDescription setKernPairs: kernPairs." result := OrderedCollection new. (encodingTag = nil or: [encodingTag = 0]) ifTrue: [^ Array with: fontDescription1]. result add: fontDescription0. encodingTag -1 timesRepeat: [result add: nil]. result add: fontDescription1. ^ result asArray. ! Item was changed: AbstractFont subclass: #TTCFontSet + instanceVariableNames: 'name fontArray foregroundColor derivatives' + classVariableNames: '' - instanceVariableNames: 'name fontArray foregroundColor' - classVariableNames: 'Registry' poolDictionaries: '' category: 'TrueType-Fonts'! Item was changed: + ----- Method: TTCFontSet class>>discardDefault (in category 'private') ----- - ----- Method: TTCFontSet class>>discardDefault (in category 'as yet unclassified') ----- discardDefault " self discardDefault " | ttc | ttc := TTCFontDescription default. ttc ifNotNil: [ TextConstants removeKey: ttc name asSymbol ifAbsent: []. ].! Item was changed: + ----- Method: TTCFontSet class>>familyName:pointSize: (in category 'instance creation') ----- - ----- Method: TTCFontSet class>>familyName:pointSize: (in category 'as yet unclassified') ----- familyName: n pointSize: s + "(self familyName: 'MSGothic' pointSize: 14) pointSize" - "(self familyName: 'MultiMSGothic' pointSize: 14) pointSize" | t ret index | t := self registry at: n asSymbol ifAbsent: [#()]. t isEmpty ifTrue: [ t := (TextConstants at: #DefaultTextStyle) fontArray. ret := t first. ret pointSize >= s ifTrue: [^ ret]. index := 2. [index <= t size and: [(t at: index) pointSize <= s]] whileTrue: [ ret := t at: index. index := index + 1. ]. ^ ret. ]. ^ (TextStyle named: n) addNewFontSize: s.! Item was added: + ----- Method: TTCFontSet class>>familyName:pointSize:emphasized: (in category 'instance creation') ----- + familyName: n pointSize: s emphasized: code + + + | t ret index | + t := self registry at: n asSymbol ifAbsent: [#()]. + t isEmpty ifTrue: [ + t := (TextConstants at: #DefaultTextStyle) fontArray. + ret := t first. + ret pointSize >= s ifTrue: [^ ret]. + index := 2. + [index <= t size and: [(t at: index) pointSize <= s]] whileTrue: [ + ret := t at: index. + index := index + 1. + ]. + ^ ret emphasis: code + ]. + ^ ((TextStyle named: n) addNewFontSize: s) emphasis: code.! Item was added: + ----- Method: TTCFontSet class>>getExistings: (in category 'private') ----- + getExistings: fontArray + + | result em | + result _ OrderedCollection new. + result add: fontArray. + 1 to: 3 do: [:i | + em := (fontArray collect: [:f | f emphasized: i]). + (em at: 1) ~= (fontArray at: 1) ifTrue: [ + result add: em. + ]. + ]. + ^ result asArray. + ! Item was changed: + ----- Method: TTCFontSet class>>initialize (in category 'class initialization') ----- - ----- Method: TTCFontSet class>>initialize (in category 'as yet unclassified') ----- initialize " self initialize " | tt | tt := TTCFontDescription default. tt ifNotNil: [self newTextStyleFromTT: tt]. ! Item was changed: + ----- Method: TTCFontSet class>>newFontArray: (in category 'private') ----- - ----- Method: TTCFontSet class>>newFontArray: (in category 'as yet unclassified') ----- newFontArray: anArray ^super new initializeWithFontArray: anArray ! Item was changed: + ----- Method: TTCFontSet class>>newTextStyleFromTT: (in category 'file out/in') ----- - ----- Method: TTCFontSet class>>newTextStyleFromTT: (in category 'as yet unclassified') ----- newTextStyleFromTT: descriptionArray + | array f arrayOfArray | - | array textStyle styleName arrayOfArray | arrayOfArray := self pointSizes collect: [:pt | + descriptionArray collect: [:ttc | - descriptionArray collect: [:ttc | | f | ttc ifNil: [nil] ifNotNil: [ f := (ttc size > 256) + ifTrue: [MultiTTCFont new] + ifFalse: [TTCFont new]. - ifTrue: [MultiTTCFont new initialize] - ifFalse: [TTCFont new initialize]. f ttcDescription: ttc. f pointSize: pt. ]. ]. ]. array := arrayOfArray collect: [:fonts | self newFontArray: fonts. ]. + ^TTCFont reorganizeForNewFontArray: array name: array first familyName asSymbol. + " styleName := (array at: 1) familyName asSymbol. textStyle := TextStyle fontArray: array. TextConstants at: styleName put: textStyle. self register: array at: styleName. ^ TextConstants at: styleName. + "! - ! Item was changed: + ----- Method: TTCFontSet class>>newTextStyleFromTTFile: (in category 'file out/in') ----- - ----- Method: TTCFontSet class>>newTextStyleFromTTFile: (in category 'as yet unclassified') ----- newTextStyleFromTTFile: fileName " TTCFontReader encodingTag: JapaneseEnvironment leadingChar. self newTextStyleFromTTFile: 'C:\WINDOWS\Fonts\msmincho.TTC' TTCFontReader encodingTag: 0. self newTextStyleFromTTFile: 'C:\WINDOWS\Fonts\symbol.ttf' " | description | description := TTCFontDescription addFromTTFile: fileName. ^ self newTextStyleFromTT: description. ! Item was added: + ----- Method: TTCFontSet class>>newTextStyleFromTTFile:encodingTag:ranges: (in category 'file out/in') ----- + newTextStyleFromTTFile: fileName encodingTag: encodingTag ranges: ranges + + | description | + description := TTFontDescription addSetFromTTFile: fileName encodingTag: encodingTag ranges: ranges. + self newTextStyleFromTT: description. + ^ description. + ! Item was changed: + ----- Method: TTCFontSet class>>pointSizes (in category 'accessing') ----- - ----- Method: TTCFontSet class>>pointSizes (in category 'as yet unclassified') ----- pointSizes ^ TTCFont pointSizes. ! Item was changed: + ----- Method: TTCFontSet class>>register:at: (in category 'registry') ----- - ----- Method: TTCFontSet class>>register:at: (in category 'as yet unclassified') ----- register: anObject at: symbolName self registry at: symbolName put: anObject. ! Item was changed: + ----- Method: TTCFontSet class>>registry (in category 'registry') ----- - ----- Method: TTCFontSet class>>registry (in category 'as yet unclassified') ----- registry + + ^ TTCFont registry. + ! - ^ Registry - ifNil: [Registry := IdentityDictionary new]! Item was changed: + ----- Method: TTCFontSet class>>removeStyleName: (in category 'registry') ----- - ----- Method: TTCFontSet class>>removeStyleName: (in category 'as yet unclassified') ----- removeStyleName: aString | style symName | symName := aString asSymbol. style := TextConstants removeKey: symName ifAbsent: []. style ifNotNil: [self unregister: symName]. TTCFontDescription removeDescriptionNamed: aString asString. ! Item was changed: + ----- Method: TTCFontSet class>>setDefault (in category 'private') ----- - ----- Method: TTCFontSet class>>setDefault (in category 'as yet unclassified') ----- setDefault " self setDefault " | tt | tt := TTCFontDescription default. tt ifNil: [TTCFontDescription setDefault]. tt := TTCFontDescription default. tt ifNotNil: [self newTextStyleFromTT: tt]. ! Item was changed: + ----- Method: TTCFontSet class>>unregister: (in category 'registry') ----- - ----- Method: TTCFontSet class>>unregister: (in category 'as yet unclassified') ----- unregister: symbolName self registry removeKey: symbolName ifAbsent: []. ! Item was added: + ----- Method: TTCFontSet>>addLined: (in category 'derivatives') ----- + addLined: aTTCFont + | l | + l := LinedTTCFont fromTTCFont: aTTCFont emphasis: 4. + self derivativeFont: l at: l emphasis. + + l := LinedTTCFont fromTTCFont: aTTCFont emphasis: 16. + self derivativeFont: l at: l emphasis. + + l := LinedTTCFont fromTTCFont: aTTCFont emphasis: 20. + self derivativeFont: l at: l emphasis. + ! Item was added: + ----- Method: TTCFontSet>>derivativeFont: (in category 'derivatives') ----- + derivativeFont: aTTCFont + + | index | + index := TTCFont indexOfSubfamilyName: (aTTCFont subfamilyName). + index < 1 ifTrue: [ + ^ self "inform: 'unknown sub family name. This font will be skipped'". + ]. + + self derivativeFont: aTTCFont at: index. + + "self addLined: aTTCFont." + ! Item was added: + ----- Method: TTCFontSet>>derivativeFont:at: (in category 'derivatives') ----- + derivativeFont: aTTCFontSet at: index + + | newDeriv | + aTTCFontSet ifNil: [derivatives := nil. ^ self]. + derivatives ifNil: [derivatives := Array new: 32]. + derivatives size < 32 ifTrue: [ + newDeriv := Array new: 32. + newDeriv replaceFrom: 1 to: derivatives size with: derivatives. + derivatives := newDeriv. + ]. + derivatives at: index put: aTTCFontSet + ! Item was added: + ----- Method: TTCFontSet>>derivativeFonts (in category 'derivatives') ----- + derivativeFonts + + derivatives ifNil: [^ #()]. + ^derivatives copyWithout: nil! Item was added: + ----- Method: TTCFontSet>>emphasis: (in category 'derivatives') ----- + emphasis: code + + code > 3 ifTrue: [^ self]. + code = 0 ifTrue: [^ self]. + derivatives isNil ifTrue: [^ self]. + ^ (derivatives at: code) ifNil: [self]. + ! Item was changed: ----- Method: TTCFontSet>>emphasized: (in category 'accessing') ----- emphasized: code + code = 0 ifTrue: [^ self]. + derivatives ifNil: [^ self]. + (((code bitAnd: 20) ~= 0) and: [ + derivatives size < code or: [(derivatives at: code) isNil]]) ifTrue: [ + self addLined. + ]. + ^ (derivatives at: code) ifNil: [self]. ! Item was changed: ----- Method: TTCFontSet>>familyName (in category 'accessing') ----- familyName + ^ (fontArray at: 1) familyName. - ^ 'Multi', (fontArray at: 1) familyName. ! Item was added: + ----- Method: TTCFontSet>>hasGlyphWithFallbackOf: (in category 'accessing') ----- + hasGlyphWithFallbackOf: aCharacter + + | index f | + index := aCharacter leadingChar +1. + fontArray size < index ifTrue: [^ false]. + (f := fontArray at: index) ifNil: [^ false]. + + ^ f hasGlyphWithFallbackOf: aCharacter. + ! Item was changed: + ----- Method: TTCFontSet>>initializeWithFontArray: (in category 'initialization') ----- - ----- Method: TTCFontSet>>initializeWithFontArray: (in category 'as yet unclassified') ----- initializeWithFontArray: anArray fontArray := anArray. "name := anArray first name." ! Item was changed: + ----- Method: TTCFontSet>>installOn: (in category 'displaying private') ----- - ----- Method: TTCFontSet>>installOn: (in category 'as yet unclassified') ----- installOn: aDisplayContext ^aDisplayContext installTTCFont: self. ! Item was changed: + ----- Method: TTCFontSet>>installOn:foregroundColor:backgroundColor: (in category 'displaying private') ----- - ----- Method: TTCFontSet>>installOn:foregroundColor:backgroundColor: (in category 'as yet unclassified') ----- installOn: aDisplayContext foregroundColor: fgColor backgroundColor: bgColor foregroundColor := fgColor. fontArray do: [:s | s ifNotNil: [s installOn: aDisplayContext foregroundColor: fgColor backgroundColor: bgColor]]. ! Item was added: + ----- Method: TTCFontSet>>isRegular (in category 'testing') ----- + isRegular + "Answer true if I am a Regular/Roman font (i.e. not bold, etc.)" + ^ (TTCFont indexOfSubfamilyName: (self subfamilyName)) = 0. + ! Item was added: + ----- Method: TTCFontSet>>pointSize: (in category 'derivatives') ----- + pointSize: aNumber + + self privatePointSize: aNumber. + derivatives ifNotNil: [ derivatives do: [ :f | f ifNotNil: [ f privatePointSize: aNumber ]]]. + ! Item was added: + ----- Method: TTCFontSet>>privatePointSize: (in category 'derivatives') ----- + privatePointSize: aNumber + fontArray do: [:f | + f privatePointSize: aNumber + ]. + ! Item was changed: ----- Method: TTCFontSet>>questionGlyphInfoInto: (in category 'private') ----- questionGlyphInfoInto: glyphInfoArray "return glyph info for the question mark character in the first font of the fontArray -sort of a default set of info" | f form | f := fontArray at: 1. form := f formOf: $?. glyphInfoArray at: 1 put: form; at: 2 put: 0; at: 3 put: form width; + at: 4 put: (self ascentOf: $?); + at: 5 put: self. - at: 4 put: self. ^ glyphInfoArray. ! Item was added: + ----- Method: TTCFontSet>>subfamilyName (in category 'accessing') ----- + subfamilyName + + ^ fontArray first ttcDescription subfamilyName. + ! Item was changed: + ----- Method: TTCFontSet>>ttcDescription (in category 'accessing') ----- - ----- Method: TTCFontSet>>ttcDescription (in category 'as yet unclassified') ----- ttcDescription ^ fontArray first ttcDescription! Item was changed: ----- Method: TTCFontSet>>widthOf: (in category 'measuring') ----- widthOf: aCharacter + | encoding font | - | encoding | encoding := aCharacter leadingChar. + encoding >= fontArray size ifFalse: [ + font := (fontArray at: encoding + 1). + font ifNotNil: [^ font widthOf: aCharacter]. + ]. + ^ (fontArray at: 1) widthOf: aCharacter. - ^ (fontArray at: encoding + 1) widthOf: aCharacter. ! Item was added: + ----- Method: TTCompositeGlyph>>basicGlyphs (in category 'accessing') ----- + basicGlyphs + + ^ glyphs + ! Item was added: + ----- Method: TTCompositeGlyph>>basicGlyphs: (in category 'accessing') ----- + basicGlyphs: colOfAssocs + + glyphs := colOfAssocs + ! Item was changed: Object subclass: #TTFileDescription + instanceVariableNames: 'fileName fileOffset familyName subfamilyName copyright ascender descender lineGap unitsPerEm numGlyphs indexToLocOffset indexToLocFormat glyphTableOffset cmapType cmapOffset numHMetrics hmtxTableOffset sTypoAscender sTypoDescender sTypoLineGap' - instanceVariableNames: 'fileName fileOffset familyName subfamilyName ascender descender lineGap unitsPerEm numGlyphs indexToLocOffset indexToLocFormat glyphTableOffset cmapType cmapOffset numHMetrics hmtxTableOffset sTypoAscender sTypoDescender sTypoLineGap' classVariableNames: 'AllFontsAndFiles FontPaths OfferNonPortableFonts' poolDictionaries: '' category: 'TrueType-Fonts'! !TTFileDescription commentStamp: 'ar 7/29/2009 22:18' prior: 0! Contrary to TTFontDescritption, this class leaves true type files on disk and only reads the required portions when constructing glyphs. This avoids the need of reading the entire font into memory at the cost of having to hit disk whenever a glyph is requested.! Item was added: + ----- Method: TTFileDescription>>copyright (in category 'accessing') ----- + copyright + + ^ copyright! Item was added: + ----- Method: TTFileDescription>>fallbackGlyph (in category 'glyphs') ----- + fallbackGlyph + "Answer the fallback glyph, the first in the loca table " + | glyph | + self withFileDo:[:fontFile| + glyph := self readGlyphAt: 0 fromFile: fontFile. + self updateGlyphMetrics: glyph fromFile: fontFile. + ]. + ^glyph! Item was added: + ----- Method: TTFileDescription>>isRegular (in category 'testing') ----- + isRegular + "Answer true if I am a Regular/Roman font (i.e. not bold, etc.)" + ^ (TTCFont indexOfSubfamilyName: (self subfamilyName)) = 0. + ! Item was changed: ----- Method: TTFileDescription>>processNamingTable: (in category 'ttf tables') ----- processNamingTable: fontFile "copyright CHARPTR The font's copyright notice. familyName CHARPTR The font's family name. subfamilyName CHARPTR The font's subfamily name. uniqueName CHARPTR A unique identifier for this font. fullName CHARPTR The font's full name (a combination of familyName and subfamilyName). versionName CHARPTR The font's version string. " | nRecords initialOffset storageOffset format | initialOffset := fontFile position. format := fontFile nextNumber: 2. format = 0 ifFalse: [self error: 'Cannot handle format 1 naming tables']. "Get the number of name records" nRecords := fontFile nextNumber: 2. "Offset from the beginning of this table" storageOffset := (fontFile nextNumber: 2) + initialOffset. 1 to: nRecords do:[:i| | pID sID lID nID length offset string | fontFile position: initialOffset + 6 + ((i-1) * 12). pID := fontFile nextNumber: 2. sID := fontFile nextNumber: 2. lID := fontFile nextNumber: 2. nID := fontFile nextNumber: 2. length := fontFile nextNumber: 2. offset := fontFile nextNumber: 2. "Read only Macintosh or Microsoft strings" (pID = 1 or:[pID = 3 and:[sID = 1]]) ifTrue:[ "MS uses Unicode all others single byte" "multiBytes := pID = 3." fontFile position: storageOffset+offset. string := (fontFile next: length) asString. pID = 3 ifTrue:[ | keep | keep := true. string := string select:[:ch| keep := keep not]. ]. "Select only English names, prefer Macintosh" ((pID = 1 and: [lID = 0]) or: [pID = 3 and: [lID = 16r0409]]) ifTrue: [ nID caseOf: { + [0] -> [(pID = 1 or:[copyright == nil]) ifTrue:[copyright := string]]. - "[0] -> [copyright := string]." [1] -> [(pID = 1 or:[familyName == nil]) ifTrue:[familyName := string]]. [2] -> [(pID = 1 or:[subfamilyName == nil]) ifTrue:[subfamilyName := string]]. "[3] -> [(pID = 1 or:[uniqueName == nil]) ifTrue:[uniqueName := string]]." "[4] -> [(pID = 1 or:[fullName == nil]) ifTrue:[fullName := string]]." "[5] -> [(pID = 1 or:[versionName == nil]) ifTrue:[versionName := string]]." "[6] -> [(pID = 1 or:[postscriptName == ni]) ifTrue:[postscriptName := string]]." "[7] -> [(pID = 1 or:[trademark == nil]) ifTrue:[trademark := string]]." } otherwise:["ignore"]. ] ]. ]. ! Item was added: + ----- Method: TTFileDescription>>renderFallbackGlyphOfHeight:fgColor:bgColor:depth: (in category 'rendering') ----- + renderFallbackGlyphOfHeight: height fgColor: fgColor bgColor: bgColor depth: depth + "Render the glyph with the given code point at the specified pixel height." + ^ self fallbackGlyph + asFormWithScale: height asFloat / (ascender - descender) + ascender: ascender + descender: descender + fgColor: fgColor bgColor: bgColor depth: depth! Item was added: + ----- Method: TTFontDescription class>>addFromSmartRefStream: (in category 'instance creation') ----- + addFromSmartRefStream: ref + + | tts | + tts := ref nextAndClose. + + ^ tts collect: [:tt | + self addToDescription: tt. + ]. + ! Item was changed: + ----- Method: TTFontDescription class>>addFromTTFile: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>addFromTTFile: (in category 'instance creations') ----- addFromTTFile: fileName " self addFromTTFile: 'C:\WINDOWS\Fonts\ARIALN.TTF' " ^self addFromTTStream: (FileStream readOnlyFileNamed: fileName). ! Item was changed: + ----- Method: TTFontDescription class>>addFromTTStream: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>addFromTTStream: (in category 'instance creations') ----- addFromTTStream: readStream " self addFromTTFile: 'C:\WINDOWS\Fonts\ARIALN.TTF' " + | tt | - | tt old | tt := TTFontReader readFrom: readStream. + tt := self addToDescription: tt. + tt blankGlyphForSeparators. - old := Descriptions detect: [:f | f name = tt name and: [f subfamilyName = tt subfamilyName]] ifNone: [nil]. - old ifNotNil: [Descriptions remove: old]. - Descriptions add: tt. ^ tt. ! Item was added: + ----- Method: TTFontDescription class>>addSetFromTTFile:encodingTag:ranges: (in category 'instance creation') ----- + addSetFromTTFile: fileName encodingTag: encodingTag ranges: ranges + + | tt | + (fileName asLowercase endsWith: 'ttf') ifTrue: [ + tt := TTCFontReader readTTFFrom: (FileStream readOnlyFileNamed: fileName). + ] ifFalse: [ + tt := TTCFontReader readFrom: (FileStream readOnlyFileNamed: fileName). + ]. + + (tt at: encodingTag + 1) compactForRanges: ranges. + ^ self addToDescription: tt. + ! Item was added: + ----- Method: TTFontDescription class>>addToDescription: (in category 'instance creation') ----- + addToDescription: tt + + | old new | + old := Descriptions detect: [:f | f first fullName = tt first fullName] ifNone: [nil]. + ^ old ifNotNil: [ + new := old, (Array new: ((tt size - old size) max: 0)). + 1 to: tt size do: [:ind | + (tt at: ind) ifNotNil: [ + new at: ind put: (tt at: ind) + ]. + ]. + Descriptions remove: old. + Descriptions add: new. + new. + ] ifNil: [ + Descriptions add: tt. + tt. + ] + ! Item was changed: + ----- Method: TTFontDescription class>>clearDefault (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>clearDefault (in category 'instance creations') ----- clearDefault " self clearDefault " Default := nil. ! Item was changed: + ----- Method: TTFontDescription class>>clearDescriptions (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>clearDescriptions (in category 'instance creations') ----- clearDescriptions " self clearDescriptions " Descriptions := Set new. Default ifNotNil: [Descriptions add: Default]. ! Item was changed: + ----- Method: TTFontDescription class>>default (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>default (in category 'instance creations') ----- default ^ Default! Item was changed: + ----- Method: TTFontDescription class>>descriptionFullNamed: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>descriptionFullNamed: (in category 'instance creations') ----- descriptionFullNamed: descriptionFullName ^ Descriptions + detect: [:f | f first fullName = descriptionFullName] - detect: [:f | f fullName = descriptionFullName] ifNone: [Default]! Item was added: + ----- Method: TTFontDescription class>>descriptionFullNamed:at: (in category 'instance creation') ----- + descriptionFullNamed: descriptionFullName at: index + | ans | + ans := Descriptions + detect: [:f | f first fullName = descriptionFullName] + ifNone: [Default]. + index > 0 ifTrue: [^ ans at: index]. + ^ ans. + ! Item was changed: + ----- Method: TTFontDescription class>>descriptionNamed: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>descriptionNamed: (in category 'instance creations') ----- descriptionNamed: descriptionName + ^ Descriptions detect: [:f | f first name = descriptionName] ifNone: [Default]. - ^ Descriptions detect: [:f | f name = descriptionName] ifNone: [Default]. ! Item was added: + ----- Method: TTFontDescription class>>foo (in category 'instance creation') ----- + foo! Item was changed: + ----- Method: TTFontDescription class>>initialize (in category 'class initialization') ----- - ----- Method: TTFontDescription class>>initialize (in category 'instance creations') ----- initialize " self initialize " self clearDescriptions. ! Item was changed: + ----- Method: TTFontDescription class>>removeDescriptionNamed: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>removeDescriptionNamed: (in category 'instance creations') ----- removeDescriptionNamed: descriptionName | tt | Descriptions ifNil: [^ self]. + [(tt := Descriptions detect: [:f | f first name = descriptionName] ifNone: [nil]) notNil] whileTrue:[ - [(tt := Descriptions detect: [:f | f name = descriptionName] ifNone: [nil]) notNil] whileTrue:[ Descriptions remove: tt ]. ! Item was changed: + ----- Method: TTFontDescription class>>removeDescriptionNamed:subfamilyName: (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>removeDescriptionNamed:subfamilyName: (in category 'instance creations') ----- removeDescriptionNamed: descriptionName subfamilyName: subfamilyName | tts | Descriptions ifNil: [^ self]. tts := Descriptions select: [:f | f name = descriptionName and: [f subfamilyName = subfamilyName]]. tts do: [:f | Descriptions remove: f]. ! Item was changed: + ----- Method: TTFontDescription class>>setDefault (in category 'instance creation') ----- - ----- Method: TTFontDescription class>>setDefault (in category 'instance creations') ----- setDefault " self setDefault " Default := TTFontReader readFrom: (FileStream readOnlyFileNamed: 'C:\WINDOWS\Fonts\comic.ttf'). ! Item was added: + ----- Method: TTFontDescription>>compactForRanges: (in category 'migration') ----- + compactForRanges: rangesArray + + | newGlyphTable noMapping | + noMapping := glyphs == glyphTable. + newGlyphTable := SparseLargeTable new: rangesArray last last chunkSize: 32 arrayClass: Array base: 0 + 1 defaultValue: (glyphs at: 1). + rangesArray do: [:pair | + pair first to: pair second do: [:i | + newGlyphTable at: i put: (glyphs at: i) + ] + ]. + glyphTable := newGlyphTable. + noMapping ifTrue: [glyphs := glyphTable]. + ! Item was added: + ----- Method: TTFontDescription>>fallbackGlyph (in category 'accessing') ----- + fallbackGlyph + "Answer the fallback glyph, the first in the loca table " + ^ glyphs at: 1! Item was added: + ----- Method: TTFontDescription>>first (in category 'accessing') ----- + first + + ^ self. + ! Item was added: + ----- Method: TTFontDescription>>isRegular (in category 'testing') ----- + isRegular + "Answer true if I am a Regular/Roman font (i.e. not bold, etc.)" + ^ (TTCFont indexOfSubfamilyName: (self subfamilyName)) = 0. + ! Item was changed: ----- Method: TTFontDescription>>objectForDataStream: (in category 'copying') ----- objectForDataStream: refStrm + | dp isCollection | - | dp | "I am about to be written on an object file. Write a reference to a known Font in the other system instead. " "A path to me" (TextConstants at: #forceFontWriting ifAbsent: [false]) ifTrue: [^ self]. "special case for saving the default fonts on the disk. See collectionFromFileNamed:" + isCollection := (Descriptions detect: [:e | e == self]) isCollection. + + dp := DiskProxy global: #TTFontDescription selector: #descriptionFullNamed:at: + args: {self fullName. (isCollection ifTrue: [(TTFontDescription descriptionFullNamed: self fullName) indexOf: self] ifFalse: [0])}. - dp := DiskProxy global: #TTFontDescription selector: #descriptionFullNamed: - args: {self fullName}. refStrm replace: self with: dp. ^ dp. ! Item was added: + ----- Method: TTFontDescription>>renderFallbackGlyphOfHeight:fgColor:bgColor:depth: (in category 'rendering') ----- + renderFallbackGlyphOfHeight: height fgColor: fgColor bgColor: bgColor depth: depth + "Render the glyph with the given code point at the specified pixel height." + ^ self fallbackGlyph + asFormWithScale: height asFloat / (ascender - descender) + ascender: ascender + descender: descender + fgColor: fgColor bgColor: bgColor depth: depth! Item was changed: ----- Method: TTFontDescription>>size (in category 'accessing') ----- size + + ^ glyphTable size. - "Answer the logical number of characters in this font" - ^glyphTable size - 1 ! Item was changed: ----- Method: TTFontReader class>>installTTF:asTextStyle:sizes: (in category 'instance creation') ----- installTTF: ttfFileName asTextStyle: textStyleName sizes: sizeArray "Sizes are in pixels." "TTFontReader + installTTF: 'F:\fonts\amazon__.TTF' - installTTF: 'F:\fonts\amazon:=:=.TTF' asTextStyle: #Amazon sizes: #(24 60)" | ttf fontArray | ttf := self parseFileNamed: ttfFileName. fontArray := sizeArray collect: [:each | (ttf asStrikeFontScale: each / ttf unitsPerEm) name: textStyleName; + pixelSize: each]. - pointSize: each]. TextConstants at: textStyleName asSymbol put: (TextStyle fontArray: fontArray)! Item was changed: ----- Method: TTFontReader>>decodeCmapFmtTable: (in category 'private') ----- decodeCmapFmtTable: entry | cmapFmt length entryCount segCount segments offset cmap firstCode | cmapFmt := entry nextUShort. length := entry nextUShort. entry skip: 2. "skip version" cmapFmt = 0 ifTrue: "byte encoded table" [length := length - 6. "should be always 256" length <= 0 ifTrue: [^ nil]. "but sometimes, this table is empty" cmap := Array new: length. entry nextBytes: length into: cmap startingAt: entry offset. ^ cmap]. cmapFmt = 4 ifTrue: "segment mapping to deltavalues" [segCount := entry nextUShort // 2. entry skip: 6. "skip searchRange, entrySelector, rangeShift" segments := Array new: segCount. segments := (1 to: segCount) collect: [:e | Array new: 4]. 1 to: segCount do: [:i | (segments at: i) at: 2 put: entry nextUShort]. "endCount" entry skip: 2. "skip reservedPad" 1 to: segCount do: [:i | (segments at: i) at: 1 put: entry nextUShort]. "startCount" 1 to: segCount do: [:i | (segments at: i) at: 3 put: entry nextShort]. "idDelta" offset := entry offset. 1 to: segCount do: [:i | (segments at: i) at: 4 put: entry nextUShort]. "idRangeOffset" entryCount := segments inject: 0 into: [:max :seg | max max: seg second]. cmap := Array new: entryCount+1 withAll: 0.. segments withIndexDo: [:seg :si | | code | seg first to: seg second do: [:i | + i < 256 ifTrue: + [seg last > 0 ifTrue: + ["offset to glypthIdArray - this is really C-magic!!" + entry offset: i - seg first - 1 * 2 + seg last + si + si + offset. + code := entry nextUShort. + code > 0 ifTrue: [code := code + seg third]] + ifFalse: + ["simple offset" + code := i + seg third]. + cmap at: i + 1 put: code]]]. - seg last > 0 ifTrue: - ["offset to glypthIdArray - this is really C-magic!!" - entry offset: i - seg first - 1 * 2 + seg last + si + si + offset. - code := entry nextUShort. - code > 0 ifTrue: [code := code + seg third]] - ifFalse: - ["simple offset" - code := i + seg third]. - cmap at: i + 1 put: code]]. ^ cmap]. cmapFmt = 6 ifTrue: "trimmed table" [firstCode := entry nextUShort. entryCount := entry nextUShort. cmap := Array new: entryCount + firstCode withAll: 0. entryCount timesRepeat: [cmap at: (firstCode := firstCode + 1) put: entry nextUShort]. ^ cmap]. ^ nil! Item was changed: ----- Method: TTFontReader>>processCharacterMappingTable: (in category 'processing') ----- processCharacterMappingTable: entry "Read the font's character to glyph index mapping table. If an appropriate mapping can be found then return an association with the format identifier and the contents of the table" | copy initialOffset nSubTables pID sID offset cmap assoc | initialOffset := entry offset. entry skip: 2. "Skip table version" nSubTables := entry nextUShort. 1 to: nSubTables do:[:i| pID := entry nextUShort. sID := entry nextUShort. offset := entry nextULong. + "Check if this is either a Macintosh encoded table + or a Windows encoded table" + (pID = 1 or:[pID = 3]) ifTrue:[ - "Check if this is either a Unicode (0), Macintosh (1), - or a Windows (3) encoded table" - (#(0 1 3) includes: pID) ifTrue:[ "Go to the beginning of the table" copy := entry copy. copy offset: initialOffset + offset. cmap := self decodeCmapFmtTable: copy. + (pID = 3 and: [cmap notNil]) "Prefer Windows encoding over everything else" - (pID = 0 and: [cmap notNil]) "Prefer Unicode encoding over everything else" ifTrue: [^ pID -> cmap]. + assoc := pID -> cmap. "Keep it in case we don't find a Mac encoded table" - assoc := pID -> cmap. "Keep it in case we don't find a better table" ]. ]. ^assoc! Item was changed: ----- Method: TTFontReader>>processCompositeGlyph:contours:from: (in category 'processing') ----- processCompositeGlyph: glyph contours: nContours from: entry "Read a composite glyph from the font data. The glyph passed into this method contains some state variables that must be copied into the resulting composite glyph." | flags glyphIndex hasInstr cGlyph ofsX ofsY iLen a11 a12 a21 a22 m | cGlyph := TTCompositeGlyph new. a11 := a22 := 16r4000. "1.0 in F2Dot14" a21 := a12 := 0. "0.0 in F2Dot14" "Copy state" cGlyph bounds: glyph bounds; glyphIndex: glyph glyphIndex. hasInstr := false. [ flags := entry nextUShort. glyphIndex := entry nextUShort + 1. (flags bitAnd: 1) = 1 ifTrue:[ ofsX := entry nextShort. ofsY := entry nextShort. ] ifFalse:[ (ofsX := entry nextByte) > 127 ifTrue:[ofsX := ofsX - 256]. (ofsY := entry nextByte) > 127 ifTrue:[ofsY := ofsY - 256]]. ((flags bitAnd: 2) = 2) ifFalse:[self halt]. (flags bitAnd: 8) = 8 ifTrue:[ a11 := a22 := entry nextShort]. (flags bitAnd: 64) = 64 ifTrue:[ a11 := entry nextShort. a22 := entry nextShort]. (flags bitAnd: 128) = 128 ifTrue:[ "2x2 transformation" a11 := entry nextShort. a21 := entry nextShort. a12 := entry nextShort. a22 := entry nextShort]. m := MatrixTransform2x3 new. "Convert entries from F2Dot14 to float" m a11: (a11 asFloat / 16r4000). m a12: (a12 asFloat / 16r4000). m a21: (a21 asFloat / 16r4000). m a22: (a22 asFloat / 16r4000). m a13: ofsX. m a23: ofsY. cGlyph addGlyph: (glyphs at: glyphIndex) transformation: m. hasInstr := hasInstr or:[ (flags bitAnd: 256) = 256]. + "Continue as long as the MORE_COMPONENTS bit is set" - "Continue as long as the MORE:=COMPONENTS bit is set" (flags bitAnd: 32) = 32] whileTrue. hasInstr ifTrue:[ iLen := entry nextUShort. entry skip: iLen]. ^cGlyph! Item was added: + ----- Method: TTFontReader>>processKerningSubTableType0: (in category 'processing') ----- + processKerningSubTableType0: entry + + | kp nKernPairs | + nKernPairs := entry nextUShort. + entry skip: 2. "Skip search range" + entry skip: 2. "Skip entry selector" + entry skip: 2. "Skip range shift" + kernPairs := Array new: nKernPairs. + 1 to: nKernPairs do:[:i| + kp := TTKernPair new. + kp left: entry nextUShort. + kp right: entry nextUShort. + kp value: entry nextShort. + kernPairs at: i put: kp]. + ^true + ! Item was changed: ----- Method: TTFontReader>>processKerningTable: (in category 'processing') ----- processKerningTable: entry "Extract the kerning information for pairs of glyphs." + | version nTables covLow covHigh | + version := entry nextUShort. "Skip table version" + nTables := entry nextUShort. "Skip number of sub tables -- we're using the first one only" + nTables = 0 ifTrue: [" This detection is hacky " + entry skip: -4. "rewind" + ^ self processOSXKerningTable: entry]. - | covLow covHigh nKernPairs kp | - entry skip: 2. "Skip table version" - entry skip: 2. "Skip number of sub tables -- we're using the first one only" entry skip: 2. "Skip current subtable number" entry skip: 2. "Skip length of subtable" covHigh := entry nextByte. covLow := entry nextByte. "Make sure the format is right (kerning table and format type 0)" ((covLow bitAnd: 2) = 2 or:[ covHigh ~= 0]) ifTrue:[^false]. + "Subtable" + ^ self processKerningSubTableType0: entry. + ! - nKernPairs := entry nextUShort. - entry skip: 2. "Skip search range" - entry skip: 2. "Skip entry selector" - entry skip: 2. "Skip range shift" - kernPairs := Array new: nKernPairs. - 1 to: nKernPairs do:[:i| - kp := TTKernPair new. - kp left: entry nextUShort. - kp right: entry nextUShort. - kp value: entry nextShort. - kernPairs at: i put: kp]. - ^true! Item was added: + ----- Method: TTFontReader>>processOSXKerningTable: (in category 'processing') ----- + processOSXKerningTable: entry + "From Apple's TrueType reference: + + Previous versions of the 'kern' table defined both the version and nTables fields in the header as UInt16 values and not UInt32 values. Use of the older format on OS X is discouraged (although AAT can sense an old kerning table and still make correct use of it). Microsoft Windows still uses the older format for the 'kern' table and will not recognize the newer one. Fonts targeted for OS X only should use the new format; fonts targeted for both OS X and Windows should use the old format. + " + "Extract the kerning information for pairs of glyphs." + | version nTables length coverage tupleIndex | + version := entry nextULong. "Skip table version" + nTables := entry nextULong. "Skip number of sub tables -- we're using the first one only" + + length := entry nextULong. "Skip length of subtable" + coverage := entry nextUShort. + tupleIndex := entry nextUShort. "Skip tuple index". + "Make sure the format is right (kerning table and format type 0)" + coverage = 0 ifFalse: [^false]. + + "Subtable" + ^ self processKerningSubTableType0: entry. + ! Item was changed: ----- Method: TTFontReader>>processSimpleGlyph:contours:from: (in category 'processing') ----- processSimpleGlyph: glyph contours: nContours from: entry | endPts nPts iLength flags | endPts := Array new: nContours. 1 to: nContours do:[:i| endPts at: i put: entry nextUShort]. glyph initializeContours: nContours with: endPts. + nContours = 0 ifTrue: [^ self]. nPts := endPts last + 1. iLength := entry nextUShort. "instruction length" entry skip: iLength. flags := self getGlyphFlagsFrom: entry size: nPts. self readGlyphXCoords: entry glyph: glyph nContours: nContours flags: flags endPoints: endPts. self readGlyphYCoords: entry glyph: glyph nContours: nContours flags: flags endPoints: endPts. glyph buildContours.! From commits at source.squeak.org Thu Mar 19 10:38:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 10:38:03 2015 Subject: [squeak-dev] The Trunk: Multilingual-topa.202.mcz Message-ID: Tobias Pape uploaded a new version of Multilingual to project The Trunk: http://source.squeak.org/trunk/Multilingual-topa.202.mcz ==================== Summary ==================== Name: Multilingual-topa.202 Author: topa Time: 19 March 2015, 11:37:45.607 am UUID: 327ad8ef-6f2a-4f1e-9a90-e3cc544d6305 Ancestors: Multilingual-nice.201 Move to Morphic =============== Diff against Multilingual-nice.201 =============== Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender: (in category '*Multilingual-Display-converting') ----- - asFormWithScale: scale ascender: ascender descender: descender - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: Color black - bgColor: Color white - depth: 8 - replaceColor: true. - ! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth: (in category '*Multilingual-Display-converting') ----- - asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth - - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: fgColor - bgColor: bgColor - depth: depth - replaceColor: false. - ! Item was removed: - ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor: (in category '*Multilingual-Display-converting') ----- - asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag - - ^ self - asFormWithScale: scale - ascender: ascender - descender: descender - fgColor: fgColor - bgColor: bgColor - depth: depth - replaceColor: replaceColorFlag - lineGlyph: nil - lingGlyphWidth: 0 - emphasis: 0.! From commits at source.squeak.org Thu Mar 19 10:40:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 10:40:45 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.784.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.784.mcz ==================== Summary ==================== Name: Morphic-topa.784 Author: topa Time: 19 March 2015, 11:40:04.459 am UUID: 4213f9dc-bbed-4cbd-9a7e-816a07234bd8 Ancestors: Morphic-topa.783 Add a Font Importer Tool. You can now easily import available font into the image, either by actually embedding them or by referencing the font file on disk. =============== Diff against Morphic-topa.783 =============== Item was changed: ----- Method: FontChooserTool>>fontList (in category 'font list') ----- fontList "List of available font family names" + ^fontList ifNil:[fontList := TextStyle knownTextStyles]! - ^fontList ifNil:[fontList := (TextConstants select: [:each | each isKindOf: TextStyle]) keys asArray sort]! Item was added: + Object subclass: #FontImporterFontDescription + instanceVariableNames: 'fontname filename children parent' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Support'! Item was added: + ----- Method: FontImporterFontDescription>><= (in category 'comparing') ----- + <= other + + ^ self fontname asString <= other fontname asString! Item was added: + ----- Method: FontImporterFontDescription>>addChild: (in category 'accessing') ----- + addChild: aChild + + ^ self children add: aChild! Item was added: + ----- Method: FontImporterFontDescription>>allFilenames (in category 'accessing') ----- + allFilenames + + ^ self filename + ifNil: [ + (self children + select: [:child | child filename notNil] + thenCollect: [:child | child filename]) + asSet asArray] + ifNotNil: [:f | {f}] ! Item was added: + ----- Method: FontImporterFontDescription>>children (in category 'accessing') ----- + children + + ^ children ifNil: [children := OrderedCollection new].! Item was added: + ----- Method: FontImporterFontDescription>>children: (in category 'accessing') ----- + children: anObject + + children := anObject! Item was added: + ----- Method: FontImporterFontDescription>>filename (in category 'accessing') ----- + filename + + ^ filename! Item was added: + ----- Method: FontImporterFontDescription>>filename: (in category 'accessing') ----- + filename: anObject + + filename := anObject! Item was added: + ----- Method: FontImporterFontDescription>>fontname (in category 'accessing') ----- + fontname + + ^ fontname! Item was added: + ----- Method: FontImporterFontDescription>>fontname: (in category 'accessing') ----- + fontname: anObject + + fontname := anObject! Item was added: + ----- Method: FontImporterFontDescription>>hasChildren (in category 'testing') ----- + hasChildren + + ^ self children notNil and: [self children notEmpty]! Item was added: + ----- Method: FontImporterFontDescription>>normalize (in category 'actions') ----- + normalize + + self children size = 1 ifTrue: [ | pseudoChild | + pseudoChild := self children removeFirst. + (self filename notNil and: [pseudoChild filename ~= self filename]) + ifTrue: [self error: 'Inconsistent state']. + self filename: pseudoChild filename]! Item was added: + ----- Method: FontImporterFontDescription>>parent (in category 'accessing') ----- + parent + + ^ parent! Item was added: + ----- Method: FontImporterFontDescription>>parent: (in category 'accessing') ----- + parent: anObject + + parent := anObject! Item was added: + ----- Method: FontImporterFontDescription>>printOn: (in category 'printing') ----- + printOn: aStream + + self parent ifNotNil: [:p | aStream nextPutAll: p fontname; nextPut: $ ]. + aStream nextPutAll: self fontname. + self children notEmpty ifTrue: [aStream nextPut: $ ]. + self children + do: [:subfont | aStream nextPutAll: subfont fontname] + separatedBy: [aStream nextPut: $/]. + aStream nextPut: $ ; nextPut: $(. + self allFilenames + do: [:filename | aStream nextPutAll: filename] + separatedBy: [aStream nextPut: $,; nextPut: $ ]. + aStream nextPut: $). + ! Item was added: + Model subclass: #FontImporterTool + instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Support'! + + !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! + A tool to import platform (native) fonts into the image! Item was added: + ----- Method: FontImporterTool class>>default (in category 'accessing') ----- + default + "Answer the default font imporer tool, ie me + (polymorphic with font chooser) + " + ^ self! Item was added: + ----- Method: FontImporterTool class>>initialize (in category 'class initialization') ----- + initialize + + self registerInOpenMenu.! Item was added: + ----- Method: FontImporterTool class>>open (in category 'opening') ----- + open + " + FontChooserTool open. + " + ^self new open! Item was added: + ----- Method: FontImporterTool class>>openWithWindowTitle:for:setSelector:getSelector: (in category 'opening') ----- + openWithWindowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + " + FontChooserTool + openWithWindowTitle: 'Choose the Menu Font' + for: Preferences + setSelector: #setMenuFontTo: + getSelector: #standardMenuFont. + " + ^(self withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector) open! Item was added: + ----- Method: FontImporterTool class>>registerInOpenMenu (in category 'class initialization') ----- + registerInOpenMenu + (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ + TheWorldMenu unregisterOpenCommand: 'Font Importer'. + TheWorldMenu registerOpenCommand: {'Font Importer'. {self. #open}}]. + ! Item was added: + ----- Method: FontImporterTool class>>unload (in category 'class initialization') ----- + unload + + self unregisterFromOpenMenu.! Item was added: + ----- Method: FontImporterTool class>>unregisterFromOpenMenu (in category 'class initialization') ----- + unregisterFromOpenMenu + (TheWorldMenu respondsTo: #registerOpenCommand:) + ifTrue: [TheWorldMenu unregisterOpenCommand: 'Font Importer']. + ! Item was added: + ----- Method: FontImporterTool class>>windowTitle:for:setSelector:getSelector: (in category 'opening') ----- + windowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + | instance | + + instance := self new. + instance + title: titleString; + target: anObject; + setSelector: setSelector; + getSelector: getSelector. + ^instance open! Item was added: + ----- Method: FontImporterTool class>>withTitle:for:setSelector:getSelector: (in category 'opening') ----- + withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + " + (FontChooserTool + withTitle: 'Choose the Menu Font' + for: Preferences + setSelector: #setMenuFontTo: + getSelector: #standardMenuFont) open. + " + | instance | + instance := self new. + instance + title: titleString; + target: anObject; + setSelector: setSelector; + getSelector: getSelector. + ^instance! Item was added: + ----- Method: FontImporterTool>>allFonts (in category 'accessing') ----- + allFonts + ^ allFonts ifNil: [ | fonts | + fonts := Dictionary new. + Cursor wait showWhile: [ + TTFileDescription fontPathsDo:[:path | + TTFileDescription fontFilesIn: path do:[:font| | fontDesc filename fname | + filename := path, FileDirectory slash, font fileName. + fname := self textForFamily: font familyName subfamily: nil. + fontDesc := fonts + at: font familyName + ifAbsentPut: (FontImporterFontDescription new fontname: fname; yourself). + font subfamilyName + ifNil: [fontDesc filename: filename] + ifNotNil: [ |subfontDesc sname | + sname := self textForFamily: font familyName subfamily: font subfamilyName. + subfontDesc := FontImporterFontDescription new fontname: sname; yourself. + subfontDesc + parent: fontDesc; + filename: filename. + fontDesc addChild: subfontDesc]]]]. + allFonts := fonts values sorted. + allFonts do: [:fontDesc | fontDesc normalize]. + allFonts]. + + ! Item was added: + ----- Method: FontImporterTool>>allFonts: (in category 'accessing') ----- + allFonts: anObject + + allFonts := anObject. + self changed: #allFonts.! Item was added: + ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- + buildButtonBarWith: builder + "Build the button bar" + | panelSpec buttonSpec | + panelSpec := builder pluggablePanelSpec new. + panelSpec children: OrderedCollection new. + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Import ' translated; + action: #import; + frame: (0@0 corner: (1/3)@1); + yourself. + panelSpec children addLast: buttonSpec. + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Install ' translated; + action: #install; + frame: ((1/3)@0 corner: (2/3)@1); + yourself. + panelSpec children addLast: buttonSpec. + + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Close ' translated; + action: #close; + frame: ((2/3)@0 corner: 1@1); + yourself. + panelSpec children addLast: buttonSpec. + + + ^panelSpec! Item was added: + ----- Method: FontImporterTool>>buildFontListWith: (in category 'toolbuilder') ----- + buildFontListWith: builder + "Build the font choosers list of font names" + + ^ builder pluggableTreeSpec new + model: self; + roots: #allFonts; + label: #labelOf: ; + getChildren: #childrenOf: ; + getSelected: #currentSelection; + setSelected: #currentSelection:; + setSelectedParent: #currentParent:; + autoDeselect: false; + yourself + ! Item was added: + ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- + buildPreviewPaneWith: builder + "Build the preview panel" + + ^ builder pluggablePanelSpec new + children: { + builder pluggableTextSpec new + model: self; + getText: #filename; + frame: (LayoutFrame + fractions: (0@0 corner: 1@0) + offsets: (0@0 corner: 0@ -25)); + yourself. + + builder pluggableTextSpec new + name: #preview; + model: self; + getText: #contents; + frame: (LayoutFrame + fractions: (0@0 corner: 1@0.75) + offsets: (0@ 30 corner: 0@0)); + yourself. + + builder pluggableTextSpec new + model: self; + getText: #copyright; + frame: (LayoutFrame + fractions: (0@0.75 corner: 1@1)); + yourself + + }; + yourself! Item was added: + ----- Method: FontImporterTool>>buildWindowWith: (in category 'toolbuilder') ----- + buildWindowWith: builder + + ^ builder pluggableWindowSpec new + model: self; + label: #windowTitle; + children: OrderedCollection new; + yourself + ! Item was added: + ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- + buildWindowWith: builder specs: specs + | windowSpec | + windowSpec := self buildWindowWith: builder. + specs do:[:assoc| | action widgetSpec rect | + rect := assoc key. + action := assoc value. + widgetSpec := action value. + widgetSpec ifNotNil:[ + widgetSpec frame: rect. + windowSpec children add: widgetSpec]]. + ^windowSpec! Item was added: + ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + "Create the ui for the browser" + "ToolBuilder open: self" + | windowSpec | + windowSpec := self buildWindowWith: builder specs: { + (self fontListFrame) -> [self buildFontListWith: builder]. + (self previewFrame) -> [self buildPreviewPaneWith: builder]. + (self buttonsFrame) -> [self buildButtonBarWith: builder]. + }. + windowSpec extent: self initialExtent. + window := builder build: windowSpec. + "Yes, that's a hack. But it looks ugly with line breaks." + (builder widgetAt: #preview) textMorph wrapFlag: false. + ^window! Item was added: + ----- Method: FontImporterTool>>buttonHeight (in category 'toolbuilder') ----- + buttonHeight + ^Preferences standardButtonFont height + 25! Item was added: + ----- Method: FontImporterTool>>buttonsFrame (in category 'toolbuilder') ----- + buttonsFrame + + ^ LayoutFrame + fractions: (0@1 corner: 1@1) + offsets: (0@ self buttonHeight negated corner: 0@0) + ! Item was added: + ----- Method: FontImporterTool>>childrenOf: (in category 'accessing') ----- + childrenOf: aFontDescription + + ^ aFontDescription children! Item was added: + ----- Method: FontImporterTool>>close (in category 'actions') ----- + close + ToolBuilder default close: window.! Item was added: + ----- Method: FontImporterTool>>contents (in category 'toolbuilder') ----- + contents + | sample i c f | + sample := WriteStream on: ''. + f := self selectedFont ifNil:[^Text new]. + (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ + sample + nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; + nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; + nextPutAll: '0123456789'; cr; cr; + nextPutAll: + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.' + ] ifTrue:[ + i := 0. + 33 to: 255 do:[:ci | + sample nextPut: (c:=Character value: ci). + i := i + 1. + (('@Z`z' includes:c) or:[i = 30]) + ifTrue:[i :=0. sample cr]]. + ]. + sample := sample contents asText. + sample addAttribute: (TextFontReference toFont: f). + ^sample! Item was added: + ----- Method: FontImporterTool>>copyright (in category 'toolbuilder') ----- + copyright + | f | + f := self selectedFont ifNil:[^ '']. + ^ f isTTCFont + ifTrue: [f ttcDescription copyright ifNil: ['']] + ifFalse: ['']! Item was added: + ----- Method: FontImporterTool>>currentParent (in category 'accessing') ----- + currentParent + + ^ currentParent! Item was added: + ----- Method: FontImporterTool>>currentParent: (in category 'accessing') ----- + currentParent: anObject + + anObject = currentParent ifTrue: [^ self]. + currentParent := anObject. + self changed: #currentParent. + ! Item was added: + ----- Method: FontImporterTool>>currentSelection (in category 'accessing') ----- + currentSelection + + ^ currentSelection! Item was added: + ----- Method: FontImporterTool>>currentSelection: (in category 'accessing') ----- + currentSelection: anObject + + anObject = currentSelection ifTrue: [^ self]. + currentSelection := anObject. + self changed: #currentSelection. + self changed: #contents. + self changed: #filename. + self changed: #copyright.! Item was added: + ----- Method: FontImporterTool>>emphasis (in category 'accessing') ----- + emphasis + + ^ emphasis! Item was added: + ----- Method: FontImporterTool>>emphasis: (in category 'accessing') ----- + emphasis: anObject + + emphasis := anObject! Item was added: + ----- Method: FontImporterTool>>filename (in category 'toolbuilder') ----- + filename + + ^ self currentSelection + ifNil: [''] + ifNotNil: [:sel | + String streamContents: [:stream | + sel allFilenames + do: [:filename | stream nextPutAll: filename] + separatedBy: [stream nextPut: $,;nextPut: $ ]]]! Item was added: + ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'toolbuilder') ----- + font: f hasGlyphOf: aCharacter + + ^ f isTTCFont + ifFalse: [f hasGlyphOf: aCharacter] + ifTrue: [ + " [(f hasGlyphOf: aCharacter) not] does not work, the fallback glyph is always found instead. + So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." + (f formOf: aCharacter) bits ~= f fallbackForm bits] + ! Item was added: + ----- Method: FontImporterTool>>fontFromFamily: (in category 'helper') ----- + fontFromFamily: aFamily + + | readFonts | + aFamily ifNil: [^ TextStyle default fonts first]. + readFonts := TTFileDescription readFontsFrom: aFamily allFilenames anyOne. + ^ (readFonts size > 1 + ifTrue: [ + | ftArray | + " see TTCFontSet>>newTextStyleFromTT: " + ftArray := readFonts collect: [:ttc | |f| + ttc ifNil: [nil] ifNotNil: [ + f := TTCFont new. + f ttcDescription: ttc. + f pointSize: 11.0 . + f]]. + TTCFontSet newFontArray: ftArray] + ifFalse: [ |f| + f := TTCFont new. + f ttcDescription: readFonts anyOne. + f pointSize: 11.0 . + f])! Item was added: + ----- Method: FontImporterTool>>fontListFrame (in category 'toolbuilder') ----- + fontListFrame + + ^ LayoutFrame + fractions: (0@0 corner: 0.4@1) + offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>import (in category 'actions') ----- + import + | megaSize filenames fonts | + fonts := self currentSelection. + filenames := fonts allFilenames. + megaSize := ((filenames inject: 0 into: [ :sum :fn | + sum + (FileStream readOnlyFileNamed: fn do: [:file | file size])]) / (1024 * 1024)) asFloat. + (UIManager default confirm: ( + 'About to import {1}{2}.\\This is at least {3} MB of space required int the image.\ + Please respect the copyright and embedding restrictions of the font.\ + Proceed?' + withCRs format: { + self currentParent + ifNotNil: [:p| p fontname, ' ', self currentSelection fontname] + ifNil: [self currentSelection fontname]. + filenames size > 1 ifTrue: [' (', filenames size, ' font files)'] ifFalse: ['']. + megaSize printShowingDecimalPlaces: 2})) + ifTrue: [ + filenames do: [:filename | | readFonts | + readFonts := TTCFontDescription addFromTTFile: filename. + readFonts isCollection + ifFalse: [TTCFont newTextStyleFromTT: readFonts] + ifTrue: [self importFontFamily: readFonts]]]. + self allFonts: nil. "force redraw" + ! Item was added: + ----- Method: FontImporterTool>>importFontFamily: (in category 'helper') ----- + importFontFamily: readFonts + + |r rest array | + r := readFonts detect: [:f | + [f isRegular] on: Error do: [false] "hack for unknown emphases" + ] ifNone: [^ TTCFont newTextStyleFromTT: readFonts first]. + rest := readFonts copyWithout: r. + array :=TTCFont pointSizes collect: [:pt | | f | + f := TTCFont new ttcDescription: r; pointSize: pt; yourself. + rest do: [:rf | + (self isStyleNameSupported: rf subfamilyName) + ifTrue: [f derivativeFont: (TTCFont new ttcDescription: rf; pointSize: pt; yourself)] + ifFalse: [ + Transcript show: 'Cannot import unknown style ', rf subfamilyName, ' from Font family ', f name]]. + f]. + ^ TTCFont reorganizeForNewFontArray: array name: array first name asSymbol.! Item was added: + ----- Method: FontImporterTool>>initialExtent (in category 'initialize') ----- + initialExtent + + ^ 600@400.! Item was added: + ----- Method: FontImporterTool>>initialize (in category 'initialize') ----- + initialize + super initialize. + title := 'Choose a Font to import'. + emphasis := 0. + ! Item was added: + ----- Method: FontImporterTool>>install (in category 'actions') ----- + install + | filenames fonts | + fonts := self currentSelection. + self warningSeen ifFalse: [ + (UIManager default confirm: ( + 'Note that installing a font instead of importing may make the + image un-portable, since the installed font must be present on + the system the next time the image is run. + + This warning is only shown once per session.' ) trueChoice: 'Proceed' falseChoice: 'Cancel') + ifFalse: [^ self]. + self warningSeen: true].. + filenames := fonts allFilenames. + filenames do: [:filename | | readFonts | + readFonts := TTFileDescription readFontsFrom: filename. + readFonts isCollection + ifFalse: [TTCFont newTextStyleFromTT: readFonts] + ifTrue: [self importFontFamily: readFonts]]. + self allFonts: nil. "force redraw"! Item was added: + ----- Method: FontImporterTool>>isStyleNameSupported: (in category 'helper') ----- + isStyleNameSupported: subfamilyName + + ^ (TextStyle decodeStyleName: subfamilyName) second isEmpty! Item was added: + ----- Method: FontImporterTool>>labelOf: (in category 'accessing') ----- + labelOf: aFontDescription + + ^ aFontDescription fontname + + ! Item was added: + ----- Method: FontImporterTool>>open (in category 'toolbuilder') ----- + open + ^ToolBuilder open: self! Item was added: + ----- Method: FontImporterTool>>previewFrame (in category 'toolbuilder') ----- + previewFrame + + ^ LayoutFrame + fractions: (0.4@0 corner: 1@1) + offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>selectedFont (in category 'font list') ----- + selectedFont + | fontDesc font | + fontDesc := self currentSelection. + font := self fontFromFamily: fontDesc. + font isFontSet ifTrue: [ + font := (self currentParent isNil or: [self currentParent = self currentSelection]) + ifTrue: [font fontArray anyOne] + ifFalse: [ "we have selected a leaf " + font fontArray + detect: [:subfont | subfont subfamilyName = fontDesc fontname] + ifNone: [font]]]. + ^font emphasized: emphasis! Item was added: + ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'accessing') ----- + textForFamily: familyName subfamily: subfamilyName + + subfamilyName ifNil: [ + ^ (TextStyle named: familyName) + ifNil: [familyName] + ifNotNil: [:style | style isTTCStyle + ifTrue: ["we are already present " + Text string: familyName attribute: TextEmphasis underlined] + ifFalse: [familyName]]]. + + " frome here on it is only about subfamilies" + + (self isStyleNameSupported: subfamilyName) + ifFalse: [^ Text string: subfamilyName attribute: TextColor gray]. + + ^ (TextStyle named: familyName) + ifNil: ["importable" subfamilyName] + ifNotNil: [:style | + (style isTTCStyle and: [ | regular emph | + regular := style fonts anyOne. + emph := TTCFont indexOfSubfamilyName: subfamilyName. + " detect if this style is already imported " + regular emphasis = emph or: [(regular emphasis: emph) ~= regular]]) + ifFalse: ["again importable" subfamilyName] + ifTrue: [Text string: subfamilyName attribute: TextEmphasis underlined]]! Item was added: + ----- Method: FontImporterTool>>title (in category 'accessing') ----- + title + + ^ title! Item was added: + ----- Method: FontImporterTool>>title: (in category 'accessing') ----- + title: anObject + "Set the value of title" + + title := anObject! Item was added: + ----- Method: FontImporterTool>>warningSeen (in category 'accessing') ----- + warningSeen + + ^ warningSeen ifNil: [false]! Item was added: + ----- Method: FontImporterTool>>warningSeen: (in category 'accessing') ----- + warningSeen: anObject + + warningSeen := anObject! Item was added: + ----- Method: FontImporterTool>>window (in category 'accessing') ----- + window + ^window! Item was added: + ----- Method: FontImporterTool>>window: (in category 'accessing') ----- + window: anObject + + window := anObject! Item was added: + ----- Method: FontImporterTool>>windowTitle (in category 'initialize') ----- + windowTitle + ^ title translated! Item was added: + ----- Method: TTCFont>>fallbackForm (in category '*Morphic-Multilingual') ----- + fallbackForm + "Compute the glyph form for the fallback glyph" + ^ttcDescription renderFallbackGlyphOfHeight: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: Color black + bgColor: Color white + depth: 8 + replaceColor: true. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: false. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: replaceColorFlag + lineGlyph: nil + lingGlyphWidth: 0 + emphasis: 0.! From commits at source.squeak.org Thu Mar 19 10:41:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 10:41:52 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.784.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.784.mcz ==================== Summary ==================== Name: Morphic-topa.784 Author: topa Time: 19 March 2015, 11:40:04.459 am UUID: 4213f9dc-bbed-4cbd-9a7e-816a07234bd8 Ancestors: Morphic-topa.783 Add a Font Importer Tool. You can now easily import available font into the image, either by actually embedding them or by referencing the font file on disk. =============== Diff against Morphic-topa.783 =============== Item was changed: ----- Method: FontChooserTool>>fontList (in category 'font list') ----- fontList "List of available font family names" + ^fontList ifNil:[fontList := TextStyle knownTextStyles]! - ^fontList ifNil:[fontList := (TextConstants select: [:each | each isKindOf: TextStyle]) keys asArray sort]! Item was added: + Object subclass: #FontImporterFontDescription + instanceVariableNames: 'fontname filename children parent' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Support'! Item was added: + ----- Method: FontImporterFontDescription>><= (in category 'comparing') ----- + <= other + + ^ self fontname asString <= other fontname asString! Item was added: + ----- Method: FontImporterFontDescription>>addChild: (in category 'accessing') ----- + addChild: aChild + + ^ self children add: aChild! Item was added: + ----- Method: FontImporterFontDescription>>allFilenames (in category 'accessing') ----- + allFilenames + + ^ self filename + ifNil: [ + (self children + select: [:child | child filename notNil] + thenCollect: [:child | child filename]) + asSet asArray] + ifNotNil: [:f | {f}] ! Item was added: + ----- Method: FontImporterFontDescription>>children (in category 'accessing') ----- + children + + ^ children ifNil: [children := OrderedCollection new].! Item was added: + ----- Method: FontImporterFontDescription>>children: (in category 'accessing') ----- + children: anObject + + children := anObject! Item was added: + ----- Method: FontImporterFontDescription>>filename (in category 'accessing') ----- + filename + + ^ filename! Item was added: + ----- Method: FontImporterFontDescription>>filename: (in category 'accessing') ----- + filename: anObject + + filename := anObject! Item was added: + ----- Method: FontImporterFontDescription>>fontname (in category 'accessing') ----- + fontname + + ^ fontname! Item was added: + ----- Method: FontImporterFontDescription>>fontname: (in category 'accessing') ----- + fontname: anObject + + fontname := anObject! Item was added: + ----- Method: FontImporterFontDescription>>hasChildren (in category 'testing') ----- + hasChildren + + ^ self children notNil and: [self children notEmpty]! Item was added: + ----- Method: FontImporterFontDescription>>normalize (in category 'actions') ----- + normalize + + self children size = 1 ifTrue: [ | pseudoChild | + pseudoChild := self children removeFirst. + (self filename notNil and: [pseudoChild filename ~= self filename]) + ifTrue: [self error: 'Inconsistent state']. + self filename: pseudoChild filename]! Item was added: + ----- Method: FontImporterFontDescription>>parent (in category 'accessing') ----- + parent + + ^ parent! Item was added: + ----- Method: FontImporterFontDescription>>parent: (in category 'accessing') ----- + parent: anObject + + parent := anObject! Item was added: + ----- Method: FontImporterFontDescription>>printOn: (in category 'printing') ----- + printOn: aStream + + self parent ifNotNil: [:p | aStream nextPutAll: p fontname; nextPut: $ ]. + aStream nextPutAll: self fontname. + self children notEmpty ifTrue: [aStream nextPut: $ ]. + self children + do: [:subfont | aStream nextPutAll: subfont fontname] + separatedBy: [aStream nextPut: $/]. + aStream nextPut: $ ; nextPut: $(. + self allFilenames + do: [:filename | aStream nextPutAll: filename] + separatedBy: [aStream nextPut: $,; nextPut: $ ]. + aStream nextPut: $). + ! Item was added: + Model subclass: #FontImporterTool + instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' + classVariableNames: '' + poolDictionaries: '' + category: 'Morphic-Support'! + + !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! + A tool to import platform (native) fonts into the image! Item was added: + ----- Method: FontImporterTool class>>default (in category 'accessing') ----- + default + "Answer the default font imporer tool, ie me + (polymorphic with font chooser) + " + ^ self! Item was added: + ----- Method: FontImporterTool class>>initialize (in category 'class initialization') ----- + initialize + + self registerInOpenMenu.! Item was added: + ----- Method: FontImporterTool class>>open (in category 'opening') ----- + open + " + FontChooserTool open. + " + ^self new open! Item was added: + ----- Method: FontImporterTool class>>openWithWindowTitle:for:setSelector:getSelector: (in category 'opening') ----- + openWithWindowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + " + FontChooserTool + openWithWindowTitle: 'Choose the Menu Font' + for: Preferences + setSelector: #setMenuFontTo: + getSelector: #standardMenuFont. + " + ^(self withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector) open! Item was added: + ----- Method: FontImporterTool class>>registerInOpenMenu (in category 'class initialization') ----- + registerInOpenMenu + (TheWorldMenu respondsTo: #registerOpenCommand:) ifTrue: [ + TheWorldMenu unregisterOpenCommand: 'Font Importer'. + TheWorldMenu registerOpenCommand: {'Font Importer'. {self. #open}}]. + ! Item was added: + ----- Method: FontImporterTool class>>unload (in category 'class initialization') ----- + unload + + self unregisterFromOpenMenu.! Item was added: + ----- Method: FontImporterTool class>>unregisterFromOpenMenu (in category 'class initialization') ----- + unregisterFromOpenMenu + (TheWorldMenu respondsTo: #registerOpenCommand:) + ifTrue: [TheWorldMenu unregisterOpenCommand: 'Font Importer']. + ! Item was added: + ----- Method: FontImporterTool class>>windowTitle:for:setSelector:getSelector: (in category 'opening') ----- + windowTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + | instance | + + instance := self new. + instance + title: titleString; + target: anObject; + setSelector: setSelector; + getSelector: getSelector. + ^instance open! Item was added: + ----- Method: FontImporterTool class>>withTitle:for:setSelector:getSelector: (in category 'opening') ----- + withTitle: titleString for: anObject setSelector: setSelector getSelector: getSelector + " + (FontChooserTool + withTitle: 'Choose the Menu Font' + for: Preferences + setSelector: #setMenuFontTo: + getSelector: #standardMenuFont) open. + " + | instance | + instance := self new. + instance + title: titleString; + target: anObject; + setSelector: setSelector; + getSelector: getSelector. + ^instance! Item was added: + ----- Method: FontImporterTool>>allFonts (in category 'accessing') ----- + allFonts + ^ allFonts ifNil: [ | fonts | + fonts := Dictionary new. + Cursor wait showWhile: [ + TTFileDescription fontPathsDo:[:path | + TTFileDescription fontFilesIn: path do:[:font| | fontDesc filename fname | + filename := path, FileDirectory slash, font fileName. + fname := self textForFamily: font familyName subfamily: nil. + fontDesc := fonts + at: font familyName + ifAbsentPut: (FontImporterFontDescription new fontname: fname; yourself). + font subfamilyName + ifNil: [fontDesc filename: filename] + ifNotNil: [ |subfontDesc sname | + sname := self textForFamily: font familyName subfamily: font subfamilyName. + subfontDesc := FontImporterFontDescription new fontname: sname; yourself. + subfontDesc + parent: fontDesc; + filename: filename. + fontDesc addChild: subfontDesc]]]]. + allFonts := fonts values sorted. + allFonts do: [:fontDesc | fontDesc normalize]. + allFonts]. + + ! Item was added: + ----- Method: FontImporterTool>>allFonts: (in category 'accessing') ----- + allFonts: anObject + + allFonts := anObject. + self changed: #allFonts.! Item was added: + ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- + buildButtonBarWith: builder + "Build the button bar" + | panelSpec buttonSpec | + panelSpec := builder pluggablePanelSpec new. + panelSpec children: OrderedCollection new. + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Import ' translated; + action: #import; + frame: (0@0 corner: (1/3)@1); + yourself. + panelSpec children addLast: buttonSpec. + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Install ' translated; + action: #install; + frame: ((1/3)@0 corner: (2/3)@1); + yourself. + panelSpec children addLast: buttonSpec. + + + buttonSpec := builder pluggableButtonSpec new + model: self; + label: ' Close ' translated; + action: #close; + frame: ((2/3)@0 corner: 1@1); + yourself. + panelSpec children addLast: buttonSpec. + + + ^panelSpec! Item was added: + ----- Method: FontImporterTool>>buildFontListWith: (in category 'toolbuilder') ----- + buildFontListWith: builder + "Build the font choosers list of font names" + + ^ builder pluggableTreeSpec new + model: self; + roots: #allFonts; + label: #labelOf: ; + getChildren: #childrenOf: ; + getSelected: #currentSelection; + setSelected: #currentSelection:; + setSelectedParent: #currentParent:; + autoDeselect: false; + yourself + ! Item was added: + ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- + buildPreviewPaneWith: builder + "Build the preview panel" + + ^ builder pluggablePanelSpec new + children: { + builder pluggableTextSpec new + model: self; + getText: #filename; + frame: (LayoutFrame + fractions: (0@0 corner: 1@0) + offsets: (0@0 corner: 0@ -25)); + yourself. + + builder pluggableTextSpec new + name: #preview; + model: self; + getText: #contents; + frame: (LayoutFrame + fractions: (0@0 corner: 1@0.75) + offsets: (0@ 30 corner: 0@0)); + yourself. + + builder pluggableTextSpec new + model: self; + getText: #copyright; + frame: (LayoutFrame + fractions: (0@0.75 corner: 1@1)); + yourself + + }; + yourself! Item was added: + ----- Method: FontImporterTool>>buildWindowWith: (in category 'toolbuilder') ----- + buildWindowWith: builder + + ^ builder pluggableWindowSpec new + model: self; + label: #windowTitle; + children: OrderedCollection new; + yourself + ! Item was added: + ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- + buildWindowWith: builder specs: specs + | windowSpec | + windowSpec := self buildWindowWith: builder. + specs do:[:assoc| | action widgetSpec rect | + rect := assoc key. + action := assoc value. + widgetSpec := action value. + widgetSpec ifNotNil:[ + widgetSpec frame: rect. + windowSpec children add: widgetSpec]]. + ^windowSpec! Item was added: + ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + "Create the ui for the browser" + "ToolBuilder open: self" + | windowSpec | + windowSpec := self buildWindowWith: builder specs: { + (self fontListFrame) -> [self buildFontListWith: builder]. + (self previewFrame) -> [self buildPreviewPaneWith: builder]. + (self buttonsFrame) -> [self buildButtonBarWith: builder]. + }. + windowSpec extent: self initialExtent. + window := builder build: windowSpec. + "Yes, that's a hack. But it looks ugly with line breaks." + (builder widgetAt: #preview) textMorph wrapFlag: false. + ^window! Item was added: + ----- Method: FontImporterTool>>buttonHeight (in category 'toolbuilder') ----- + buttonHeight + ^Preferences standardButtonFont height + 25! Item was added: + ----- Method: FontImporterTool>>buttonsFrame (in category 'toolbuilder') ----- + buttonsFrame + + ^ LayoutFrame + fractions: (0@1 corner: 1@1) + offsets: (0@ self buttonHeight negated corner: 0@0) + ! Item was added: + ----- Method: FontImporterTool>>childrenOf: (in category 'accessing') ----- + childrenOf: aFontDescription + + ^ aFontDescription children! Item was added: + ----- Method: FontImporterTool>>close (in category 'actions') ----- + close + ToolBuilder default close: window.! Item was added: + ----- Method: FontImporterTool>>contents (in category 'toolbuilder') ----- + contents + | sample i c f | + sample := WriteStream on: ''. + f := self selectedFont ifNil:[^Text new]. + (f isSymbolFont or: [(self font: f hasGlyphOf: $a) not]) ifFalse:[ + sample + nextPutAll: 'the quick brown fox jumps over the lazy dog' ;cr; + nextPutAll: 'THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG.' ;cr;cr; + nextPutAll: '0123456789'; cr; cr; + nextPutAll: + 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, + sed do eiusmod tempor incididunt ut labore et dolore + magna aliqua. Ut enim ad minim veniam, quis nostrud + exercitation ullamco laboris nisi ut aliquip ex ea commodo + consequat. Duis aute irure dolor in reprehenderit in voluptate + velit esse cillum dolore eu fugiat nulla pariatur. Excepteur + sint occaecat cupidatat non proident, sunt in culpa qui + officia deserunt mollit anim id est laborum.' + ] ifTrue:[ + i := 0. + 33 to: 255 do:[:ci | + sample nextPut: (c:=Character value: ci). + i := i + 1. + (('@Z`z' includes:c) or:[i = 30]) + ifTrue:[i :=0. sample cr]]. + ]. + sample := sample contents asText. + sample addAttribute: (TextFontReference toFont: f). + ^sample! Item was added: + ----- Method: FontImporterTool>>copyright (in category 'toolbuilder') ----- + copyright + | f | + f := self selectedFont ifNil:[^ '']. + ^ f isTTCFont + ifTrue: [f ttcDescription copyright ifNil: ['']] + ifFalse: ['']! Item was added: + ----- Method: FontImporterTool>>currentParent (in category 'accessing') ----- + currentParent + + ^ currentParent! Item was added: + ----- Method: FontImporterTool>>currentParent: (in category 'accessing') ----- + currentParent: anObject + + anObject = currentParent ifTrue: [^ self]. + currentParent := anObject. + self changed: #currentParent. + ! Item was added: + ----- Method: FontImporterTool>>currentSelection (in category 'accessing') ----- + currentSelection + + ^ currentSelection! Item was added: + ----- Method: FontImporterTool>>currentSelection: (in category 'accessing') ----- + currentSelection: anObject + + anObject = currentSelection ifTrue: [^ self]. + currentSelection := anObject. + self changed: #currentSelection. + self changed: #contents. + self changed: #filename. + self changed: #copyright.! Item was added: + ----- Method: FontImporterTool>>emphasis (in category 'accessing') ----- + emphasis + + ^ emphasis! Item was added: + ----- Method: FontImporterTool>>emphasis: (in category 'accessing') ----- + emphasis: anObject + + emphasis := anObject! Item was added: + ----- Method: FontImporterTool>>filename (in category 'toolbuilder') ----- + filename + + ^ self currentSelection + ifNil: [''] + ifNotNil: [:sel | + String streamContents: [:stream | + sel allFilenames + do: [:filename | stream nextPutAll: filename] + separatedBy: [stream nextPut: $,;nextPut: $ ]]]! Item was added: + ----- Method: FontImporterTool>>font:hasGlyphOf: (in category 'toolbuilder') ----- + font: f hasGlyphOf: aCharacter + + ^ f isTTCFont + ifFalse: [f hasGlyphOf: aCharacter] + ifTrue: [ + " [(f hasGlyphOf: aCharacter) not] does not work, the fallback glyph is always found instead. + So we fake. if aCharacter is the same form as Character null aka 0, we assume absence." + (f formOf: aCharacter) bits ~= f fallbackForm bits] + ! Item was added: + ----- Method: FontImporterTool>>fontFromFamily: (in category 'helper') ----- + fontFromFamily: aFamily + + | readFonts | + aFamily ifNil: [^ TextStyle default fonts first]. + readFonts := TTFileDescription readFontsFrom: aFamily allFilenames anyOne. + ^ (readFonts size > 1 + ifTrue: [ + | ftArray | + " see TTCFontSet>>newTextStyleFromTT: " + ftArray := readFonts collect: [:ttc | |f| + ttc ifNil: [nil] ifNotNil: [ + f := TTCFont new. + f ttcDescription: ttc. + f pointSize: 11.0 . + f]]. + TTCFontSet newFontArray: ftArray] + ifFalse: [ |f| + f := TTCFont new. + f ttcDescription: readFonts anyOne. + f pointSize: 11.0 . + f])! Item was added: + ----- Method: FontImporterTool>>fontListFrame (in category 'toolbuilder') ----- + fontListFrame + + ^ LayoutFrame + fractions: (0@0 corner: 0.4@1) + offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>import (in category 'actions') ----- + import + | megaSize filenames fonts | + fonts := self currentSelection. + filenames := fonts allFilenames. + megaSize := ((filenames inject: 0 into: [ :sum :fn | + sum + (FileStream readOnlyFileNamed: fn do: [:file | file size])]) / (1024 * 1024)) asFloat. + (UIManager default confirm: ( + 'About to import {1}{2}.\\This is at least {3} MB of space required int the image.\ + Please respect the copyright and embedding restrictions of the font.\ + Proceed?' + withCRs format: { + self currentParent + ifNotNil: [:p| p fontname, ' ', self currentSelection fontname] + ifNil: [self currentSelection fontname]. + filenames size > 1 ifTrue: [' (', filenames size, ' font files)'] ifFalse: ['']. + megaSize printShowingDecimalPlaces: 2})) + ifTrue: [ + filenames do: [:filename | | readFonts | + readFonts := TTCFontDescription addFromTTFile: filename. + readFonts isCollection + ifFalse: [TTCFont newTextStyleFromTT: readFonts] + ifTrue: [self importFontFamily: readFonts]]]. + self allFonts: nil. "force redraw" + ! Item was added: + ----- Method: FontImporterTool>>importFontFamily: (in category 'helper') ----- + importFontFamily: readFonts + + |r rest array | + r := readFonts detect: [:f | + [f isRegular] on: Error do: [false] "hack for unknown emphases" + ] ifNone: [^ TTCFont newTextStyleFromTT: readFonts first]. + rest := readFonts copyWithout: r. + array :=TTCFont pointSizes collect: [:pt | | f | + f := TTCFont new ttcDescription: r; pointSize: pt; yourself. + rest do: [:rf | + (self isStyleNameSupported: rf subfamilyName) + ifTrue: [f derivativeFont: (TTCFont new ttcDescription: rf; pointSize: pt; yourself)] + ifFalse: [ + Transcript show: 'Cannot import unknown style ', rf subfamilyName, ' from Font family ', f name]]. + f]. + ^ TTCFont reorganizeForNewFontArray: array name: array first name asSymbol.! Item was added: + ----- Method: FontImporterTool>>initialExtent (in category 'initialize') ----- + initialExtent + + ^ 600@400.! Item was added: + ----- Method: FontImporterTool>>initialize (in category 'initialize') ----- + initialize + super initialize. + title := 'Choose a Font to import'. + emphasis := 0. + ! Item was added: + ----- Method: FontImporterTool>>install (in category 'actions') ----- + install + | filenames fonts | + fonts := self currentSelection. + self warningSeen ifFalse: [ + (UIManager default confirm: ( + 'Note that installing a font instead of importing may make the + image un-portable, since the installed font must be present on + the system the next time the image is run. + + This warning is only shown once per session.' ) trueChoice: 'Proceed' falseChoice: 'Cancel') + ifFalse: [^ self]. + self warningSeen: true].. + filenames := fonts allFilenames. + filenames do: [:filename | | readFonts | + readFonts := TTFileDescription readFontsFrom: filename. + readFonts isCollection + ifFalse: [TTCFont newTextStyleFromTT: readFonts] + ifTrue: [self importFontFamily: readFonts]]. + self allFonts: nil. "force redraw"! Item was added: + ----- Method: FontImporterTool>>isStyleNameSupported: (in category 'helper') ----- + isStyleNameSupported: subfamilyName + + ^ (TextStyle decodeStyleName: subfamilyName) second isEmpty! Item was added: + ----- Method: FontImporterTool>>labelOf: (in category 'accessing') ----- + labelOf: aFontDescription + + ^ aFontDescription fontname + + ! Item was added: + ----- Method: FontImporterTool>>open (in category 'toolbuilder') ----- + open + ^ToolBuilder open: self! Item was added: + ----- Method: FontImporterTool>>previewFrame (in category 'toolbuilder') ----- + previewFrame + + ^ LayoutFrame + fractions: (0.4@0 corner: 1@1) + offsets: (0@0 corner: 0@ self buttonHeight negated + 4)! Item was added: + ----- Method: FontImporterTool>>selectedFont (in category 'font list') ----- + selectedFont + | fontDesc font | + fontDesc := self currentSelection. + font := self fontFromFamily: fontDesc. + font isFontSet ifTrue: [ + font := (self currentParent isNil or: [self currentParent = self currentSelection]) + ifTrue: [font fontArray anyOne] + ifFalse: [ "we have selected a leaf " + font fontArray + detect: [:subfont | subfont subfamilyName = fontDesc fontname] + ifNone: [font]]]. + ^font emphasized: emphasis! Item was added: + ----- Method: FontImporterTool>>textForFamily:subfamily: (in category 'accessing') ----- + textForFamily: familyName subfamily: subfamilyName + + subfamilyName ifNil: [ + ^ (TextStyle named: familyName) + ifNil: [familyName] + ifNotNil: [:style | style isTTCStyle + ifTrue: ["we are already present " + Text string: familyName attribute: TextEmphasis underlined] + ifFalse: [familyName]]]. + + " frome here on it is only about subfamilies" + + (self isStyleNameSupported: subfamilyName) + ifFalse: [^ Text string: subfamilyName attribute: TextColor gray]. + + ^ (TextStyle named: familyName) + ifNil: ["importable" subfamilyName] + ifNotNil: [:style | + (style isTTCStyle and: [ | regular emph | + regular := style fonts anyOne. + emph := TTCFont indexOfSubfamilyName: subfamilyName. + " detect if this style is already imported " + regular emphasis = emph or: [(regular emphasis: emph) ~= regular]]) + ifFalse: ["again importable" subfamilyName] + ifTrue: [Text string: subfamilyName attribute: TextEmphasis underlined]]! Item was added: + ----- Method: FontImporterTool>>title (in category 'accessing') ----- + title + + ^ title! Item was added: + ----- Method: FontImporterTool>>title: (in category 'accessing') ----- + title: anObject + "Set the value of title" + + title := anObject! Item was added: + ----- Method: FontImporterTool>>warningSeen (in category 'accessing') ----- + warningSeen + + ^ warningSeen ifNil: [false]! Item was added: + ----- Method: FontImporterTool>>warningSeen: (in category 'accessing') ----- + warningSeen: anObject + + warningSeen := anObject! Item was added: + ----- Method: FontImporterTool>>window (in category 'accessing') ----- + window + ^window! Item was added: + ----- Method: FontImporterTool>>window: (in category 'accessing') ----- + window: anObject + + window := anObject! Item was added: + ----- Method: FontImporterTool>>windowTitle (in category 'initialize') ----- + windowTitle + ^ title translated! Item was added: + ----- Method: TTCFont>>fallbackForm (in category '*Morphic-Multilingual') ----- + fallbackForm + "Compute the glyph form for the fallback glyph" + ^ttcDescription renderFallbackGlyphOfHeight: self height fgColor: foregroundColor bgColor: Color transparent depth: self depth! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: Color black + bgColor: Color white + depth: 8 + replaceColor: true. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: false. + ! Item was added: + ----- Method: TTGlyph>>asFormWithScale:ascender:descender:fgColor:bgColor:depth:replaceColor: (in category '*Morphic-Multilingual') ----- + asFormWithScale: scale ascender: ascender descender: descender fgColor: fgColor bgColor: bgColor depth: depth replaceColor: replaceColorFlag + + ^ self + asFormWithScale: scale + ascender: ascender + descender: descender + fgColor: fgColor + bgColor: bgColor + depth: depth + replaceColor: replaceColorFlag + lineGlyph: nil + lingGlyphWidth: 0 + emphasis: 0.! From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 10:32:39 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 10:42:50 2015 Subject: [squeak-dev] Re: The Trunk: TrueType-topa.33.mcz In-Reply-To: References: Message-ID: <1426761159960-4813131.post@n4.nabble.com> !!! TTFontDescription DNU #collect: Can you execute "TTCFontSet initialize" safely? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-TrueType-topa-33-mcz-tp4813127p4813131.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Mar 19 10:51:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 10:51:47 2015 Subject: [squeak-dev] The Trunk: TrueType-topa.34.mcz Message-ID: Tobias Pape uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-topa.34.mcz ==================== Summary ==================== Name: TrueType-topa.34 Author: topa Time: 19 March 2015, 11:51:31.347 am UUID: 2ba0a76c-c23a-4dac-a3aa-b1737dd6ca40 Ancestors: TrueType-topa.33 Fix an initializer, more Unicode =============== Diff against TrueType-topa.33 =============== Item was removed: - ----- Method: TTCFontReader>>processCharacterMappingTable: (in category 'as yet unclassified') ----- - processCharacterMappingTable: entry - "Read the font's character to glyph index mapping table. - If an appropriate mapping can be found then return an association - with the format identifier and the contents of the table" - | copy initialOffset nSubTables pID sID offset cmap assoc | - initialOffset := entry offset. - entry skip: 2. "Skip table version" - nSubTables := entry nextUShort. - 1 to: nSubTables do:[:i| - pID := entry nextUShort. - sID := entry nextUShort. - offset := entry nextULong. - "Check if this is either a Macintosh encoded table - or a Windows encoded table" - (#(0 1 3) includes: pID) ifTrue: [ - (assoc notNil and: [assoc key = pID]) ifFalse: [ - "Go to the beginning of the table" - copy := entry copy. - copy offset: initialOffset + offset. - cmap := self decodeCmapFmtTable: copy. - (pID = 0 and: [cmap notNil]) "Prefer Unicode encoding over everything else" - ifTrue: [^ pID -> cmap]. - "(pID = 1 and: [cmap notNil])" "Prefer Macintosh encoding over everything else" - "ifTrue: [pID -> cmap]." - assoc := pID -> cmap. "Keep it in case we don't find a better table" - ]. - ]. - ]. - ^assoc! Item was changed: ----- Method: TTCFontSet class>>initialize (in category 'class initialization') ----- initialize " self initialize " | tt | tt := TTCFontDescription default. + tt ifNotNil: [self newTextStyleFromTT: {tt}]. - tt ifNotNil: [self newTextStyleFromTT: tt]. ! Item was changed: ----- Method: TTFontReader>>processCharacterMappingTable: (in category 'processing') ----- processCharacterMappingTable: entry "Read the font's character to glyph index mapping table. If an appropriate mapping can be found then return an association with the format identifier and the contents of the table" | copy initialOffset nSubTables pID sID offset cmap assoc | initialOffset := entry offset. entry skip: 2. "Skip table version" nSubTables := entry nextUShort. 1 to: nSubTables do:[:i| pID := entry nextUShort. sID := entry nextUShort. offset := entry nextULong. "Check if this is either a Macintosh encoded table or a Windows encoded table" + (#(0 1 3) includes: pID) ifTrue: [ + (assoc notNil and: [assoc key = pID]) ifFalse: [ + "Go to the beginning of the table" + copy := entry copy. + copy offset: initialOffset + offset. + cmap := self decodeCmapFmtTable: copy. + (pID = 0 and: [cmap notNil]) "Prefer Unicode encoding over everything else" + ifTrue: [^ pID -> cmap]. + "(pID = 1 and: [cmap notNil])" "Prefer Macintosh encoding over everything else" + "ifTrue: [pID -> cmap]." + assoc := pID -> cmap. "Keep it in case we don't find a better table" + ]. - (pID = 1 or:[pID = 3]) ifTrue:[ - "Go to the beginning of the table" - copy := entry copy. - copy offset: initialOffset + offset. - cmap := self decodeCmapFmtTable: copy. - (pID = 3 and: [cmap notNil]) "Prefer Windows encoding over everything else" - ifTrue: [^ pID -> cmap]. - assoc := pID -> cmap. "Keep it in case we don't find a Mac encoded table" ]. ]. ^assoc! From Das.Linux at gmx.de Thu Mar 19 10:52:30 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 10:52:35 2015 Subject: [squeak-dev] Re: The Trunk: TrueType-topa.33.mcz In-Reply-To: <1426761159960-4813131.post@n4.nabble.com> References: <1426761159960-4813131.post@n4.nabble.com> Message-ID: <8ABF3D4F-505C-4860-ABFB-448294CCC533@gmx.de> Sorry. Should be fixed. On 19.03.2015, at 11:32, Marcel Taeumel wrote: > !!! TTFontDescription DNU #collect: > > Can you execute "TTCFontSet initialize" safely? > > Best, > Marcel From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 10:49:26 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 10:59:36 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: References: Message-ID: <1426762166547-4813138.post@n4.nabble.com> Nice! :) Two questions: 1. Who does the rendering? Looks kind of irregular... See attachment. 2. Can we move it to the "Tools" package? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813138.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 10:50:54 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 11:01:05 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762166547-4813138.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> Message-ID: <1426762254623-4813139.post@n4.nabble.com> What is the difference between "import" and "install"? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813139.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 10:54:09 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 11:04:17 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762254623-4813139.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> Message-ID: <1426762449067-4813141.post@n4.nabble.com> Would it be difficult to let the user decide/override which font sizes to import? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813141.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 11:08:41 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 11:18:50 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762449067-4813141.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> Message-ID: <1426763321511-4813144.post@n4.nabble.com> Could we apply a short but smart algorithm to the glyphs to increase contrast? As part of the import process. Should not be that difficult. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813144.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Thu Mar 19 12:01:45 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 12:01:50 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762166547-4813138.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> Message-ID: <99D9A2B9-E844-4F31-B931-2F7FB5FC6BF9@gmx.de> Hey, On 19.03.2015, at 11:49, Marcel Taeumel wrote: > Nice! :) > > > > Two questions: > > 1. Who does the rendering? Looks kind of irregular... See attachment. Balloon. A Balloon canvas renders the bezier curves onto a Form for each glyph. > 2. Can we move it to the "Tools" package? Probably. I just put it next to the FontChooserTool, I modeled the importer after that. > > Best, > Marcel From Das.Linux at gmx.de Thu Mar 19 12:02:23 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 12:02:28 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762254623-4813139.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> Message-ID: <65878201-2889-437A-B654-9EE28D9B1529@gmx.de> On 19.03.2015, at 11:50, Marcel Taeumel wrote: > What is the difference between "import" and "install"? > Import embeds the font data in the image, install creates a "reference" font to the font file on disk > Best, > Marcel From Das.Linux at gmx.de Thu Mar 19 12:06:55 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 12:06:58 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426762449067-4813141.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> Message-ID: <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> On 19.03.2015, at 11:54, Marcel Taeumel wrote: > Would it be difficult to let the user decide/override which font sizes to > import? Yeno :D To quote TTCFont class >> #pointSizes "The default sizes that are created when a TextStyle is created. You can add new sizes by the new-size feature." ^ #(9 12 15 24 36). So, it is possible to change the point size of a TTCFont internally and TextStyles also support this somewhat, but actually _adding_ a point size takes code; after import/install you could do ((TextStyle named: 'Gill Sans') addNewFontSize: 8) but there's no UI. > > Best, > Marcel From maxleske at gmail.com Thu Mar 19 12:41:30 2015 From: maxleske at gmail.com (Max Leske) Date: Thu Mar 19 12:41:35 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: <550aa7c2.07abc20a.776b.6695SMTPIN_ADDED_MISSING@mx.google.com> References: <550aa7c2.07abc20a.776b.6695SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > On 19 Mar 2015, at 11:41, squeak-dev-request@lists.squeakfoundation.org wrote: > > Max, > > Where are you getting that package from? The Fuel configuration does #ensureMetacello which then seems to get the latest ConfigurationOfMetacello. > > I just checked and the version available from GemSource[1] loads > (unzips) in both GemStone/GsDevKit and Pharo3.0...it's almost certain > that the Metacello and that package has been tested against Squeak4.5 > and a couple of earlier versions as I've just run a test against the > latest Metacello up on Travis .. I am not testing against Squeak4.6 ... > yet ... but I have been testing regularly against the Squeak-Trunk and > those tests passed today[3][4] I?m not sure from which repository the file comes. > > So perhaps the problem with the mcz file is in how Squeak 4.6 unzips things? That?s what I thought at first but the same file behaves the same way in 4.5 (invalid zip). You should be able to reproduce the problem with this script: "load development" [ (Smalltalk at: #Gofer) new url: 'http://smalltalkhub.com/mc/Pharo/Fuel/main'; package: 'ConfigurationOfFuel'; load. (Smalltalk at: #ConfigurationOfFuel) loadBleedingEdge ] on: Error do: [ ((Smalltalk at: #Installer) monticello http: 'http://smalltalkhub.com/mc/Pharo/Fuel/') project: 'main'; package: 'ConfigurationOfFuel'; install. (Smalltalk at: #ConfigurationOfFuel) loadBleedingEdge ]. I?ve attached the file, just in case. Cheers, Max > > I suppose I should add Squeak4.6 to my Metacello lineup, but I've been > waiting for a PR from Frank[2] and it looks like he is waiting for the > Squeak 4.6 release. > > Dale -------------- next part -------------- Skipped content of type multipart/mixed From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 12:34:46 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 12:44:58 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> Message-ID: <1426768486150-4813170.post@n4.nabble.com> Hmm... "StrikeFont class>>#familyNamed:pointSize:" could dynamically add the missing size if it is possible instead of falling back to another font. Does this make sense? Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813170.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 19 12:35:54 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 19 12:46:04 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426768486150-4813170.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> <1426768486150-4813170.post@n4.nabble.com> Message-ID: <1426768554370-4813171.post@n4.nabble.com> Why should I use TextStyle if I want to program with or access fonts? I always use StrikeFont... :-) -- View this message in context: http://forum.world.st/The-Trunk-Morphic-topa-784-mcz-tp4813130p4813171.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Thu Mar 19 13:19:55 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 13:19:57 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426768554370-4813171.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> <1426768486150-4813170.post@n4.nabble.com> <1426768554370-4813171.post@n4.nabble.com> Message-ID: <3159A419-4D04-4B40-8D71-05FC1773AA4A@gmx.de> On 19.03.2015, at 13:35, Marcel Taeumel wrote: > Why should I use TextStyle if I want to program with or access fonts? I > always use StrikeFont... :-) Because that is what the user sees when she hits ctrl-K for the font menu? I used this TextStyle thingy because it is there and I don't need no additional registry again :D Best -Tobias From Das.Linux at gmx.de Thu Mar 19 13:20:21 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 13:20:25 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <1426768486150-4813170.post@n4.nabble.com> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> <1426768486150-4813170.post@n4.nabble.com> Message-ID: <8D2971C8-89ED-4EC4-92C7-C495AEC4D8BA@gmx.de> On 19.03.2015, at 13:34, Marcel Taeumel wrote: > Hmm... "StrikeFont class>>#familyNamed:pointSize:" could dynamically add the > missing size if it is possible instead of falling back to another font. Does > this make sense? I don't understand? TTFonts have nothing to do with StrikeFonts :D > > Best, > Marcel From bert at freudenbergs.de Thu Mar 19 13:58:18 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 19 13:58:22 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-topa.784.mcz In-Reply-To: <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> Message-ID: <864829CF-AECD-4016-A1B2-246370E2BA81@freudenbergs.de> On 19.03.2015, at 13:06, Tobias Pape wrote: > > > On 19.03.2015, at 11:54, Marcel Taeumel wrote: > >> Would it be difficult to let the user decide/override which font sizes to >> import? > > Yeno :D > To quote TTCFont class >> #pointSizes > > "The default sizes that are created when a TextStyle is created. You can add new sizes by the new-size feature." > ^ #(9 12 15 24 36). > > So, it is possible to change the point size of a TTCFont internally > and TextStyles also support this somewhat, but actually _adding_ a point > size takes code; after import/install you could do > > ((TextStyle named: 'Gill Sans') addNewFontSize: 8) > > but there's no UI. There used to be UI. We lost it when the font menu was replaced with the font dialog. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/43af5c97/smime.bin From dale.henrichs at gemtalksystems.com Thu Mar 19 14:20:22 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Thu Mar 19 14:20:27 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: References: <550aa7c2.07abc20a.776b.6695SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <550ADB26.9030901@gemtalksystems.com> Max, Before I go about trying to install Squeak on my machine, could you provide me with more details about the environment that you are running in? I'm not seeing any issues with my travis builds nor has anyone else run into this issue... So I'm suspicious that the root cause is going to be something unique to your working environment. I haven't run Squeak myself in months:) and I rely on Travis .... So I have to find and download all the bits and pieces to install Squeak in my environment in the hopes that when I execute your expression I will see the same corruption as you are seeing (I don't have a great batting average in this regards) ... It certainly appears that ConfigurationOfMetacello-dkh.800.mcz is not corrupted up on smalltalkhub or gemsource (the two repos accessed during bootstrapping)... which also leads me to believe that the root cause is in your setup ... Your package has been truncated it should be 128999 bytes and your copy is 53989 ... perhaps your copy of the package is corrupted in the package-cache? The next most likely culprit is the vm ... which brings me back to why I asked the question at the top of the email ... if you give me the details about your setup - vm version is probably the most important, since I get the impression that there a lot of them running around and the version you have depends upon when you downloaded yours... but it would help if you told me where you got your images and changes files as well ... oh and the os version, too... Dale On 3/19/15 5:41 AM, Max Leske wrote: > >> On 19 Mar 2015, at 11:41, >> squeak-dev-request@lists.squeakfoundation.org >> wrote: >> >> Max, >> >> Where are you getting that package from? > > The Fuel configuration does #ensureMetacello which then seems to get > the latest ConfigurationOfMetacello. > >> >> I just checked and the version available from GemSource[1] loads >> (unzips) in both GemStone/GsDevKit and Pharo3.0...it's almost certain >> that the Metacello and that package has been tested against Squeak4.5 >> and a couple of earlier versions as I've just run a test against the >> latest Metacello up on Travis .. I am not testing against Squeak4.6 ... >> yet ... but I have been testing regularly against the Squeak-Trunk and >> those tests passed today[3][4] > > I?m not sure from which repository the file comes. > >> >> So perhaps the problem with the mcz file is in how Squeak 4.6 unzips >> things? > > That?s what I thought at first but the same file behaves the same way > in 4.5 (invalid zip). > > You should be able to reproduce the problem with this script: > > "load development" > [ (Smalltalk at: #Gofer) new > url: 'http://smalltalkhub.com/mc/Pharo/Fuel/main' > ; > package: 'ConfigurationOfFuel'; > load. > (Smalltalk at: #ConfigurationOfFuel) loadBleedingEdge ] on: Error do: [ > ((Smalltalk at: #Installer) monticello http: > 'http://smalltalkhub.com/mc/Pharo/Fuel/' > ) > project: 'main'; > package: 'ConfigurationOfFuel'; > install. > (Smalltalk at: #ConfigurationOfFuel) loadBleedingEdge ]. > > > I?ve attached the file, just in case. > > Cheers, > Max > > > > >> >> I suppose I should add Squeak4.6 to my Metacello lineup, but I've been >> waiting for a PR from Frank[2] and it looks like he is waiting for the >> Squeak 4.6 release. >> >> Dale > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/94c5ff19/attachment.htm From bert at freudenbergs.de Thu Mar 19 17:01:12 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Thu Mar 19 17:01:16 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.784.mcz In-Reply-To: <864829CF-AECD-4016-A1B2-246370E2BA81@freudenbergs.de> References: <1426762166547-4813138.post@n4.nabble.com> <1426762254623-4813139.post@n4.nabble.com> <1426762449067-4813141.post@n4.nabble.com> <2BE28FE2-AB39-4836-BC9D-0412674B2ECC@gmx.de> <864829CF-AECD-4016-A1B2-246370E2BA81@freudenbergs.de> Message-ID: <6588639F-D572-4E23-A03F-32679ADF3F58@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/03064f2b/smime.bin From commits at source.squeak.org Thu Mar 19 18:37:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 18:37:04 2015 Subject: [squeak-dev] The Trunk: Tests-eem.313.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.313.mcz ==================== Summary ==================== Name: Tests-eem.313 Author: eem Time: 19 March 2015, 11:36:45.654 am UUID: 73f5d743-97d9-47a2-b36e-7ddd7b30d136 Ancestors: Tests-nice.312 Provide a test to check that the tempsMark is positioned correctly in non-interactive parsing. Used for the new toggle break on entry code. =============== Diff against Tests-nice.312 =============== Item was added: + TestCase subclass: #ParserEditingTest + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'Tests-Compiler'! Item was added: + ----- Method: ParserEditingTest>>parse:into: (in category 'support') ----- + parse: aString into: aTrinaryBlock + | parser code | + parser := self class newParser. + code := aString withCRs. + ^aTrinaryBlock + value: (parser parse: code class: self class; yourself) + value: parser tempsMark + value: code! Item was added: + ----- Method: ParserEditingTest>>testTempsMarkBinary (in category 'tests') ----- + testTempsMarkBinary + self parse: '+ arg foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: '+ arg\ foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: '+ arg\ \ foo' into: + [:parser :tempsMark :code| + self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: '+ arg | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ \ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ | foo |\ \ bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]! Item was added: + ----- Method: ParserEditingTest>>testTempsMarkKeyword (in category 'tests') ----- + testTempsMarkKeyword + self parse: 'key: word foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: 'key: word\ foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: 'key: word\ \ foo' into: + [:parser :tempsMark :code| + self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: 'key: word | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ \ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ | foo |\ \ bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]! Item was added: + ----- Method: ParserEditingTest>>testTempsMarkUnary (in category 'tests') ----- + testTempsMarkUnary + self parse: 'unary foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: 'unary\ foo' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code indexOf: $f)]. + self parse: 'unary\ \ foo' into: + [:parser :tempsMark :code| + self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: 'unary | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ \ | foo | bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ | foo |\ \ bar' into: + [:parser :tempsMark :code| + self assert: tempsMark = (code lastIndexOf: $|)]! From commits at source.squeak.org Thu Mar 19 18:49:00 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 18:49:02 2015 Subject: [squeak-dev] The Trunk: Tests-eem.314.mcz Message-ID: Eliot Miranda uploaded a new version of Tests to project The Trunk: http://source.squeak.org/trunk/Tests-eem.314.mcz ==================== Summary ==================== Name: Tests-eem.314 Author: eem Time: 19 March 2015, 11:48:45.588 am UUID: f9f4b676-4eb8-47e5-a6ec-d99ffed0c11e Ancestors: Tests-eem.313 Remove annoying Undeclared warnings from the ParserEditingTest =============== Diff against Tests-eem.313 =============== Item was changed: ----- Method: ParserEditingTest>>testTempsMarkBinary (in category 'tests') ----- testTempsMarkBinary + self parse: '+ arg false' into: - self parse: '+ arg foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: '+ arg\ false' into: - self parse: '+ arg\ foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: '+ arg\ \ false' into: - self parse: '+ arg\ \ foo' into: [:parser :tempsMark :code| self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: '+ arg | foo | false' into: - self parse: '+ arg | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ | foo | false' into: - self parse: '+ arg\ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ \ | foo | false' into: - self parse: '+ arg\ \ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: '+ arg\ | foo |\ \ false' into: - self parse: '+ arg\ | foo |\ \ bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]! Item was changed: ----- Method: ParserEditingTest>>testTempsMarkKeyword (in category 'tests') ----- testTempsMarkKeyword + self parse: 'key: word false' into: - self parse: 'key: word foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: 'key: word\ false' into: - self parse: 'key: word\ foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: 'key: word\ \ false' into: - self parse: 'key: word\ \ foo' into: [:parser :tempsMark :code| self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: 'key: word | foo | false' into: - self parse: 'key: word | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ | foo | false' into: - self parse: 'key: word\ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ \ | foo | false' into: - self parse: 'key: word\ \ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'key: word\ | foo |\ \ false' into: - self parse: 'key: word\ | foo |\ \ bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]! Item was changed: ----- Method: ParserEditingTest>>testTempsMarkUnary (in category 'tests') ----- testTempsMarkUnary + self parse: 'unary false' into: - self parse: 'unary foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: 'unary\ false' into: - self parse: 'unary\ foo' into: [:parser :tempsMark :code| self assert: tempsMark = (code indexOf: $f)]. + self parse: 'unary\ \ false' into: - self parse: 'unary\ \ foo' into: [:parser :tempsMark :code| self assert: (tempsMark = (code indexOf: $f) or: [tempsMark = (code indexOf: $<)])]. + self parse: 'unary | foo | false' into: - self parse: 'unary | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ | foo | false' into: - self parse: 'unary\ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ \ | foo | false' into: - self parse: 'unary\ \ | foo | bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]. + self parse: 'unary\ | foo |\ \ false' into: - self parse: 'unary\ | foo |\ \ bar' into: [:parser :tempsMark :code| self assert: tempsMark = (code lastIndexOf: $|)]! From commits at source.squeak.org Thu Mar 19 19:11:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 19:11:24 2015 Subject: [squeak-dev] The Trunk: System-eem.708.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.708.mcz ==================== Summary ==================== Name: System-eem.708 Author: eem Time: 19 March 2015, 12:10:48.635 pm UUID: d4bc49a3-c726-4233-bec5-8c9f25b1466c Ancestors: System-mt.707 Have BreakpointManager preserve source when adding breakpoints via toggle on entry. =============== Diff against System-mt.707 =============== Item was changed: ----- Method: BreakpointManager class>>compilePrototype:in: (in category 'private') ----- + compilePrototype: aSymbol in: aClass + "Compile and answer a new method containing a break statement" - compilePrototype: aSymbol in: aClass - "Compile and return a new method containing a break statement" + | oldSource parser methodNode breakOnlyMethodNode sendBreakMessageNode hasTemps newSource mark | + oldSource := aClass sourceCodeAt: aSymbol. + parser := aClass newParser. + methodNode := parser + parse: oldSource + class: aClass + noPattern: false + notifying: nil + ifFail: [self error: '[breakpoint] unable to install breakpoint']. + breakOnlyMethodNode := aClass newCompiler + compile: 'temporaryMethodSelectorForBreakpoint self break. ^self' + in: aClass + notifying: nil + ifFail: [self error: '[breakpoint] unable to install breakpoint']. + sendBreakMessageNode := breakOnlyMethodNode block statements first. + methodNode block statements addFirst: sendBreakMessageNode. + hasTemps := parser tempsMark <= oldSource size and: [(oldSource at: parser tempsMark) = $|]. + "If no temps, tempsMark points at start of first token in body" + mark := hasTemps + ifTrue: [parser tempsMark + 2] + ifFalse: + [parser tempsMark >= oldSource size + ifTrue: "empty body" + [(parser tempsMark min: oldSource size) + 1] + ifFalse: + [parser tempsMark - 1]]. + newSource := oldSource copyReplaceFrom: mark to: mark - 1 with: ' self break.\' withCRs. + ^methodNode generate copyWithSourceCode: newSource! - | source node method | - source := self breakpointMethodSourceFor: aSymbol in: aClass. - node := aClass newCompiler - compile: source - in: aClass - notifying: nil - ifFail: [self error: '[breakpoint] unable to install breakpoint']. - node isNil ifTrue: [^nil]. - method := node generateWithTempNames. - ^method! From Das.Linux at gmx.de Thu Mar 19 19:13:52 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 19 19:13:55 2015 Subject: [squeak-dev] The Trunk: System-eem.708.mcz Message-ID: <53CD2E27-34A4-4EB6-A365-4E845BAD2749@gmx.de> On 19.03.2015, at 19:11, commits@source.squeak.org wrote: > Eliot Miranda uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-eem.708.mcz > > ==================== Summary ==================== > > Name: System-eem.708 > Author: eem > Time: 19 March 2015, 12:10:48.635 pm > UUID: d4bc49a3-c726-4233-bec5-8c9f25b1466c > Ancestors: System-mt.707 > > Have BreakpointManager preserve source when > adding breakpoints via toggle on entry. Thank you! From commits at source.squeak.org Thu Mar 19 19:18:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 19:18:08 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.708.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.708.mcz ==================== Summary ==================== Name: System.spur-eem.708 Author: eem Time: 19 March 2015, 12:17:08.215 pm UUID: a8abc018-3140-4a40-85cc-5854d6b77a3a Ancestors: System-eem.708, System.spur-mt.707 System-eem.708 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.248 Have BreakpointManager preserve source when adding breakpoints via toggle on entry. =============== Diff against System-eem.708 =============== Item was removed: - ----- Method: Object>>oopAge (in category '*system-support') ----- - oopAge - ^ ObjectHistory current ageOf: self! Item was removed: - ----- Method: Object>>oopTimestamp (in category '*system-support') ----- - oopTimestamp - ^ ObjectHistory current timestampOf: self! Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From peter at ozzard.org Thu Mar 19 20:26:36 2015 From: peter at ozzard.org (Peter Crowther) Date: Thu Mar 19 20:26:37 2015 Subject: [squeak-dev] Re: please /don't/ mark commit messages as spam... In-Reply-To: <4B9D395C-E227-4E7F-8985-046E98ABE92F@freudenbergs.de> References: <4B9D395C-E227-4E7F-8985-046E98ABE92F@freudenbergs.de> Message-ID: On 18 March 2015 at 08:24, Bert Freudenberg wrote: > If you go and tell gmail that you don't consider these to be spam, maybe > it will personalize that for you? > > > It doesn't seem to for me; I'd be interested in others' experiences, though this is probably not a topic for the list. Cheers, - Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/fbd4339f/attachment.htm From cunningham.cb at gmail.com Thu Mar 19 21:17:37 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Thu Mar 19 21:17:40 2015 Subject: [squeak-dev] Re: please /don't/ mark commit messages as spam... In-Reply-To: References: <4B9D395C-E227-4E7F-8985-046E98ABE92F@freudenbergs.de> Message-ID: So, I have recently seen several message from this list marked as spam. For instance, Eliot's last VM announcement I found in the gmail spam folder. As well as his first message here. So, each day now I start off by looking in spam and unmark all email from this list as 'not spam' anymore. -cbc On Thu, Mar 19, 2015 at 1:26 PM, Peter Crowther wrote: > On 18 March 2015 at 08:24, Bert Freudenberg wrote: > >> If you go and tell gmail that you don't consider these to be spam, maybe >> it will personalize that for you? >> >> >> It doesn't seem to for me; I'd be interested in others' experiences, > though this is probably not a topic for the list. > > Cheers, > > - Peter > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/f77fe032/attachment.htm From maxleske at gmail.com Thu Mar 19 21:28:41 2015 From: maxleske at gmail.com (Max Leske) Date: Thu Mar 19 21:28:46 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: <550b2102.ae14b40a.6ab4.fffffeb4SMTPIN_ADDED_MISSING@mx.google.com> References: <550b2102.ae14b40a.6ab4.fffffeb4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > On 19 Mar 2015, at 20:18, squeak-dev-request@lists.squeakfoundation.org wrote: > > Max, > > Before I go about trying to install Squeak on my machine, could you > provide me with more details about the environment that you are running in? I?m sorry you had to write all this stuff. I?m usually more thorrough with my reports. > > I'm not seeing any issues with my travis builds nor has anyone else run > into this issue... So I'm suspicious that the root cause is going to be > something unique to your working environment. I haven't run Squeak > myself in months:) and I rely on Travis .... So I have to find and > download all the bits and pieces to install Squeak in my environment in > the hopes that when I execute your expression I will see the same > corruption as you are seeing (I don't have a great batting average in > this regards) ... > > It certainly appears that ConfigurationOfMetacello-dkh.800.mcz is not > corrupted up on smalltalkhub or gemsource (the two repos accessed during > bootstrapping)... which also leads me to believe that the root cause is > in your setup ... > > Your package has been truncated it should be 128999 bytes and your copy > is 53989 ... perhaps your copy of the package is corrupted in the > package-cache? > > The next most likely culprit is the vm ... which brings me back to why I > asked the question at the top of the email ... if you give me the > details about your setup - vm version is probably the most important, > since I get the impression that there a lot of them running around and > the version you have depends upon when you downloaded yours... but it > would help if you told me where you got your images and changes files as > well ... oh and the os version, too... > > Dale I've figured it out. Your were right, the newest Cog VM doesn?t exhibit the problem. The problem seems to be the method ZipWriteStream>>deflateBlock:chainLength:goodMatch:. The primitive in that method fails in 4.6 only when I open the 4.6 image with the VM packaged with the 4.5 all-in-one app ('Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.331] 4.5?). The fallback method generates an error. This is reproducible when using the fallback instead of the primitive with the other VM and a 4.5 image too, so there is definitely something wrong with the Zip implementation. Here?s a snippet for reproducing the problem: ZipWriteStream removeSelector: #deflateBlock:chainLength:goodMatch:. (Installer monticello http: 'http://www.squeaksource.com/MetacelloRepository') package: 'Gofer-Core-lr.115.mcz'; install. (Smalltalk at: #Gofer) new url: 'http://seaside.gemstone.com/ss/metacello'; addPackage: 'ConfigurationOfMetacello'; load So no need for you to fix anything about Metacello. Sorry about the fuss. Cheers, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/01360ee3/attachment.htm From dale.henrichs at gemtalksystems.com Thu Mar 19 21:57:52 2015 From: dale.henrichs at gemtalksystems.com (Dale Henrichs) Date: Thu Mar 19 21:57:57 2015 Subject: [squeak-dev] Metacello load error In-Reply-To: References: <550b2102.ae14b40a.6ab4.fffffeb4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <550B4660.7010305@gemtalksystems.com> Max, Sorry for being cranky:) You caught early in the morning before I had coffee:) It's good news, bad news ... the good news is that I can rely on travis to do a ton of testing ... the bad news is that I don't have test systems at my fingertips for Squeak or Pharo ... I develop Metacello in GemStone and when Pharo/Squeak tests fail on Travis, I can usually get away with editing the Squeak/Pharo packages in-place in my filetree checkout:). I also depend up Frank Shearar, Tobias and the HPI crew for tracking down specific issues that may show up during testing... I am always on the look out for bugs that may creep into the system and bootstrapping Metacello has been a historically hard problem ... in the last few years (thanks in large part to travis), I've been able to keep bootstrapping issues from escaping into the wild... but one never really knows ... I am glad that you got to the bottom of this and I appreciate your patience. Dale On 03/19/2015 02:28 PM, Max Leske wrote: > >> On 19 Mar 2015, at 20:18, >> squeak-dev-request@lists.squeakfoundation.org >> wrote: >> >> Max, >> >> Before I go about trying to install Squeak on my machine, could you >> provide me with more details about the environment that you are >> running in? > > I?m sorry you had to write all this stuff. I?m usually more thorrough > with my reports. > >> >> I'm not seeing any issues with my travis builds nor has anyone else run >> into this issue... So I'm suspicious that the root cause is going to be >> something unique to your working environment. I haven't run Squeak >> myself in months:) and I rely on Travis .... So I have to find and >> download all the bits and pieces to install Squeak in my environment in >> the hopes that when I execute your expression I will see the same >> corruption as you are seeing (I don't have a great batting average in >> this regards) ... >> >> It certainly appears that ConfigurationOfMetacello-dkh.800.mcz is not >> corrupted up on smalltalkhub or gemsource (the two repos accessed during >> bootstrapping)... which also leads me to believe that the root cause is >> in your setup ... >> >> Your package has been truncated it should be 128999 bytes and your copy >> is 53989 ... perhaps your copy of the package is corrupted in the >> package-cache? >> >> The next most likely culprit is the vm ... which brings me back to why I >> asked the question at the top of the email ... if you give me the >> details about your setup - vm version is probably the most important, >> since I get the impression that there a lot of them running around and >> the version you have depends upon when you downloaded yours... but it >> would help if you told me where you got your images and changes files as >> well ... oh and the os version, too... >> >> Dale > > > I've figured it out. Your were right, the newest Cog VM doesn?t > exhibit the problem. The problem seems to be the method > ZipWriteStream>>deflateBlock:chainLength:goodMatch:. The primitive in > that method fails in 4.6 only when I open the 4.6 image with the VM > packaged with the 4.5 all-in-one app ('Croquet Closure Cog VM > [CoInterpreter VMMaker.oscog-eem.331] 4.5?). The fallback method > generates an error. > This is reproducible when using the fallback instead of the primitive > with the other VM and a 4.5 image too, so there is definitely > something wrong with the Zip implementation. Here?s a snippet for > reproducing the problem: > > ZipWriteStream removeSelector: #deflateBlock:chainLength:goodMatch:. > > (Installer monticello http: > 'http://www.squeaksource.com/MetacelloRepository' > ) > package: 'Gofer-Core-lr.115.mcz'; > install. > > (Smalltalk at: #Gofer) new > url: 'http://seaside.gemstone.com/ss/metacello' > ; > addPackage: 'ConfigurationOfMetacello'; > load > > > So no need for you to fix anything about Metacello. Sorry about the fuss. > > Cheers, > Max > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/c0b57497/attachment.htm From avalloud at smalltalk.comcastbiz.net Thu Mar 19 22:14:26 2015 From: avalloud at smalltalk.comcastbiz.net (Andres Valloud) Date: Thu Mar 19 22:15:14 2015 Subject: [squeak-dev] Camp Smalltalk PDX Message-ID: <550B4A42.6040107@smalltalk.comcastbiz.net> An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150319/6a3562e7/attachment.htm From leves at elte.hu Thu Mar 19 22:39:27 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Mar 19 22:39:30 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: Message-ID: The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? Levente [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html On Wed, 18 Mar 2015, Tobias Pape wrote: > Hi, > > On 18.03.2015, at 15:11, commits@source.squeak.org wrote: > >> A new version of Tools was added to project The Inbox: >> http://source.squeak.org/inbox/Tools-topa.556.mcz >> >> ==================== Summary ==================== >> >> Name: Tools-topa.556 >> Author: topa >> Time: 18 March 2015, 4:09:54.221 pm >> UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d >> Ancestors: Tools-topa.555 >> >> Pluggable Menus for many tools >> ============================== >> >> A lot of tools, especially the Browser, rely on context menus >> (aka yellow button menus). Dynamically extending these is possible >> but requires a lot of care. The Pluggable Menus allow to add menu >> entries easily via extension methods. The Services package serves >> as example here. > > An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. > > If nobody objects, I move this to trunk on friday :) > > Best > -Tobias > From commits at source.squeak.org Thu Mar 19 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 19 22:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150319225502.17549.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007653.html Name: TrueType-topa.33 Ancestors: TrueType-topa.32 Improve TrueType handling, if ever so slightly. - Pick up some imporvements from Etoys. - Improves Unicode cmaps - Unifies TTFontDescription and TTCFontDescription a bit more - Add support for some newer Apple OS X Font idiosyncracies (like Post-Script OpenType in ttc fonts or proprietary kern tables) - polymorphize (?) TTFileDescription a bit more with TTFontDescription ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007654.html Name: Multilingual-topa.202 Ancestors: Multilingual-nice.201 Move to Morphic ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007655.html Name: Morphic-topa.784 Ancestors: Morphic-topa.783 Add a Font Importer Tool. You can now easily import available font into the image, either by actually embedding them or by referencing the font file on disk. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007656.html Name: Morphic-topa.784 Ancestors: Morphic-topa.783 Add a Font Importer Tool. You can now easily import available font into the image, either by actually embedding them or by referencing the font file on disk. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007657.html Name: TrueType-topa.34 Ancestors: TrueType-topa.33 Fix an initializer, more Unicode ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007658.html Name: Tests-eem.313 Ancestors: Tests-nice.312 Provide a test to check that the tempsMark is positioned correctly in non-interactive parsing. Used for the new toggle break on entry code. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007659.html Name: Tests-eem.314 Ancestors: Tests-eem.313 Remove annoying Undeclared warnings from the ParserEditingTest ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007660.html Name: System-eem.708 Ancestors: System-mt.707 Have BreakpointManager preserve source when adding breakpoints via toggle on entry. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007661.html Name: Kernel.spur-topa.912 Ancestors: Kernel-topa.912, Kernel.spur-cmm.911 Kernel-topa.912 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.248 Move methods from Kernel to Tools/Morphic for basic Models (3/3) Load this last. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007662.html Name: System.spur-eem.708 Ancestors: System-eem.708, System.spur-mt.707 System-eem.708 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.248 Have BreakpointManager preserve source when adding breakpoints via toggle on entry. ============================================= From tim at rowledge.org Fri Mar 20 00:01:14 2015 From: tim at rowledge.org (tim Rowledge) Date: Fri Mar 20 00:01:18 2015 Subject: [squeak-dev] VancouverIsland Spring CampSmalltalk References: <5509CDAE.8000404@yahoo.de> Message-ID: <6DB0017C-59A7-4056-A2F3-B967FD37C7FB@rowledge.org> Along with the PDX camp recently mentioned for the fall, Sebastian & I are holding another camp in Nanaimo at the end of April. Last years Camp Nanaimo was amazingly successful and everyone had much fun. If you?re in the general pacific north-west region do consider coming along. When: Friday & Saturday April 25-6th Location: Makerspace Nanaimo 2221 McGarrigle Rd Nanaimo their website: makerspacenanaimo.org NO particular formal schedule; no papers to submit, no fees to pay (but we will be asking for donations around $10/day to help pay for the coffee etc), fun to be had, people to see. We found a bunch of good eateries last time. Accommodation was considered pretty good. Scenery is spectacular around here. Weather will likely be cool-spring, with chance of rain. Transport is reasonably simple - fly into Nanaimo airport, ferry to Nanaimo from Vancouver, drive up from Victoria, teleport from your orbiting GSV, whatever. Ask about specific details if you need help. Please let us know if you?re interested so we can start to organise for food, accommodation and all that. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Starbucks are, of course, run by the Caffeinatti. From edgardec2005 at gmail.com Fri Mar 20 12:18:58 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Fri Mar 20 12:19:08 2015 Subject: [squeak-dev] About forks and how we update the .image Message-ID: Folks: I rechecking the process for my fork SqueakRosCore4dot5 I wish a .image towards Cuis elegancy and simplicity , but as compatible with current and previous Squeak as possible. So my defaultUpdateURL is 'http://source.squeak.org/trunk' Today , I have the followings logs update-tpr.249-SqueakRosCore4dot5-12545.image.log update-tpr.248-SqueakRosCore4dot5-12545.image.log update-nice.263-SqueakRosCore4dot5-12545.image.log update-nice.261-SqueakRosCore4dot5-12545.image.log update-nice.260-SqueakRosCore4dot5-12545.image.log update-nice.259-SqueakRosCore4dot5-12545.image.log update-nice.258-SqueakRosCore4dot5-12545.image.log update-nice.257-SqueakRosCore4dot5-12545.image.log update-nice.256-SqueakRosCore4dot5-12545.image.log update-nice.255-SqueakRosCore4dot5-12545.image.log update-nice.254-SqueakRosCore4dot5-12545.image.log update-nice.252-SqueakRosCore4dot5-12545.image.log update-nice.251-SqueakRosCore4dot5-12545.image.log update-nice.250-SqueakRosCore4dot5-12545.image.log update-nice.247-SqueakRosCore4dot5-12545.image.log update-nice.246-SqueakRosCore4dot5-12545.image.log update-fbs.266-SqueakRosCore4dot5-12545.image.log update-fbs.265-SqueakRosCore4dot5-12545.image.log update-fbs.264-SqueakRosCore4dot5-12545.image.log update-fbs.245-SqueakRosCore4dot5-12545.image.log update-fbs.244-SqueakRosCore4dot5-12545.image.log update-fbs.243-SqueakRosCore4dot5-12545.image.log update-cmm.262-SqueakRosCore4dot5-12545.image.log update-cmm.253-SqueakRosCore4dot5-12545.image.log And opening and see this I found ========== ShoutCore-cwp.36 ========== Remove support for per-class settings of #allowUnderscoreSelectors. On several of this. Seems some odd doing the same again and again. Feedback ? Edgar @morplenauta en twitter -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/a59d5405/attachment-0001.htm From maxleske at gmail.com Fri Mar 20 13:05:02 2015 From: maxleske at gmail.com (Max Leske) Date: Fri Mar 20 13:05:10 2015 Subject: [squeak-dev] Possible bug in DeflateStream Message-ID: <894462D8-7AE6-4E2B-B6A6-28684A63D8E6@gmail.com> For those of you that haven?t seen the ?Metacello load error? conversation between Dale and me, there seems to be a bug in DeflateStream. I?m quoting myself from the other thread: > > I've figured it out. Your were right, the newest Cog VM doesn???t exhibit the problem. The problem seems to be the method ZipWriteStream>>deflateBlock:chainLength:goodMatch:. The primitive in that method fails in 4.6 only when I open the 4.6 image with the VM packaged with the 4.5 all-in-one app ('Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.331] 4.5???). The fallback method generates an error. > This is reproducible when using the fallback instead of the primitive with the other VM and a 4.5 image too, so there is definitely something wrong with the Zip implementation. Here???s a snippet for reproducing the problem: > > ZipWriteStream removeSelector: #deflateBlock:chainLength:goodMatch:. > > (Installer monticello http: 'http://www.squeaksource.com/MetacelloRepository' ) > package: 'Gofer-Core-lr.115.mcz'; > install. > > (Smalltalk at: #Gofer) new > url: 'http://seaside.gemstone.com/ss/metacello' ; > addPackage: 'ConfigurationOfMetacello'; > load Cheers, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/73888f1f/attachment.htm From lewis at mail.msen.com Fri Mar 20 13:36:21 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 20 13:36:23 2015 Subject: [squeak-dev] Possible bug in DeflateStream In-Reply-To: <894462D8-7AE6-4E2B-B6A6-28684A63D8E6@gmail.com> References: <894462D8-7AE6-4E2B-B6A6-28684A63D8E6@gmail.com> Message-ID: <20150320133621.GA19219@shell.msen.com> On Fri, Mar 20, 2015 at 02:05:02PM +0100, Max Leske wrote: > For those of you that haven???t seen the ???Metacello load error??? conversation between Dale and me, there seems to be a bug in DeflateStream. I???m quoting myself from the other thread: > This sounds familiar, although I don't have a link to the details. IIRC we changed something in the image that exposed an existing bug in a primitive, then fixed that bug. So there were be some combinations of image and VM that would have a problem. I'm sorry I can't give a better reference right now, but I think it was discussed on squeak-dev, and the VM fixes may have been added in VMMaker.oscog-eem.826 (Cog) and VMMaker-dtl.347 (VMM trunk). Dave > > > > I've figured it out. Your were right, the newest Cog VM doesn??????t exhibit the problem. The problem seems to be the method ZipWriteStream>>deflateBlock:chainLength:goodMatch:. The primitive in that method fails in 4.6 only when I open the 4.6 image with the VM packaged with the 4.5 all-in-one app ('Croquet Closure Cog VM [CoInterpreter VMMaker.oscog-eem.331] 4.5??????). The fallback method generates an error. > > This is reproducible when using the fallback instead of the primitive with the other VM and a 4.5 image too, so there is definitely something wrong with the Zip implementation. Here??????s a snippet for reproducing the problem: > > > > ZipWriteStream removeSelector: #deflateBlock:chainLength:goodMatch:. > > > > (Installer monticello http: 'http://www.squeaksource.com/MetacelloRepository' ) > > package: 'Gofer-Core-lr.115.mcz'; > > install. > > > > (Smalltalk at: #Gofer) new > > url: 'http://seaside.gemstone.com/ss/metacello' ; > > addPackage: 'ConfigurationOfMetacello'; > > load > > > Cheers, > Max > From garduino at gmail.com Fri Mar 20 13:49:00 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Fri Mar 20 13:49:02 2015 Subject: [squeak-dev] Maui In-Reply-To: <777EC21E-4A2C-4F80-B9D7-20D1B3B83487@san.rr.com> References: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> <777EC21E-4A2C-4F80-B9D7-20D1B3B83487@san.rr.com> Message-ID: Currently the latest Squeak version where Maui is available is 4.4? 2015-03-15 22:52 GMT-03:00 Douglas McPherson : > +1000 > > I used Maui for many parts of the UI of a large cellular wireless > simulator project I worked on a couple of years ago. It made the task of > developing many UI components almost free. Very cool stuff. > > Doug > > > On Mar 15, 2015, at 16:23, Casey Ransberger > wrote: > > > > Gotta second this motion. Maui really is a gift. Data-directed directly > into your brain, nearly tactile user interaction. It's like you're looking > directly at the actual object, but with a lens that lets you see more > clearly than the standard inspector. In some ways, it reminds me of Self > and its Outliners. > > > > If you're using Squeak and you haven't checked out Maui, please do. > There's a bit of a learning curve, but Chris has documented it well. > > > > --C > > > > P.S. > > > > Also install... What's it called? Maybe Connectors? Help me out here, > Chris. Anyway it aids visualization a *whole lot.* Makes the whole network > of information really pop out at your eye in a way that's really intuitive. > > > >> On Mar 15, 2015, at 11:54 AM, Chris Muller wrote: > >> > >> Thanks for saying so. I plan to do another iteration on Maui to fix > >> some issues for the 4.6 release. Later this year I want to reinvent > >> it from the ground up as Maui 2, a version that runs in the browser. > >> Maui 1 has been a good learning experiment I'm ready to reinvent it > >> better as Maui 2 in the browser. > >> > >>> On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin > wrote: > >>> Hi Chris, > >>> I want to tell you that the more I use Maui the more I like it. > >>> It is a Jewell , fast and very useful. Morphic as it is, seems a > mountain to climb. But if I need to do an application I will do it with > Maui but let it die if I got to do it with morphic because it is too much > work and very too long. So Maui is a must for users of Squeak who just love > to do small applications for them, applications they can use in everyday > life. > >>> > >>> I hope it will be of full use in 4.6 in the near futur (serialization > of MauiFamily of prototypes) > >>> > >>> Again this is a gift you did to the community and I wanted to let you > know that it is appreciated. > >>> > >>> Raymond > >>> > >>> Envoy? de mon iPhone > >> > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/0f8b7d2b/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Mar 20 13:55:19 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Mar 20 13:55:21 2015 Subject: [squeak-dev] Possible bug in DeflateStream In-Reply-To: <20150320133621.GA19219@shell.msen.com> References: <894462D8-7AE6-4E2B-B6A6-28684A63D8E6@gmail.com> <20150320133621.GA19219@shell.msen.com> Message-ID: 2015-03-20 14:36 GMT+01:00 David T. Lewis : > On Fri, Mar 20, 2015 at 02:05:02PM +0100, Max Leske wrote: > > For those of you that haven???t seen the ???Metacello load error??? > conversation between Dale and me, there seems to be a bug in DeflateStream. > I???m quoting myself from the other thread: > > > > This sounds familiar, although I don't have a link to the details. IIRC we > changed something in the image that exposed an existing bug in a primitive, > then fixed that bug. So there were be some combinations of image and VM > that > would have a problem. > > I'm sorry I can't give a better reference right now, but I think it was > discussed > on squeak-dev, and the VM fixes may have been added in > VMMaker.oscog-eem.826 (Cog) > and VMMaker-dtl.347 (VMM trunk). > > Dave > > If I remember, an inst. var. was added by Eliot in Stream hierarchy and that broke the primitives that were using hardcoded inst. var. offsets. In newer VM, the primitives have been changed to accomodate for relative offset or something like that. So a recent VM must be used. We also had a doubt whether the Smalltalk fallback code was consistent with primitives or not, but I can't remember the conclusions... Nicolas > > > > > > > I've figured it out. Your were right, the newest Cog VM doesn??????t > exhibit the problem. The problem seems to be the method > ZipWriteStream>>deflateBlock:chainLength:goodMatch:. The primitive in that > method fails in 4.6 only when I open the 4.6 image with the VM packaged > with the 4.5 all-in-one app ('Croquet Closure Cog VM [CoInterpreter > VMMaker.oscog-eem.331] 4.5??????). The fallback method generates an error. > > > This is reproducible when using the fallback instead of the primitive > with the other VM and a 4.5 image too, so there is definitely something > wrong with the Zip implementation. Here??????s a snippet for reproducing > the problem: > > > > > > ZipWriteStream removeSelector: #deflateBlock:chainLength:goodMatch:. > > > > > > (Installer monticello http: ' > http://www.squeaksource.com/MetacelloRepository' < > http://www.squeaksource.com/MetacelloRepository'>) > > > package: 'Gofer-Core-lr.115.mcz'; > > > install. > > > > > > (Smalltalk at: #Gofer) new > > > url: 'http://seaside.gemstone.com/ss/metacello' < > http://seaside.gemstone.com/ss/metacello'>; > > > addPackage: 'ConfigurationOfMetacello'; > > > load > > > > > > Cheers, > > Max > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/91d90027/attachment.htm From commits at source.squeak.org Fri Mar 20 14:08:51 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 14:08:52 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Kernel-dtl.66.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-Kernel-dtl.66.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.66 Author: dtl Time: 20 March 2015, 4:00:13.461 pm UUID: a396787d-a01a-40b3-8e2d-e1a91f6d3d3c Ancestors: ToolBuilder-Kernel-mt.65 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-Kernel-mt.65 =============== Item was changed: Object subclass: #UIManager + instanceVariableNames: '' - instanceVariableNames: 'toolBuilder' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !UIManager commentStamp: 'dtl 5/2/2010 16:06' prior: 0! UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic, MVC or other user interfaces.! Item was changed: + ----- Method: UIManager>>toolBuilder (in category 'builder') ----- - ----- Method: UIManager>>toolBuilder (in category 'accessing') ----- toolBuilder + "Answer a ToolBuilder for this kind of UIManager" + ^ self subclassResponsibility! - ^toolBuilder! From commits at source.squeak.org Fri Mar 20 14:09:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 14:09:14 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-MVC-dtl.35.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-MVC-dtl.35.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.35 Author: dtl Time: 20 March 2015, 4:00:36.889 pm UUID: 97e7e8fa-358a-487e-a8ec-0c7c357b3d2f Ancestors: ToolBuilder-MVC-fbs.34 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-MVC-fbs.34 =============== Item was removed: - ----- Method: MVCUIManager>>initialize (in category 'initialize-release') ----- - initialize - toolBuilder := MVCToolBuilder new! Item was added: + ----- Method: MVCUIManager>>toolBuilder (in category 'builder') ----- + toolBuilder + ^ MVCToolBuilder new! From commits at source.squeak.org Fri Mar 20 14:09:43 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 14:09:44 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Morphic-dtl.100.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-Morphic-dtl.100.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-dtl.100 Author: dtl Time: 20 March 2015, 4:01:04.899 pm UUID: 10696acd-74dc-4047-898e-77fed9121b6e Ancestors: ToolBuilder-Morphic-mt.99 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-Morphic-mt.99 =============== Item was removed: - ----- Method: MorphicUIManager>>initialize (in category 'initialize-release') ----- - initialize - toolBuilder := MorphicToolBuilder new! Item was added: + ----- Method: MorphicUIManager>>toolBuilder (in category 'builder') ----- + toolBuilder + ^ MorphicToolBuilder new! From lewis at mail.msen.com Fri Mar 20 14:13:02 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 20 14:13:05 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Kernel-dtl.66.mcz In-Reply-To: <201503201408.t2KE8sGN026489@shell.msen.com> References: <201503201408.t2KE8sGN026489@shell.msen.com> Message-ID: <20150320141302.GA26550@shell.msen.com> This addresses Eliot's earlier question about how to get rid of garbage that accumulates in a ToolBuilder. It goes to the inbox for now because I am not entirely sure that it will not break the update stream. I'll move it to trunk this weekend if no one says otherwise. Tested in Morphic and MVC. Dave On Fri, Mar 20, 2015 at 02:08:50PM +0000, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Inbox: > http://source.squeak.org/inbox/ToolBuilder-Kernel-dtl.66.mcz > > ==================== Summary ==================== > > Name: ToolBuilder-Kernel-dtl.66 > Author: dtl > Time: 20 March 2015, 4:00:13.461 pm > UUID: a396787d-a01a-40b3-8e2d-e1a91f6d3d3c > Ancestors: ToolBuilder-Kernel-mt.65 > > Remove toolBuilder instance variable from UIManager. > > A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance > > =============== Diff against ToolBuilder-Kernel-mt.65 =============== > > Item was changed: > Object subclass: #UIManager > + instanceVariableNames: '' > - instanceVariableNames: 'toolBuilder' > classVariableNames: '' > poolDictionaries: '' > category: 'ToolBuilder-Kernel'! > > !UIManager commentStamp: 'dtl 5/2/2010 16:06' prior: 0! > UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic, MVC or other user interfaces.! > > Item was changed: > + ----- Method: UIManager>>toolBuilder (in category 'builder') ----- > - ----- Method: UIManager>>toolBuilder (in category 'accessing') ----- > toolBuilder > + "Answer a ToolBuilder for this kind of UIManager" > + ^ self subclassResponsibility! > - ^toolBuilder! > From jgr.asselin at me.com Fri Mar 20 15:54:37 2015 From: jgr.asselin at me.com (Raymond Asselin) Date: Fri Mar 20 15:54:48 2015 Subject: [squeak-dev] Maui In-Reply-To: References: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> <777EC21E-4A2C-4F80-B9D7-20D1B3B83487@san.rr.com> Message-ID: I use it on Squeak4.6 latest update: #14092 Current Change Set: Unnamed1 Image format 6505 (32 bit) with Squeak Cog 4.0.3282 on OSX 10.10.2 ====== - But some things don't works like seriliazing the MauiFamily of prototypals views - You can't use the refactoringBrowser - Some others small points I don't recall except when you encounter them. ====== If I remember correctly I picked the code from http://ss3.gemstone.com/ss/Maui with Monticello Browser. and load it with connector Hope this help Le 2015-03-20 ? 09:49, Germ?n Arduino a ?crit : > > Currently the latest Squeak version where Maui is available is 4.4? > > 2015-03-15 22:52 GMT-03:00 Douglas McPherson >: > +1000 > > I used Maui for many parts of the UI of a large cellular wireless simulator project I worked on a couple of years ago. It made the task of developing many UI components almost free. Very cool stuff. > > Doug > > > On Mar 15, 2015, at 16:23, Casey Ransberger > wrote: > > > > Gotta second this motion. Maui really is a gift. Data-directed directly into your brain, nearly tactile user interaction. It's like you're looking directly at the actual object, but with a lens that lets you see more clearly than the standard inspector. In some ways, it reminds me of Self and its Outliners. > > > > If you're using Squeak and you haven't checked out Maui, please do. There's a bit of a learning curve, but Chris has documented it well. > > > > --C > > > > P.S. > > > > Also install... What's it called? Maybe Connectors? Help me out here, Chris. Anyway it aids visualization a *whole lot.* Makes the whole network of information really pop out at your eye in a way that's really intuitive. > > > >> On Mar 15, 2015, at 11:54 AM, Chris Muller > wrote: > >> > >> Thanks for saying so. I plan to do another iteration on Maui to fix > >> some issues for the 4.6 release. Later this year I want to reinvent > >> it from the ground up as Maui 2, a version that runs in the browser. > >> Maui 1 has been a good learning experiment I'm ready to reinvent it > >> better as Maui 2 in the browser. > >> > >>> On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin > wrote: > >>> Hi Chris, > >>> I want to tell you that the more I use Maui the more I like it. > >>> It is a Jewell , fast and very useful. Morphic as it is, seems a mountain to climb. But if I need to do an application I will do it with Maui but let it die if I got to do it with morphic because it is too much work and very too long. So Maui is a must for users of Squeak who just love to do small applications for them, applications they can use in everyday life. > >>> > >>> I hope it will be of full use in 4.6 in the near futur (serialization of MauiFamily of prototypes) > >>> > >>> Again this is a gift you did to the community and I wanted to let you know that it is appreciated. > >>> > >>> Raymond > >>> > >>> Envoy? de mon iPhone > >> > > > > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/7a563331/attachment.htm From garduino at gmail.com Fri Mar 20 16:29:27 2015 From: garduino at gmail.com (=?UTF-8?Q?Germ=C3=A1n_Arduino?=) Date: Fri Mar 20 16:29:30 2015 Subject: [squeak-dev] Maui In-Reply-To: References: <95A3BCDD-3C60-4923-B150-A4A011F747E0@gmail.com> <777EC21E-4A2C-4F80-B9D7-20D1B3B83487@san.rr.com> Message-ID: Thanks you Raymond. 2015-03-20 12:54 GMT-03:00 Raymond Asselin : > I use it on Squeak4.6 > latest update: #14092 > Current Change Set: Unnamed1 > Image format 6505 (32 bit) > > with Squeak Cog 4.0.3282 > on OSX 10.10.2 > ====== > - But some things don't works like seriliazing the MauiFamily of > prototypals views > - You can't use the refactoringBrowser > - Some others small points I don't recall except when you encounter them. > ====== > > If I remember correctly I picked the code from > http://ss3.gemstone.com/ss/Maui with Monticello Browser. > and load it with connector > > Hope this help > > > > > > > > > Le 2015-03-20 ? 09:49, Germ?n Arduino a ?crit : > > > Currently the latest Squeak version where Maui is available is 4.4? > > 2015-03-15 22:52 GMT-03:00 Douglas McPherson : > >> +1000 >> >> I used Maui for many parts of the UI of a large cellular wireless >> simulator project I worked on a couple of years ago. It made the task of >> developing many UI components almost free. Very cool stuff. >> >> Doug >> >> > On Mar 15, 2015, at 16:23, Casey Ransberger >> wrote: >> > >> > Gotta second this motion. Maui really is a gift. Data-directed directly >> into your brain, nearly tactile user interaction. It's like you're looking >> directly at the actual object, but with a lens that lets you see more >> clearly than the standard inspector. In some ways, it reminds me of Self >> and its Outliners. >> > >> > If you're using Squeak and you haven't checked out Maui, please do. >> There's a bit of a learning curve, but Chris has documented it well. >> > >> > --C >> > >> > P.S. >> > >> > Also install... What's it called? Maybe Connectors? Help me out here, >> Chris. Anyway it aids visualization a *whole lot.* Makes the whole network >> of information really pop out at your eye in a way that's really intuitive. >> > >> >> On Mar 15, 2015, at 11:54 AM, Chris Muller >> wrote: >> >> >> >> Thanks for saying so. I plan to do another iteration on Maui to fix >> >> some issues for the 4.6 release. Later this year I want to reinvent >> >> it from the ground up as Maui 2, a version that runs in the browser. >> >> Maui 1 has been a good learning experiment I'm ready to reinvent it >> >> better as Maui 2 in the browser. >> >> >> >>> On Sun, Mar 15, 2015 at 10:30 AM, Raymond Asselin >> wrote: >> >>> Hi Chris, >> >>> I want to tell you that the more I use Maui the more I like it. >> >>> It is a Jewell , fast and very useful. Morphic as it is, seems a >> mountain to climb. But if I need to do an application I will do it with >> Maui but let it die if I got to do it with morphic because it is too much >> work and very too long. So Maui is a must for users of Squeak who just love >> to do small applications for them, applications they can use in everyday >> life. >> >>> >> >>> I hope it will be of full use in 4.6 in the near futur >> (serialization of MauiFamily of prototypes) >> >>> >> >>> Again this is a gift you did to the community and I wanted to let >> you know that it is appreciated. >> >>> >> >>> Raymond >> >>> >> >>> Envoy? de mon iPhone >> >> >> > >> >> >> > > > > > > > -- Saludos / Regards, Germ?n Arduino www.arduinosoftware.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150320/31de0304/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 20 17:07:45 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 20 17:18:02 2015 Subject: [squeak-dev] Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz In-Reply-To: References: Message-ID: <1426871265231-4813645.post@n4.nabble.com> Hmm... I just realized that the instance variable in the UIManager is always nil in my images. Seems that the "new" initialization code was never executed in a migration script. Please make sure that the logic of #findDefault in ToolBuilder does not get broken. There, you can create subclasses and use those as tool builders. Using this fix, subclassing would not work anymore. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-ToolBuilder-Morphic-dtl-100-mcz-tp4813610p4813645.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Fri Mar 20 17:10:26 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Fri Mar 20 17:20:47 2015 Subject: [squeak-dev] Re: The Inbox: ToolBuilder-Kernel-dtl.66.mcz In-Reply-To: <20150320141302.GA26550@shell.msen.com> References: <20150320141302.GA26550@shell.msen.com> Message-ID: <1426871426848-4813647.post@n4.nabble.com> Please test custom builder classes. See my comment at: http://forum.world.st/The-Inbox-ToolBuilder-Morphic-dtl-100-mcz-td4813610.html Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-ToolBuilder-Kernel-dtl-66-mcz-tp4813608p4813647.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From lewis at mail.msen.com Fri Mar 20 17:32:38 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 20 17:32:40 2015 Subject: [squeak-dev] Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz In-Reply-To: <1426871265231-4813645.post@n4.nabble.com> References: <1426871265231-4813645.post@n4.nabble.com> Message-ID: <34163.136.2.1.102.1426872758.squirrel@webmail.msen.com> Thanks, I had forgotten about #findDefault. I will take a look at it. Dave > Hmm... I just realized that the instance variable in the UIManager is > always > nil in my images. Seems that the "new" initialization code was never > executed in a migration script. > > Please make sure that the logic of #findDefault in ToolBuilder does not > get > broken. There, you can create subclasses and use those as tool builders. > Using this fix, subclassing would not work anymore. > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/The-Inbox-ToolBuilder-Morphic-dtl-100-mcz-tp4813610p4813645.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > From lewis at mail.msen.com Fri Mar 20 17:49:25 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Fri Mar 20 17:49:27 2015 Subject: [squeak-dev] About forks and how we update the .image In-Reply-To: References: Message-ID: <6728.136.2.1.102.1426873765.squirrel@webmail.msen.com> Hi Edgar, I do not know what the problem is, but I see that we have quite a few updates since ShoutCore-cwp.36.mcz. So maybe your update for ShoutCore is getting stuck at that point, and cannot finish the update? ShoutCore-eem.43.mcz Eliot Miranda 2015-02-03 19:38:18 ShoutCore-ul.42.mcz Levente Uzonyi 2014-07-08 12:51:23 ShoutCore-ul.41.mcz Levente Uzonyi 2014-07-08 12:51:57 ShoutCore-nice.41.mcz Nicolas Cellier 2014-03-14 22:13:45 ShoutCore-cwp.40.mcz Colin Putney 2014-01-03 20:57:10 ShoutCore-fbs.39.mcz Frank Shearar 2013-11-24 20:53:07 ShoutCore-fbs.38.mcz Frank Shearar 2013-11-23 17:10:35 ShoutCore-fbs.37.mcz Frank Shearar 2013-11-23 15:57:15 ShoutCore-cwp.36.mcz Colin Putney 2012-10-25 19:04:09 Dave > Folks: > > I rechecking the process for my fork SqueakRosCore4dot5 > > I wish a .image towards Cuis elegancy and simplicity , but as compatible > with current and previous Squeak as possible. > > So my defaultUpdateURL is 'http://source.squeak.org/trunk' > > Today , I have the followings logs > > update-tpr.249-SqueakRosCore4dot5-12545.image.log > update-tpr.248-SqueakRosCore4dot5-12545.image.log > update-nice.263-SqueakRosCore4dot5-12545.image.log > update-nice.261-SqueakRosCore4dot5-12545.image.log > update-nice.260-SqueakRosCore4dot5-12545.image.log > update-nice.259-SqueakRosCore4dot5-12545.image.log > update-nice.258-SqueakRosCore4dot5-12545.image.log > update-nice.257-SqueakRosCore4dot5-12545.image.log > update-nice.256-SqueakRosCore4dot5-12545.image.log > update-nice.255-SqueakRosCore4dot5-12545.image.log > update-nice.254-SqueakRosCore4dot5-12545.image.log > update-nice.252-SqueakRosCore4dot5-12545.image.log > update-nice.251-SqueakRosCore4dot5-12545.image.log > update-nice.250-SqueakRosCore4dot5-12545.image.log > update-nice.247-SqueakRosCore4dot5-12545.image.log > update-nice.246-SqueakRosCore4dot5-12545.image.log > update-fbs.266-SqueakRosCore4dot5-12545.image.log > update-fbs.265-SqueakRosCore4dot5-12545.image.log > update-fbs.264-SqueakRosCore4dot5-12545.image.log > update-fbs.245-SqueakRosCore4dot5-12545.image.log > update-fbs.244-SqueakRosCore4dot5-12545.image.log > update-fbs.243-SqueakRosCore4dot5-12545.image.log > update-cmm.262-SqueakRosCore4dot5-12545.image.log > update-cmm.253-SqueakRosCore4dot5-12545.image.log > > And opening and see this I found > > ========== ShoutCore-cwp.36 ========== > > Remove support for per-class settings of #allowUnderscoreSelectors. > > On several of this. > > Seems some odd doing the same again and again. > > Feedback ? > > Edgar > @morplenauta en twitter > > > > > > From leves at elte.hu Fri Mar 20 17:56:31 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Mar 20 17:56:36 2015 Subject: [squeak-dev] The Trunk: Tools-mt.553.mcz In-Reply-To: References: Message-ID: I consider the depth filter to be a bad idea, because I see no value in filtering only the next 1, 2 or 3 levels. I can imagine two possible use cases: 1. filter only the tree nodes already opened - great when some nodes may be proxies. 2. filter the whole tree - what most users would expect to see This could be a simple boolean preference. The actual filtering should be done with a single tree traversal. Levente On Fri, 13 Mar 2015, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-mt.553.mcz > > ==================== Summary ==================== > > Name: Tools-mt.553 > Author: mt > Time: 13 March 2015, 10:31:03.81 am > UUID: 8a53e27d-a4d2-1b4d-b899-7433bf6d5424 > Ancestors: Tools-mt.552 > > Filtering changed to support a depth offset. Will be used to filter subtrees and support separate exploration activities in a large tree structure. The depth-limit will then be applied together with the offset. > > =============== Diff against Tools-mt.552 =============== > > Item was changed: > ----- Method: IndentingListItemMorph>>applyFilter: (in category 'filtering') ----- > applyFilter: filter > > + self > + applyFilter: filter > + depthOffset: self indentLevel.! > - | selfMatch childMatch | > - self isExpanded ifTrue: [self toggleExpandedState]. > - > - selfMatch := self matches: filter. > - childMatch := self matchesAnyChild: filter. > - > - selfMatch | childMatch ifFalse: [^ self hide]. > - > - selfMatch ifTrue: [ > - self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. > - childMatch ifTrue: [ > - self toggleExpandedState. > - self childrenDo: [:child | child applyFilter: filter]].! > > Item was added: > + ----- Method: IndentingListItemMorph>>applyFilter:depthOffset: (in category 'filtering') ----- > + applyFilter: filter depthOffset: offset > + > + | selfMatch childMatch | > + self isExpanded ifTrue: [self toggleExpandedState]. > + > + selfMatch := self matches: filter. > + childMatch := self matchesAnyChild: filter depthOffset: offset. > + > + selfMatch | childMatch ifFalse: [^ self hide]. > + > + selfMatch ifTrue: [ > + self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. > + childMatch ifTrue: [ > + self toggleExpandedState. > + self childrenDo: [:child | child applyFilter: filter depthOffset: offset]].! > > Item was removed: > - ----- Method: IndentingListItemMorph>>matchesAnyChild: (in category 'filtering') ----- > - matchesAnyChild: pattern > - > - | maxDepth next current | > - maxDepth := PluggableTreeMorph maximumSearchDepth - self indentLevel. > - maxDepth <= 0 ifTrue: [^ false]. > - > - next := (self getChildren collect: [:obj | 1 -> obj]) asOrderedCollection. > - [next notEmpty] whileTrue: [ > - current := next removeFirst. > - > - (self matches: pattern in: current value) > - ifTrue: [^ true]. > - > - current key < maxDepth ifTrue: [ > - next addAll: ((self getChildrenFor: current value) collect: [:obj | (current key + 1) -> obj])]. > - ]. > - > - ^ false! > > Item was added: > + ----- Method: IndentingListItemMorph>>matchesAnyChild:depthOffset: (in category 'filtering') ----- > + matchesAnyChild: pattern depthOffset: offset > + > + | maxDepth next current | > + maxDepth := PluggableTreeMorph maximumSearchDepth - self indentLevel + offset. > + maxDepth <= 0 ifTrue: [^ false]. > + > + next := (self getChildren collect: [:obj | 1 -> obj]) asOrderedCollection. > + [next notEmpty] whileTrue: [ > + current := next removeFirst. > + > + (self matches: pattern in: current value) > + ifTrue: [^ true]. > + > + current key < maxDepth ifTrue: [ > + next addAll: ((self getChildrenFor: current value) collect: [:obj | (current key + 1) -> obj])]. > + ]. > + > + ^ false! > > > From edgardec2005 at gmail.com Fri Mar 20 18:42:54 2015 From: edgardec2005 at gmail.com (Edgar J. De Cleene) Date: Fri Mar 20 18:43:06 2015 Subject: [squeak-dev] About forks and how we update the .image In-Reply-To: <6728.136.2.1.102.1426873765.squirrel@webmail.msen.com> Message-ID: On 3/20/15, 2:49 PM, "David T. Lewis" wrote: > Hi Edgar, > > I do not know what the problem is, but I see that we have quite a few > updates since ShoutCore-cwp.36.mcz. So maybe your update for ShoutCore is > getting stuck at that point, and cannot finish the update? > > ShoutCore-eem.43.mcz Eliot Miranda 2015-02-03 19:38:18 > ShoutCore-ul.42.mcz Levente Uzonyi 2014-07-08 12:51:23 > ShoutCore-ul.41.mcz Levente Uzonyi 2014-07-08 12:51:57 > ShoutCore-nice.41.mcz Nicolas Cellier 2014-03-14 22:13:45 > ShoutCore-cwp.40.mcz Colin Putney 2014-01-03 20:57:10 > ShoutCore-fbs.39.mcz Frank Shearar 2013-11-24 20:53:07 > ShoutCore-fbs.38.mcz Frank Shearar 2013-11-23 17:10:35 > ShoutCore-fbs.37.mcz Frank Shearar 2013-11-23 15:57:15 > ShoutCore-cwp.36.mcz Colin Putney 2012-10-25 19:04:09 > > Dave Thanks, I recheck again. Edgar From commits at source.squeak.org Fri Mar 20 19:32:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 19:32:49 2015 Subject: [squeak-dev] The Trunk: Kernel-eem.913.mcz Message-ID: Eliot Miranda uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-eem.913.mcz ==================== Summary ==================== Name: Kernel-eem.913 Author: eem Time: 20 March 2015, 12:32:15.433 pm UUID: 3424456e-291c-4424-97d8-a19ff41755fe Ancestors: Kernel-topa.912 Provide missing copyWithSourceCode: depended on by new breakpointing with source code. =============== Diff against Kernel-topa.912 =============== Item was added: + ----- Method: CompiledMethod>>copyWithSourceCode: (in category 'source code management') ----- + copyWithSourceCode: sourceCode + "Create a copy of the receiver whose source is embedded in the method. Used for breakpoints." + ^self copyWithTrailerBytes: (CompiledMethodTrailer new sourceCode: sourceCode)! From commits at source.squeak.org Fri Mar 20 19:34:19 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 19:34:20 2015 Subject: [squeak-dev] The Trunk: System-eem.709.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.709.mcz ==================== Summary ==================== Name: System-eem.709 Author: eem Time: 20 March 2015, 12:33:44.474 pm UUID: c5ffe3f2-3a6a-4110-9d9b-ebb72d5334c3 Ancestors: System-eem.708 Fix breakpoint source when pragmas follow temporaries. =============== Diff against System-eem.708 =============== Item was changed: ----- Method: BreakpointManager class>>compilePrototype:in: (in category 'private') ----- compilePrototype: aSymbol in: aClass "Compile and answer a new method containing a break statement" + | oldSource parser methodNode breakOnlyMethodNode sendBreakMessageNode hasTemps newSource mark positionParser markBeforePragmas pragmasFollowTemps | - | oldSource parser methodNode breakOnlyMethodNode sendBreakMessageNode hasTemps newSource mark | oldSource := aClass sourceCodeAt: aSymbol. parser := aClass newParser. methodNode := parser parse: oldSource class: aClass noPattern: false notifying: nil ifFail: [self error: '[breakpoint] unable to install breakpoint']. breakOnlyMethodNode := aClass newCompiler compile: 'temporaryMethodSelectorForBreakpoint self break. ^self' in: aClass notifying: nil ifFail: [self error: '[breakpoint] unable to install breakpoint']. sendBreakMessageNode := breakOnlyMethodNode block statements first. methodNode block statements addFirst: sendBreakMessageNode. + "Use anothe rparser to discover positions because if pragmas follow temporaries + then we want to insert the break after the last pragma, not after the temporaries." + (positionParser := aClass newParser) + initPattern: oldSource + return: + [:pattern| + positionParser pragmaSequence; temporaries. + markBeforePragmas := positionParser startOfNextToken. + positionParser pragmaSequence]. + mark := (pragmasFollowTemps := positionParser startOfNextToken > markBeforePragmas) + ifTrue: + [positionParser startOfNextToken - 1] - hasTemps := parser tempsMark <= oldSource size and: [(oldSource at: parser tempsMark) = $|]. - "If no temps, tempsMark points at start of first token in body" - mark := hasTemps - ifTrue: [parser tempsMark + 2] ifFalse: + [(hasTemps := positionParser tempsMark <= oldSource size and: [(oldSource at: positionParser tempsMark) = $|]) + ifTrue: [positionParser tempsMark + 2] + ifFalse: "If no temps, tempsMark points at start of first token in body iff there is a body" + [positionParser tempsMark >= oldSource size + ifTrue: "empty body" + [positionParser startOfNextToken] + ifFalse: + [positionParser tempsMark - 1]]]. - [parser tempsMark >= oldSource size - ifTrue: "empty body" - [(parser tempsMark min: oldSource size) + 1] - ifFalse: - [parser tempsMark - 1]]. newSource := oldSource copyReplaceFrom: mark to: mark - 1 with: ' self break.\' withCRs. ^methodNode generate copyWithSourceCode: newSource! From commits at source.squeak.org Fri Mar 20 19:36:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 19:36:05 2015 Subject: [squeak-dev] The Trunk: Tools-eem.556.mcz Message-ID: Eliot Miranda uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-eem.556.mcz ==================== Summary ==================== Name: Tools-eem.556 Author: eem Time: 20 March 2015, 12:35:32.087 pm UUID: a804a709-6711-4c89-ab48-81bd4d50c66b Ancestors: Tools-topa.555 Cache endPC in abstractPCForConcretePC: so that run to here... in breakponted methods doesn't take an eternity. =============== Diff against Tools-topa.555 =============== Item was changed: ----- Method: CompiledMethod>>abstractPCForConcretePC: (in category '*Tools-Debugger-support') ----- abstractPCForConcretePC: concretePC "Answer the abstractPC matching concretePC." + | abstractPC scanner client endPC | - | abstractPC scanner client | self flag: 'belongs in DebuggerMethodMap?'. abstractPC := 1. scanner := InstructionStream on: self. client := InstructionClient new. + "cache endPC for methods with embedded source; finding out the endPC is very slow in this case..." + endPC := self endPC. + [(scanner pc > endPC - [(scanner atEnd or: [scanner pc >= concretePC]) ifTrue: [^abstractPC]. abstractPC := abstractPC + 1. scanner interpretNextInstructionFor: client] repeat! From commits at source.squeak.org Fri Mar 20 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 20 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150320225502.8873.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007663.html Name: Kernel-eem.913 Ancestors: Kernel-topa.912 Provide missing copyWithSourceCode: depended on by new breakpointing with source code. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007664.html Name: System-eem.709 Ancestors: System-eem.708 Fix breakpoint source when pragmas follow temporaries. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007665.html Name: Tools-eem.556 Ancestors: Tools-topa.555 Cache endPC in abstractPCForConcretePC: so that run to here... in breakponted methods doesn't take an eternity. ============================================= From rpboland at gmail.com Sat Mar 21 00:31:27 2015 From: rpboland at gmail.com (Ralph Boland) Date: Sat Mar 21 00:31:28 2015 Subject: [squeak-dev] Voice recognition Message-ID: I am contemplating (far from implementing) an educational video game that can accept voice commands. There would be 10-20 (simple) commands, certainly no more than 100. Voices would mostly be of children but adult voices are also possible. The auditory environment could be noisy. Voice recognition not simply a nice addon to the game; it is very important. I want to implement this game in Smalltalk. Does anybody have any ideas or experience related to recognizing voice commands in Smalltalk? My assumption is that some kind of library (say in C) would be used. I would want to keep any kind of voice recognition training to a minimum. Obviously, training users so that they can play the game would be a major handicap. It can be a high paced game so failing to recognize a command in the middle of a user playing the game could be catastrophic (in the game, not in the real world). Any feed back most welcome. Ralph Boland -- -- Those who can make you believe absurdities, can make you commit atrocities, -- especially in video games -- Voltaire/Boland From leves at elte.hu Sat Mar 21 02:57:26 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sat Mar 21 02:57:31 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.911.mcz In-Reply-To: References: <55064a2d.064bb40a.2f12.0375SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: This was the first thing I fixed in my image, but it's just a fix for the symptoms, and not the cause. Also, this fix has no effect in a running image, until [Sensor installInterruptWatcher] is evaluated, because the existing process is still running the old method in the loop. It seems like new UI processes share the WorldState object with other UI processes, so I'll have to come up with a workaround for this. Another unrelated problem I see here is that the SoundService's registry is not used as it was designed: SoundService registeredClasses anySatisfy: #isBehavior "==> false" Instances are registered instead of classes, which may be benefical, but it causes some trouble here. In my image there are three registered SoundServices: a DummySoundSystem, a BaseSoundSystem, and another DummySoundSystem. If classes were used, then the code would have prevented the double registration. Levente On Sun, 15 Mar 2015, Chris Muller wrote: > Levente wrote: > >> ... I think the error can occur if you use the same WorldState object from multiple UI processes (but doing that is a bad >> idea). > > So there it is, that big stack (from my other post) is the > userInterruptWatcher waking up from my pressing the interrupt key. > How did it find its way into WorldState to do some > drawWorld:submorphs:invalidAreasOn:'ing? It happened before > userInterruptWater even attempted to open the debugger, because it > first executes: > > SoundService default shutDown. > > and even though the SoundService's 'default' instance was nil, it > needed to construct one just so it can forthwith tell it to #shutDown. > Brilliant! :) > > It gets better. The system has to know *which kind* of SoundService > it should construct before it can construct it and tell it to > shutDown. But there are two! BaseSoundSystem and DummySoundSystem. > But, oh, which one? Hm, maybe best in this situation to pop up a menu > to ask the user (not)! > > And so to pop up such a menu it is now into the WorldState machinery > and image meltdown. > > I hope papering over it with this simple guard before the insanity > starts in lowSpaceWatcher will help, but something feels unsettling > about the distance between the cause and the symptom. > > Accessing WorldState from multiple UI processes is a bad idea, for > sure, but IF it happens, the penalty is of a locked image is pretty > strict.. > > > > On Sun, Mar 15, 2015 at 10:12 PM, wrote: >> Chris Muller uploaded a new version of Kernel to project The Trunk: >> http://source.squeak.org/trunk/Kernel-cmm.911.mcz >> >> ==================== Summary ==================== >> >> Name: Kernel-cmm.911 >> Author: cmm >> Time: 15 March 2015, 10:12:04.602 pm >> UUID: 0d5cd697-a536-47ec-8c0c-0b8b38bf297a >> Ancestors: Kernel-ul.910 >> >> - Don't create a SoundSystem just to send #shutDown to it, so that its lazy-initialization will not try to pop up a menu asking the user which type to create and, in the process, invoking WorldState behaviors from outside the UI process and colliding with the new intercycle pause implementation. >> >> =============== Diff against Kernel-ul.910 =============== >> >> Item was changed: >> ----- Method: InputSensor>>userInterruptWatcher (in category 'user interrupts') ----- >> userInterruptWatcher >> "Wait for user interrupts and open a notifier on the active process when one occurs." >> - >> [ InterruptSemaphore wait. >> Display deferUpdates: false. >> + SoundService defaultOrNil ifNotNil: [ : soundSystem | soundSystem shutDown ]. >> - SoundService default shutDown. >> Smalltalk handleUserInterrupt ] repeat! >> >> > > From commits at source.squeak.org Sat Mar 21 16:07:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 21 16:07:27 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Kernel-dtl.67.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-Kernel-dtl.67.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.67 Author: dtl Time: 21 March 2015, 12:07:23.671 pm UUID: d0d0c324-e12d-4424-a1dd-7b4a1cf1f946 Ancestors: ToolBuilder-Kernel-dtl.66 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-Kernel-dtl.66 =============== Item was changed: ----- Method: ToolBuilder class>>findDefault (in category 'accessing') ----- findDefault "Answer a default tool builder" | builderClass | "Note: The way the following is phrased ensures that you can always make 'more specific' builders merely by subclassing a tool builder and implementing a more specific way of reacting to #isActiveBuilder. For example, a BobsUIToolBuilder can subclass MorphicToolBuilder and (if enabled, say Preferences useBobsUITools) will be considered before the parent (generic MorphicToolBuilder)." builderClass := self allSubclasses detect:[:any| any isActiveBuilder and:[ any subclasses noneSatisfy:[:sub| sub isActiveBuilder]]] ifNone:[nil]. + builderClass ifNotNil: [^builderClass ]. - builderClass ifNotNil: [^builderClass new]. ^self error: 'ToolBuilder not found'! Item was changed: Object subclass: #UIManager + instanceVariableNames: 'builderClass' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !UIManager commentStamp: 'dtl 5/2/2010 16:06' prior: 0! UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic, MVC or other user interfaces.! Item was added: + ----- Method: UIManager>>builderClass (in category 'builder') ----- + builderClass + "Answer the kind of tool builder to use, possibly influenced by project preferences" + ^ builderClass ifNil: [ builderClass := ToolBuilder findDefault ]! Item was changed: ----- Method: UIManager>>toolBuilder (in category 'builder') ----- toolBuilder + ^ self builderClass new! - "Answer a ToolBuilder for this kind of UIManager" - ^ self subclassResponsibility! From commits at source.squeak.org Sat Mar 21 16:07:57 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 21 16:07:59 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-MVC-dtl.36.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-MVC-dtl.36.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.36 Author: dtl Time: 21 March 2015, 12:07:57.062 pm UUID: 8a01e8ca-80e4-4edd-b166-bea8b1ac01d5 Ancestors: ToolBuilder-MVC-dtl.35 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-MVC-dtl.35 =============== Item was removed: - ----- Method: MVCUIManager>>toolBuilder (in category 'builder') ----- - toolBuilder - ^ MVCToolBuilder new! From commits at source.squeak.org Sat Mar 21 16:08:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 21 16:08:31 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Morphic-dtl.101.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-Morphic-dtl.101.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-dtl.101 Author: dtl Time: 21 March 2015, 12:08:28.036 pm UUID: bd975efe-ecc6-4634-94cf-a74a251da227 Ancestors: ToolBuilder-Morphic-dtl.100 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-Morphic-dtl.100 =============== Item was removed: - ----- Method: MorphicUIManager>>toolBuilder (in category 'builder') ----- - toolBuilder - ^ MorphicToolBuilder new! From lewis at mail.msen.com Sat Mar 21 16:21:09 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 21 16:21:10 2015 Subject: [squeak-dev] Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz In-Reply-To: <1426871265231-4813645.post@n4.nabble.com> References: <1426871265231-4813645.post@n4.nabble.com> Message-ID: <20150321162109.GA93649@shell.msen.com> On Fri, Mar 20, 2015 at 10:07:45AM -0700, Marcel Taeumel wrote: > Hmm... I just realized that the instance variable in the UIManager is always > nil in my images. Seems that the "new" initialization code was never > executed in a migration script. > > Please make sure that the logic of #findDefault in ToolBuilder does not get > broken. There, you can create subclasses and use those as tool builders. > Using this fix, subclassing would not work anymore. > I put another update in the inbox. The #findDefault logic is now used to find the ToolBuilder class to use, and this normally happens the first time that a ToolBuiilder is needed in a new Project. The mechanism should now work as before, but the UIManager no longer needs to have a dedicated ToolBuilder instance. Dave From lewis at mail.msen.com Sat Mar 21 19:04:36 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sat Mar 21 19:04:39 2015 Subject: [squeak-dev] Instantiating a ToolBuilder for a UIManager (was: Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz) In-Reply-To: <20150321162109.GA93649@shell.msen.com> References: <1426871265231-4813645.post@n4.nabble.com> <20150321162109.GA93649@shell.msen.com> Message-ID: <20150321190436.GA18571@shell.msen.com> On Sat, Mar 21, 2015 at 12:21:09PM -0400, David T. Lewis wrote: > On Fri, Mar 20, 2015 at 10:07:45AM -0700, Marcel Taeumel wrote: > > Hmm... I just realized that the instance variable in the UIManager is always > > nil in my images. Seems that the "new" initialization code was never > > executed in a migration script. > > > > Please make sure that the logic of #findDefault in ToolBuilder does not get > > broken. There, you can create subclasses and use those as tool builders. > > Using this fix, subclassing would not work anymore. > > > > I put another update in the inbox. The #findDefault logic is now used to > find the ToolBuilder class to use, and this normally happens the first time > that a ToolBuiilder is needed in a new Project. The mechanism should now > work as before, but the UIManager no longer needs to have a dedicated > ToolBuilder instance. > I should note for the record that I am the person who added the #toolBuilder instance variable a few years ago. At the time, I did not notice the side effect of garbage accumulating in the tool builder's registry. Hopefully the changes in the inbox will make it right. For background, here is where that original set of changes were made: Name: ToolBuilder-Kernel-dtl.46 Author: dtl Time: 5 March 2011, 1:05:35.352 pm A Project has a UIManager, and a UIManager has a ToolBuilder, so add #toolBuilder ivar to UIManager and initialize accordingly. This facilitates setting up the appropriate UIManager and ToolBuilder to allow SMxMorphicProject to host a SimpleMorphic world. Change Toolbuilder class>>default to always ask the default UI manager for its tool builder. Remove class var Default (this was provided in the ToolBuilder package but never used in Squeak). Deprecate ToolBuilder class>>default: Background: In previous Squeak usage, ToolBuilder class>>default always invoked a search for the appropriate ToolBuilder subclass, and class var Default was unused (this is awkward if more than one kind of ToolBuilder could be used in a project that #isMorphic). This change makes the default tool builder an explicit attibute of the active UI manager. Dave From asqueaker at gmail.com Sat Mar 21 20:02:04 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sat Mar 21 20:02:06 2015 Subject: [squeak-dev] The Trunk: Tools-mt.553.mcz In-Reply-To: References: Message-ID: 3. Collect an attribute of a collection (see screenshot). This is possible only when depth is 2 and "Filterable Lists by labels only" is set. On Fri, Mar 20, 2015 at 12:56 PM, Levente Uzonyi wrote: > I consider the depth filter to be a bad idea, because I see no value in > filtering only the next 1, 2 or 3 levels. > > I can imagine two possible use cases: > 1. filter only the tree nodes already opened - great when some nodes may be > proxies. > 2. filter the whole tree - what most users would expect to see > This could be a simple boolean preference. > > The actual filtering should be done with a single tree traversal. > > Levente > > > On Fri, 13 Mar 2015, commits@source.squeak.org wrote: > >> Marcel Taeumel uploaded a new version of Tools to project The Trunk: >> http://source.squeak.org/trunk/Tools-mt.553.mcz >> >> ==================== Summary ==================== >> >> Name: Tools-mt.553 >> Author: mt >> Time: 13 March 2015, 10:31:03.81 am >> UUID: 8a53e27d-a4d2-1b4d-b899-7433bf6d5424 >> Ancestors: Tools-mt.552 >> >> Filtering changed to support a depth offset. Will be used to filter >> subtrees and support separate exploration activities in a large tree >> structure. The depth-limit will then be applied together with the offset. >> >> =============== Diff against Tools-mt.552 =============== >> >> Item was changed: >> ----- Method: IndentingListItemMorph>>applyFilter: (in category >> 'filtering') ----- >> applyFilter: filter >> >> + self >> + applyFilter: filter >> + depthOffset: self indentLevel.! >> - | selfMatch childMatch | >> - self isExpanded ifTrue: [self toggleExpandedState]. >> - >> - selfMatch := self matches: filter. >> - childMatch := self matchesAnyChild: filter. >> - >> - selfMatch | childMatch ifFalse: [^ self hide]. >> - >> - selfMatch ifTrue: [ >> - self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. >> - childMatch ifTrue: [ >> - self toggleExpandedState. >> - self childrenDo: [:child | child applyFilter: filter]].! >> >> Item was added: >> + ----- Method: IndentingListItemMorph>>applyFilter:depthOffset: (in >> category 'filtering') ----- >> + applyFilter: filter depthOffset: offset >> + >> + | selfMatch childMatch | >> + self isExpanded ifTrue: [self toggleExpandedState]. >> + >> + selfMatch := self matches: filter. >> + childMatch := self matchesAnyChild: filter depthOffset: offset. >> + >> + selfMatch | childMatch ifFalse: [^ self hide]. >> + >> + selfMatch ifTrue: [ >> + self backgroundColor: ((Color gray: 0.85) alpha: 0.5)]. >> + childMatch ifTrue: [ >> + self toggleExpandedState. >> + self childrenDo: [:child | child applyFilter: filter >> depthOffset: offset]].! >> >> Item was removed: >> - ----- Method: IndentingListItemMorph>>matchesAnyChild: (in category >> 'filtering') ----- >> - matchesAnyChild: pattern >> - >> - | maxDepth next current | >> - maxDepth := PluggableTreeMorph maximumSearchDepth - self >> indentLevel. >> - maxDepth <= 0 ifTrue: [^ false]. >> - >> - next := (self getChildren collect: [:obj | 1 -> obj]) >> asOrderedCollection. >> - [next notEmpty] whileTrue: [ >> - current := next removeFirst. >> - >> - (self matches: pattern in: current value) >> - ifTrue: [^ true]. >> - >> - current key < maxDepth ifTrue: [ >> - next addAll: ((self getChildrenFor: current value) >> collect: [:obj | (current key + 1) -> obj])]. >> - ]. >> - >> - ^ false! >> >> Item was added: >> + ----- Method: IndentingListItemMorph>>matchesAnyChild:depthOffset: (in >> category 'filtering') ----- >> + matchesAnyChild: pattern depthOffset: offset >> + >> + | maxDepth next current | >> + maxDepth := PluggableTreeMorph maximumSearchDepth - self >> indentLevel + offset. >> + maxDepth <= 0 ifTrue: [^ false]. >> + >> + next := (self getChildren collect: [:obj | 1 -> obj]) >> asOrderedCollection. >> + [next notEmpty] whileTrue: [ >> + current := next removeFirst. >> + >> + (self matches: pattern in: current value) >> + ifTrue: [^ true]. >> + >> + current key < maxDepth ifTrue: [ >> + next addAll: ((self getChildrenFor: current value) >> collect: [:obj | (current key + 1) -> obj])]. >> + ]. >> + >> + ^ false! >> >> >> > -------------- next part -------------- A non-text attachment was scrubbed... Name: collect-format.png Type: image/png Size: 17665 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150321/ec60a5e9/collect-format.png From eliot.miranda at gmail.com Sun Mar 22 02:18:16 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sun Mar 22 02:18:19 2015 Subject: [squeak-dev] Instantiating a ToolBuilder for a UIManager (was: Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz) In-Reply-To: <20150321190436.GA18571@shell.msen.com> References: <1426871265231-4813645.post@n4.nabble.com> <20150321162109.GA93649@shell.msen.com> <20150321190436.GA18571@shell.msen.com> Message-ID: David, thanks so much for addressing this arcana so promptly! On Sat, Mar 21, 2015 at 12:04 PM, David T. Lewis wrote: > On Sat, Mar 21, 2015 at 12:21:09PM -0400, David T. Lewis wrote: > > On Fri, Mar 20, 2015 at 10:07:45AM -0700, Marcel Taeumel wrote: > > > Hmm... I just realized that the instance variable in the UIManager is > always > > > nil in my images. Seems that the "new" initialization code was never > > > executed in a migration script. > > > > > > Please make sure that the logic of #findDefault in ToolBuilder does > not get > > > broken. There, you can create subclasses and use those as tool > builders. > > > Using this fix, subclassing would not work anymore. > > > > > > > I put another update in the inbox. The #findDefault logic is now used to > > find the ToolBuilder class to use, and this normally happens the first > time > > that a ToolBuiilder is needed in a new Project. The mechanism should now > > work as before, but the UIManager no longer needs to have a dedicated > > ToolBuilder instance. > > > > I should note for the record that I am the person who added the > #toolBuilder > instance variable a few years ago. At the time, I did not notice the side > effect of garbage accumulating in the tool builder's registry. Hopefully > the changes in the inbox will make it right. > > For background, here is where that original set of changes were made: > > Name: ToolBuilder-Kernel-dtl.46 > Author: dtl > Time: 5 March 2011, 1:05:35.352 pm > > A Project has a UIManager, and a UIManager has a ToolBuilder, so add > #toolBuilder ivar to UIManager and initialize accordingly. This > facilitates setting up the appropriate UIManager and ToolBuilder to > allow SMxMorphicProject to host a SimpleMorphic world. > > Change Toolbuilder class>>default to always ask the default UI > manager for its tool builder. Remove class var Default (this was > provided in the ToolBuilder package but never used in Squeak). > Deprecate ToolBuilder class>>default: > > Background: In previous Squeak usage, ToolBuilder class>>default always > invoked a search for the appropriate ToolBuilder subclass, and class var > Default was unused (this is awkward if more than one kind of ToolBuilder > could be used in a project that #isMorphic). This change makes the > default > tool builder an explicit attibute of the active UI manager. > > Dave > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150321/22845144/attachment.htm From sean at clipperadams.com Sun Mar 22 21:22:41 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Sun Mar 22 21:33:15 2015 Subject: [squeak-dev] Older VMs Message-ID: <1427059361988-4814222.post@n4.nabble.com> The "Other VMs - The Squeak VM website" link at seems to hang forever http://www.downforeveryoneorjustme.com/squeakvm.org/ ----- Cheers, Sean -- View this message in context: http://forum.world.st/Older-VMs-tp4814222.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 23 05:34:19 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 23 05:44:57 2015 Subject: [squeak-dev] Re: The Trunk: Tools-mt.553.mcz In-Reply-To: References: Message-ID: <1427088859756-4814249.post@n4.nabble.com> Fitering the whole tree may break for infinitely deep structures. Filtering the already opened tree nodes? What do you mean? We should move filtering one level up to start at the list where the current selection is. Just considering Tobias' new Font tool. Hmmm... but then we would have to change the selection in a freshly opened object explorer to filter the list of instance variables... I don't think that the depth filter is a bad idea in general. It depends on your scenarios. Levente, maybe you could elaborate a little bit more the scenarios you have in mind. I optimized the filter for the exploration idea, I explained in the other thread. :) Best, Marcel -- View this message in context: http://forum.world.st/Re-The-Trunk-Tools-mt-553-mcz-tp4813661p4814249.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 23 05:38:13 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 23 05:48:50 2015 Subject: [squeak-dev] Re: Instantiating a ToolBuilder for a UIManager (was: Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz) In-Reply-To: <20150321190436.GA18571@shell.msen.com> References: <1426871265231-4813645.post@n4.nabble.com> <20150321162109.GA93649@shell.msen.com> <20150321190436.GA18571@shell.msen.com> Message-ID: <1427089093516-4814251.post@n4.nabble.com> Almost there. :) There is no setter #builderClass:. Could you add one? I don't see the need for creating a new project whenever a new builder is introduced to the system. It should be possible to reuse the current project. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-ToolBuilder-Morphic-dtl-100-mcz-tp4813610p4814251.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Mon Mar 23 08:54:39 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 08:54:45 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: Message-ID: Hi Levente, [Sorry for the late reply] On 19.03.2015, at 23:39, Levente Uzonyi wrote: > The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. > One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? > In spirit, these implementations indeed are similar. Bal?zs' code however only deals with the World main docking bar while _this_ proposal deals with context menus in tools like the browser. I don't understand what you mean by ?Performance-wise a single "pragma" is better?. Can you elaborate a bit? Best -Tobias > Levente > > [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html > > On Wed, 18 Mar 2015, Tobias Pape wrote: > >> Hi, >> >> On 18.03.2015, at 15:11, commits@source.squeak.org wrote: >> >>> A new version of Tools was added to project The Inbox: >>> http://source.squeak.org/inbox/Tools-topa.556.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Tools-topa.556 >>> Author: topa >>> Time: 18 March 2015, 4:09:54.221 pm >>> UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d >>> Ancestors: Tools-topa.555 >>> >>> Pluggable Menus for many tools >>> ============================== >>> >>> A lot of tools, especially the Browser, rely on context menus >>> (aka yellow button menus). Dynamically extending these is possible >>> but requires a lot of care. The Pluggable Menus allow to add menu >>> entries easily via extension methods. The Services package serves >>> as example here. >> >> An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. >> >> If nobody objects, I move this to trunk on friday :) >> >> Best >> -Tobias From frank.shearar at gmail.com Mon Mar 23 09:15:16 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Mon Mar 23 09:15:18 2015 Subject: [squeak-dev] Older VMs In-Reply-To: <1427059361988-4814222.post@n4.nabble.com> References: <1427059361988-4814222.post@n4.nabble.com> Message-ID: On 22 March 2015 at 21:22, Sean P. DeNigris wrote: > The "Other VMs - The Squeak VM website" link at seems to hang forever > http://www.downforeveryoneorjustme.com/squeakvm.org/ It must have been a transient issue, because it's up for me, 11 hours later. frank From frank.shearar at gmail.com Mon Mar 23 09:16:59 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Mon Mar 23 09:17:02 2015 Subject: [squeak-dev] Older VMs In-Reply-To: References: <1427059361988-4814222.post@n4.nabble.com> Message-ID: On 23 March 2015 at 09:15, Frank Shearar wrote: > On 22 March 2015 at 21:22, Sean P. DeNigris wrote: >> The "Other VMs - The Squeak VM website" link at seems to hang forever >> http://www.downforeveryoneorjustme.com/squeakvm.org/ > > It must have been a transient issue, because it's up for me, 11 hours later. I should really read _all_ my mail before responding. Not "transient network issue", but rather "David Lewis and Ian Piumarta hauled out the spanners and fixed things issue". frank From leves at elte.hu Mon Mar 23 10:43:09 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Mar 23 10:43:14 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: Message-ID: On Mon, 23 Mar 2015, Tobias Pape wrote: > Hi Levente, > > [Sorry for the late reply] > > > On 19.03.2015, at 23:39, Levente Uzonyi wrote: > >> The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. >> One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? >> > > In spirit, these implementations indeed are similar. Bal?zs' code however > only deals with the World main docking bar while _this_ proposal deals > with context menus in tools like the browser. That's exactly what I meant. My point is that the two should be quite similar. > > I don't understand what you mean by ?Performance-wise a single "pragma" is better?. > Can you elaborate a bit? Using two separate "pragmas" means that you have to look up the priority in a separate query for each entry. While using a single "pragma", the priority is available without these extra lookups. Levente > > Best > -Tobias > > >> Levente >> >> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html >> >> On Wed, 18 Mar 2015, Tobias Pape wrote: >> >>> Hi, >>> >>> On 18.03.2015, at 15:11, commits@source.squeak.org wrote: >>> >>>> A new version of Tools was added to project The Inbox: >>>> http://source.squeak.org/inbox/Tools-topa.556.mcz >>>> >>>> ==================== Summary ==================== >>>> >>>> Name: Tools-topa.556 >>>> Author: topa >>>> Time: 18 March 2015, 4:09:54.221 pm >>>> UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d >>>> Ancestors: Tools-topa.555 >>>> >>>> Pluggable Menus for many tools >>>> ============================== >>>> >>>> A lot of tools, especially the Browser, rely on context menus >>>> (aka yellow button menus). Dynamically extending these is possible >>>> but requires a lot of care. The Pluggable Menus allow to add menu >>>> entries easily via extension methods. The Services package serves >>>> as example here. >>> >>> An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. >>> >>> If nobody objects, I move this to trunk on friday :) >>> >>> Best >>> -Tobias > > > > From commits at source.squeak.org Mon Mar 23 11:34:19 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 23 11:34:20 2015 Subject: [squeak-dev] The Inbox: ToolBuilder-Kernel-dtl.68.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Inbox: http://source.squeak.org/inbox/ToolBuilder-Kernel-dtl.68.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.68 Author: dtl Time: 23 March 2015, 7:34:14.341 am UUID: 686389b8-aad6-4324-b077-19a7673bf4c8 Ancestors: ToolBuilder-Kernel-dtl.67 Add UIManager>> builderClass. Clean up unreferenced code. =============== Diff against ToolBuilder-Kernel-dtl.67 =============== Item was changed: ----- Method: ToolBuilder class>>default (in category 'accessing') ----- default "Answer the default tool builder" ^ Project current uiManager toolBuilder + ! - ifNil: [self findDefault]! Item was removed: - ----- Method: ToolBuilder class>>default: (in category 'accessing') ----- - default: aToolBuilder - "Set a new default tool builder" - self deprecated: 'The default ToolBuilder is an attribute of the UIManager' - ! Item was added: + ----- Method: UIManager>>builderClass: (in category 'accessing') ----- + builderClass: aClass + builderClass := aClass! From lewis at mail.msen.com Mon Mar 23 11:45:21 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 23 11:45:23 2015 Subject: [squeak-dev] Re: Instantiating a ToolBuilder for a UIManager (was: Re: The Inbox: ToolBuilder-Morphic-dtl.100.mcz) In-Reply-To: <1427089093516-4814251.post@n4.nabble.com> References: <1426871265231-4813645.post@n4.nabble.com> <20150321162109.GA93649@shell.msen.com> <20150321190436.GA18571@shell.msen.com> <1427089093516-4814251.post@n4.nabble.com> Message-ID: <20150323114521.GB95959@shell.msen.com> On Sun, Mar 22, 2015 at 10:38:13PM -0700, Marcel Taeumel wrote: > Almost there. :) There is no setter #builderClass:. Could you add one? I > don't see the need for creating a new project whenever a new builder is > introduced to the system. It should be possible to reuse the current > project. Done. Thanks for the reviews :-) Dave From Das.Linux at gmx.de Mon Mar 23 12:12:17 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 12:12:23 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: Message-ID: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> On 23.03.2015, at 11:43, Levente Uzonyi wrote: > On Mon, 23 Mar 2015, Tobias Pape wrote: > >> Hi Levente, >> >> [Sorry for the late reply] >> >> >> On 19.03.2015, at 23:39, Levente Uzonyi wrote: >> >>> The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. >>> One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? >>> >> >> In spirit, these implementations indeed are similar. Bal?zs' code however >> only deals with the World main docking bar while _this_ proposal deals >> with context menus in tools like the browser. > > That's exactly what I meant. My point is that the two should be quite similar. > >> >> I don't understand what you mean by ?Performance-wise a single "pragma" is better?. >> Can you elaborate a bit? > > Using two separate "pragmas" means that you have to look up the priority in a separate query for each entry. While using a single "pragma", the priority is available without these extra lookups. > Ok, I thought you meant that. The point is that I want to make the simple case (just a menu) very simple: ? Create an instance of MenuMorph or similar. ? Create a method that should build the menu entries: someMenu: aMenu ^ aMenu addList: #( ('use' use) ('remove' remove) ('copy' copyName)); yourself ? Send `self menu: aMorph for: #myMenu` (that should be it) but complex cases possible nonetheless. I don't want to bother the average tool writer with shifted states, priorities or whatnot. I have seen Pragma>>allNamed:in:sortedByArgument:, but I cannot handle default values with that. Do you think performance is actually a bottleneck here? Best -Tobias > Levente > >> >> Best >> -Tobias >> >> >>> Levente >>> >>> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html >>> >>> On Wed, 18 Mar 2015, Tobias Pape wrote: >>> >>>> Hi, >>>> >>>> On 18.03.2015, at 15:11, commits@source.squeak.org wrote: >>>> >>>>> A new version of Tools was added to project The Inbox: >>>>> http://source.squeak.org/inbox/Tools-topa.556.mcz >>>>> >>>>> ==================== Summary ==================== >>>>> >>>>> Name: Tools-topa.556 >>>>> Author: topa >>>>> Time: 18 March 2015, 4:09:54.221 pm >>>>> UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d >>>>> Ancestors: Tools-topa.555 >>>>> >>>>> Pluggable Menus for many tools >>>>> ============================== >>>>> >>>>> A lot of tools, especially the Browser, rely on context menus >>>>> (aka yellow button menus). Dynamically extending these is possible >>>>> but requires a lot of care. The Pluggable Menus allow to add menu >>>>> entries easily via extension methods. The Services package serves >>>>> as example here. >>>> >>>> An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. >>>> >>>> If nobody objects, I move this to trunk on friday :) >>>> >>>> Best >>>> -Tobias From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 23 14:00:35 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 23 14:11:15 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> Message-ID: <1427119235519-4814352.post@n4.nabble.com> According so Shneiderman [1, p.445], simple but frequent tasks should take no longer than 1 second. Personally, I find this too long for opening a context menu. Let us shoot for at most 500 milliseconds. Now bench. Where are we? If it lies within scope, let us favor this flexible programming interface instead of performance improvements that many users will not notice/appreciate here. [1] Shneiderman. "Designing the User Interface". 5th Edition. Pearson. 2010. Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Tools-topa-556-mcz-tp4812884p4814352.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From ma.chris.m at gmail.com Mon Mar 23 15:23:16 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Mon Mar 23 15:23:22 2015 Subject: [squeak-dev] what does primGarbageCollect return in Spur? Message-ID: Has anyone else noticed that flushing Monticello cached versions in Spur no longer reports any memory freed up..? From btc at openinworld.com Mon Mar 23 15:26:01 2015 From: btc at openinworld.com (Ben Coman) Date: Mon Mar 23 15:26:24 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: <1427119235519-4814352.post@n4.nabble.com> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> Message-ID: On Mon, Mar 23, 2015 at 10:00 PM, Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > According so Shneiderman [1, p.445], simple but frequent tasks should take > no > longer than 1 second. Personally, I find this too long for opening a > context > menu. Let us shoot for at most 500 milliseconds. Now bench. Where are we? > > If it lies within scope, let us favor this flexible programming interface > instead of performance improvements that many users will not > notice/appreciate here. > > [1] Shneiderman. "Designing the User Interface". 5th Edition. Pearson. > 2010. > Jakob Nielsen was the reference text for my undergraduate Human Computer Interaction course... http://www.nngroup.com/articles/response-times-3-important-limits/ * 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result. * 1.0 second is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data. * 10 seconds is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect. Context menus should feel instantaneous. cheers -ben -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/4cd9263d/attachment.htm From Das.Linux at gmx.de Mon Mar 23 15:53:18 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 15:53:25 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> Message-ID: <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> Hi, On 23.03.2015, at 16:26, Ben Coman wrote: > > On Mon, Mar 23, 2015 at 10:00 PM, Marcel Taeumel wrote: > According so Shneiderman [1, p.445], simple but frequent tasks should take no > longer than 1 second. Personally, I find this too long for opening a context > menu. Let us shoot for at most 500 milliseconds. Now bench. Where are we? > > If it lies within scope, let us favor this flexible programming interface > instead of performance improvements that many users will not > notice/appreciate here. > > [1] Shneiderman. "Designing the User Interface". 5th Edition. Pearson. 2010. > > Jakob Nielsen was the reference text for my undergraduate Human Computer Interaction course... > http://www.nngroup.com/articles/response-times-3-important-limits/ > > * 0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result. > > * 1.0 second is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data. > > * 10 seconds is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect. > > Context menus should feel instantaneous. > cheers -ben So I did a quick bench for "Open the context menu for the messages list in a browser" by emulating #getMenu: of PuggableListMorph/ScrollPane like this: | browser | browser := Browser new. browser selectSystemCategory: browser class category. browser selectClass: browser class. browser messageCategoryListIndex: 1. browser messageListIndex: 1. [ | aMenu aTitle | aTitle := nil. aMenu := MenuMorph new defaultTarget: browser. browser perform: #messageListMenu:shifted: with: aMenu with: false. aTitle ifNotNil: [aMenu addTitle: aTitle]. ] bench For the trunk I get: '7,070 per second. 141 microseconds per run.' For my version I get: '2,630 per second. 381 microseconds per run.' Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. Are there still objections? Best -Tobias From commits at source.squeak.org Mon Mar 23 16:08:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 23 16:08:22 2015 Subject: [squeak-dev] The Trunk: Morphic-cmm.785.mcz Message-ID: Chris Muller uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-cmm.785.mcz ==================== Summary ==================== Name: Morphic-cmm.785 Author: cmm Time: 23 March 2015, 11:07:11.337 am UUID: 44fe53f8-470d-48cf-91f3-10b602d87f16 Ancestors: Morphic-topa.784 - Smart-Splitter behavior now accounts for possible icons. - Fix incorrect Smart-Splitter adjustment when user has sized window width smaller than the sum of the minimum widths of all panes. - Fix argAdvance: for selectors that were copied using "copy selector (c)" command. =============== Diff against Morphic-topa.784 =============== Item was changed: ----- Method: PluggableListMorph>>charactersOccluded (in category 'accessing') ----- charactersOccluded "Answer the number of characters occluded in my #visibleList by my right edge." + | listIndex | listIndex:=0. ^ self visibleList inject: 0 into: + [ : sum : each | | eachString totalWidth indexOfLastVisible iconWidth | + totalWidth:=0. - [ : sum : each | | eachString totalWidth indexOfLastVisible | - totalWidth := 0. eachString := each asString "withBlanksTrimmed". + iconWidth := (self iconAt: (listIndex := listIndex+1)) ifNil:[0] ifNotNil: [ : icon | icon width+2 ]. indexOfLastVisible := ((1 to: eachString size) detect: + [ : stringIndex | (totalWidth:=totalWidth+(self font widthOf: (eachString at: stringIndex))) > - [ : index | (totalWidth := totalWidth + (self font widthOf: (eachString at: index))) > (self width - (scrollBar ifNil: [ 0 ] + ifNotNil: [ scrollBar width ]) - iconWidth) ] - ifNotNil: [ scrollBar width ])) ] ifNone: [ eachString size + 1 ]) - 1. sum + (eachString size - indexOfLastVisible) ]! Item was changed: ----- Method: ProportionalSplitterMorph>>leftRightImbalance (in category 'layout') ----- leftRightImbalance "First check if I find myself out of range due to user having reduced size of parent." ^ self left < self leftBoundary "too far left" ifTrue: [ self leftBoundary-self left ] ifFalse: [ self right > self rightBoundary "too far right" + ifTrue: [ self rightBoundary-self right ] - ifTrue: [ self right-self rightBoundary ] ifFalse: [ self occlusionDifference ] ]! Item was changed: ----- Method: TextEditor>>argAdvance: (in category 'typing/selecting keys') ----- argAdvance: aKeyboardEvent "Invoked by Ctrl-a or Shift+Command+A. Useful after Ctrl-q. + Search forward from the end of the selection for a colon and place the caret after it. If no colon is found, do nothing." - Search forward from the end of the selection for a colon followed by a space. Place the caret after the space. If none are found, place the caret at the end of the text. Does not affect the undoability of the previous command." | start | self insertAndCloseTypeIn. start := paragraph text + findString: ':' - findString: ': ' startingAt: self stopIndex. + start isZero ifFalse: [ self selectAt: start + 1 ]. - start isZero - ifTrue: - [ (start := paragraph text - findString: ':' - startingAt: self stopIndex) isZero ifTrue: [ start := paragraph text size + 1 ] ] - ifFalse: [ start := start + 1 ]. - self selectAt: start + 1. ^ true! From eliot.miranda at gmail.com Mon Mar 23 16:56:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Mar 23 16:56:56 2015 Subject: [squeak-dev] what does primGarbageCollect return in Spur? In-Reply-To: References: Message-ID: Hi Chris, in Spur, primitiveGarbageCollect answers the largest free chunk in oldSpace, not the total free space. This is done so that handleFailingBasicNew: et al can determine whether memory should be grown before an allocation is retried: handleFailingBasicNew: sizeRequested "handleFailingBasicNew: gets sent after basicNew: has failed and allowed a scavenging garbage collection to occur. The scavenging collection will have happened as the VM is activating the (failing) basicNew:. If handleFailingBasicNew: fails then the scavenge failed to reclaim sufficient space and a global garbage collection is required. Retry after garbage collecting and growing memory if necessary. Primitive. Answer an instance of this class with the number of indexable variables specified by the argument, sizeRequested. Fail if this class is not indexable or if the argument is not a positive Integer, or if there is not enough memory available. Essential. See Object documentation whatIsAPrimitive." | bytesRequested | bytesRequested := self byteSizeOfInstanceOfSize: sizeRequested. Smalltalk garbageCollect < bytesRequested ifTrue: [Smalltalk growMemoryByAtLeast: bytesRequested]. "retry after global garbage collect and possible grow" ^self handleFailingFailingBasicNew: sizeRequested Further, primBytesLeft answers the amount of free old space, excluding newSpace entirely. newSpace is continually changing its capacity as allocation and scavenging continues, so IMO including that information introduces noise. But you point out that both methods should be commented accurately in Spur. I'll make it so. On Mon, Mar 23, 2015 at 8:23 AM, Chris Muller wrote: > Has anyone else noticed that flushing Monticello cached versions in > Spur no longer reports any memory freed up..? > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/482e9de0/attachment.htm From tim at rowledge.org Mon Mar 23 16:57:45 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Mar 23 16:57:53 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> Message-ID: <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> On 23-03-2015, at 8:53 AM, Tobias Pape wrote: > > For the trunk I get: '7,070 per second. 141 microseconds per run.' > For my version I get: '2,630 per second. 381 microseconds per run.' > > Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. > Are there still objections? Not so much an objection as a reminder to test these things on slower hardware as well as ?my nice new Mac Pro 12 core with a twazillion gigglebytes of ram?. Say, a Raspberry Pi model B, for example. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Useful random insult:- Living proof that nature does not abhor a vacuum. From Das.Linux at gmx.de Mon Mar 23 17:06:22 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 17:06:27 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> Message-ID: On 23.03.2015, at 17:57, tim Rowledge wrote: > On 23-03-2015, at 8:53 AM, Tobias Pape wrote: >> >> For the trunk I get: '7,070 per second. 141 microseconds per run.' >> For my version I get: '2,630 per second. 381 microseconds per run.' >> >> Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. >> Are there still objections? > > Not so much an objection as a reminder to test these things on slower hardware as well as ?my nice new Mac Pro 12 core with a twazillion gigglebytes of ram?. Say, a Raspberry Pi model B, for example. I shall do that. Best -Tobias From tim at rowledge.org Mon Mar 23 17:14:52 2015 From: tim at rowledge.org (tim Rowledge) Date: Mon Mar 23 17:14:56 2015 Subject: [squeak-dev] Re: The Inbox: Tools-topa.556.mcz In-Reply-To: References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> Message-ID: <96E5BB93-EE9A-4943-8BEB-0A58AC1E21BB@rowledge.org> On 23-03-2015, at 10:06 AM, Tobias Pape wrote: > > On 23.03.2015, at 17:57, tim Rowledge wrote: > >> On 23-03-2015, at 8:53 AM, Tobias Pape wrote: >>> >>> For the trunk I get: '7,070 per second. 141 microseconds per run.' >>> For my version I get: '2,630 per second. 381 microseconds per run.' >>> >>> Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. >>> Are there still objections? >> >> Not so much an objection as a reminder to test these things on slower hardware as well as ?my nice new Mac Pro 12 core with a twazillion gigglebytes of ram?. Say, a Raspberry Pi model B, for example. > > I shall do that. Thank you; it?s long been a bit of a joke that developers should be forced to work on the slowest possible machines so they don?t get carried away by the speed of {insert latest toy here}. Now with things like the Pi it is so easy to have a slower device around for testing that there really isn?t a good excuse. If you haven?t already, consider installing the xrdp package on the Pi and a suitable xrdp client on your main machine. I find it a lot more convenient that having the Pi (or Pis in my case) hooked up to separate screens. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: RAI: Randomize Accounting Information From leves at elte.hu Mon Mar 23 17:25:53 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Mar 23 17:26:01 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> Message-ID: The focus of this thread shifted towards performance, but that was just an advantage of using one "pragma" instead of two (or more). My question about the implementation was: > Is there any advantage of using two "pragmas", instead of one? You pointed out one such advantage: it keeps the simplest use case very simple. But do priorities add much complexity? For example: is - from the user's point of view - significantly simpler than or or ? How common is this use case? How often will people not want to tweak the priority, but use the alphabetical sort order instead? Levente On Mon, 23 Mar 2015, Tobias Pape wrote: > > On 23.03.2015, at 11:43, Levente Uzonyi wrote: > >> On Mon, 23 Mar 2015, Tobias Pape wrote: >> >>> Hi Levente, >>> >>> [Sorry for the late reply] >>> >>> >>> On 19.03.2015, at 23:39, Levente Uzonyi wrote: >>> >>>> The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. >>>> One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? >>>> >>> >>> In spirit, these implementations indeed are similar. Bal?zs' code however >>> only deals with the World main docking bar while _this_ proposal deals >>> with context menus in tools like the browser. >> >> That's exactly what I meant. My point is that the two should be quite similar. >> >>> >>> I don't understand what you mean by ?Performance-wise a single "pragma" is better?. >>> Can you elaborate a bit? >> >> Using two separate "pragmas" means that you have to look up the priority in a separate query for each entry. While using a single "pragma", the priority is available without these extra lookups. >> > > Ok, I thought you meant that. > The point is that I want to make the simple case (just a menu) > very simple: > > ? Create an instance of MenuMorph or similar. > ? Create a method that should build the menu entries: > someMenu: aMenu > > ^ aMenu addList: #( > ('use' use) > ('remove' remove) > ('copy' copyName)); > yourself > ? Send `self menu: aMorph for: #myMenu` > > (that should be it) but complex cases possible nonetheless. > > I don't want to bother the average tool writer with shifted states, priorities or whatnot. > I have seen Pragma>>allNamed:in:sortedByArgument:, but I cannot handle > default values with that. > > Do you think performance is actually a bottleneck here? > > Best > -Tobias > > >> Levente >> >>> >>> Best >>> -Tobias >>> >>> >>>> Levente >>>> >>>> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html >>>> >>>> On Wed, 18 Mar 2015, Tobias Pape wrote: >>>> >>>>> Hi, >>>>> >>>>> On 18.03.2015, at 15:11, commits@source.squeak.org wrote: >>>>> >>>>>> A new version of Tools was added to project The Inbox: >>>>>> http://source.squeak.org/inbox/Tools-topa.556.mcz >>>>>> >>>>>> ==================== Summary ==================== >>>>>> >>>>>> Name: Tools-topa.556 >>>>>> Author: topa >>>>>> Time: 18 March 2015, 4:09:54.221 pm >>>>>> UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d >>>>>> Ancestors: Tools-topa.555 >>>>>> >>>>>> Pluggable Menus for many tools >>>>>> ============================== >>>>>> >>>>>> A lot of tools, especially the Browser, rely on context menus >>>>>> (aka yellow button menus). Dynamically extending these is possible >>>>>> but requires a lot of care. The Pluggable Menus allow to add menu >>>>>> entries easily via extension methods. The Services package serves >>>>>> as example here. >>>>> >>>>> An easier to read version of the commit message is at https://gist.github.com/krono/5f7f5197df5f1d1da052. >>>>> >>>>> If nobody objects, I move this to trunk on friday :) >>>>> >>>>> Best >>>>> -Tobias > > > > From sean at clipperadams.com Mon Mar 23 18:34:27 2015 From: sean at clipperadams.com (DeNigris Sean) Date: Mon Mar 23 18:34:34 2015 Subject: [squeak-dev] Unique Mouse Wheel Events Message-ID: Cross-posting to Pharo dev, Squeak dev, and Squeak VM lists... Recently, we discovered on the Pharo dev list that the key combination used to fake wheel events - ctrl + arrowKey - may be a bit too simple. Apparently ctrl+horizontalArrowKey is a standard in-use combo in Linux and Windows, so adding horizontal wheel events broke some users' workflows. So I propose "ctrl + alt + shift + cmd + arrowKey". The new combo is: very unlikely to be typed backward-compatible with existing Pharo and Squeak images, which only checks that either cmd or ctrl is pressed frees up ctrl + arrow for our Linux/Windows friends For Pharo, there is: https://github.com/pharo-project/pharo-vm/pull/72 Fogbugz Issue 15209: "Mouse Wheel Events Keyboard Clash", with a slice all ready on the image side once the VM patch is integrated. NB: I changed the combo in the VM for Mac OS and OSX. Are these the only two platforms that fake wheel events? I searched a bit but didn't see similar logic for other platforms... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/db1d92ed/attachment.htm From commits at source.squeak.org Mon Mar 23 18:58:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 23 18:58:40 2015 Subject: [squeak-dev] The Inbox: Environments-cmm.57.mcz Message-ID: Chris Muller uploaded a new version of Environments to project The Inbox: http://source.squeak.org/inbox/Environments-cmm.57.mcz ==================== Summary ==================== Name: Environments-cmm.57 Author: cmm Time: 23 March 2015, 1:58:37.126 pm UUID: 6e10d99c-b424-4f94-9152-18ccd72ca623 Ancestors: Environments-topa.56 Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. =============== Diff against Environments-topa.56 =============== Item was changed: ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- + at: aSymbol ifAbsentPut: aBlock - at: aSymbol ifAbsentPut: aBlock ^ declarations at: aSymbol + ifAbsentPut: + [ bindings + at: aSymbol + ifAbsentPut: aBlock ]! - ifAbsentPut: aBlock! From Das.Linux at gmx.de Mon Mar 23 19:32:55 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 19:32:58 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: <96E5BB93-EE9A-4943-8BEB-0A58AC1E21BB@rowledge.org> References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> <96E5BB93-EE9A-4943-8BEB-0A58AC1E21BB@rowledge.org> Message-ID: <0E42DBDE-4CCE-4AC4-8737-5C9D07B28366@gmx.de> On 23.03.2015, at 18:14, tim Rowledge wrote: > On 23-03-2015, at 10:06 AM, Tobias Pape wrote: > >> >> On 23.03.2015, at 17:57, tim Rowledge wrote: >> >>> On 23-03-2015, at 8:53 AM, Tobias Pape wrote: >>>> >>>> For the trunk I get: '7,070 per second. 141 microseconds per run.' >>>> For my version I get: '2,630 per second. 381 microseconds per run.' >>>> >>>> Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. >>>> Are there still objections? >>> >>> Not so much an objection as a reminder to test these things on slower hardware as well as ?my nice new Mac Pro 12 core with a twazillion gigglebytes of ram?. Say, a Raspberry Pi model B, for example. >> >> I shall do that. > > Thank you; it?s long been a bit of a joke that developers should be forced to work on the slowest possible machines so they don?t get carried away by the speed of {insert latest toy here}. Now with things like the Pi it is so easy to have a slower device around for testing that there really isn?t a good excuse. > > If you haven?t already, consider installing the xrdp package on the Pi and a suitable xrdp client on your main machine. I find it a lot more convenient that having the Pi (or Pis in my case) hooked up to separate screens. Well, the NEC EA241WM has both a display port and a HDMI in, so it is ok-ish to hook it up. From Das.Linux at gmx.de Mon Mar 23 19:37:49 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 23 19:37:56 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> Message-ID: <72B41E55-561E-4E4B-9E97-ACAAA737C4D7@gmx.de> On 23.03.2015, at 18:25, Levente Uzonyi wrote: > The focus of this thread shifted towards performance, but that was just an advantage of using one "pragma" instead of two (or more). > My question about the implementation was: > >> Is there any advantage of using two "pragmas", instead of one? > > You pointed out one such advantage: it keeps the simplest use case very simple. > But do priorities add much complexity? > For example: is - from the user's point of view - significantly simpler than or or ? > How common is this use case? How often will people not want to tweak the priority, but use the alphabetical sort order instead? > My view is: I just want to add a menu entry. I am out of control what else goes into the menu in any case, so _typically_ I want my menu entry (or submenu) just show up. And yes, just putting there is imho significantly simpler than having to think about or or because that tries to convey two concerns with one message. it also reads strange. What read better would be or (I cannot transform you to a better-reading version, probably that is too low-level?) Best -Tobias > Levente > > On Mon, 23 Mar 2015, Tobias Pape wrote: > >> >> On 23.03.2015, at 11:43, Levente Uzonyi wrote: >> >>> On Mon, 23 Mar 2015, Tobias Pape wrote: >>> >>>> Hi Levente, >>>> >>>> [Sorry for the late reply] >>>> >>>> >>>> On 19.03.2015, at 23:39, Levente Uzonyi wrote: >>>> >>>>> The implementation looks very similar to what Bal?zs did back in 2010 to the Docking Bar[1], even though his changes never made it into the Trunk. >>>>> One main difference I see is that he used a single "pragma", instead of two separate "pragmas". Performance-wise a single "pragma" is better. Is there any advantage of using two "pragmas", instead of one? >>>>> >>>> >>>> In spirit, these implementations indeed are similar. Bal?zs' code however >>>> only deals with the World main docking bar while _this_ proposal deals >>>> with context menus in tools like the browser. >>> >>> That's exactly what I meant. My point is that the two should be quite similar. >>> >>>> >>>> I don't understand what you mean by ?Performance-wise a single "pragma" is better?. >>>> Can you elaborate a bit? >>> >>> Using two separate "pragmas" means that you have to look up the priority in a separate query for each entry. While using a single "pragma", the priority is available without these extra lookups. >>> >> >> Ok, I thought you meant that. >> The point is that I want to make the simple case (just a menu) >> very simple: >> >> ? Create an instance of MenuMorph or similar. >> ? Create a method that should build the menu entries: >> someMenu: aMenu >> >> ^ aMenu addList: #( >> ('use' use) >> ('remove' remove) >> ('copy' copyName)); >> yourself >> ? Send `self menu: aMorph for: #myMenu` >> >> (that should be it) but complex cases possible nonetheless. >> >> I don't want to bother the average tool writer with shifted states, priorities or whatnot. >> I have seen Pragma>>allNamed:in:sortedByArgument:, but I cannot handle >> default values with that. >> >> Do you think performance is actually a bottleneck here? >> >> Best >> -Tobias >> >> >>> Levente >>> >>>> >>>> Best >>>> -Tobias >>>> >>>> >>>>> Levente >>>>> >>>>> [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2010-April/149345.html >>>>> >>>>> On Wed, 18 Mar 2015, Tobias Pape wrote: From eliot.miranda at gmail.com Mon Mar 23 19:45:10 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Mar 23 19:45:13 2015 Subject: [squeak-dev] Re-purposing vm parameter 23 in Spur? Message-ID: Hi All, right now vm parameter 23 is defined to be: 23 bytes of extra memory to reserve for VM buffers, plugins, etc. but is ignored by all the VMs (AFAIA). I would like to reinterpret this in Spur to be the minimum amount of headroom to make available on startup. I expect this is useful for really small platforms where one wants to control the ammount of free space on startup to be quite small. Given that the field is ignored I like putting it to a more useful purpose. Objections? -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/0b959477/attachment.htm From johnmci at smalltalkconsulting.com Mon Mar 23 20:43:16 2015 From: johnmci at smalltalkconsulting.com (John McIntosh) Date: Mon Mar 23 20:43:21 2015 Subject: [squeak-dev] Re-purposing vm parameter 23 in Spur? In-Reply-To: References: Message-ID: 23 was used in os 7/8/9? back in the last millennium to ensure the allocation of memory for the image wouldn't consume all the memory in the application space, thus leaving no memory for third party plugs which could required non-trival free memory for malloc. So yes a good reuse.. Also see http://en.wikipedia.org/wiki/Mac_OS_memory_management On Mon, Mar 23, 2015 at 12:45 PM, Eliot Miranda wrote: > Hi All, > > right now vm parameter 23 is defined to be: > > 23 bytes of extra memory to reserve for VM buffers, plugins, etc. > > but is ignored by all the VMs (AFAIA). I would like to reinterpret this > in Spur to be the minimum amount of headroom to make available on startup. > I expect this is useful for really small platforms where one wants to > control the ammount of free space on startup to be quite small. Given that > the field is ignored I like putting it to a more useful purpose. > Objections? > -- > best, > Eliot > > > > -- =========================================================================== John M. McIntosh https://www.linkedin.com/in/smalltalk =========================================================================== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/be695419/attachment.htm From commits at source.squeak.org Mon Mar 23 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 23 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150323225503.25605.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007666.html Name: Morphic-cmm.785 Ancestors: Morphic-topa.784 - Smart-Splitter behavior now accounts for possible icons. - Fix incorrect Smart-Splitter adjustment when user has sized window width smaller than the sum of the minimum widths of all panes. - Fix argAdvance: for selectors that were copied using "copy selector (c)" command. ============================================= From eliot.miranda at gmail.com Tue Mar 24 00:31:19 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 24 00:31:23 2015 Subject: [squeak-dev] New Cog VMs available Message-ID: ...at http://www.mirandabanda.org/files/Cog/VM/VM.r3284/. CogVM binaries as per VMMaker.oscog-eem.1113/r3284 Redo free space allocation on Spur image load. Provide a minimum ammount of free space, taking into account extant free space. Provisionally use extraVMMemory in the header, defaulting to growHeadroom if extraVMMemory is empty. This can be revised if folks protest. Exclude dumpImage: from Spur (no seg support yet) These include release candidate Spur VMs for Squeak 5. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/0162958f/attachment.htm From commits at source.squeak.org Tue Mar 24 00:55:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 24 00:55:07 2015 Subject: [squeak-dev] The Trunk: Compiler-cmm.297.mcz Message-ID: Chris Muller uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler-cmm.297.mcz ==================== Summary ==================== Name: Compiler-cmm.297 Author: cmm Time: 23 March 2015, 7:54:50.696 pm UUID: 1d7e980a-3504-44fa-9a9c-803bf3a6bda2 Ancestors: Compiler-topa.296 DoIt evaluation in the debugger needs to be from the selected Context's methodClass, not the receiver's class so that "super" will refer to the correct class. =============== Diff against Compiler-topa.296 =============== Item was changed: ----- Method: Compiler>>evaluate:in:to:notifying:ifFail:logged: (in category 'public access logging') ----- evaluate: textOrStream in: aContext to: receiver notifying: aRequestor ifFail: failBlock logged: logFlag "Compiles the sourceStream into a parse tree, then generates code into a method. If aContext is not nil, the text can refer to temporaries in that context (the Debugger uses this). If aRequestor is not nil, then it will receive a notify:at: message before the attempt to evaluate is aborted. Finally, the compiled method is invoked from here via withArgs:executeMethod:, hence the system no longer creates Doit method litter on errors." - | theClass | + theClass := (aContext == nil ifTrue: [receiver class] ifFalse: [aContext methodClass]). - theClass := ((aContext == nil ifTrue: [receiver] ifFalse: [aContext receiver]) class). ^self evaluateCue: (CompilationCue source: textOrStream context: aContext receiver: receiver class: theClass environment: theClass environment requestor: aRequestor) ifFail: failBlock logged: logFlag! From sean at clipperadams.com Tue Mar 24 01:37:57 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Tue Mar 24 01:48:39 2015 Subject: [squeak-dev] Re: HTML parser (again) (again) In-Reply-To: <1426944514604-4813856.post@n4.nabble.com> References: <1288338013191-3018595.post@n4.nabble.com> <1288359974395-3019125.post@n4.nabble.com> <1288372795179-3019488.post@n4.nabble.com> <4CCB402A.3010407@krampe.se> <1426944514604-4813856.post@n4.nabble.com> Message-ID: <1427161077808-4814611.post@n4.nabble.com> EntheoWizard wrote > Hello G?ran, > > I am rekindling my 30+ year old love affair with Smalltalk and I came > across your post regarding WebRobot and your offer "...and if anyone wants > more details I can take a look in the image" :-) > > I'm trying WRExampleRobot and I'm stuck right out of the gate... :-( > > I would really appreciate it if you could point me in the right direction > to solve this - thanks :-) > > > I changed the URL in login to www.google.com and then tried: > t := WRExampleRobot new > t login > > which results in: > > BlockClosure(Object)>>doesNotUnderstand: #deferredValue > > while trying to process the send message: > > send > "Send the request with no entity (typical for a GET Request). > This method returns immediately. > You can either: > -test with #isReady (and when true access the #responseBody). > -wait (block) on #waitOnReady or #waitOnReadyCancelling (and then > access #responseBody)" > > "Note: If you are debuging an exception that occurs in the deferred send, > you can > uncomment the 'self halt' to open a debugger on the problem" > > deferredSend := > ["["self sendMessages"] on: Error > do: > [:e | > > e]"] > deferredValue ----- Cheers, Sean -- View this message in context: http://forum.world.st/HTML-parser-again-again-tp3018595p4814611.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From asqueaker at gmail.com Tue Mar 24 02:08:47 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 24 02:08:50 2015 Subject: [squeak-dev] The Inbox: Environments-cmm.57.mcz In-Reply-To: <55106264.1b2b370a.5a01.ffffeed8SMTPIN_ADDED_MISSING@mx.google.com> References: <55106264.1b2b370a.5a01.ffffeed8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: To define a global variable in code, while taking care not to over-write it if it already is defined, I wrote: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. But this only put it in the Smalltalk environments 'declarations', not its 'bindings', which renders MyGlobal inaccessible from any code. I don't really like this nesting of at:ifAbsentPut: into 'bindings', but it does solve the bug for the basic case. Is it the right way to fix it? On Mon, Mar 23, 2015 at 1:58 PM, wrote: > Chris Muller uploaded a new version of Environments to project The Inbox: > http://source.squeak.org/inbox/Environments-cmm.57.mcz > > ==================== Summary ==================== > > Name: Environments-cmm.57 > Author: cmm > Time: 23 March 2015, 1:58:37.126 pm > UUID: 6e10d99c-b424-4f94-9152-18ccd72ca623 > Ancestors: Environments-topa.56 > > Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. > > =============== Diff against Environments-topa.56 =============== > > Item was changed: > ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- > + at: aSymbol ifAbsentPut: aBlock > - at: aSymbol ifAbsentPut: aBlock > ^ declarations > at: aSymbol > + ifAbsentPut: > + [ bindings > + at: aSymbol > + ifAbsentPut: aBlock ]! > - ifAbsentPut: aBlock! > > From leves at elte.hu Tue Mar 24 03:22:16 2015 From: leves at elte.hu (Levente Uzonyi) Date: Tue Mar 24 03:22:20 2015 Subject: [squeak-dev] The Inbox: Environments-cmm.57.mcz In-Reply-To: References: <55106264.1b2b370a.5a01.ffffeed8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: On Mon, 23 Mar 2015, Chris Muller wrote: > To define a global variable in code, while taking care not to > over-write it if it already is defined, I wrote: > > Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. > > But this only put it in the Smalltalk environments 'declarations', not > its 'bindings', which renders MyGlobal inaccessible from any code. > > I don't really like this nesting of at:ifAbsentPut: into 'bindings', > but it does solve the bug for the basic case. Is it the right way to > fix it? No, it's a hack. The right way to do it is to use #bind:to: to create a new binding. Something like this should work: at: aSymbol ifAbsentPut: aBlock ^self at: aSymbol ifAbsent: [ self at: aSymbol put: aBlock value ] Levente > > On Mon, Mar 23, 2015 at 1:58 PM, wrote: >> Chris Muller uploaded a new version of Environments to project The Inbox: >> http://source.squeak.org/inbox/Environments-cmm.57.mcz >> >> ==================== Summary ==================== >> >> Name: Environments-cmm.57 >> Author: cmm >> Time: 23 March 2015, 1:58:37.126 pm >> UUID: 6e10d99c-b424-4f94-9152-18ccd72ca623 >> Ancestors: Environments-topa.56 >> >> Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. >> >> =============== Diff against Environments-topa.56 =============== >> >> Item was changed: >> ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- >> + at: aSymbol ifAbsentPut: aBlock >> - at: aSymbol ifAbsentPut: aBlock >> ^ declarations >> at: aSymbol >> + ifAbsentPut: >> + [ bindings >> + at: aSymbol >> + ifAbsentPut: aBlock ]! >> - ifAbsentPut: aBlock! >> >> > > From djm1329 at san.rr.com Tue Mar 24 06:40:41 2015 From: djm1329 at san.rr.com (Douglas McPherson) Date: Tue Mar 24 06:40:46 2015 Subject: [squeak-dev] Re: [Pharo-dev] New Cog VMs available In-Reply-To: References: Message-ID: <314B1441-82AC-4BEC-96E2-27043157660C@san.rr.com> ARMv7 stack VMs (v3 and spur) correspondingly updated. These are known to run on: 1. RPi (original ARMv6) 2. RPi2 (ARMv7) 3. BeagleBone Black 4. Parallella Doug > On Mar 23, 2015, at 17:31, Eliot Miranda wrote: > > ...at http://www.mirandabanda.org/files/Cog/VM/VM.r3284/ . > > CogVM binaries as per VMMaker.oscog-eem.1113/r3284 > > Redo free space allocation on Spur image load. Provide a minimum ammount of > free space, taking into account extant free space. Provisionally use > extraVMMemory in the header, defaulting to growHeadroom if extraVMMemory is > empty. This can be revised if folks protest. > > Exclude dumpImage: from Spur (no seg support yet) > > These include release candidate Spur VMs for Squeak 5. > -- > best, > Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150323/c92bb7f6/attachment-0001.htm From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 24 06:51:13 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 24 07:01:57 2015 Subject: [squeak-dev] Re: The Inbox: Environments-cmm.57.mcz In-Reply-To: References: Message-ID: <1427179873534-4814643.post@n4.nabble.com> My mental model of "Smalltalk" is that there is all global stuff stored: classes and other global variables such as ActiveWorld and ActiveHand. As Smalltalk >> #at: returns the object behind that global name and Smalltalk >> #at:put: overwrites such a global binding with a new object, this looks like a regular dictionary to me. Having this, #at:ifAbsentPut: should just combine #at: and #at:put: -- like Levente proposed. What is the current state of our discussion about Smalltalk offering the full Dictionary interface? Best, Marcel -- View this message in context: http://forum.world.st/The-Inbox-Environments-cmm-57-mcz-tp4814481p4814643.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 24 06:58:23 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 24 07:09:06 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: References: Message-ID: <1427180303348-4814647.post@n4.nabble.com> For such a change, the VMs need to me adapted. I propose to pass the *correct* operating system events from the VM into Smalltalk and then to create a MouseWheelEvent from that data there. I further argue that the VM should not shadow *any* kind of user input such as CTRL+LEFTCLICK and ALT+LEFTCLICK to emulate other mouse buttons. Any of this kind of magic should be introduced in Smalltalk-land not VM-land. Best, Marcel -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814647.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 24 07:52:44 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 24 08:03:27 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <1427180303348-4814647.post@n4.nabble.com> References: <1427180303348-4814647.post@n4.nabble.com> Message-ID: <1427183564052-4814655.post@n4.nabble.com> I looked up some older discussions about this: http://forum.world.st/squeak-dev-Mouse-mapping-preference-in-win32-squeak-VM-td77688.html http://forum.world.st/Mouse-buttons-was-Browser-pane-width-adjustment-td3088397.html http://forum.world.st/Squeak-4-5-Windows-right-click-debacle-td4775136.html http://forum.world.st/Changing-keyboard-binding-td70507.html http://forum.world.st/Note-Squeak-4-1-Unix-preset-preferences-for-right-mouse-button-td1951759.html http://forum.world.st/How-difficult-is-it-to-change-focus-on-scroll-td4772542.html Best, Marcel -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814655.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 24 08:09:42 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 24 08:20:26 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <1427180303348-4814647.post@n4.nabble.com> References: <1427180303348-4814647.post@n4.nabble.com> Message-ID: <1427184582732-4814662.post@n4.nabble.com> Let me elaborate this a little bit more. I claim that tools (in-image) should provide feasible interaction techniques for all kinds of common user input methods. For example, a calculator application should be usable with both mouse and keyboard input. Some users may have no mouse attached or just prefer hitting keys. It's the tools' job to think about that -- not the VM's. Now, we want to be cross-platform compatible and thus we need a mapping from operating system-specific user input events to Smalltalk image-land. This is already done for some events. At the moment, the image gets some arrays with magic numbers and decodes it to real objects such as KeyboardEvent and MouseEvent. However, this mapping needs to be *injective* (math speak) and must not mask any user input information (like CTRL+LEFTCLICK does). (https://en.wikipedia.org/wiki/Injective_function) What kinds of events do operating systems provide nowadays? * keyboard events (w/ modifiers, deadkeys, etc.) * mouse click events (w/ modifiers) * mouse wheel events * touch events * ... We should support those events at VM-level and pass them using an apropriate format to Smalltalk-level. To give you an impression on this kind of cross-platform abstraction, take a short look at the Qt API and its QInputEvent inheritance tree: http://doc.qt.io/qt-5/qinputevent.html On backwards compatibility: A simple change set could be loaded into older images to perform that old-style event mapping in the image (HandMorph >> #processEvents). Best, Marcel -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814662.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From Das.Linux at gmx.de Tue Mar 24 10:05:57 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 24 10:06:03 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] Message-ID: n/t From Das.Linux at gmx.de Tue Mar 24 10:26:10 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 24 10:26:14 2015 Subject: [squeak-dev] The decompiler forgot a temp for me Message-ID: Hey Squeakers The decompiler did not play nicely with me: (Random >> #roll:) decompile look for _r8 in the following: roll: t1 | t2 t3 t4 t5 t6 t7 | t2 := t1 readStream. t4 := 0. t3 := #+. [t7 := self diceToken: t2. t7 isNumber ifTrue: [t6 := t7. t7 := self diceToken: t2] ifFalse: [t7 == $d ifTrue: [t6 := 1] ifFalse: [_r8 := 0]]. t7 == $d ifTrue: [t7 := self diceToken: t2. t7 isNumber ifTrue: [t5 := t7. t7 := self diceToken: t2] ifFalse: [t7 == $% ifTrue: [t5 := 100. t7 := self diceToken: t2] ifFalse: [t5 := 6]]. _r8 := 0. t6 timesRepeat: [_r8 := _r8 + (self nextInt: t5)]]. t4 := t4 perform: t3 with: _r8. t7 ifNil: [^ t4]. (t7 == $+ or: [t7 == $-]) ifFalse: [self error: 'unknown token ' , t7]. t3 := t7 asSymbol] repeat This actually has an impact when updating the current TrunkImage (which is from december) when you don't have the sources laying around. Anyone has a clue? Best -Tobias From bert at freudenbergs.de Tue Mar 24 11:01:12 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 24 11:01:17 2015 Subject: [squeak-dev] The Inbox: Environments-cmm.57.mcz In-Reply-To: References: <55106264.1b2b370a.5a01.ffffeed8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: > On 24.03.2015, at 04:22, Levente Uzonyi wrote: > > On Mon, 23 Mar 2015, Chris Muller wrote: > >> To define a global variable in code, while taking care not to >> over-write it if it already is defined, I wrote: >> >> Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. >> >> But this only put it in the Smalltalk environments 'declarations', not >> its 'bindings', which renders MyGlobal inaccessible from any code. >> >> I don't really like this nesting of at:ifAbsentPut: into 'bindings', >> but it does solve the bug for the basic case. Is it the right way to >> fix it? > > No, it's a hack. The right way to do it is to use #bind:to: to create a new binding. Something like this should work: > > at: aSymbol ifAbsentPut: aBlock > > ^self at: aSymbol ifAbsent: [ > self at: aSymbol put: aBlock value ] > > Levente +1 I just ran into this too ... - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150324/33bd59c3/smime.bin From frank.shearar at gmail.com Tue Mar 24 11:02:05 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 24 11:02:08 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] In-Reply-To: References: Message-ID: On 24 March 2015 at 10:05, Tobias Pape wrote: Yep. That's when last we had a build that actually succeeded. We've had several unrelated issues breaking the build. The current one is a strange misconfiguration of Ruby somewhere on build.squeak.org. As should be clearly apparent, I haven't had the time to fix the latest issue. frank From Das.Linux at gmx.de Tue Mar 24 11:05:51 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 24 11:05:55 2015 Subject: [squeak-dev] The Inbox: Tools-topa.556.mcz In-Reply-To: References: <82A4D15B-9EC5-430E-B1C1-8A66EA1C1735@gmx.de> <1427119235519-4814352.post@n4.nabble.com> <3E551E06-676B-4866-B88E-126AB38B76B2@gmx.de> <6D93DD65-2CD8-45C9-9FA3-C5E2584AD2A2@rowledge.org> Message-ID: On 23.03.2015, at 18:06, Tobias Pape wrote: > > On 23.03.2015, at 17:57, tim Rowledge wrote: > >> On 23-03-2015, at 8:53 AM, Tobias Pape wrote: >>> >>> For the trunk I get: '7,070 per second. 141 microseconds per run.' >>> For my version I get: '2,630 per second. 381 microseconds per run.' >>> >>> Yes, it is slower, but we are long away from noticeable effects on the UI, I'd say. >>> Are there still objections? >> >> Not so much an objection as a reminder to test these things on slower hardware as well as ?my nice new Mac Pro 12 core with a twazillion gigglebytes of ram?. Say, a Raspberry Pi model B, for example. > > I shall do that. > The numbers from my Pi (B, old version) are in: For the trunk I get: '55.9 per second. 17.9 milliseconds per run.' For my version I get: '18.6 per second. 53.9 milliseconds per run.' The ratio is a bit worse, but we are still way better than 0.1 sec :D Best -Tobias From Das.Linux at gmx.de Tue Mar 24 11:07:01 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 24 11:07:05 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] In-Reply-To: References: Message-ID: <51F6FCBD-B10C-4A2E-B983-50537ED42B1E@gmx.de> Hey Frank On 24.03.2015, at 12:02, Frank Shearar wrote: > On 24 March 2015 at 10:05, Tobias Pape wrote: > > Yep. That's when last we had a build that actually succeeded. > > We've had several unrelated issues breaking the build. The current one > is a strange misconfiguration of Ruby somewhere on build.squeak.org. > As should be clearly apparent, I haven't had the time to fix the > latest issue. > This message was not meant to be pushy, especially not towards you :) Just a reminder for the rest of us to ?do something? Best -Tobias From lewis at mail.msen.com Tue Mar 24 12:02:07 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 24 12:02:08 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <1427184582732-4814662.post@n4.nabble.com> References: <1427180303348-4814647.post@n4.nabble.com> <1427184582732-4814662.post@n4.nabble.com> Message-ID: <20150324120207.GA36460@shell.msen.com> On Tue, Mar 24, 2015 at 01:09:42AM -0700, Marcel Taeumel wrote: > Let me elaborate this a little bit more. > > I claim that tools (in-image) should provide feasible interaction techniques > for all kinds of common user input methods. For example, a calculator > application should be usable with both mouse and keyboard input. Some users > may have no mouse attached or just prefer hitting keys. It's the tools' job > to think about that -- not the VM's. > > Now, we want to be cross-platform compatible and thus we need a mapping from > operating system-specific user input events to Smalltalk image-land. This is > already done for some events. At the moment, the image gets some arrays with > magic numbers and decodes it to real objects such as KeyboardEvent and > MouseEvent. However, this mapping needs to be *injective* (math speak) and > must not mask any user input information (like CTRL+LEFTCLICK does). > > (https://en.wikipedia.org/wiki/Injective_function) > > What kinds of events do operating systems provide nowadays? > > * keyboard events (w/ modifiers, deadkeys, etc.) > * mouse click events (w/ modifiers) > * mouse wheel events > * touch events > * ... > > We should support those events at VM-level and pass them using an apropriate > format to Smalltalk-level. > > To give you an impression on this kind of cross-platform abstraction, take a > short look at the Qt API and its QInputEvent inheritance tree: > http://doc.qt.io/qt-5/qinputevent.html > > On backwards compatibility: A simple change set could be loaded into older > images to perform that old-style event mapping in the image (HandMorph >> > #processEvents). > Marcel, Thanks for raising this topic, and for providing the references. Providing a good abstract representation of input events for both the VM and the image would be a very worthwhile project. It is also becoming more important as we consider devices with touch and swipe inputs. The SqueakJS VM makes it amazingly easy to run Squeak on my cell phone, but we do not yet have a good model for the user input interactions. Dave From commits at source.squeak.org Tue Mar 24 12:12:08 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 24 12:12:11 2015 Subject: [squeak-dev] The Trunk: Morphic-topa.786.mcz Message-ID: Tobias Pape uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-topa.786.mcz ==================== Summary ==================== Name: Morphic-topa.786 Author: topa Time: 24 March 2015, 1:11:32.699 pm UUID: 4f85b986-fcc9-4344-a042-9cb323a6484c Ancestors: Morphic-cmm.785 Font Importer Tool: - Clarify 'Install' (now 'Link' via context menu) - Provide Help for 'Import' and 'Link' - Be a StringHolder now (so that perform:orSendTo: works as intended oO) =============== Diff against Morphic-cmm.785 =============== Item was changed: + StringHolder subclass: #FontImporterTool - Model subclass: #FontImporterTool instanceVariableNames: 'title allFonts emphasis window currentSelection currentParent warningSeen' classVariableNames: '' poolDictionaries: '' category: 'Morphic-Support'! !FontImporterTool commentStamp: 'topa 3/9/2015 18:56' prior: 0! A tool to import platform (native) fonts into the image! Item was changed: ----- Method: FontImporterTool>>buildButtonBarWith: (in category 'toolbuilder') ----- buildButtonBarWith: builder "Build the button bar" | panelSpec buttonSpec | panelSpec := builder pluggablePanelSpec new. panelSpec children: OrderedCollection new. buttonSpec := builder pluggableButtonSpec new model: self; label: ' Import ' translated; + help: 'Include the font data in the image and provide a TextStyle for the font'; action: #import; + frame: (0@0 corner: 0.5@1); - frame: (0@0 corner: (1/3)@1); yourself. panelSpec children addLast: buttonSpec. - buttonSpec := builder pluggableButtonSpec new - model: self; - label: ' Install ' translated; - action: #install; - frame: ((1/3)@0 corner: (2/3)@1); - yourself. - panelSpec children addLast: buttonSpec. - buttonSpec := builder pluggableButtonSpec new model: self; label: ' Close ' translated; action: #close; + frame: (0.5@0 corner: 1@1); - frame: ((2/3)@0 corner: 1@1); yourself. panelSpec children addLast: buttonSpec. ^panelSpec! Item was changed: ----- Method: FontImporterTool>>buildFontListWith: (in category 'toolbuilder') ----- buildFontListWith: builder "Build the font choosers list of font names" ^ builder pluggableTreeSpec new model: self; roots: #allFonts; label: #labelOf: ; getChildren: #childrenOf: ; getSelected: #currentSelection; setSelected: #currentSelection:; setSelectedParent: #currentParent:; + menu: #fontListMenu:; autoDeselect: false; yourself ! Item was changed: ----- Method: FontImporterTool>>buildPreviewPaneWith: (in category 'toolbuilder') ----- buildPreviewPaneWith: builder "Build the preview panel" ^ builder pluggablePanelSpec new children: { builder pluggableTextSpec new model: self; getText: #filename; frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@ -25)); yourself. + (self buildCodePaneWith: builder) - builder pluggableTextSpec new name: #preview; - model: self; - getText: #contents; frame: (LayoutFrame fractions: (0@0 corner: 1@0.75) offsets: (0@ 30 corner: 0@0)); yourself. builder pluggableTextSpec new model: self; getText: #copyright; frame: (LayoutFrame fractions: (0@0.75 corner: 1@1)); yourself }; yourself! Item was removed: - ----- Method: FontImporterTool>>buildWindowWith: (in category 'toolbuilder') ----- - buildWindowWith: builder - - ^ builder pluggableWindowSpec new - model: self; - label: #windowTitle; - children: OrderedCollection new; - yourself - ! Item was removed: - ----- Method: FontImporterTool>>buildWindowWith:specs: (in category 'toolbuilder') ----- - buildWindowWith: builder specs: specs - | windowSpec | - windowSpec := self buildWindowWith: builder. - specs do:[:assoc| | action widgetSpec rect | - rect := assoc key. - action := assoc value. - widgetSpec := action value. - widgetSpec ifNotNil:[ - widgetSpec frame: rect. - windowSpec children add: widgetSpec]]. - ^windowSpec! Item was changed: ----- Method: FontImporterTool>>buildWith: (in category 'toolbuilder') ----- buildWith: builder "Create the ui for the browser" "ToolBuilder open: self" | windowSpec | windowSpec := self buildWindowWith: builder specs: { (self fontListFrame) -> [self buildFontListWith: builder]. (self previewFrame) -> [self buildPreviewPaneWith: builder]. (self buttonsFrame) -> [self buildButtonBarWith: builder]. }. windowSpec extent: self initialExtent. window := builder build: windowSpec. "Yes, that's a hack. But it looks ugly with line breaks." (builder widgetAt: #preview) textMorph wrapFlag: false. ^window! Item was added: + ----- Method: FontImporterTool>>fontListMenu: (in category 'font list') ----- + fontListMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('Import Font' import 'Include the font data in the image and provide a TextStyle for the font') + ('Link Font' link 'Install the font as a link to its file and provide a TextStyle for the referenced font')) + yourself! Item was removed: - ----- Method: FontImporterTool>>install (in category 'actions') ----- - install - | filenames fonts | - fonts := self currentSelection. - self warningSeen ifFalse: [ - (UIManager default confirm: ( - 'Note that installing a font instead of importing may make the - image un-portable, since the installed font must be present on - the system the next time the image is run. - - This warning is only shown once per session.' ) trueChoice: 'Proceed' falseChoice: 'Cancel') - ifFalse: [^ self]. - self warningSeen: true].. - filenames := fonts allFilenames. - filenames do: [:filename | | readFonts | - readFonts := TTFileDescription readFontsFrom: filename. - readFonts isCollection - ifFalse: [TTCFont newTextStyleFromTT: readFonts] - ifTrue: [self importFontFamily: readFonts]]. - self allFonts: nil. "force redraw"! Item was added: + ----- Method: FontImporterTool>>link (in category 'actions') ----- + link + | filenames fonts | + fonts := self currentSelection. + self warningSeen ifFalse: [ + (UIManager default confirm: ( + 'Note that linking a font instead of importing may make the + image un-portable, since the linked font must be present on + the system the next time the image is run. + + This warning is only shown once per session.' ) trueChoice: 'Proceed' falseChoice: 'Cancel') + ifFalse: [^ self]. + self warningSeen: true].. + filenames := fonts allFilenames. + filenames do: [:filename | | readFonts | + readFonts := TTFileDescription readFontsFrom: filename. + readFonts isCollection + ifFalse: [TTCFont newTextStyleFromTT: readFonts] + ifTrue: [self importFontFamily: readFonts]]. + self allFonts: nil. "force redraw"! From sean at clipperadams.com Tue Mar 24 12:25:26 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Tue Mar 24 12:36:12 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <1427180303348-4814647.post@n4.nabble.com> References: <1427180303348-4814647.post@n4.nabble.com> Message-ID: <1427199926631-4814728.post@n4.nabble.com> Marcel Taeumel wrote > For such a change, the VMs need to me adapted. Yes, the changes have already been merged into the latest Pharo VM for Mac OS X. Marcel Taeumel wrote > I propose to pass the *correct* operating system events from the VM into > Smalltalk and then to create a MouseWheelEvent from that data there. I also agree! This change is a temporary solution so that horizontal scrolling works while we are inventing the future :) ----- Cheers, Sean -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814728.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From frank.shearar at gmail.com Tue Mar 24 13:16:22 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 24 13:16:25 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] In-Reply-To: <51F6FCBD-B10C-4A2E-B983-50537ED42B1E@gmx.de> References: <51F6FCBD-B10C-4A2E-B983-50537ED42B1E@gmx.de> Message-ID: On 24 March 2015 at 11:07, Tobias Pape wrote: > Hey Frank > On 24.03.2015, at 12:02, Frank Shearar wrote: > >> On 24 March 2015 at 10:05, Tobias Pape wrote: >> >> Yep. That's when last we had a build that actually succeeded. >> >> We've had several unrelated issues breaking the build. The current one >> is a strange misconfiguration of Ruby somewhere on build.squeak.org. >> As should be clearly apparent, I haven't had the time to fix the >> latest issue. >> > > This message was not meant to be pushy, especially not towards you :) > Just a reminder for the rest of us to ?do something? Even if you'd intended to be pushy, I'd be OK with that :) There's little point in a CI system that no one watches, so I'm happy to see someone flagging up a CI issue. I just, as I said, haven't had the time to address the issue. Levente had a look on the machine and it does have gem installed, so there's presumably some little bit of configuration missing somewhere to set the PATH correctly. frank > Best > -Tobias From bert at freudenbergs.de Tue Mar 24 13:35:45 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 24 13:35:49 2015 Subject: [squeak-dev] Unique Mouse Wheel Events In-Reply-To: References: Message-ID: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> > On 23.03.2015, at 19:34, DeNigris Sean wrote: > > Cross-posting to Pharo dev, Squeak dev, and Squeak VM lists... > > Recently, we discovered on the Pharo dev list that the key combination used to fake wheel events - ctrl + arrowKey - may be a bit too simple. Apparently ctrl+horizontalArrowKey is a standard in-use combo in Linux and Windows, so adding horizontal wheel events broke some users' workflows. So I propose "ctrl + alt + shift + cmd + arrowKey". > The new combo is: > > ? very unlikely to be typed > ? backward-compatible with existing Pharo and Squeak images, which only checks that either cmd or ctrl is pressed > ? frees up ctrl + arrow for our Linux/Windows friends I'm not quite sure I understand. It shouldn't matter if ctrl-arrow OS keyboard events have some system-wide binding. E.g. on a Mac, this is the default to switch between desktops. The mouse wheel does *not* generate an OS keyboard event. We only synthesize a VM keyboard event for the image to consume. So how could that possibly affect anything outside the image? I'm not against changing how the VM handles scroll events. However, I would like to understand what the actual problem is in the first place. - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150324/85d8cdfe/smime.bin From sean at clipperadams.com Tue Mar 24 13:28:08 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Tue Mar 24 13:38:53 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> Message-ID: <086C85F4-7CD9-4FC3-938A-776F5B9EDC85@clipperadams.com> > It shouldn't matter if ctrl-arrow OS keyboard events have some system-wide binding Sorry, I didn't explain it well. ctrl-arrow is apparently a standard Linux key combo, which Squeak/Pharo text editors therefore use to jump among words. The conflict is inside the image. ----- Cheers, Sean -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814767.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/20150324/91cfbd2c/attachment.htm From bert at freudenbergs.de Tue Mar 24 14:43:05 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 24 14:43:18 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <086C85F4-7CD9-4FC3-938A-776F5B9EDC85@clipperadams.com> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> <086C85F4-7CD9-4FC3-938A-776F5B9EDC85@clipperadams.com> Message-ID: <18EF1D4D-2BF7-47C5-AC30-423B49CBBB8A@freudenbergs.de> Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 6112 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150324/59912fb2/smime.bin From ma.chris.m at gmail.com Tue Mar 24 15:47:57 2015 From: ma.chris.m at gmail.com (Chris Muller) Date: Tue Mar 24 15:48:02 2015 Subject: [squeak-dev] The Inbox: Environments-cmm.57.mcz In-Reply-To: References: <55106264.1b2b370a.5a01.ffffeed8SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Oh that is so much better; use the existing API's which we know work rather than another path through the code which modifies the state of the object. I just tried it and it worked, thanks Levente! I'll commit it to trunk. On Mon, Mar 23, 2015 at 10:22 PM, Levente Uzonyi wrote: > On Mon, 23 Mar 2015, Chris Muller wrote: > >> To define a global variable in code, while taking care not to >> over-write it if it already is defined, I wrote: >> >> Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. >> >> But this only put it in the Smalltalk environments 'declarations', not >> its 'bindings', which renders MyGlobal inaccessible from any code. >> >> I don't really like this nesting of at:ifAbsentPut: into 'bindings', >> but it does solve the bug for the basic case. Is it the right way to >> fix it? > > > No, it's a hack. The right way to do it is to use #bind:to: to create a new > binding. Something like this should work: > > at: aSymbol ifAbsentPut: aBlock > > ^self at: aSymbol ifAbsent: [ > self at: aSymbol put: aBlock value ] > > Levente > >> >> On Mon, Mar 23, 2015 at 1:58 PM, wrote: >>> >>> Chris Muller uploaded a new version of Environments to project The Inbox: >>> http://source.squeak.org/inbox/Environments-cmm.57.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Environments-cmm.57 >>> Author: cmm >>> Time: 23 March 2015, 1:58:37.126 pm >>> UUID: 6e10d99c-b424-4f94-9152-18ccd72ca623 >>> Ancestors: Environments-topa.56 >>> >>> Fix access to globals which were defined by: Smalltalk at: #MyGlobal >>> ifAbsentPut: [myValue]. >>> >>> =============== Diff against Environments-topa.56 =============== >>> >>> Item was changed: >>> ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') >>> ----- >>> + at: aSymbol ifAbsentPut: aBlock >>> - at: aSymbol ifAbsentPut: aBlock >>> ^ declarations >>> at: aSymbol >>> + ifAbsentPut: >>> + [ bindings >>> + at: aSymbol >>> + ifAbsentPut: aBlock ]! >>> - ifAbsentPut: aBlock! >>> >>> >> >> > From maxleske at gmail.com Tue Mar 24 19:03:55 2015 From: maxleske at gmail.com (Max Leske) Date: Tue Mar 24 19:03:59 2015 Subject: [squeak-dev] Fuel issue tracker now on github Message-ID: Hi folks We?ve moved the issue tracker from Google code to github: https://github.com/theseion/fuel/issues . Cheers, Max -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150324/c4bf11f4/attachment.htm From commits at source.squeak.org Tue Mar 24 19:15:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 24 19:15:53 2015 Subject: [squeak-dev] The Trunk: Environments-cmm.57.mcz Message-ID: Chris Muller uploaded a new version of Environments to project The Trunk: http://source.squeak.org/trunk/Environments-cmm.57.mcz ==================== Summary ==================== Name: Environments-cmm.57 Author: cmm Time: 24 March 2015, 2:15:46.253 pm UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 Ancestors: Environments-topa.56 Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. =============== Diff against Environments-topa.56 =============== Item was changed: ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- at: aSymbol ifAbsentPut: aBlock + ^self at: aSymbol ifAbsent: [ + self at: aSymbol put: aBlock value ]! - ^ declarations - at: aSymbol - ifAbsentPut: aBlock! From asqueaker at gmail.com Tue Mar 24 19:21:55 2015 From: asqueaker at gmail.com (Chris Muller) Date: Tue Mar 24 19:21:58 2015 Subject: [squeak-dev] The Trunk: Environments-cmm.57.mcz In-Reply-To: <5511b7ed.4b21370a.3338.717eSMTPIN_ADDED_MISSING@mx.google.com> References: <5511b7ed.4b21370a.3338.717eSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Oops, its generally good to _never_ create two different MCVersions with the same name, e.g., better if I would have not reused cmm.57. Oh well, I moved the hack one in Inbox to Treated so it will never become a hassle later. On Tue, Mar 24, 2015 at 2:15 PM, wrote: > Chris Muller uploaded a new version of Environments to project The Trunk: > http://source.squeak.org/trunk/Environments-cmm.57.mcz > > ==================== Summary ==================== > > Name: Environments-cmm.57 > Author: cmm > Time: 24 March 2015, 2:15:46.253 pm > UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 > Ancestors: Environments-topa.56 > > Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. > > =============== Diff against Environments-topa.56 =============== > > Item was changed: > ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- > at: aSymbol ifAbsentPut: aBlock > + ^self at: aSymbol ifAbsent: [ > + self at: aSymbol put: aBlock value ]! > - ^ declarations > - at: aSymbol > - ifAbsentPut: aBlock! > > From Das.Linux at gmx.de Tue Mar 24 19:35:59 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 24 19:36:02 2015 Subject: [squeak-dev] The Trunk: Environments-cmm.57.mcz Message-ID: <2E050535-AD51-492C-883C-8B3EAC53545E@gmx.de> Would it be sane to cherry-pick this to 4.5 as well? best -Tobias On 24.03.2015, at 19:15, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of Environments to project The Trunk: > http://source.squeak.org/trunk/Environments-cmm.57.mcz > > ==================== Summary ==================== > > Name: Environments-cmm.57 > Author: cmm > Time: 24 March 2015, 2:15:46.253 pm > UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 > Ancestors: Environments-topa.56 > > Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. > > =============== Diff against Environments-topa.56 =============== > > Item was changed: From bert at freudenbergs.de Tue Mar 24 19:38:31 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 24 19:38:35 2015 Subject: [squeak-dev] The Trunk: Environments-cmm.57.mcz In-Reply-To: <2E050535-AD51-492C-883C-8B3EAC53545E@gmx.de> References: <2E050535-AD51-492C-883C-8B3EAC53545E@gmx.de> Message-ID: <1052294C-EDB9-4EC0-8156-443516A92B83@freudenbergs.de> > On 24.03.2015, at 20:35, Tobias Pape wrote: > > Would it be sane to cherry-pick this to 4.5 as well? I'd think so. - Bert - > > best > -Tobias > > On 24.03.2015, at 19:15, commits@source.squeak.org wrote: > >> Chris Muller uploaded a new version of Environments to project The Trunk: >> http://source.squeak.org/trunk/Environments-cmm.57.mcz >> >> ==================== Summary ==================== >> >> Name: Environments-cmm.57 >> Author: cmm >> Time: 24 March 2015, 2:15:46.253 pm >> UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 >> Ancestors: Environments-topa.56 >> >> Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. >> >> =============== Diff against Environments-topa.56 =============== >> >> Item was changed: > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150324/77224215/smime-0001.bin From commits at source.squeak.org Tue Mar 24 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 24 22:55:05 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150324225503.9075.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007667.html Name: Compiler-cmm.297 Ancestors: Compiler-topa.296 DoIt evaluation in the debugger needs to be from the selected Context's methodClass, not the receiver's class so that "super" will refer to the correct class. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007668.html Name: Morphic-topa.786 Ancestors: Morphic-cmm.785 Font Importer Tool: - Clarify 'Install' (now 'Link' via context menu) - Provide Help for 'Import' and 'Link' - Be a StringHolder now (so that perform:orSendTo: works as intended oO) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007669.html Name: Environments-cmm.57 Ancestors: Environments-topa.56 Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. ============================================= From alf.mmm.cat at gmail.com Tue Mar 24 23:02:57 2015 From: alf.mmm.cat at gmail.com (Alain Rastoul) Date: Tue Mar 24 23:03:03 2015 Subject: [squeak-dev] Unique Mouse Wheel Events In-Reply-To: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> Message-ID: <5511ED21.1000607@gmail.com> Le 24/03/2015 14:35, Bert Freudenberg a ?crit : > I'm not against changing how the VM handles scroll events. However, I would like to understand what the actual problem is in the first place. > > - Bert - > Hi Bert, (a bit long, sorry). I don't know is Squeak vm is impacted, it was originally about Pharo, the source was the same but may be the repos are not the same (?), but may be Squeak could be interested in that? The problem is about the current handling for horizontal mouse wheel that maps mouse wheel events to Ctrl-Arrow keyboard events. Currently the image side detect Ctrl-ArrowUp and Ctrl-ArrowDown and maps them as Vertical Mouse wheel event (this mapping done at the vm level). It works fine. An attempt was made in Pharo image to detect and handle horizontal mouse wheel event the same way (Ctrl-Left Ctrl-Right) and to map them as MouseWheelEvent in HandMorph class (generateKeyboarEvent:) but we lost the ability to use Ctrl-left / Ctrl-right for editing (jump from word to word). You could use Alt-left Alt-Right but it gets hard when you want to cut/paste along the way (the switch between Alt and Ctrl keys was prone to editing errors) It was a pain. So the question was about the ability to add an extra modifier at the VM level for the generated event, precisely to add ALT and CTRL extra modifiers to the generated event (and handling them correctly in the image of course - in HandMorph class first). This should be a non breaking change for the vm part (correct me if I'm wrong). I had a look at the vm code, I think it could be done for Unix in sqUnixX11.c at line 3533: int modifiers= modifierState ^ CtrlKeyBit; => Add ALT + CTRL modifiers (xored) For Windows (not really needed but eventually) quite the same in sqWin32Window.c at 266 evt->modifiers = CtrlKeyBit; (to check xored or not?) As stated by MS, at https://msdn.microsoft.com/en-us/library/ms997498.aspx the horizontal mouse wheel seems to be not really handled: "... Horizontal scrolling will not work, or is likely not to work, in the following scenarios: The application uses custom horizontal scroll bars. The application has no horizontal scroll bars. The horizontal scroll bar is physically placed in a nonstandard way relative to the window it is associated with. " As Pharo (squeak too) do not have native widgets , my understanding is that it should not work. =>No problem For Mac .... well I don't know mac but had a look at the source anyway sqMacUIEvents around l 1912 ? if (wheelMouseDelta != 0) { ... evt->modifiers = modifierMap[(controlKey >> 8)]; my guess-> the change goes around here ? May be an interested Mac developer could have a look and try? (nb I can do the mod build and test for unix and windows not for mac) (Sean ?) -- Regards, Alain From alf.mmm.cat at gmail.com Tue Mar 24 23:08:57 2015 From: alf.mmm.cat at gmail.com (Alain Rastoul) Date: Tue Mar 24 23:09:02 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <5511ED21.1000607@gmail.com> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> <5511ED21.1000607@gmail.com> Message-ID: <5511EE89.8080601@gmail.com> Le 25/03/2015 00:02, Alain Rastoul a ?crit : > for the generated event, precisely to add ALT and CTRL extra modifiers > to the generated event tipo : to add ALT and *SHIFT* modifier CTRL is already here -- Regards, Alain From sean at clipperadams.com Tue Mar 24 23:42:13 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Tue Mar 24 23:53:01 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <5511ED21.1000607@gmail.com> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> <5511ED21.1000607@gmail.com> Message-ID: > I had a look at the vm code, I think it could be done for Unix in > For Windows (not really needed but eventually) quite the same in Cool! I couldn't find those. I'll get on it! > May be an interested Mac developer could have a look and try? Already integrated in PharoVM :) btw the shortcut is now "ctrl + alt + shift + cmd + arrowKey", and as mentioned the VM change should be backward compatible with existing Squeak and Pharo ----- Cheers, Sean -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814948.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/20150324/509a1dc2/attachment.htm From commits at source.squeak.org Wed Mar 25 01:08:44 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:08:45 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.66.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.66.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.66 Author: dtl Time: 20 March 2015, 4:00:13.461 pm UUID: a396787d-a01a-40b3-8e2d-e1a91f6d3d3c Ancestors: ToolBuilder-Kernel-mt.65 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-Kernel-mt.65 =============== Item was changed: Object subclass: #UIManager + instanceVariableNames: '' - instanceVariableNames: 'toolBuilder' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !UIManager commentStamp: 'dtl 5/2/2010 16:06' prior: 0! UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic, MVC or other user interfaces.! Item was changed: + ----- Method: UIManager>>toolBuilder (in category 'builder') ----- - ----- Method: UIManager>>toolBuilder (in category 'accessing') ----- toolBuilder + "Answer a ToolBuilder for this kind of UIManager" + ^ self subclassResponsibility! - ^toolBuilder! From commits at source.squeak.org Wed Mar 25 01:08:59 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:09:02 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.67.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.67.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.67 Author: dtl Time: 21 March 2015, 12:07:23.671 pm UUID: d0d0c324-e12d-4424-a1dd-7b4a1cf1f946 Ancestors: ToolBuilder-Kernel-dtl.66 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-Kernel-dtl.66 =============== Item was changed: ----- Method: ToolBuilder class>>findDefault (in category 'accessing') ----- findDefault "Answer a default tool builder" | builderClass | "Note: The way the following is phrased ensures that you can always make 'more specific' builders merely by subclassing a tool builder and implementing a more specific way of reacting to #isActiveBuilder. For example, a BobsUIToolBuilder can subclass MorphicToolBuilder and (if enabled, say Preferences useBobsUITools) will be considered before the parent (generic MorphicToolBuilder)." builderClass := self allSubclasses detect:[:any| any isActiveBuilder and:[ any subclasses noneSatisfy:[:sub| sub isActiveBuilder]]] ifNone:[nil]. + builderClass ifNotNil: [^builderClass ]. - builderClass ifNotNil: [^builderClass new]. ^self error: 'ToolBuilder not found'! Item was changed: Object subclass: #UIManager + instanceVariableNames: 'builderClass' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !UIManager commentStamp: 'dtl 5/2/2010 16:06' prior: 0! UIManager is a dispatcher for various user interface requests, such as menu and dialog interactions. An instance of UIManager is associated with each Project to implement the appropriate functions for Morphic, MVC or other user interfaces.! Item was added: + ----- Method: UIManager>>builderClass (in category 'builder') ----- + builderClass + "Answer the kind of tool builder to use, possibly influenced by project preferences" + ^ builderClass ifNil: [ builderClass := ToolBuilder findDefault ]! Item was changed: ----- Method: UIManager>>toolBuilder (in category 'builder') ----- toolBuilder + ^ self builderClass new! - "Answer a ToolBuilder for this kind of UIManager" - ^ self subclassResponsibility! From commits at source.squeak.org Wed Mar 25 01:09:16 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:09:17 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.68.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.68.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.68 Author: dtl Time: 23 March 2015, 7:34:14.341 am UUID: 686389b8-aad6-4324-b077-19a7673bf4c8 Ancestors: ToolBuilder-Kernel-dtl.67 Add UIManager>> builderClass. Clean up unreferenced code. =============== Diff against ToolBuilder-Kernel-dtl.67 =============== Item was changed: ----- Method: ToolBuilder class>>default (in category 'accessing') ----- default "Answer the default tool builder" ^ Project current uiManager toolBuilder + ! - ifNil: [self findDefault]! Item was removed: - ----- Method: ToolBuilder class>>default: (in category 'accessing') ----- - default: aToolBuilder - "Set a new default tool builder" - self deprecated: 'The default ToolBuilder is an attribute of the UIManager' - ! Item was added: + ----- Method: UIManager>>builderClass: (in category 'accessing') ----- + builderClass: aClass + builderClass := aClass! From commits at source.squeak.org Wed Mar 25 01:09:36 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:09:39 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-dtl.35.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-dtl.35.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.35 Author: dtl Time: 20 March 2015, 4:00:36.889 pm UUID: 97e7e8fa-358a-487e-a8ec-0c7c357b3d2f Ancestors: ToolBuilder-MVC-fbs.34 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-MVC-fbs.34 =============== Item was removed: - ----- Method: MVCUIManager>>initialize (in category 'initialize-release') ----- - initialize - toolBuilder := MVCToolBuilder new! Item was added: + ----- Method: MVCUIManager>>toolBuilder (in category 'builder') ----- + toolBuilder + ^ MVCToolBuilder new! From commits at source.squeak.org Wed Mar 25 01:09:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:09:58 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-dtl.36.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-dtl.36.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.36 Author: dtl Time: 21 March 2015, 12:07:57.062 pm UUID: 8a01e8ca-80e4-4edd-b166-bea8b1ac01d5 Ancestors: ToolBuilder-MVC-dtl.35 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-MVC-dtl.35 =============== Item was removed: - ----- Method: MVCUIManager>>toolBuilder (in category 'builder') ----- - toolBuilder - ^ MVCToolBuilder new! From commits at source.squeak.org Wed Mar 25 01:10:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:10:18 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-dtl.100.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-dtl.100.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-dtl.100 Author: dtl Time: 20 March 2015, 4:01:04.899 pm UUID: 10696acd-74dc-4047-898e-77fed9121b6e Ancestors: ToolBuilder-Morphic-mt.99 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance =============== Diff against ToolBuilder-Morphic-mt.99 =============== Item was removed: - ----- Method: MorphicUIManager>>initialize (in category 'initialize-release') ----- - initialize - toolBuilder := MorphicToolBuilder new! Item was added: + ----- Method: MorphicUIManager>>toolBuilder (in category 'builder') ----- + toolBuilder + ^ MorphicToolBuilder new! From commits at source.squeak.org Wed Mar 25 01:10:29 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 01:10:30 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-dtl.101.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-dtl.101.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-dtl.101 Author: dtl Time: 21 March 2015, 12:08:28.036 pm UUID: bd975efe-ecc6-4634-94cf-a74a251da227 Ancestors: ToolBuilder-Morphic-dtl.100 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). =============== Diff against ToolBuilder-Morphic-dtl.100 =============== Item was removed: - ----- Method: MorphicUIManager>>toolBuilder (in category 'builder') ----- - toolBuilder - ^ MorphicToolBuilder new! From sean at clipperadams.com Wed Mar 25 03:17:37 2015 From: sean at clipperadams.com (Sean P. DeNigris) Date: Wed Mar 25 03:28:27 2015 Subject: [squeak-dev] Re: Unique Mouse Wheel Events In-Reply-To: <5511ED21.1000607@gmail.com> References: <253B6B62-8E60-4D85-A8AD-9EF74D0030D5@freudenbergs.de> <5511ED21.1000607@gmail.com> Message-ID: <3F7E9C5B-18B7-48A7-9F70-AEF4524C2E2F@clipperadams.com> > I had a look at the vm code, I think it could be done for Unix in > sqUnixX11.c at line 3533: > ... > For Windows (not really needed but eventually) quite the same in > sqWin32Window.c at 266 Okay, I took a first pass... https://github.com/pharo-project/pharo-vm/pull/73 I have no idea if any of this works because: a) I can't compile it because I'm on a Mac and b) I haven't programmed C in almost 20 years. But it's a start! ----- Cheers, Sean -- View this message in context: http://forum.world.st/Unique-Mouse-Wheel-Events-tp4814474p4814970.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/20150324/f5feeb3d/attachment.htm From commits at source.squeak.org Wed Mar 25 08:42:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 08:42:04 2015 Subject: [squeak-dev] The Trunk: Tools-topa.557.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.557.mcz ==================== Summary ==================== Name: Tools-topa.557 Author: topa Time: 25 March 2015, 9:41:06.71 am UUID: 154a18bc-667c-43e6-8971-fc65de2ea68a Ancestors: Tools-eem.556 Browser: Fix message list icons for metaclasses =============== Diff against Tools-eem.556 =============== Item was changed: ----- Method: Browser>>messageIconAt: (in category 'message list') ----- messageIconAt: anIndex self class showMessageIcons ifFalse: [^ nil]. ^ ToolIcons iconNamed: (ToolIcons + iconForClass: self selectedClassOrMetaClass - iconForClass: self selectedClass selector: (self messageList at: anIndex))! From commits at source.squeak.org Wed Mar 25 10:29:31 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 10:29:33 2015 Subject: [squeak-dev] The Trunk: HelpSystem-Core-mt.66.mcz Message-ID: Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-mt.66.mcz ==================== Summary ==================== Name: HelpSystem-Core-mt.66 Author: mt Time: 25 March 2015, 11:29:26.547 am UUID: c1308541-7e10-544a-97a6-4f2887a2178d Ancestors: HelpSystem-Core-mt.65 Help browser uses now the tool builder. To increase performance, the help system creates help topics now lazily (that is, the use of topic builders is not suggested but still possible for backwards compatibility). For example, "HelpBrowser openOn: SystemReference" opens now faster. New kinds of help topics should be implemented by subclassing AbstractHelpTopic. =============== Diff against HelpSystem-Core-mt.65 =============== Item was added: + Object subclass: #AbstractHelpTopic + instanceVariableNames: '' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! + + !AbstractHelpTopic commentStamp: 'mt 3/24/2015 16:26' prior: 0! + A HelpTopic provides content information that can be used as a help to the user. + It can be labeled with a title and marked with an (optional) icon. + + Help topics form a hierarchy since any topic is able to have zero or more + subtopics. ! Item was added: + ----- Method: AbstractHelpTopic>><= (in category 'comparing') ----- + <= anotherHelpTopic + + "Priority-based: ... -3 -2 -1 nil nil nil 1 2 3 4 ..." + (self priority notNil and: [anotherHelpTopic priority notNil]) + ifTrue: [^ self priority <= anotherHelpTopic priority]. + + (self priority notNil and: [anotherHelpTopic priority isNil]) + ifTrue: [^ self priority <= 0]. + + (self priority isNil and: [anotherHelpTopic priority notNil]) + ifTrue: [^ anotherHelpTopic priority >= 0]. + + "Fall-back." + ^ self title <= anotherHelpTopic title! Item was added: + ----- Method: AbstractHelpTopic>>asHelpTopic (in category 'conversion') ----- + asHelpTopic + + ^ self! Item was added: + ----- Method: AbstractHelpTopic>>contents (in category 'accessing') ----- + contents + "Return the text contents of this topic." + + self subclassResponsibility.! Item was added: + ----- Method: AbstractHelpTopic>>hasSubtopics (in category 'testing') ----- + hasSubtopics + + ^ self subtopics notEmpty! Item was added: + ----- Method: AbstractHelpTopic>>icon (in category 'accessing') ----- + icon + "Returns a descriptive form to support manual detection in a list of topics. Icons may encode the kind of topic." + + ^ nil! Item was added: + ----- Method: AbstractHelpTopic>>printOn: (in category 'printing') ----- + printOn: stream + + | title | + super printOn: stream. + (title := self title) notNil + ifTrue: [stream nextPutAll: '<' , title , '>'].! Item was added: + ----- Method: AbstractHelpTopic>>priority (in category 'accessing') ----- + priority + + ^ nil! Item was added: + ----- Method: AbstractHelpTopic>>subtopics (in category 'accessing') ----- + subtopics + "Topics can be nested in a tree structure." + + ^ #()! Item was added: + ----- Method: AbstractHelpTopic>>title (in category 'accessing') ----- + title + "A brief description of this topic's contents." + + ^ self contents truncateWithElipsisTo: 20! Item was added: + AbstractHelpTopic subclass: #ClassAPIHelpTopic + instanceVariableNames: 'theClass withSubclasses withMethods subclassesAsSeparateTopic' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! Item was added: + ----- Method: ClassAPIHelpTopic>>contents (in category 'accessing') ----- + contents + + ^ self theClass instanceSide organization classComment! Item was added: + ----- Method: ClassAPIHelpTopic>>icon (in category 'accessing') ----- + icon + + ^ ToolIcons iconNamed: (ToolIcons iconForClass: self theClass name)! Item was added: + ----- Method: ClassAPIHelpTopic>>subclassesAsSeparateTopic (in category 'accessing') ----- + subclassesAsSeparateTopic + + ^ subclassesAsSeparateTopic! Item was added: + ----- Method: ClassAPIHelpTopic>>subclassesAsSeparateTopic: (in category 'accessing') ----- + subclassesAsSeparateTopic: aBoolean + + subclassesAsSeparateTopic := aBoolean.! Item was added: + ----- Method: ClassAPIHelpTopic>>subtopics (in category 'accessing') ----- + subtopics + + ^ (self withMethods ifFalse: [#()] ifTrue: [ { + MethodListHelpTopic new theClass: self theClass theNonMetaClass. + MethodListHelpTopic new theClass: self theClass theMetaClass }]), + + (self withSubclasses ifFalse: [#()] ifTrue: [ + | topics | + topics := self theClass subclasses collect: [:cls | + self class new + theClass: cls; + subclassesAsSeparateTopic: self subclassesAsSeparateTopic; + withMethods: self withMethods; + withSubclasses: self withSubclasses]. + + self subclassesAsSeparateTopic + ifTrue: [{(HelpTopic named: 'Subclasses') + subtopics: topics; + yourself}] + ifFalse: [topics]])! Item was added: + ----- Method: ClassAPIHelpTopic>>theClass (in category 'accessing') ----- + theClass + + ^ theClass! Item was added: + ----- Method: ClassAPIHelpTopic>>theClass: (in category 'accessing') ----- + theClass: aClassDescription + + theClass := aClassDescription.! Item was added: + ----- Method: ClassAPIHelpTopic>>title (in category 'accessing') ----- + title + + ^ self theClass name! Item was added: + ----- Method: ClassAPIHelpTopic>>withMethods (in category 'accessing') ----- + withMethods + + ^ withMethods! Item was added: + ----- Method: ClassAPIHelpTopic>>withMethods: (in category 'accessing') ----- + withMethods: aBoolean + + withMethods := aBoolean.! Item was added: + ----- Method: ClassAPIHelpTopic>>withSubclasses (in category 'accessing') ----- + withSubclasses + + ^ withSubclasses! Item was added: + ----- Method: ClassAPIHelpTopic>>withSubclasses: (in category 'accessing') ----- + withSubclasses: aBoolean + + withSubclasses := aBoolean.! Item was added: + AbstractHelpTopic subclass: #ClassBasedHelpTopic + instanceVariableNames: 'helpClass' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! + + !ClassBasedHelpTopic commentStamp: 'mt 3/24/2015 16:28' prior: 0! + This kind of topic uses subclasses and methods to encode books and pages.! Item was added: + ----- Method: ClassBasedHelpTopic>>contents (in category 'accessing') ----- + contents + "A book has no contents. Only its pages do." + + ^ ''! Item was added: + ----- Method: ClassBasedHelpTopic>>hasSubtopics (in category 'testing') ----- + hasSubtopics + + ^ self helpClass pages notEmpty or: [self helpClass subclasses notEmpty]! Item was added: + ----- Method: ClassBasedHelpTopic>>helpClass (in category 'accessing') ----- + helpClass + + ^ helpClass! Item was added: + ----- Method: ClassBasedHelpTopic>>helpClass: (in category 'accessing') ----- + helpClass: aHelpClass + + helpClass := aHelpClass.! Item was added: + ----- Method: ClassBasedHelpTopic>>icon (in category 'accessing') ----- + icon + ^ self helpClass icon! Item was added: + ----- Method: ClassBasedHelpTopic>>priority (in category 'accessing') ----- + priority + + ^ self helpClass priority! Item was added: + ----- Method: ClassBasedHelpTopic>>subtopics (in category 'accessing') ----- + subtopics + + | pages | + pages := (self helpClass pages collect: [:pageSelectorOrClassName | + (Smalltalk hasClassNamed: pageSelectorOrClassName asString) + ifTrue: [Smalltalk classNamed: pageSelectorOrClassName asString] + ifFalse: [pageSelectorOrClassName]]) asOrderedCollection. + + self helpClass subclasses do: [:cls | + pages addIfNotPresent: cls]. + + ^ pages withIndexCollect: [:pageSelectorOrClass :priority | + pageSelectorOrClass isBehavior + ifFalse: [(self helpClass perform: pageSelectorOrClass) priority: priority - pages size; yourself] + ifTrue: [pageSelectorOrClass asHelpTopic]]! Item was added: + ----- Method: ClassBasedHelpTopic>>title (in category 'accessing') ----- + title + ^ self helpClass bookName! Item was changed: ----- Method: CustomHelp class>>asHelpTopic (in category 'converting') ----- asHelpTopic "Convert the receiver to a help topic" + ^ ClassBasedHelpTopic new helpClass: self! - ^self builder buildHelpTopicFrom: self! Item was removed: - ----- Method: CustomHelp class>>builder (in category 'defaults') ----- - builder - "Returns the builder that is used to build the given help book from the receiver. You can override this method - in a subclass to provide an own builder". - - ^CustomHelpHelpBuilder! Item was removed: - ----- Method: CustomHelp class>>key (in category 'accessing') ----- - key - "Returns a unique key identifying the receiver in the help system" - - ^''! Item was added: + ----- Method: CustomHelp class>>priority (in category 'accessing') ----- + priority + + ^ nil! Item was added: + ----- Method: HelpAPIDocumentation class>>asHelpTopic (in category 'defaults') ----- + asHelpTopic + + ^ (HelpTopic named: self bookName) + subtopics: (self packages collect: [:pkgName | PackageAPIHelpTopic new packageName: pkgName]); + yourself! Item was removed: - ----- Method: HelpAPIDocumentation class>>builder (in category 'defaults') ----- - builder - ^PackageAPIHelpBuilder! Item was changed: Object subclass: #HelpBrowser + instanceVariableNames: 'rootTopic topic result' - instanceVariableNames: 'rootTopic window treeMorph contentMorph topicClass topicMethod topic result' classVariableNames: 'DefaultHelpBrowser' poolDictionaries: '' category: 'HelpSystem-Core-UI'! !HelpBrowser commentStamp: 'tbn 3/8/2010 09:33' prior: 0! A HelpBrowser is used to display a hierarchy of help topics and their contents. Instance Variables rootTopic: window: treeMorph: contentMorph: rootTopic - xxxxx window - xxxxx treeMorph - xxxxx contentMorph - xxxxx ! Item was changed: ----- Method: HelpBrowser class>>open (in category 'instance creation') ----- open + ^self openOn: CustomHelp! - ^self openOn: SystemHelp! Item was changed: ----- Method: HelpBrowser class>>openOn: (in category 'instance creation') ----- openOn: aHelpTopic "Open the receiver on the given help topic or any other object that can be transformed into a help topic by sending #asHelpTopic." ^(self defaultHelpBrowser new) + open; + rootTopic: aHelpTopic; + yourself! - rootTopic: aHelpTopic; - open; - yourself! Item was changed: ----- Method: HelpBrowser>>accept: (in category 'actions') ----- accept: text "Accept edited text. Compile it into a HelpTopic" + | code topicClass topicMethod | + (self find: self topic contents) asArray ifNotEmpty: [:refs | + topicClass := refs first actualClass theNonMetaClass. + topicMethod := refs first selector]. + - | code | code := String streamContents:[:s| s nextPutAll: topicMethod. s crtab; nextPutAll: '"This method was automatically generated. Edit it using:"'. s crtab; nextPutAll: '"', self name,' edit: ', topicMethod storeString,'"'. s crtab; nextPutAll: '^HelpTopic'. s crtab: 2; nextPutAll: 'title: ', topic title storeString. s crtab: 2; nextPutAll: 'contents: '. s cr; nextPutAll: (String streamContents:[:c| c nextChunkPutWithStyle: text]) storeString. s nextPutAll:' readStream nextChunkText'. ]. topicClass class compile: code classified: ((topicClass class organization categoryOfElement: topicMethod) ifNil:['pages']). + + self flag: #fixme. "mt: Update will not work because the topic builder eagerly cached all the contents and lost track of its origins. We need to get rid of the topic builders and create topic contents lazily resp. live." + + self changed: #topics. + self changed: #topic. + self changed: #topicContents. - self refresh. ! Item was added: + ----- Method: HelpBrowser>>buildWith: (in category 'toolbuilder') ----- + buildWith: builder + + | windowSpec treeSpec textSpec | + windowSpec := builder pluggableWindowSpec new. + windowSpec + model: self; + children: OrderedCollection new; + label: #label. + + treeSpec := builder pluggableTreeSpec new. + treeSpec + model: self; + nodeClass: HelpTopicListItemWrapper; + roots: #topics; + getSelected: #topic; + setSelected: #topic:; + menu: #menu:; + autoDeselect: false; + frame: (0@0 corner: 0.3@1). + windowSpec children add: treeSpec. + + textSpec := builder pluggableTextSpec new. + textSpec + model: self; + getText: #topicContents; + setText: #accept:; + menu: #codePaneMenu:shifted:; + frame: (0.3@0 corner: 1@1). + windowSpec children add: textSpec. + + ^ builder build: windowSpec! Item was removed: - ----- Method: HelpBrowser>>close (in category 'ui') ----- - close - window notNil ifTrue: [window delete]! Item was removed: - ----- Method: HelpBrowser>>defaultRoot (in category 'defaults') ----- - defaultRoot - ^CustomHelp! Item was removed: - ----- Method: HelpBrowser>>defaultViewerClass (in category 'defaults') ----- - defaultViewerClass - ^PluggableTextMorph! Item was changed: ----- Method: HelpBrowser>>findStringInHelpTopic: (in category 'actions') ----- findStringInHelpTopic: aString + - | list | result := OrderedCollection new. + self inSubtopic: self rootTopic find: aString. + result ifNotEmpty: [self topic: result first]. - list := treeMorph scroller submorphs collect: [ :each | each complexContents]. - list do:[ : topic | self inSubtopic: topic find: aString ]. - self onItemClicked: result first. ! Item was changed: ----- Method: HelpBrowser>>inSubtopic:find: (in category 'actions') ----- inSubtopic: aTopic find: aString + ((aTopic title asString includesSubstring: aString caseSensitive: false) + or: [aTopic contents asString includesSubstring: aString caseSensitive: false]) + ifTrue: [result addIfNotPresent: aTopic]. + aTopic subtopics - ((aTopic asString includesSubString: aString) - or: [aTopic item contents asString includesSubString: aString]) - ifTrue: [result addIfNotPresent: aTopic item]. - aTopic contents do: [:sub | self inSubtopic: sub find: aString]! Item was removed: - ----- Method: HelpBrowser>>initWindow (in category 'initialize-release') ----- - initWindow - window := SystemWindow labelled: 'Help Browser'. - window model: self. - "Tree" - treeMorph := PluggableTreeMorph new. - treeMorph - model: self; - setSelectedSelector: #onItemClicked:; - getSelectedSelector: #topic; - getMenuSelector: #menu:. - window addMorph: treeMorph frame: (0@0 corner: 0.3@1). - - "Text" - contentMorph := self defaultViewerClass on: self - text: nil accept: #accept: - readSelection: nil menu: #codePaneMenu:shifted:. - window addMorph: contentMorph frame: (0.3@0 corner: 1@1). - ! Item was removed: - ----- Method: HelpBrowser>>initialize (in category 'initialize-release') ----- - initialize - super initialize. - self initWindow. - ! Item was added: + ----- Method: HelpBrowser>>label (in category 'accessing - ui') ----- + label + + ^ self rootTopic + ifNil: ['Help Browser'] + ifNotNil: [:topic | topic title]! Item was removed: - ----- Method: HelpBrowser>>onItemClicked: (in category 'events') ----- - onItemClicked: anItem - - anItem ifNil: [^contentMorph setText: rootTopic asHelpTopic contents]. - contentMorph setText: anItem contents. - self topic: anItem. ! Item was changed: ----- Method: HelpBrowser>>open (in category 'ui') ----- open - "Open the receivers window" + ToolBuilder open: self.! - self refresh. - window openInWorld. - ! Item was removed: - ----- Method: HelpBrowser>>refresh (in category 'actions') ----- - refresh - - |helpTopic items| - helpTopic := rootTopic asHelpTopic. - window setLabel: helpTopic title. - items := helpTopic subtopics collect: [:each | HelpTopicListItemWrapper with: each ]. - treeMorph list: items. - contentMorph setText: helpTopic contents - ! Item was changed: ----- Method: HelpBrowser>>rootTopic: (in category 'accessing') ----- rootTopic: aHelpTopic + rootTopic := aHelpTopic asHelpTopic. + + self changed: #label. + self changed: #topics.! - rootTopic := aHelpTopic. - self refresh ! Item was removed: - ----- Method: HelpBrowser>>step (in category 'stepping') ----- - step - "Do nothing when the window dispatches stepping back to the model"! Item was changed: ----- Method: HelpBrowser>>topic (in category 'accessing') ----- topic + ^ topic! Item was changed: ----- Method: HelpBrowser>>topic: (in category 'accessing') ----- + topic: aHelpTopic - topic: anItem + self topic == aHelpTopic ifTrue: [^ self]. + + topic := aHelpTopic. + + self changed: #topic. + self changed: #topicContents.! - | classList | - topic := anItem. - classList := (self find: anItem contents) asOrderedCollection. - classList ifNotEmpty:[ - topicClass := classList first actualClass theNonMetaClass. - topicMethod := classList first selector]. - self changed: #topic.! Item was added: + ----- Method: HelpBrowser>>topicContents (in category 'accessing - ui') ----- + topicContents + + ^ (self topic ifNil: [self rootTopic]) ifNil: '' ifNotNil: #contents! Item was added: + ----- Method: HelpBrowser>>topics (in category 'accessing - ui') ----- + topics + + ^ (self rootTopic ifNil: [#()] ifNotNil: #subtopics) sorted! Item was removed: - ----- Method: HelpOnHelp class>>key (in category 'accessing') ----- - key - ^'HelpOnHelp'! Item was added: + ----- Method: HelpOnHelp class>>priority (in category 'accessing') ----- + priority + + ^ 9999 "at the bottom"! Item was changed: + AbstractHelpTopic subclass: #HelpTopic + instanceVariableNames: 'title key icon contents subtopics priority' - Object subclass: #HelpTopic - instanceVariableNames: 'title key icon contents subtopics' classVariableNames: '' poolDictionaries: '' category: 'HelpSystem-Core-Model'! + !HelpTopic commentStamp: 'mt 3/25/2015 11:27' prior: 0! + This is a configurable version of a help topic. You can define its contents, title, icon, and subtopics manually. - !HelpTopic commentStamp: 'tbn 3/29/2010 14:53' prior: 0! - A HelpTopic provides content information that can be used as a help to the user. - It can be labeled with a title, identified using an (optional) unique key and marked - with an (optional) icon. + Help builders make use of this.! - Help topics form a hierarchy since any topic is able to have zero or more - subtopics. - - - Instance Variables - contents: The help topic contents - icon: An optional icon for the topic - key: An optional unique key - subtopics: A collection of subtopics - title: The title - - contents - - The help topic contents - typically containing the help topics information - - icon - - An optional icon for the topic - - key - - An optional unique key which can be used to identify the topic. - - subtopics - - A collection of subtopics. - By default the subtopics are not sorted, so the insertion order is used. - If necessary it is possible to sort the subtopics by title. - - title - - A meaninful title for the help topic - ! Item was removed: - ----- Method: HelpTopic>><= (in category 'comparing') ----- - <= anotherHelpTopic - "Use sorting by title as the default sort order" - - ^self title <= anotherHelpTopic title ! Item was removed: - ----- Method: HelpTopic>>asHelpTopic (in category 'conversion') ----- - asHelpTopic - "Converts the receiver to a help topic" - - ^self! Item was removed: - ----- Method: HelpTopic>>hasSubtopics (in category 'testing') ----- - hasSubtopics - "Returns true if the receiver has subtopics, false otherwise" - - ^self subtopics notEmpty ! Item was changed: ----- Method: HelpTopic>>initialize (in category 'initialize-release') ----- initialize "Initializes the receiver" super initialize. self title: self defaultTitle. + self contents: ''.! - self contents: ''. - self key: '' ! Item was removed: - ----- Method: HelpTopic>>key (in category 'accessing') ----- - key - "Returns a unique key identifying the receiver in the help system" - - ^key! Item was removed: - ----- Method: HelpTopic>>key: (in category 'accessing') ----- - key: aUniqueKey - "Sets a unique key identifying the receiver in the help system" - - key := aUniqueKey ! Item was added: + ----- Method: HelpTopic>>priority (in category 'accessing') ----- + priority + "A hint for tools to influence sort order." + + ^ priority! Item was added: + ----- Method: HelpTopic>>priority: (in category 'accessing') ----- + priority: anInteger + + priority := anInteger.! Item was changed: ----- Method: HelpTopicListItemWrapper>>asString (in category 'accessing') ----- asString "Returns a string used as a label" + ^ self item title! - ^item title! Item was changed: ----- Method: HelpTopicListItemWrapper>>contents (in category 'accessing') ----- contents - "Returns subnodes (if any)" + ^self item subtopics sorted collect: [ :each | + HelpTopicListItemWrapper with: each model: self model] - item hasSubtopics ifFalse: [^#()]. - ^(item subtopics) collect: [ :each | - HelpTopicListItemWrapper with: each - ]. ! Item was added: + ----- Method: HelpTopicListItemWrapper>>hasContents (in category 'accessing') ----- + hasContents + + ^ self item hasSubtopics! Item was changed: ----- Method: HelpTopicListItemWrapper>>icon (in category 'accessing') ----- icon "Either return the icon for the given topic" | symbol | + self item icon ifNotNil: [:icon | ^ icon]. + symbol := self item hasSubtopics - item icon notNil ifTrue: [^item icon]. - symbol := item hasSubtopics ifTrue: [#bookIcon] ifFalse: [#pageIcon]. ^HelpIcons iconNamed: symbol! Item was added: + ----- Method: HelpTopicListItemWrapper>>item (in category 'accessing') ----- + item + + ^ super item ifNil: [HelpTopic new]! Item was added: + AbstractHelpTopic subclass: #MethodListHelpTopic + instanceVariableNames: 'theClass' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! Item was added: + ----- Method: MethodListHelpTopic>>contents (in category 'accessing') ----- + contents + + ^ (String streamContents: [ :stream | + self theClass selectors sort do: [ :selector | + stream + nextPutAll: self theClass name; + nextPutAll: '>>'; + nextPutAll: selector asString; + cr; + nextPutAll: ( + (self theClass commentsAt: selector) + at: 1 + ifAbsent: [ '-' ]); + cr; cr ] ])! Item was added: + ----- Method: MethodListHelpTopic>>icon (in category 'accessing') ----- + icon + + ^ HelpIcons iconNamed: #pageIcon! Item was added: + ----- Method: MethodListHelpTopic>>priority (in category 'accessing') ----- + priority + + ^ -999! Item was added: + ----- Method: MethodListHelpTopic>>theClass (in category 'accessing') ----- + theClass + + ^ theClass! Item was added: + ----- Method: MethodListHelpTopic>>theClass: (in category 'accessing') ----- + theClass: aClassOrMetaClass + + theClass := aClassOrMetaClass.! Item was added: + ----- Method: MethodListHelpTopic>>title (in category 'accessing') ----- + title + + ^ self theClass isMeta + ifTrue: ['Class side'] + ifFalse: ['Instance side']! Item was added: + AbstractHelpTopic subclass: #PackageAPIHelpTopic + instanceVariableNames: 'packageName' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! Item was added: + ----- Method: PackageAPIHelpTopic>>contents (in category 'accessing') ----- + contents + + ^ ''! Item was added: + ----- Method: PackageAPIHelpTopic>>hasSubtopics (in category 'testing') ----- + hasSubtopics + + ^ SystemOrganization categories anySatisfy: [:cat | + (cat beginsWith: self packageName) and: [(SystemOrganization listAtCategoryNamed: cat) notEmpty]]! Item was added: + ----- Method: PackageAPIHelpTopic>>packageName (in category 'accessing') ----- + packageName + + ^ packageName! Item was added: + ----- Method: PackageAPIHelpTopic>>packageName: (in category 'accessing') ----- + packageName: aString + + packageName := aString.! Item was added: + ----- Method: PackageAPIHelpTopic>>subtopics (in category 'accessing') ----- + subtopics + + ^ ((PackageInfo named: self packageName) classes + sorted: [:cl1 :cl2 | cl1 name < cl2 name]) + collect: [:class | ClassAPIHelpTopic new + theClass: class; + withSubclasses: false; + withMethods: true]! Item was added: + ----- Method: PackageAPIHelpTopic>>title (in category 'accessing') ----- + title + + ^ self packageName! Item was removed: - Object subclass: #SystemHelp - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'HelpSystem-Core-Utilities'! - - !SystemHelp commentStamp: 'tbn 4/30/2010 15:33' prior: 0! - This class defines Help for the system in front of you. - It defines the default contents when you open a help browser. - - So "HelpBrowser open" is the same as "HelpBrowser openOn: SystemHelp". - - - ! Item was removed: - ----- Method: SystemHelp class>>asHelpTopic (in category 'conversion') ----- - asHelpTopic - |topic helpOnHelp sortedTopics | - topic := CustomHelp asHelpTopic. - topic sortSubtopicsByTitle. - helpOnHelp := topic subtopics detect: [:t | t key = 'HelpOnHelp'] ifNone: [self error: 'Help for the help system is removed']. - sortedTopics := topic subtopics. - sortedTopics remove: helpOnHelp. - sortedTopics addLast: helpOnHelp. - topic subtopics: sortedTopics. - ^topic. - ! Item was changed: ----- Method: SystemReference class>>all (in category 'help topic creation') ----- all "HelpBrowser openOn: self all " + ^(ClassAPIHelpTopic new) + theClass: ProtoObject; + withSubclasses: true; + withMethods: true; + subclassesAsSeparateTopic: false! - ^(ClassAPIHelpBuilder new) - rootToBuildFrom: ProtoObject; - addSubclasses: true; - addMethods: true; - subclassesAsSeparateTopic: false; - build; - topicToBuild - - ! Item was changed: ----- Method: SystemReference class>>forClass: (in category 'help topic creation') ----- forClass: aClass |root topic | root := HelpTopic named: 'System reference for ', aClass name. + topic := ClassAPIHelpTopic new theClass: aClass. - topic := ClassAPIHelpBuilder buildHelpTopicFrom: aClass. root addSubtopic: topic. ^root! Item was changed: ----- Method: SystemReference class>>hierarchyFor: (in category 'help topic creation') ----- hierarchyFor: aClass + | root topic | - |root topic | root := HelpTopic named: 'System reference for ', aClass name. + topic := (ClassAPIHelpTopic new) + theClass: aClass; + withSubclasses: true; + withMethods: false; + subclassesAsSeparateTopic: false. - topic := (ClassAPIHelpBuilder new) - rootToBuildFrom: aClass; - addSubclasses: true; - addMethods: false; - subclassesAsSeparateTopic: false; - build; - topicToBuild. root addSubtopic: topic. + ^ root! - ^root - - ! Item was changed: ----- Method: SystemReference class>>hierarchyWithMethodsFor: (in category 'help topic creation') ----- hierarchyWithMethodsFor: aClass + | root topic | - |root topic | root := HelpTopic named: 'System reference for ', aClass name. + topic := (ClassAPIHelpTopic new) + theClass: aClass; + withSubclasses: true; + withMethods: true; + subclassesAsSeparateTopic: true. - topic := (ClassAPIHelpBuilder new) - rootToBuildFrom: aClass; - addSubclasses: true; - addMethods: true; - subclassesAsSeparateTopic: true; - build; - topicToBuild. root addSubtopic: topic. + ^ root! - ^root - - ! From commits at source.squeak.org Wed Mar 25 10:30:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 10:30:24 2015 Subject: [squeak-dev] The Trunk: HelpSystem-Tests-mt.16.mcz Message-ID: Marcel Taeumel uploaded a new version of HelpSystem-Tests to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Tests-mt.16.mcz ==================== Summary ==================== Name: HelpSystem-Tests-mt.16 Author: mt Time: 25 March 2015, 11:30:13.168 am UUID: 7a2dcc3a-6e0b-0d47-bccf-0b1bbd056a66 Ancestors: HelpSystem-Tests-fbs.15 Tests updated. =============== Diff against HelpSystem-Tests-fbs.15 =============== Item was changed: ----- Method: HelpBrowserTest>>testOpen (in category 'testing') ----- testOpen |browser| "This should not throw an exception." browser := self defaultTestClass open. World doOneCycleNow. + browser changed: #close.! - browser close.! Item was changed: ----- Method: HelpTopicTest>>testInitialization (in category 'testing') ----- testInitialization self assert: topic title = 'Unnamed Topic'. - self assert: topic key isEmpty. self assert: topic contents isEmpty ! From commits at source.squeak.org Wed Mar 25 12:23:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 12:23:25 2015 Subject: [squeak-dev] The Trunk: Tools-topa.556.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.556.mcz ==================== Summary ==================== Name: Tools-topa.556 Author: topa Time: 18 March 2015, 4:09:54.221 pm UUID: 563dd431-ffbf-43b8-b78f-79a7a55f924d Ancestors: Tools-topa.555 Pluggable Menus for many tools ============================== A lot of tools, especially the Browser, rely on context menus (aka yellow button menus). Dynamically extending these is possible but requires a lot of care. The Pluggable Menus allow to add menu entries easily via extension methods. The Services package serves as example here. Simple Usage ------------ * As tool writer, you want a menu somewhere in your tool 1. Create an instance of `MenuMorph` or similar. 2. Create a method that should build the menu entries: someMenu: aMenu ^ aMenu addList: #( ('use' use) ('remove' remove) ('copy' copyName)); yourself 3. Send `self menu: aMorph for: #myMenu` * As a tool extender, you want to extend an existing menu 1. Find the menu you want to extend, for example the Browser's message list menu. This is defined via `ToolBuilder` to be constructed in `Browser>>#messageListMenu:shifted:` as messageListMenu: aMenu shifted: shifted "Answer the message-list menu" ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted So the menu identifier is `#messageListMenu` 2. Create an _extension method_ in `Browser` and categorize it as, for example, `*MyPackage-message list`. myMenu: aMenu ^ aMenu addList: #( ('use' use) ('remove' remove) ('copy' copyName)); yourself 3. The entries should show up now the next time you open the context menu on the message list in a Browser. Examples -------- The `Services-Base` package now uses this approach to add services to several menus. For example, to add the class service entries to the class list menu in the browser, it adds this extension method in the category `*services-base` in the `Browser` class: classListMenuServices: aMenu ServiceGui browser: self classMenu: aMenu. ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu] This invokes the `ServiceGui` functionality to create the menu and * ensures the entries show up in the class list context menu (``), * make sure they appear near the top (``), * (actually build the menu (`ServiceGui browser: self classMenu: aMenu.`)), * and indicate whether or not the system should continue with the menue building, depending on a preference (`^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]`). Reference --------- * Menu creation * `StringHolder >> menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean` Collect all menu-building methods as defined by `aMenuSymbolOrCollection`, possibly reacting to the shifted `aBoolean` modifier. The `aMenuSymbolOrCollection` specification denotes the method annotation(s) (or Pragma(s)) to search the current class and all superclasses for. Then, all collected method _selectors_ are performed on `self`. * `StringHolder >> menu: aMenu for: aMenuSymbolOrCollection` Delegates to `#menu:for:shifted:` with shifted being `false`. * Menu identifiers and annotations/pragmas All senders of `#menu:for:shifted:` are free to choose what to use for the menu identifier(s) which can then be used as annotation/pragma in menu-building methods. The methods with these annotations/pragmas get called with the menu to build and (optionally) with the shift state boolean. However, indentifiers that can take an argument in a method annotation/pragma are expected to have this argument being either `true` or `false`. They are only included for menu building if the shifted state corresponds to the argument. **Examples** The message list context menu for Browsers is build using self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted with the two identifiers `#messageListMenu` and `#messageListMenuShifted:`. * The following method would be called when the shifted argument is `false` only: myMessageListMenuAdditiontTo: aMenu "..." * The following method would be called when the shifted argument is `true` only: myShiftedMessageListMenuAdditiontTo: aMenu "..." * The following method would be called regardless of the shift state: myGeneralMessageListMenuAdditiontTo: aMenu "..." * The following method would be called regardless of the shift state, but with the shift state as additional argument: myGeneralMessageListMenuAdditiontTo: aMenu shifted: aBoolean aBoolean ifTrue: ["..."]. "..." * Menu priorities (optional) Menu-building methods are typically sorted by selector name first and inheritance order second (for example, `StringHolder` before `Browser`, but `Browser>>#aMenu:` before `StringHolder>>#bMenu:`). It is optionally possible to influence the menu ordering by including an annotation/pragma `` defining a numeric priority that takes precedence over the default ordering. **The higher the number, the later it comes.** The following menu-building method would hence be sorted rather late in the menu. myMessageListMenuAdditiontTo: aMenu "..." If no priority is given, 500 is assumed. Appendix: Affected Menus ------------------------ _Note:_ For evey menu identifier in this list, a second exists with 'Shifted:' appended to make it easy for tool exteders. - StringHolder 1. code pane menu (codePaneMenu) - CodeHolder - Browser 1. class list menu (classListMenu) 2. message category menu (messageCategoryMenu) 3. message list menu (messageListMenu) 4. class/system category menu (systemCategoryMenu) - PackagePaneBrowser 1. package list menu (packageListMenu) - FileContentsBrowser 1. class list menu (fileClassListMenu) 2. message category menu (fileMessageCategoryMenu) 3. message list menu (fileMessageListMenu) 4. package list menu (filePackageListMenu) - ChangeList 1. change list menu (changeListMenu) - VersionsBrowser 1. versions menu (versionsMenu) - ChangeSorter 1. change set menu (changeSetMenu) 2. class list menu (classListMenu) 3. message list menu (messageListMenu) - Debugger 1. stack menu (contextStackMenu) - MessageSet 1. message list menu (messageListMenu) - MessageNames 1. selectors menu (selectorListMenu) - Lexicon 1. category menu (categoryListMenu) - FileList 1. contents pane menu (fileContentsMenu) 2. files menu (fileListMenu) 3. directory menu (volumeMenu) - Inspector 1. fields menu (fieldListMenu) - SelectorBrowser 1. selector list menu (selectorListMenu) =============== Diff against Tools-topa.555 =============== Item was changed: ----- Method: Browser>>classListMenu: (in category 'class functions') ----- classListMenu: aMenu + "Conveniently fit for backward compatibility with old browers stored in image segments" + + aMenu addList: #( + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('show hierarchy' hierarchy) + ('show definition' editClass) + ('show comment' editComment) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('rename class ...' renameClass) + ('copy class' copyClass) + ('remove class (x)' removeClass) + - + ('find method...' findMethod) + - + ('more...' offerShiftedClassListMenu)). + ^ aMenu + ! - "For backward compatibility with old browers stored in image segments" - - ^ self classListMenu: aMenu shifted: false! Item was changed: ----- Method: Browser>>classListMenu:shifted: (in category 'class functions') ----- classListMenu: aMenu shifted: shifted "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted. - self - menuHook: aMenu - named: #classListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue:[^ self shiftedClassListMenu: aMenu]. - aMenu addList: #( - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('show hierarchy' hierarchy) - ('show definition' editClass) - ('show comment' editComment) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('rename class ...' renameClass) - ('copy class' copyClass) - ('remove class (x)' removeClass) - - - ('find method...' findMethod) - - - ('more...' offerShiftedClassListMenu)). - ^ aMenu ! Item was added: + ----- Method: Browser>>classListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + classListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #classListMenu shifted: aBoolean. + ! Item was removed: - ----- Method: Browser>>codePaneMenu:shifted: (in category 'code pane') ----- - codePaneMenu: aMenu shifted: shifted - self - menuHook: aMenu - named: #codePaneMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^super codePaneMenu: aMenu shifted: shifted.! Item was added: + ----- Method: Browser>>mainMessageCategoryMenu: (in category 'message category functions') ----- + mainMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('browse' buildMessageCategoryBrowser) + ('print out' printOutMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + ('alphabetize' alphabetizeMessageCategories) + ('remove empty categories' removeEmptyCategories) + ('categorize all uncategorized' categorizeAllUncategorizedMethods) + ('new category...' addCategory) + - + ('rename...' renameCategory) + ('remove' removeMessageCategory)); + yourself + ! Item was added: + ----- Method: Browser>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + + ^ aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)); + yourself + ! Item was added: + ----- Method: Browser>>mainSystemCategoryMenu: (in category 'system category functions') ----- + mainSystemCategoryMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + ('back... (b)' recent) + - + ('browse all' browseAllClasses) + ('browse' buildSystemCategoryBrowser) + - + ('printOut' printOutSystemCategory) + ('fileOut' fileOutSystemCategory) + - + ('reorganize' editSystemCategories) + ('alphabetize' alphabetizeSystemCategories) + - + ('update' updateSystemCategories) + ('add item...' addSystemCategory) + ('rename...' renameSystemCategory) + ('remove' removeSystemCategory)); + yourself + ! Item was changed: ----- Method: Browser>>messageCategoryMenu: (in category 'message category functions') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(messageCategoryMenu messageCategoryMenuShifted:) - self - menuHook: aMenu - named: #messageCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^ aMenu labels: - 'browse - printOut - fileOut - reorganize - alphabetize - remove empty categories - categorize all uncategorized - new category... - rename... - remove' - lines: #(3 8) - selections: - #(buildMessageCategoryBrowser printOutMessageCategories fileOutMessageCategories - editMessageCategories alphabetizeMessageCategories removeEmptyCategories - categorizeAllUncategorizedMethods addCategory renameCategory removeMessageCategory) ! Item was added: + ----- Method: Browser>>messageCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: Browser>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>shiftedClassListMenu: (in category 'class functions') ----- shiftedClassListMenu: aMenu + "Set up the menu to apply to the receiver's class list when the shift key is down" ^ aMenu addList: #( - ('unsent methods' browseUnusedMethods 'browse all methods defined by this class that have no senders') ('unreferenced inst vars' showUnreferencedInstVars 'show a list of all instance variables that are not referenced in methods') ('unreferenced class vars' showUnreferencedClassVars 'show a list of all class variables that are not referenced in methods') ('subclass template' makeNewSubclass 'put a template into the code pane for defining of a subclass of this class') - ('sample instance' makeSampleInstance 'give me a sample instance of this class, if possible') ('inspect instances' inspectInstances 'open an inspector on all the extant instances of this class') ('inspect subinstances' inspectSubInstances 'open an inspector on all the extant instances of this class and of all of its subclasses') - ('add all meths to current chgs' addAllMethodsToCurrentChangeSet 'place all the methods defined by this class into the current change set') ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them') - ('more...' offerUnshiftedClassListMenu 'return to the standard class-list menu'))! Item was changed: ----- Method: Browser>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu + "Fill aMenu with the items appropriate when the shift key is held down" aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: Browser>>systemCategoryMenu: (in category 'system category functions') ----- systemCategoryMenu: aMenu + ^ self menu: aMenu for: #(systemCategoryMenu systemCategoryMenuShifted:) + ! - self - menuHook: aMenu - named: #systemCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - - ^ aMenu labels: - 'find class... (f) - back... (b) - browse all - browse - printOut - fileOut - reorganize - alphabetize - update - add item... - rename... - remove' - lines: #(2 4 6 8) - selections: - #(findClass recent browseAllClasses buildSystemCategoryBrowser - printOutSystemCategory fileOutSystemCategory - editSystemCategories alphabetizeSystemCategories updateSystemCategories - addSystemCategory renameSystemCategory removeSystemCategory )! Item was added: + ----- Method: Browser>>systemCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + systemCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #systemCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: ChangeList>>changeListMenu: (in category 'menu actions') ----- changeListMenu: aMenu + ^ self menu: aMenu for: #(changeListMenu changeListMenuShifted) - "Fill aMenu up so that it comprises the primary changelist-browser menu" - - aMenu addTitle: 'change list'. - aMenu addStayUpItemSpecial. - - aMenu addList: #( - - ('fileIn selections' fileInSelections 'import the selected items into the image') - ('fileOut selections... ' fileOutSelections 'create a new file containing the selected items') - - - ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) - ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') - - - ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') - ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') - ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') - - - ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') - ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') - ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') - ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') - - - - ('select all (a)' selectAll 'select all the items in the list') - ('deselect all' deselectAll 'deselect all the items in the list') - ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') - - - ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') - ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') - ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') - ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') - - - ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') - ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') - ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') - ('remove selected items' removeSelections 'remove the selected items from the change-list') - ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). - - ^ aMenu - ! Item was added: + ----- Method: ChangeList>>mainChangeListMenu: (in category 'menu actions') ----- + mainChangeListMenu: aMenu + "Fill aMenu up so that it comprises the primary changelist-browser menu" + + + aMenu addTitle: 'change list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + + ('fileIn selections' fileInSelections 'import the selected items into the image') + ('fileOut selections...' fileOutSelections 'create a new file containing the selected items') + - + ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) + ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') + - + ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') + ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') + ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') + - + ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') + ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') + ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') + ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') + + - + ('select all (a)' selectAll 'select all the items in the list') + ('deselect all' deselectAll 'deselect all the items in the list') + ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') + - + ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') + ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') + ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') + ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') + - + ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') + ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') + ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') + ('remove selected items' removeSelections 'remove the selected items from the change-list') + ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). + + ^ aMenu + + ! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForDropInClassCats: (in category 'menu') ----- + changeSetMenuForDropInClassCats: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForModification: (in category 'menu') ----- + changeSetMenuForModification: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForOpposite: (in category 'menu') ----- + changeSetMenuForOpposite: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForPromote: (in category 'menu') ----- + changeSetMenuForPromote: aMenu + + ^ aMenu! Item was removed: - ----- Method: ChangeSetBrowser>>shiftedChangeSetMenu: (in category 'menu') ----- - shiftedChangeSetMenu: aMenu - "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" - - aMenu title: 'Change set (shifted)'. - aMenu addStayUpItemSpecial. - aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in at least one other change set.'. - - aMenu addLine. - aMenu add: 'check for slips' action: #lookForSlips. - aMenu balloonTextForLastItem: - 'Check this change set for halts and references to Transcript.'. - - aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. - aMenu balloonTextForLastItem: - 'Check this change set for messages that are not sent anywhere in the system'. - - aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. - aMenu balloonTextForLastItem: - 'Check this change set for methods that do not have comments'. - - aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. - aMenu balloonTextForLastItem: - 'Check for classes with code in this changeset which lack class comments'. - - - Utilities authorInitialsPerSe isEmptyOrNil ifFalse: - [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. - - aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods any of whose previous authoring stamps do not start with "', Utilities authorInitials, '"']. - - aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. - aMenu balloonTextForLastItem: - 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. - aMenu addLine. - - aMenu add: 'inspect change set' action: #inspectChangeSet. - aMenu balloonTextForLastItem: - 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. - - aMenu add: 'update' action: #update. - aMenu balloonTextForLastItem: - 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. - - aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. - aMenu balloonTextForLastItem: - 'If this change set is currently associated with a Project, go to that project right now.'. - - aMenu add: 'trim history' action: #trimHistory. - aMenu balloonTextForLastItem: - ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. - - aMenu add: 'clear this change set' action: #clearChangeSet. - aMenu balloonTextForLastItem: - 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. - aMenu add: 'expunge uniclasses' action: #expungeUniclasses. - aMenu balloonTextForLastItem: - 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. - - aMenu add: 'uninstall this change set' action: #uninstallChangeSet. - aMenu balloonTextForLastItem: - 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. - - aMenu addLine. - - aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. - aMenu balloonTextForLastItem: - 'Takes you back to the primary change-set menu.'. - - ^ aMenu! Item was changed: ----- Method: ChangeSorter>>changeSetMenu:shifted: (in category 'changeSet menu') ----- changeSetMenu: aMenu shifted: isShifted - "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + ^ self menu: aMenu for: #( changeSetMenu changeSetMenuShifted: ) shifted: isShifted + ! - isShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu]. - Smalltalk isMorphic - ifTrue: - [aMenu title: 'Change Set'] - ifFalse: - [aMenu title: 'Change Set: - ' , myChangeSet name]. - aMenu addStayUpItemSpecial. - - aMenu add: 'make changes go to me (m)' action: #newCurrent. - aMenu addLine. - aMenu add: 'new change set... (n)' action: #newSet. - aMenu add: 'find...(f)' action: #findCngSet. - aMenu add: 'select change set...' action: #chooseCngSet. - aMenu addLine. - aMenu add: 'rename change set (r)' action: #rename. - aMenu add: 'file out (o)' action: #fileOut. - aMenu add: 'mail to list' action: #mailOut. - aMenu add: 'browse methods (b)' action: #browseChangeSet. - aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. - aMenu addLine. - parent - ifNotNil: - [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. - aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. - aMenu add: 'subtract other side (-)' action: #subtractOtherSide. - aMenu addLine]. - myChangeSet hasPreamble - ifTrue: - [aMenu add: 'edit preamble (p)' action: #addPreamble. - aMenu add: 'remove preamble' action: #removePreamble] - ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. - myChangeSet hasPostscript - ifTrue: - [aMenu add: 'edit postscript...' action: #editPostscript. - aMenu add: 'remove postscript' action: #removePostscript] - ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. - aMenu addLine. - - aMenu add: 'destroy change set (x)' action: #remove. - aMenu addLine. - aMenu add: 'more...' action: #offerShiftedChangeSetMenu. - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForDropInClassCats: (in category 'changeSet menu') ----- + changeSetMenuForDropInClassCats: aMenu + + aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. + aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. + + ^ aMenu + ! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForModification: (in category 'changeSet menu') ----- + changeSetMenuForModification: aMenu + + aMenu addLine. + + aMenu add: 'file into new...' action: #fileIntoNewChangeSet. + aMenu balloonTextForLastItem: + 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. + + aMenu add: 'reorder all change sets' action: #reorderChangeSets. + aMenu balloonTextForLastItem: + 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. + + + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForOpposite: (in category 'changeSet menu') ----- + changeSetMenuForOpposite: aMenu + + parent ifNotNil: + [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. + aMenu balloonTextForLastItem: + 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForPromote: (in category 'changeSet menu') ----- + changeSetMenuForPromote: aMenu + + aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. + aMenu balloonTextForLastItem: + 'Make this change set appear first in change-set lists in all change sorters.'. + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>classListMenu:shifted: (in category 'class list') ----- classListMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the class list" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted + ! - - aMenu title: 'class list'. - aMenu addStayUpItemSpecial. - (parent notNil and: [shifted not]) - ifTrue: [aMenu addList: #( "These two only apply to dual change sorters" - ('copy class chgs to other side' copyClassToOther) - ('move class chgs to other side' moveClassToOther))]. - - aMenu addList: (shifted - ifFalse: [#( - - - ('delete class from change set (d)' forgetClass) - ('remove class from system (x)' removeClass) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('more...' offerShiftedClassListMenu))] - - ifTrue: [#( - - - ('unsent methods' browseUnusedMethods) - ('unreferenced inst vars' showUnreferencedInstVars) - ('unreferenced class vars' showUnreferencedClassVars) - - - ('sample instance' makeSampleInstance) - ('inspect instances' inspectInstances) - ('inspect subinstances' inspectSubInstances) - - - ('more...' offerUnshiftedClassListMenu ))]). - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>mainClassListMenu: (in category 'class list') ----- + mainClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + parent ifNotNil: [ + aMenu addList: #( "These two only apply to dual change sorters" + ('copy class chgs to other side' copyClassToOther) + ('move class chgs to other side' moveClassToOther))]. + + aMenu addList: #( + - + ('delete class from change set (d)' forgetClass) + ('remove class from system (x)' removeClass) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('more...' offerShiftedClassListMenu)). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>messageMenu:shifted: (in category 'message list') ----- messageMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted! - shifted ifTrue: [^ self shiftedMessageMenu: aMenu]. - - aMenu title: 'message list'. - aMenu addStayUpItemSpecial. - - parent ifNotNil: - [aMenu addList: #( - ('copy method to other side' copyMethodToOther) - ('move method to other side' moveMethodToOther))]. - - aMenu addList: #( - ('delete method from changeSet (d)' forget) - - - ('remove method from system (x)' removeMessage) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu - ! Item was changed: ----- Method: ChangeSorter>>shiftedChangeSetMenu: (in category 'changeSet menu') ----- shiftedChangeSetMenu: aMenu "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" + + aMenu title: 'Change set (shifted)'. aMenu addStayUpItemSpecial. "CONFLICTS SECTION" aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. aMenu balloonTextForLastItem: 'Browse all methods that occur both in this change set and in at least one other change set.'. + self changeSetMenuForOpposite: aMenu. - parent ifNotNil: - [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. aMenu addLine. "CHECKS SECTION" aMenu add: 'check for slips' action: #lookForSlips. aMenu balloonTextForLastItem: 'Check this change set for halts and references to Transcript.'. aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. aMenu balloonTextForLastItem: 'Check this change set for messages that are not sent anywhere in the system'. aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. aMenu balloonTextForLastItem: 'Check this change set for methods that do not have comments'. aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. aMenu balloonTextForLastItem: 'Check for classes with code in this changeset which lack class comments'. Utilities authorInitialsPerSe isEmptyOrNil ifFalse: [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods any of whose authoring stamps do not start with "', Utilities authorInitials, '"']. aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. aMenu balloonTextForLastItem: 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. aMenu addLine. aMenu add: 'inspect change set' action: #inspectChangeSet. aMenu balloonTextForLastItem: 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. aMenu add: 'update' action: #update. aMenu balloonTextForLastItem: 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. aMenu balloonTextForLastItem: 'If this change set is currently associated with a Project, go to that project right now.'. + self changeSetMenuForPromote: aMenu. - aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. - aMenu balloonTextForLastItem: - 'Make this change set appear first in change-set lists in all change sorters.'. aMenu add: 'trim history' action: #trimHistory. aMenu balloonTextForLastItem: ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. + self changeSetMenuForDropInClassCats: aMenu. + - aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. - aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. - aMenu add: 'clear this change set' action: #clearChangeSet. aMenu balloonTextForLastItem: 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. aMenu add: 'expunge uniclasses' action: #expungeUniclasses. aMenu balloonTextForLastItem: 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. aMenu add: 'uninstall this change set' action: #uninstallChangeSet. aMenu balloonTextForLastItem: 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. + self changeSetMenuForModification: aMenu. - aMenu addLine. - aMenu add: 'file into new...' action: #fileIntoNewChangeSet. - aMenu balloonTextForLastItem: - 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. - aMenu add: 'reorder all change sets' action: #reorderChangeSets. - aMenu balloonTextForLastItem: - 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. - aMenu addLine. aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. aMenu balloonTextForLastItem: 'Takes you back to the primary change-set menu.'. ^ aMenu! Item was added: + ----- Method: ChangeSorter>>shiftedClassListMenu: (in category 'class list') ----- + shiftedClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + - + ('unsent methods' browseUnusedMethods) + ('unreferenced inst vars' showUnreferencedInstVars) + ('unreferenced class vars' showUnreferencedClassVars) + - + ('sample instance' makeSampleInstance) + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('more...' offerUnshiftedClassListMenu )). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>shiftedMessageMenu: (in category 'message list') ----- shiftedMessageMenu: aMenu "Arm the menu so that it holds items appropriate to the message-list while the shift key is down. Answer the menu." + - ^ aMenu addList: #( - ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) ('change category...' changeCategory) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances) - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) + ('revert & remove from changes' revertAndForget)); + yourself + ! - ('revert & remove from changes' revertAndForget) - - - ('more...' unshiftedYellowButtonActivity))! Item was added: + ----- Method: ChangeSorter>>unshiftedChangeSetMenu: (in category 'changeSet menu') ----- + unshiftedChangeSetMenu: aMenu + "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + + Smalltalk isMorphic + ifTrue: + [aMenu title: 'Change Set'] + ifFalse: + [aMenu title: 'Change Set: + ' , myChangeSet name]. + aMenu addStayUpItemSpecial. + + aMenu add: 'make changes go to me (m)' action: #newCurrent. + aMenu addLine. + aMenu add: 'new change set... (n)' action: #newSet. + aMenu add: 'find...(f)' action: #findCngSet. + aMenu add: 'select change set...' action: #chooseCngSet. + aMenu addLine. + aMenu add: 'rename change set (r)' action: #rename. + aMenu add: 'file out (o)' action: #fileOut. + aMenu add: 'mail to list' action: #mailOut. + aMenu add: 'browse methods (b)' action: #browseChangeSet. + aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. + aMenu addLine. + parent + ifNotNil: + [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. + aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. + aMenu add: 'subtract other side (-)' action: #subtractOtherSide. + aMenu addLine]. + myChangeSet hasPreamble + ifTrue: + [aMenu add: 'edit preamble (p)' action: #addPreamble. + aMenu add: 'remove preamble' action: #removePreamble] + ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. + myChangeSet hasPostscript + ifTrue: + [aMenu add: 'edit postscript...' action: #editPostscript. + aMenu add: 'remove postscript' action: #removePostscript] + ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. + aMenu addLine. + + aMenu add: 'destroy change set (x)' action: #remove. + aMenu addLine. + aMenu add: 'more...' action: #offerShiftedChangeSetMenu. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>unshiftedMessageMenu: (in category 'message list') ----- + unshiftedMessageMenu: aMenu + "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + + + + aMenu title: 'message list'. + aMenu addStayUpItemSpecial. + + parent ifNotNil: + [aMenu addList: #( + ('copy method to other side' copyMethodToOther) + ('move method to other side' moveMethodToOther))]. + + aMenu addList: #( + ('delete method from changeSet (d)' forget) + - + ('remove method from system (x)' removeMessage) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions)). + ^ aMenu + ! Item was added: + ----- Method: ClassCommentVersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version')); + yourself + ! Item was removed: - ----- Method: ClassCommentVersionsBrowser>>versionsMenu: (in category 'menu') ----- - versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" - - aMenu title: 'versions'. - aMenu addStayUpItemSpecial. - ^ aMenu addList: #( - - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')) - ! Item was added: + ----- Method: CodeHolder>>messageListMenuMore: (in category 'message list menu') ----- + messageListMenuMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: CodeHolder>>shiftedMessageListMore: (in category 'message list menu') ----- + shiftedMessageListMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' unshiftedYellowButtonActivity)); + yourself + ! Item was removed: - ----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') ----- - codePaneMenu: aMenu shifted: shifted - aMenu - add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; - add: 'run until...' target: self selector: #runUntil; - addLine. - super codePaneMenu: aMenu shifted: shifted. - ^aMenu. - ! Item was changed: ----- Method: Debugger>>contextStackMenu:shifted: (in category 'context stack menu') ----- contextStackMenu: aMenu shifted: shifted "Set up the menu appropriately for the context-stack-list, either shifted or unshifted as per the parameter provided" + ^ self menu: aMenu for: #(contextStackMenu contextStackMenuShifted:) shifted: shifted + ! - ^ shifted ifFalse:[ - aMenu addList: { - {'fullStack (f)'. #fullStack}. - {'restart (r)'. #restart}. - {'proceed (p)'. #proceed}. - {'step (t)'. #doStep}. - {'step through (T)'. #stepIntoBlock}. - {'send (e)'. #send}. - {'where (w)'. #where}. - {'peel to first like this'. #peelToFirst}. - #-. - {'return entered value'. #returnValue}. - #-. - {'toggle break on entry'. #toggleBreakOnEntry}. - {'senders of... (n)'. #browseSendersOfMessages}. - {'implementors of... (m)'. #browseMessages}. - {'inheritance (i)'. #methodHierarchy}. - #-. - {'versions (v)'. #browseVersions}. - #-. - {'references... (r)'. #browseVariableReferences}. - {'assignments... (a)'. #browseVariableAssignments}. - #-. - {'class refs (N)'. #browseClassRefs}. - {'browse full (b)'. #browseMethodFull}. - {'file out '. #fileOutMessage}. - #-. - {'mail out bug report'. #mailOutBugReport}. - {'more...'. #shiftedYellowButtonActivity}. - }. - ] ifTrue: [ - aMenu addList: { - {'browse class hierarchy'. #classHierarchy}. - {'browse class'. #browseClass}. - {'browse method (O)'. #openSingleMessageBrowser}. - {'implementors of sent messages'. #browseAllMessages}. - {'change sets with this method'. #findMethodInChangeSets}. - #-. - {'inspect instances'. #inspectInstances}. - {'inspect subinstances'. #inspectSubInstances}. - #-. - {'revert to previous version'. #revertToPreviousVersion}. - {'remove from current change set'. #removeFromCurrentChanges}. - {'revert & remove from changes'. #revertAndForget}. - #-. - {'more...'. #unshiftedYellowButtonActivity}. - } - ].! Item was added: + ----- Method: Debugger>>debuggerCodePaneMenu: (in category 'code pane menu') ----- + debuggerCodePaneMenu: aMenu + + + ^ aMenu + add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; + add: 'run until...' target: self selector: #runUntil; + addLine; + yourself + ! Item was added: + ----- Method: Debugger>>mainContextStackMenu: (in category 'context stack menu') ----- + mainContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, unshifted" + + ^ aMenu addList: #( + ('fullStack (f)' fullStack) + ('restart (r)' restart) + ('proceed (p)' proceed) + ('step (t)' doStep) + ('step through (T)' stepIntoBlock) + ('send (e)' send) + ('where (w)' where) + ('peel to first like this' peelToFirst) + - + ('return entered value' returnValue) + - + ('toggle break on entry' toggleBreakOnEntry) + ('senders of (n)' browseSendersOfMessages) + ('implementors of (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + - + ('versions (v)' browseVersions) + - + ('references (r)' browseVariableReferences) + ('assignments (a)' browseVariableAssignments) + - + ('class refs (N)' browseClassRefs) + ('browse full (b)' browseMethodFull) + ('file out ' fileOutMessage) + - + ('mail out bug report' mailOutBugReport)); + yourself + ! Item was added: + ----- Method: Debugger>>shiftedContextStackMenu: (in category 'context stack menu') ----- + shiftedContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, shifted" + + ^ aMenu addList: #( + ('browse class hierarchy' classHierarchy) + ('browse class' browseClass) + ('browse method (O)' openSingleMessageBrowser) + ('implementors of sent messages' browseAllMessages) + ('change sets with this method' findMethodInChangeSets) + - + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('revert to previous version' revertToPreviousVersion) + ('remove from current change set' removeFromCurrentChanges) + ('revert & remove from changes' revertAndForget)); + yourself + ! Item was removed: - ----- Method: DictionaryInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - inspect key - copy name - references - objects pointing to this value - senders of this key - refresh view - add key - rename key - remove - basic inspect' - lines: #(6 9) - selections: #(inspectSelection inspectKey copyName selectionReferences objectReferencesToSelection sendersOfSelectedKey refreshView addEntry renameEntry removeSelection inspectBasic) - ! Item was added: + ----- Method: DictionaryInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu addList: #( + ('inspect' inspectSelection) + ('inspect key' inspectKey) + ('copy name' copyName) + ('references' selectionReferences) + ('objects pointing to this value' objectReferencesToSelection) + ('senders of this key' sendersOfSelectedKey) + - + ('refresh view' refreshView) + ('add key' addEntry) + ('rename key' renameEntry) + - + ('remove' removeSelection) + ('basifc inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCatListSingletonWith: (in category 'toolbuilder') ----- buildSystemCatListSingletonWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategorySingleton; getIndex: #indexIsOne; setIndex: #indexIsOne:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCategoryListWith: (in category 'toolbuilder') ----- buildSystemCategoryListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategoryList; getIndex: #systemCategoryListIndex; setIndex: #systemCategoryListIndex:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was removed: - ----- Method: FileContentsBrowser>>classListMenu: (in category 'menus') ----- - classListMenu: aMenu - - ^ aMenu - labels: - 'definition - comment - browse full (b) - class refs (N) - fileIn - fileOut - rename... - remove - remove existing' - lines: #(2 4 6 8) - selections: #(editClass editComment browseMethodFull browseClassRefs fileInClass fileOutClass renameClass removeClass removeUnmodifiedCategories) - - ! Item was changed: ----- Method: FileContentsBrowser>>classListMenu:shifted: (in category 'menus') ----- + classListMenu: aMenu shifted: aBool - classListMenu: aMenu shifted: ignored - "Answer the class list menu, ignoring the state of the shift key in this case" + ^ self menu: aMenu for: #(fileClassListMenu fileClassListMenuShifted:) shifted: aBool + ! - ^ self classListMenu: aMenu! Item was added: + ----- Method: FileContentsBrowser>>fileClassListMenu: (in category 'menus') ----- + fileClassListMenu: aMenu + "Answer the class list menu, ignoring the state of the shift key in this case" + + aMenu addList: #( + ('definition' editClass) + ('comment' editComment) + - + ('browse full (b)' browseMethodFull) + ('class refs (N)' browseClassRefs) + - + ('fileIn' fileInClass) + ('fileOut' fileOutClass) + - + ('rename...' renameClass) + ('remove' removeClass) + ('remove existing' removeUnmodifiedCategories)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageCategoryMenu: (in category 'menus') ----- + fileMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('file in' fileInMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + - + ('add item...' addCategory) + ('rename...' renameCategory) + ('remove' removeMessageCategory) + - + ('remove existing' removeUnmodifiedMethods)); + yourself + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageListMenu: (in category 'menus') ----- + fileMessageListMenu: aMenu + + aMenu addList: #( + ('fileIn' fileInMessage) + ('fileOut' fileOutMessage) + - + ('senders (n)' browseSenders) + ('implementors (m)' browseImplementors) + ('method inheritance (h)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('remove' removeMessage)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>filePackageListMenu: (in category 'menus') ----- + filePackageListMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + - + ('file in' fileInPackage) + ('file into new changeset' fileIntoNewChangeSet) + ('file out' fileOutPackage) + - + ('remove' removePackage) + - + ('remove existing' removeUnmodifiedClasses)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>messageCategoryMenu: (in category 'menus') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(fileMessageCategoryMenu fileMessageCategoryMenuShifted:) + ! - - ^ aMenu - labels: - 'fileIn - fileOut - reorganize - add item... - rename... - remove - remove existing' - lines: #(2 3 6) - selections: #(fileInMessageCategories fileOutMessageCategories editMessageCategories addCategory renameCategory removeMessageCategory removeUnmodifiedMethods)! Item was changed: ----- Method: FileContentsBrowser>>messageListMenu:shifted: (in category 'menus') ----- messageListMenu: aMenu shifted: aBool + ^ self menu: aMenu for: #(fileMessageListMenu fileMessageListMenuShifted:) shifted: aBool - ^ aMenu - labels: - 'fileIn - fileOut - senders (n) - implementors (m) - method inheritance (h) - versions (v) - remove' - lines: #(2 6) - selections: #(fileInMessage fileOutMessage - browseSenders browseImplementors methodHierarchy browseVersions - removeMessage). ! Item was removed: - ----- Method: FileContentsBrowser>>packageListMenu: (in category 'menus') ----- - packageListMenu: aMenu - ^ aMenu - labels: - 'find class... (f) - fileIn - file into new changeset - fileOut - remove - remove existing' - lines: #(1 4 5) - selections: #(findClass fileInPackage fileIntoNewChangeSet fileOutPackage removePackage removeUnmodifiedClasses)! Item was added: + ----- Method: FileContentsBrowser>>packageListMenu:shifted: (in category 'menus') ----- + packageListMenu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(filePackageListMenu filePackageListMenuShifted:) shifted: shifted + ! Item was changed: ----- Method: FileList>>fileContentsMenu:shifted: (in category 'file list menu') ----- fileContentsMenu: aMenu shifted: shifted "Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided" + ^ self menu: aMenu for: #(fileContentsMenu fileContentsMenuShifted:) shifted: shifted! - - | services maybeLine extraLines | - shifted ifTrue: - [^ aMenu addList: StringHolder shiftedYellowButtonMenuItems]. - fileName ifNotNil: - [services := OrderedCollection new. - (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: - [services add: self serviceGet]. - (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: - [services add: self serviceGetHex]. - (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: - [services add: self serviceGetEncodedText]. - maybeLine := services size. - (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: - [services addAll: - (self servicesFromSelectorSpecs: - #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. - - extraLines := OrderedCollection new. - maybeLine > 0 ifTrue: [extraLines add: maybeLine]. - services size > maybeLine ifTrue: [extraLines add: services size]. - aMenu - addServices: services - for: self - extraLines: extraLines]. - - aMenu addList: { - {'find...(f)' translated. #find}. - {'find again (g)' translated. #findAgain}. - {'set search string (h)' translated. #setSearchString}. - #-. - {'do again (j)' translated. #again}. - {'undo (z)' translated. #undo}. - #-. - {'copy (c)' translated. #copySelection}. - {'cut (x)' translated. #cut}. - {'paste (v)' translated. #paste}. - {'paste...' translated. #pasteRecent}. - #-. - {'do it (d)' translated. #doIt}. - {'print it (p)' translated. #printIt}. - {'inspect it (i)' translated. #inspectIt}. - {'fileIn selection (G)' translated. #fileItIn}. - #-. - {'accept (s)' translated. #accept}. - {'cancel (l)' translated. #cancel}. - #-. - {'more...' translated. #shiftedYellowButtonActivity}}. - - - ^ aMenu - ! Item was changed: ----- Method: FileList>>fileListMenu: (in category 'file list menu') ----- fileListMenu: aMenu + ^ self menu: aMenu for: #(fileListMenu fileListMenuShifted:) - - fileName - ifNil: [^ self noFileSelectedMenu: aMenu] - ifNotNil: [^ self fileSelectedMenu: aMenu]. ! Item was added: + ----- Method: FileList>>mainFileContentsMenu: (in category 'file list menu') ----- + mainFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + ^ aMenu addTranslatedList: #( + ('find...(f)' find) + ('find again (g)' findAgain) + ('set search string (h)' setSearchString) + - + ('do again (j)' again) + ('undo (z)' undo) + - + ('copy (c)' copySelection) + ('cut (x)' cut) + ('paste (v)' paste) + ('paste...' pasteRecent) + - + ('do it (d)' doIt) + ('print it (p)' printIt) + ('inspect it (i)' inspectIt) + ('fileIn selection (G)' fileItIn) + - + ('accept (s)' accept) + ('cancel (l)' cancel) + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: FileList>>mainFileListMenu: (in category 'file list menu') ----- + mainFileListMenu: aMenu + + fileName + ifNil: [^ self noFileSelectedMenu: aMenu] + ifNotNil: [^ self fileSelectedMenu: aMenu]. + ! Item was added: + ----- Method: FileList>>mainVolumeMenu: (in category 'volume menu') ----- + mainVolumeMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('recent...' recentDirs) + - + ('add server...' askServerInfo) + ('remove server...' removeServer) + - + ('delete directory...' deleteDirectory) + -); + yourself! Item was added: + ----- Method: FileList>>servicesFileContentsMenu: (in category 'file list menu') ----- + servicesFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + + fileName ifNotNil: [| services maybeLine extraLines | + services := OrderedCollection new. + (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: + [services add: self serviceGet]. + (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: + [services add: self serviceGetHex]. + (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: + [services add: self serviceGetEncodedText]. + maybeLine := services size. + (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: + [services addAll: + (self servicesFromSelectorSpecs: + #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. + + extraLines := OrderedCollection new. + maybeLine > 0 ifTrue: [extraLines add: maybeLine]. + services size > maybeLine ifTrue: [extraLines add: services size]. + aMenu + addServices: services + for: self + extraLines: extraLines]. + ^ aMenu + ! Item was added: + ----- Method: FileList>>servicesVolumeMenu: (in category 'volume menu') ----- + servicesVolumeMenu: aMenu + + aMenu + addServices: (self itemsForDirectory: self directory) + for: self + extraLines: #(). + ^aMenu.! Item was added: + ----- Method: FileList>>shiftedFileContentsMenu: (in category 'file list menu') ----- + shiftedFileContentsMenu: aMenu + "Delegate the shifted menu to the default shifted menu" + + ^ aMenu addList: self class shiftedYellowButtonMenuItems; yourself + ! Item was changed: ----- Method: FileList>>volumeMenu: (in category 'volume menu') ----- volumeMenu: aMenu + ^ self menu: aMenu for: #(volumeMenu volumeMenuShifted:) + ! - aMenu addList: { - {'recent...' translated. #recentDirs}. - #-. - {'add server...' translated. #askServerInfo}. - {'remove server...' translated. #removeServer}. - #-. - {'delete directory...' translated. #deleteDirectory}. - #-}. - aMenu - addServices: (self itemsForDirectory: self directory) - for: self - extraLines: #(). - ^aMenu.! Item was changed: ----- Method: Inspector>>fieldListMenu: (in category 'menu commands') ----- fieldListMenu: aMenu "Arm the supplied menu with items for the field-list of the receiver" + ^ self menu: aMenu for: #(fieldListMenu fieldListMenuShifted:) - - aMenu addStayUpItemSpecial. - - aMenu addList: #( - ('inspect (i)' inspectSelection) - ('explore (I)' exploreSelection)). - - self addCollectionItemsTo: aMenu. - - aMenu addList: #( - - - ('method refs to this inst var' referencesToSelection) - ('methods storing into this inst var' defsOfSelection) - ('objects pointing to this value' objectReferencesToSelection) - ('chase pointers' chasePointers) - ('explore pointers' explorePointers) - - - ('browse full (b)' browseMethodFull) - ('browse class' browseClass) - ('browse hierarchy (h)' classHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('copy name (c)' copyName) - ('basic inspect' inspectBasic)). - - Smalltalk isMorphic ifTrue: - [aMenu addList: #( - - - ('tile for this value (t)' tearOffTile) - ('viewer for this value (v)' viewerForValue))]. - - ^ aMenu - - - " - - ('alias for this value' aliasForValue) - ('watcher for this slot' watcherForSlot)" - ! Item was added: + ----- Method: Inspector>>mainFieldListMenu: (in category 'menu commands') ----- + mainFieldListMenu: aMenu + "Arm the supplied menu with items for the field-list of the receiver" + + "gets overriden by subclasses, _whithout_ the " + aMenu addStayUpItemSpecial. + + aMenu addList: #( + ('inspect (i)' inspectSelection) + ('explore (I)' exploreSelection)). + + self addCollectionItemsTo: aMenu. + + aMenu addList: #( + - + ('method refs to this inst var' referencesToSelection) + ('methods storing into this inst var' defsOfSelection) + ('objects pointing to this value' objectReferencesToSelection) + ('chase pointers' chasePointers) + ('explore pointers' explorePointers) + - + ('browse full (b)' browseMethodFull) + ('browse class' browseClass) + ('browse hierarchy (h)' classHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('copy name (c)' copyName) + ('basic inspect' inspectBasic)). + + Smalltalk isMorphic ifTrue: + [aMenu addList: #( + - + ('tile for this value (t)' tearOffTile) + ('viewer for this value (v)' viewerForValue))]. + + ^ aMenu + + + " - + ('alias for this value' aliasForValue) + ('watcher for this slot' watcherForSlot)" + + ! Item was added: + ----- Method: MessageNames>>mainSelectorListMenu: (in category 'selector list') ----- + mainSelectorListMenu: aMenu + "Answer the menu associated with the selectorList" + + aMenu addList: #( + ('senders (n)' browseSenders 'browse senders of the chosen selector') + ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') + - + ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). + + ^ aMenu! Item was changed: ----- Method: MessageNames>>selectorListMenu: (in category 'selector list') ----- selectorListMenu: aMenu "Answer the menu associated with the selectorList" + ^ self menu: aMenu for: #(selectorListMenu selectorListMenuShifted:) + ! - - aMenu addList: #( - ('senders (n)' browseSenders 'browse senders of the chosen selector') - ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') - - - ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). - - ^ aMenu! Item was added: + ----- Method: MessageSet>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + "Answer the message-list menu" + + aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)). + ^ aMenu! Item was changed: ----- Method: MessageSet>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: MessageSet>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: MessageSet>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu "Fill aMenu with the items appropriate when the shift key is held down" + aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: ObjectExplorer>>codePaneMenu:shifted: (in category 'menus') ----- codePaneMenu: aMenu shifted: shifted "Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items" + ^ StringHolder codePaneMenu: aMenu shifted: shifted - ^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted ! Item was added: + ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category 'package list') ----- + mainPackageMenu: aMenu + "Answer a Menu of operations on class packages to be + displayed when the operate menu button is pressed." + + ^aMenu addList: #( + ('find class...' findClass) + ('recent classes...' recent) + - + ('reorganize' editSystemCategories) + ('update' updatePackages)); + yourself. + ! Item was changed: ----- Method: PackagePaneBrowser>>packageMenu: (in category 'package list') ----- packageMenu: aMenu - "Answer a Menu of operations on class packages to be - displayed when the operate menu button is pressed." + ^ self menu: aMenu for: #(packageListMenu packageListMenuShifted:)! - ^aMenu - labels: 'find class...\recent classes...\reorganize\update' withCRs - lines: #(2) - selections: #(#findClass #recent #editSystemCategories #updatePackages)! Item was changed: ----- Method: PointerFinder>>menu:shifted: (in category 'pointer-list') ----- menu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(pointerListMenu pointerListMenuShifted:) shifted: shifted! - ^ aMenu - addList: #( - ('Inspect (i)' #inspectObject 'Live long and prosper!!') - - - ('Search again' #searchAgain 'Search again\for the same object' withCRs)); - yourself.! Item was added: + ----- Method: PointerFinder>>pointerListMenu: (in category 'pointer-list') ----- + pointerListMenu: aMenu + + + ^ aMenu + addList: #( + ('Inspect (i)' #inspectObject 'Live long and prosper!!') + - + ('Search again' #searchAgain 'Search again\for the same object' withCRs)); + yourself.! Item was removed: - ----- Method: RecentMessageSet>>messageListMenu:shifted: (in category 'message functions') ----- - messageListMenu: aMenu shifted: shifted - "Answer the message-list menu" - - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList:#( - ('what to show...' offerWhatToShowMenu) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut (o)' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('remove from RecentSubmissions' removeFromRecentSubmissions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: RecentMessageSet>>messageListMenuForRecentSubmission: (in category 'message functions') ----- + messageListMenuForRecentSubmission: aMenu + + aMenu addList:#( + ('remove from RecentSubmissions' removeFromRecentSubmissions)). + ^ aMenu! Item was added: + ----- Method: SelectorBrowser>>mainSelectorMenu: (in category 'selector list') ----- + mainSelectorMenu: aMenu + + + ^ aMenu addList: #( + ('senders (n)' senders) + ('implementors (m)' implementors) + ('copy selector to clipboard' copyName)); + yourself + ! Item was changed: ----- Method: SelectorBrowser>>selectorMenu: (in category 'selector list') ----- selectorMenu: aMenu + ^ self menu: aMenu for: #(selectorMenu selectorMenuShifted:) + ! - ^ aMenu labels: - 'senders (n) - implementors (m) - copy selector to clipboard' - lines: #() - selections: #(senders implementors copyName)! Item was removed: - ----- Method: SetInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - copy name - objects pointing to this value - refresh view - remove - basic inspect' - lines: #( 5 8) - selections: #(inspectSelection copyName objectReferencesToSelection update removeSelection inspectBasic) - ! Item was added: + ----- Method: SetInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu labels: #( + ('inspect' inspectSelection) + ('copy name' copyName) + ('objects pointing to this value' objectReferencesToSelection) + ('refresh view' update) + ('remove' removeSelection) + - + ('basic inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: StringHolder class>>open (in category '*Tools') ----- open ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace' + ! - "Not to be confused with our own class var 'Workspace'"! Item was added: + ----- Method: StringHolder>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- + buildMenu: aMenu withBuilders: builders shifted: aBoolean + " We let every builder modify the menu. + The builder should indicate whether to abort by returning nil." + | menu | + menu := aMenu. + builders do: [:builder | + menu := self perform: builder method selector withEnoughArguments: { aMenu . aBoolean }. + menu ifNil: [^ aMenu]]. + ^ menu + ! Item was changed: ----- Method: StringHolder>>codePaneMenu:shifted: (in category '*Tools-code pane menu') ----- codePaneMenu: aMenu shifted: shifted + ^ self menu: aMenu for: #(codePaneMenu codePaneMenuShifted:) shifted: shifted + ! - "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" - ^self class codePaneMenu: aMenu shifted: shifted! Item was added: + ----- Method: StringHolder>>codePaneMenuHook:shifted: (in category '*Tools-pluggable menus - hooks') ----- + codePaneMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #codePaneMenu shifted: aBoolean. + ! Item was added: + ----- Method: StringHolder>>mainCodePaneMenu:shifted: (in category '*Tools-code pane menu') ----- + mainCodePaneMenu: aMenu shifted: shifted + + "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" + ^ self class codePaneMenu: aMenu shifted: shifted. + ! Item was added: + ----- Method: StringHolder>>menu:for: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection + + ^ self menu: aMenu for: aMenuSymbolOrCollection shifted: false! Item was added: + ----- Method: StringHolder>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean + + | builders | + builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class. + builders := aBoolean + ifTrue: [builders reject: [:builder | builder arguments = #(false)]] + ifFalse: [builders reject: [:builder | builder arguments = #(true)]]. + + ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean + ! Item was added: + ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- + menuBuildersFor: someMenus in: aClass + "Find all builders and sort them by + 1. Priority (default 500) + 2. selector name + 3. inheritance + " + ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | + |ma mb pa pb| + ma := a method. + mb := b method. + pa := self methodMenuPriority: ma. + pb := self methodMenuPriority: mb. + pa < pb or: [ + pa = pb and: [ + ma selector <= mb selector and: [ + mb methodClass inheritsFrom: ma methodClass]]]] + ! Item was added: + ----- Method: StringHolder>>menuPragmasFor:in: (in category '*Tools-pluggable menus') ----- + menuPragmasFor: aMenuSymbolOrCollection in: aClass + + ^ aMenuSymbolOrCollection isCollection + ifTrue: [aMenuSymbolOrCollection gather: [:aMenuSymbol | + Pragma allNamed: aMenuSymbol from: aClass to: Object]] + ifFalse: [Pragma allNamed: aMenuSymbolOrCollection from: aClass to: Object]! Item was added: + ----- Method: StringHolder>>methodMenuPriority: (in category '*Tools-pluggable menus') ----- + methodMenuPriority: aMethod + "The pirority of a menu method indicated by a pragma. + Defaults to 500" + ^ (aMethod pragmas detect: [:p | p keyword == #menuPriority: ] ifNone: [^ 500]) + argumentAt: 1 + ! Item was added: + ----- Method: VersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + listIndex > 0 ifTrue:[ + (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. + "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" + aMenu addTranslatedList: #( + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') + ('fileOut selected version' fileOutSelection 'file out the selected version') )]. + ^ aMenu! Item was added: + ----- Method: VersionsBrowser>>mainVersionsMenu: (in category 'menu') ----- + mainVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + aMenu addTranslatedList: #( + ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') + ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') + ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') + - + ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') + ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') + - + ('senders (n)' browseSenders 'browse all senders of this selector') + ('implementors (m)' browseImplementors 'browse all implementors of this selector') + - + ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). + + ^aMenu! Item was added: + ----- Method: VersionsBrowser>>titleVersionsMenu: (in category 'menu') ----- + titleVersionsMenu: aMenu + "Add a menu title atop aMenu" + + + aMenu title: 'Versions' translated. + aMenu addStayUpItemSpecial. + ^ aMenu! Item was changed: ----- Method: VersionsBrowser>>versionsMenu: (in category 'menu') ----- versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" + ^ self menu: aMenu for: #(versionsMenu versionsMenuShifted:) + ! - aMenu title: 'Versions' translated. - aMenu addStayUpItemSpecial. - - listIndex > 0 ifTrue:[ - (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. - "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" - aMenu addTranslatedList: #( - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('fileOut selected version' fileOutSelection 'file out the selected version') )]. - - aMenu addTranslatedList: #( - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('senders (n)' browseSenders 'browse all senders of this selector') - ('implementors (m)' browseImplementors 'browse all implementors of this selector') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). - - ^aMenu! From commits at source.squeak.org Wed Mar 25 12:24:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 12:24:42 2015 Subject: [squeak-dev] The Trunk: Tools-topa.558.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.558.mcz ==================== Summary ==================== Name: Tools-topa.558 Author: topa Time: 25 March 2015, 1:24:14.025 pm UUID: 22b48459-f2b7-444f-b7b1-8c8b37220819 Ancestors: Tools-topa.557, Tools-topa.556 Merge. =============== Diff against Tools-topa.557 =============== Item was changed: ----- Method: Browser>>classListMenu: (in category 'class functions') ----- classListMenu: aMenu + "Conveniently fit for backward compatibility with old browers stored in image segments" + + aMenu addList: #( + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('show hierarchy' hierarchy) + ('show definition' editClass) + ('show comment' editComment) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('rename class ...' renameClass) + ('copy class' copyClass) + ('remove class (x)' removeClass) + - + ('find method...' findMethod) + - + ('more...' offerShiftedClassListMenu)). + ^ aMenu + ! - "For backward compatibility with old browers stored in image segments" - - ^ self classListMenu: aMenu shifted: false! Item was changed: ----- Method: Browser>>classListMenu:shifted: (in category 'class functions') ----- classListMenu: aMenu shifted: shifted "Set up the menu to apply to the receiver's class list, honoring the #shifted boolean" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted. - self - menuHook: aMenu - named: #classListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue:[^ self shiftedClassListMenu: aMenu]. - aMenu addList: #( - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('show hierarchy' hierarchy) - ('show definition' editClass) - ('show comment' editComment) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('rename class ...' renameClass) - ('copy class' copyClass) - ('remove class (x)' removeClass) - - - ('find method...' findMethod) - - - ('more...' offerShiftedClassListMenu)). - ^ aMenu ! Item was added: + ----- Method: Browser>>classListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + classListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #classListMenu shifted: aBoolean. + ! Item was removed: - ----- Method: Browser>>codePaneMenu:shifted: (in category 'code pane') ----- - codePaneMenu: aMenu shifted: shifted - self - menuHook: aMenu - named: #codePaneMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^super codePaneMenu: aMenu shifted: shifted.! Item was added: + ----- Method: Browser>>mainMessageCategoryMenu: (in category 'message category functions') ----- + mainMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('browse' buildMessageCategoryBrowser) + ('print out' printOutMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + ('alphabetize' alphabetizeMessageCategories) + ('remove empty categories' removeEmptyCategories) + ('categorize all uncategorized' categorizeAllUncategorizedMethods) + ('new category...' addCategory) + - + ('rename...' renameCategory) + ('remove' removeMessageCategory)); + yourself + ! Item was added: + ----- Method: Browser>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + + ^ aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)); + yourself + ! Item was added: + ----- Method: Browser>>mainSystemCategoryMenu: (in category 'system category functions') ----- + mainSystemCategoryMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + ('back... (b)' recent) + - + ('browse all' browseAllClasses) + ('browse' buildSystemCategoryBrowser) + - + ('printOut' printOutSystemCategory) + ('fileOut' fileOutSystemCategory) + - + ('reorganize' editSystemCategories) + ('alphabetize' alphabetizeSystemCategories) + - + ('update' updateSystemCategories) + ('add item...' addSystemCategory) + ('rename...' renameSystemCategory) + ('remove' removeSystemCategory)); + yourself + ! Item was changed: ----- Method: Browser>>messageCategoryMenu: (in category 'message category functions') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(messageCategoryMenu messageCategoryMenuShifted:) - self - menuHook: aMenu - named: #messageCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - ^ aMenu labels: - 'browse - printOut - fileOut - reorganize - alphabetize - remove empty categories - categorize all uncategorized - new category... - rename... - remove' - lines: #(3 8) - selections: - #(buildMessageCategoryBrowser printOutMessageCategories fileOutMessageCategories - editMessageCategories alphabetizeMessageCategories removeEmptyCategories - categorizeAllUncategorizedMethods addCategory renameCategory removeMessageCategory) ! Item was added: + ----- Method: Browser>>messageCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: Browser>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: Browser>>shiftedClassListMenu: (in category 'class functions') ----- shiftedClassListMenu: aMenu + "Set up the menu to apply to the receiver's class list when the shift key is down" ^ aMenu addList: #( - ('unsent methods' browseUnusedMethods 'browse all methods defined by this class that have no senders') ('unreferenced inst vars' showUnreferencedInstVars 'show a list of all instance variables that are not referenced in methods') ('unreferenced class vars' showUnreferencedClassVars 'show a list of all class variables that are not referenced in methods') ('subclass template' makeNewSubclass 'put a template into the code pane for defining of a subclass of this class') - ('sample instance' makeSampleInstance 'give me a sample instance of this class, if possible') ('inspect instances' inspectInstances 'open an inspector on all the extant instances of this class') ('inspect subinstances' inspectSubInstances 'open an inspector on all the extant instances of this class and of all of its subclasses') - ('add all meths to current chgs' addAllMethodsToCurrentChangeSet 'place all the methods defined by this class into the current change set') ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them') - ('more...' offerUnshiftedClassListMenu 'return to the standard class-list menu'))! Item was changed: ----- Method: Browser>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu + "Fill aMenu with the items appropriate when the shift key is held down" aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: Browser>>systemCategoryMenu: (in category 'system category functions') ----- systemCategoryMenu: aMenu + ^ self menu: aMenu for: #(systemCategoryMenu systemCategoryMenuShifted:) + ! - self - menuHook: aMenu - named: #systemCategoryMenu - shifted: false. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - - ^ aMenu labels: - 'find class... (f) - back... (b) - browse all - browse - printOut - fileOut - reorganize - alphabetize - update - add item... - rename... - remove' - lines: #(2 4 6 8) - selections: - #(findClass recent browseAllClasses buildSystemCategoryBrowser - printOutSystemCategory fileOutSystemCategory - editSystemCategories alphabetizeSystemCategories updateSystemCategories - addSystemCategory renameSystemCategory removeSystemCategory )! Item was added: + ----- Method: Browser>>systemCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + systemCategoryMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #systemCategoryMenu shifted: aBoolean. + ! Item was changed: ----- Method: ChangeList>>changeListMenu: (in category 'menu actions') ----- changeListMenu: aMenu + ^ self menu: aMenu for: #(changeListMenu changeListMenuShifted) - "Fill aMenu up so that it comprises the primary changelist-browser menu" - - aMenu addTitle: 'change list'. - aMenu addStayUpItemSpecial. - - aMenu addList: #( - - ('fileIn selections' fileInSelections 'import the selected items into the image') - ('fileOut selections... ' fileOutSelections 'create a new file containing the selected items') - - - ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) - ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') - - - ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') - ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') - ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') - - - ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) - ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') - ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') - ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') - ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') - - - - ('select all (a)' selectAll 'select all the items in the list') - ('deselect all' deselectAll 'deselect all the items in the list') - ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') - - - ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') - ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') - ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') - ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') - - - ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') - ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') - ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') - ('remove selected items' removeSelections 'remove the selected items from the change-list') - ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). - - ^ aMenu - ! Item was added: + ----- Method: ChangeList>>mainChangeListMenu: (in category 'menu actions') ----- + mainChangeListMenu: aMenu + "Fill aMenu up so that it comprises the primary changelist-browser menu" + + + aMenu addTitle: 'change list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + + ('fileIn selections' fileInSelections 'import the selected items into the image') + ('fileOut selections...' fileOutSelections 'create a new file containing the selected items') + - + ('compare to current' compareToCurrentVersion 'open a separate window which shows the text differences between the on-file version and the in-image version.' ) + ('toggle diffing (D)' toggleDiffing 'start or stop showing diffs in the code pane.') + - + ('select conflicts with any changeset' selectAllConflicts 'select methods in the file which also occur in any change-set in the system') + ('select conflicts with current changeset' selectConflicts 'select methods in the file which also occur in the current change-set') + ('select conflicts with...' selectConflictsWith 'allows you to designate a file or change-set against which to check for code conflicts.') + - + ('select unchanged definitions' selectUnchangedDefinitions 'select class definitions, class comments and methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select unchanged methods' selectUnchangedMethods 'select methods in the file whose in-image versions are the same as their in-file counterparts' ) + ('select new methods' selectNewMethods 'select methods in the file that do not current occur in the image') + ('select methods for this class' selectMethodsForThisClass 'select all methods in the file that belong to the currently-selected class') + ('select methods for extant classes' selectMethodsForExtantClasses 'select all methods in the file that belong to a class that exists in the image') + ('select changes with contents matching' selectContentsMatching 'select all changes in the file whose text includes a pattern') + + - + ('select all (a)' selectAll 'select all the items in the list') + ('deselect all' deselectAll 'deselect all the items in the list') + ('invert selections' invertSelections 'select every item that is not currently selected, and deselect every item that *is* currently selected') + - + ('browse all versions of single selection' browseVersions 'open a version browser showing the versions of the currently selected method') + ('browse all versions of selections' browseAllVersionsOfSelections 'open a version browser showing all the versions of all the selected methods') + ('browse current versions of selections' browseCurrentVersionsOfSelections 'open a message-list browser showing the current (in-image) counterparts of the selected methods') + ('destroy current methods of selections' destroyCurrentCodeOfSelections 'remove (*destroy*) the in-image counterparts of all selected methods') + - + ('remove doIts' removeDoIts 'remove all items that are doIts rather than methods') + ('remove older versions' removeOlderMethodVersions 'remove all but the most recent versions of methods in the list') + ('remove up-to-date versions' removeExistingMethodVersions 'remove all items whose code is the same as the counterpart in-image code') + ('remove selected items' removeSelections 'remove the selected items from the change-list') + ('remove unselected items' removeNonSelections 'remove all the items not currently selected from the change-list')). + + ^ aMenu + + ! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForDropInClassCats: (in category 'menu') ----- + changeSetMenuForDropInClassCats: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForModification: (in category 'menu') ----- + changeSetMenuForModification: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForOpposite: (in category 'menu') ----- + changeSetMenuForOpposite: aMenu + + ^ aMenu! Item was added: + ----- Method: ChangeSetBrowser>>changeSetMenuForPromote: (in category 'menu') ----- + changeSetMenuForPromote: aMenu + + ^ aMenu! Item was removed: - ----- Method: ChangeSetBrowser>>shiftedChangeSetMenu: (in category 'menu') ----- - shiftedChangeSetMenu: aMenu - "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" - - aMenu title: 'Change set (shifted)'. - aMenu addStayUpItemSpecial. - aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in at least one other change set.'. - - aMenu addLine. - aMenu add: 'check for slips' action: #lookForSlips. - aMenu balloonTextForLastItem: - 'Check this change set for halts and references to Transcript.'. - - aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. - aMenu balloonTextForLastItem: - 'Check this change set for messages that are not sent anywhere in the system'. - - aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. - aMenu balloonTextForLastItem: - 'Check this change set for methods that do not have comments'. - - aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. - aMenu balloonTextForLastItem: - 'Check for classes with code in this changeset which lack class comments'. - - - Utilities authorInitialsPerSe isEmptyOrNil ifFalse: - [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. - - aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. - aMenu balloonTextForLastItem: - 'Check this change set for methods any of whose previous authoring stamps do not start with "', Utilities authorInitials, '"']. - - aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. - aMenu balloonTextForLastItem: - 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. - aMenu addLine. - - aMenu add: 'inspect change set' action: #inspectChangeSet. - aMenu balloonTextForLastItem: - 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. - - aMenu add: 'update' action: #update. - aMenu balloonTextForLastItem: - 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. - - aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. - aMenu balloonTextForLastItem: - 'If this change set is currently associated with a Project, go to that project right now.'. - - aMenu add: 'trim history' action: #trimHistory. - aMenu balloonTextForLastItem: - ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. - - aMenu add: 'clear this change set' action: #clearChangeSet. - aMenu balloonTextForLastItem: - 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. - aMenu add: 'expunge uniclasses' action: #expungeUniclasses. - aMenu balloonTextForLastItem: - 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. - - aMenu add: 'uninstall this change set' action: #uninstallChangeSet. - aMenu balloonTextForLastItem: - 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. - - aMenu addLine. - - aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. - aMenu balloonTextForLastItem: - 'Takes you back to the primary change-set menu.'. - - ^ aMenu! Item was changed: ----- Method: ChangeSorter>>changeSetMenu:shifted: (in category 'changeSet menu') ----- changeSetMenu: aMenu shifted: isShifted - "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + ^ self menu: aMenu for: #( changeSetMenu changeSetMenuShifted: ) shifted: isShifted + ! - isShifted ifTrue: [^ self shiftedChangeSetMenu: aMenu]. - Smalltalk isMorphic - ifTrue: - [aMenu title: 'Change Set'] - ifFalse: - [aMenu title: 'Change Set: - ' , myChangeSet name]. - aMenu addStayUpItemSpecial. - - aMenu add: 'make changes go to me (m)' action: #newCurrent. - aMenu addLine. - aMenu add: 'new change set... (n)' action: #newSet. - aMenu add: 'find...(f)' action: #findCngSet. - aMenu add: 'select change set...' action: #chooseCngSet. - aMenu addLine. - aMenu add: 'rename change set (r)' action: #rename. - aMenu add: 'file out (o)' action: #fileOut. - aMenu add: 'mail to list' action: #mailOut. - aMenu add: 'browse methods (b)' action: #browseChangeSet. - aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. - aMenu addLine. - parent - ifNotNil: - [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. - aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. - aMenu add: 'subtract other side (-)' action: #subtractOtherSide. - aMenu addLine]. - myChangeSet hasPreamble - ifTrue: - [aMenu add: 'edit preamble (p)' action: #addPreamble. - aMenu add: 'remove preamble' action: #removePreamble] - ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. - myChangeSet hasPostscript - ifTrue: - [aMenu add: 'edit postscript...' action: #editPostscript. - aMenu add: 'remove postscript' action: #removePostscript] - ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. - aMenu addLine. - - aMenu add: 'destroy change set (x)' action: #remove. - aMenu addLine. - aMenu add: 'more...' action: #offerShiftedChangeSetMenu. - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForDropInClassCats: (in category 'changeSet menu') ----- + changeSetMenuForDropInClassCats: aMenu + + aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. + aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. + + ^ aMenu + ! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForModification: (in category 'changeSet menu') ----- + changeSetMenuForModification: aMenu + + aMenu addLine. + + aMenu add: 'file into new...' action: #fileIntoNewChangeSet. + aMenu balloonTextForLastItem: + 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. + + aMenu add: 'reorder all change sets' action: #reorderChangeSets. + aMenu balloonTextForLastItem: + 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. + + + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForOpposite: (in category 'changeSet menu') ----- + changeSetMenuForOpposite: aMenu + + parent ifNotNil: + [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. + aMenu balloonTextForLastItem: + 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>changeSetMenuForPromote: (in category 'changeSet menu') ----- + changeSetMenuForPromote: aMenu + + aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. + aMenu balloonTextForLastItem: + 'Make this change set appear first in change-set lists in all change sorters.'. + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>classListMenu:shifted: (in category 'class list') ----- classListMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the class list" + ^ self menu: aMenu for: #(classListMenu classListMenuShifted:) shifted: shifted + ! - - aMenu title: 'class list'. - aMenu addStayUpItemSpecial. - (parent notNil and: [shifted not]) - ifTrue: [aMenu addList: #( "These two only apply to dual change sorters" - ('copy class chgs to other side' copyClassToOther) - ('move class chgs to other side' moveClassToOther))]. - - aMenu addList: (shifted - ifFalse: [#( - - - ('delete class from change set (d)' forgetClass) - ('remove class from system (x)' removeClass) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('printOut' printOutClass) - ('fileOut' fileOutClass) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('more...' offerShiftedClassListMenu))] - - ifTrue: [#( - - - ('unsent methods' browseUnusedMethods) - ('unreferenced inst vars' showUnreferencedInstVars) - ('unreferenced class vars' showUnreferencedClassVars) - - - ('sample instance' makeSampleInstance) - ('inspect instances' inspectInstances) - ('inspect subinstances' inspectSubInstances) - - - ('more...' offerUnshiftedClassListMenu ))]). - ^ aMenu! Item was added: + ----- Method: ChangeSorter>>mainClassListMenu: (in category 'class list') ----- + mainClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + parent ifNotNil: [ + aMenu addList: #( "These two only apply to dual change sorters" + ('copy class chgs to other side' copyClassToOther) + ('move class chgs to other side' moveClassToOther))]. + + aMenu addList: #( + - + ('delete class from change set (d)' forgetClass) + ('remove class from system (x)' removeClass) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('printOut' printOutClass) + ('fileOut' fileOutClass) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('more...' offerShiftedClassListMenu)). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>messageMenu:shifted: (in category 'message list') ----- messageMenu: aMenu shifted: shifted "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted! - shifted ifTrue: [^ self shiftedMessageMenu: aMenu]. - - aMenu title: 'message list'. - aMenu addStayUpItemSpecial. - - parent ifNotNil: - [aMenu addList: #( - ('copy method to other side' copyMethodToOther) - ('move method to other side' moveMethodToOther))]. - - aMenu addList: #( - ('delete method from changeSet (d)' forget) - - - ('remove method from system (x)' removeMessage) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' spawnHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu - ! Item was changed: ----- Method: ChangeSorter>>shiftedChangeSetMenu: (in category 'changeSet menu') ----- shiftedChangeSetMenu: aMenu "Set up aMenu to hold items relating to the change-set-list pane when the shift key is down" + + aMenu title: 'Change set (shifted)'. aMenu addStayUpItemSpecial. "CONFLICTS SECTION" aMenu add: 'conflicts with other change sets' action: #browseMethodConflicts. aMenu balloonTextForLastItem: 'Browse all methods that occur both in this change set and in at least one other change set.'. + self changeSetMenuForOpposite: aMenu. - parent ifNotNil: - [aMenu add: 'conflicts with change set opposite' action: #methodConflictsWithOtherSide. - aMenu balloonTextForLastItem: - 'Browse all methods that occur both in this change set and in the one on the opposite side of the change sorter.'.]. aMenu addLine. "CHECKS SECTION" aMenu add: 'check for slips' action: #lookForSlips. aMenu balloonTextForLastItem: 'Check this change set for halts and references to Transcript.'. aMenu add: 'check for unsent messages' action: #checkForUnsentMessages. aMenu balloonTextForLastItem: 'Check this change set for messages that are not sent anywhere in the system'. aMenu add: 'check for uncommented methods' action: #checkForUncommentedMethods. aMenu balloonTextForLastItem: 'Check this change set for methods that do not have comments'. aMenu add: 'check for uncommented classes' action: #checkForUncommentedClasses. aMenu balloonTextForLastItem: 'Check for classes with code in this changeset which lack class comments'. Utilities authorInitialsPerSe isEmptyOrNil ifFalse: [aMenu add: 'check for other authors' action: #checkForAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods whose current authoring stamp does not start with "', Utilities authorInitials, '"'. aMenu add: 'check for any other authors' action: #checkForAnyAlienAuthorship. aMenu balloonTextForLastItem: 'Check this change set for methods any of whose authoring stamps do not start with "', Utilities authorInitials, '"']. aMenu add: 'check for uncategorized methods' action: #checkForUnclassifiedMethods. aMenu balloonTextForLastItem: 'Check to see if any methods in the selected change set have not yet been assigned to a category. If any are found, open a browser on them.'. aMenu addLine. aMenu add: 'inspect change set' action: #inspectChangeSet. aMenu balloonTextForLastItem: 'Open an inspector on this change set. (There are some details in a change set which you don''t see in a change sorter.)'. aMenu add: 'update' action: #update. aMenu balloonTextForLastItem: 'Update the display for this change set. (This is done automatically when you activate this window, so is seldom needed.)'. aMenu add: 'go to change set''s project' action: #goToChangeSetsProject. aMenu balloonTextForLastItem: 'If this change set is currently associated with a Project, go to that project right now.'. + self changeSetMenuForPromote: aMenu. - aMenu add: 'promote to top of list' action: #promoteToTopChangeSet. - aMenu balloonTextForLastItem: - 'Make this change set appear first in change-set lists in all change sorters.'. aMenu add: 'trim history' action: #trimHistory. aMenu balloonTextForLastItem: ' Drops any methods added and then removed, as well as renaming and reorganization of newly-added classes. NOTE: can cause confusion if later filed in over an earlier version of these changes'. + self changeSetMenuForDropInClassCats: aMenu. + - aMenu add: 'remove contained in class categories...' action: #removeContainedInClassCategories. - aMenu balloonTextForLastItem: ' Drops any changes in given class categories'. - aMenu add: 'clear this change set' action: #clearChangeSet. aMenu balloonTextForLastItem: 'Reset this change set to a pristine state where it holds no information. CAUTION: this is destructive and irreversible!!'. aMenu add: 'expunge uniclasses' action: #expungeUniclasses. aMenu balloonTextForLastItem: 'Remove from the change set all memory of uniclasses, e.g. classes added on behalf of etoys, fabrik, etc., whose classnames end with a digit.'. aMenu add: 'uninstall this change set' action: #uninstallChangeSet. aMenu balloonTextForLastItem: 'Attempt to uninstall this change set. CAUTION: this may not work completely and is irreversible!!'. + self changeSetMenuForModification: aMenu. - aMenu addLine. - aMenu add: 'file into new...' action: #fileIntoNewChangeSet. - aMenu balloonTextForLastItem: - 'Load a fileout from disk and place its changes into a new change set (seldom needed -- much better to do this from a file-list browser these days.)'. - aMenu add: 'reorder all change sets' action: #reorderChangeSets. - aMenu balloonTextForLastItem: - 'Applies a standard reordering of all change-sets in the system -- at the bottom will come the sets that come with the release; next will come all the numbered updates; finally, at the top, will come all other change sets'. - aMenu addLine. aMenu add: 'more...' action: #offerUnshiftedChangeSetMenu. aMenu balloonTextForLastItem: 'Takes you back to the primary change-set menu.'. ^ aMenu! Item was added: + ----- Method: ChangeSorter>>shiftedClassListMenu: (in category 'class list') ----- + shiftedClassListMenu: aMenu + "Fill aMenu with items appropriate for the class list" + + + aMenu title: 'class list'. + aMenu addStayUpItemSpecial. + + aMenu addList: #( + - + ('unsent methods' browseUnusedMethods) + ('unreferenced inst vars' showUnreferencedInstVars) + ('unreferenced class vars' showUnreferencedClassVars) + - + ('sample instance' makeSampleInstance) + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('more...' offerUnshiftedClassListMenu )). + + ^ aMenu! Item was changed: ----- Method: ChangeSorter>>shiftedMessageMenu: (in category 'message list') ----- shiftedMessageMenu: aMenu "Arm the menu so that it holds items appropriate to the message-list while the shift key is down. Answer the menu." + - ^ aMenu addList: #( - ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) ('change category...' changeCategory) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances) - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) + ('revert & remove from changes' revertAndForget)); + yourself + ! - ('revert & remove from changes' revertAndForget) - - - ('more...' unshiftedYellowButtonActivity))! Item was added: + ----- Method: ChangeSorter>>unshiftedChangeSetMenu: (in category 'changeSet menu') ----- + unshiftedChangeSetMenu: aMenu + "Set up aMenu to hold commands for the change-set-list pane. This could be for a single or double changeSorter" + + Smalltalk isMorphic + ifTrue: + [aMenu title: 'Change Set'] + ifFalse: + [aMenu title: 'Change Set: + ' , myChangeSet name]. + aMenu addStayUpItemSpecial. + + aMenu add: 'make changes go to me (m)' action: #newCurrent. + aMenu addLine. + aMenu add: 'new change set... (n)' action: #newSet. + aMenu add: 'find...(f)' action: #findCngSet. + aMenu add: 'select change set...' action: #chooseCngSet. + aMenu addLine. + aMenu add: 'rename change set (r)' action: #rename. + aMenu add: 'file out (o)' action: #fileOut. + aMenu add: 'mail to list' action: #mailOut. + aMenu add: 'browse methods (b)' action: #browseChangeSet. + aMenu add: 'browse change set (B)' action: #openChangeSetBrowser. + aMenu addLine. + parent + ifNotNil: + [aMenu add: 'copy all to other side (c)' action: #copyAllToOther. + aMenu add: 'submerge into other side' action: #submergeIntoOtherSide. + aMenu add: 'subtract other side (-)' action: #subtractOtherSide. + aMenu addLine]. + myChangeSet hasPreamble + ifTrue: + [aMenu add: 'edit preamble (p)' action: #addPreamble. + aMenu add: 'remove preamble' action: #removePreamble] + ifFalse: [aMenu add: 'add preamble (p)' action: #addPreamble]. + myChangeSet hasPostscript + ifTrue: + [aMenu add: 'edit postscript...' action: #editPostscript. + aMenu add: 'remove postscript' action: #removePostscript] + ifFalse: [aMenu add: 'add postscript...' action: #editPostscript]. + aMenu addLine. + + aMenu add: 'destroy change set (x)' action: #remove. + aMenu addLine. + aMenu add: 'more...' action: #offerShiftedChangeSetMenu. + ^ aMenu! Item was added: + ----- Method: ChangeSorter>>unshiftedMessageMenu: (in category 'message list') ----- + unshiftedMessageMenu: aMenu + "Fill aMenu with items appropriate for the message list; could be for a single or double changeSorter" + + + + aMenu title: 'message list'. + aMenu addStayUpItemSpecial. + + parent ifNotNil: + [aMenu addList: #( + ('copy method to other side' copyMethodToOther) + ('move method to other side' moveMethodToOther))]. + + aMenu addList: #( + ('delete method from changeSet (d)' forget) + - + ('remove method from system (x)' removeMessage) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' spawnHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions)). + ^ aMenu + ! Item was added: + ----- Method: ClassCommentVersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version')); + yourself + ! Item was removed: - ----- Method: ClassCommentVersionsBrowser>>versionsMenu: (in category 'menu') ----- - versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" - - aMenu title: 'versions'. - aMenu addStayUpItemSpecial. - ^ aMenu addList: #( - - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')) - ! Item was added: + ----- Method: CodeHolder>>messageListMenuMore: (in category 'message list menu') ----- + messageListMenuMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: CodeHolder>>shiftedMessageListMore: (in category 'message list menu') ----- + shiftedMessageListMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in message lists and context stacks " + + + + ^ aMenu addList: #( + - + ('more...' unshiftedYellowButtonActivity)); + yourself + ! Item was removed: - ----- Method: Debugger>>codePaneMenu:shifted: (in category 'code pane menu') ----- - codePaneMenu: aMenu shifted: shifted - aMenu - add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; - add: 'run until...' target: self selector: #runUntil; - addLine. - super codePaneMenu: aMenu shifted: shifted. - ^aMenu. - ! Item was changed: ----- Method: Debugger>>contextStackMenu:shifted: (in category 'context stack menu') ----- contextStackMenu: aMenu shifted: shifted "Set up the menu appropriately for the context-stack-list, either shifted or unshifted as per the parameter provided" + ^ self menu: aMenu for: #(contextStackMenu contextStackMenuShifted:) shifted: shifted + ! - ^ shifted ifFalse:[ - aMenu addList: { - {'fullStack (f)'. #fullStack}. - {'restart (r)'. #restart}. - {'proceed (p)'. #proceed}. - {'step (t)'. #doStep}. - {'step through (T)'. #stepIntoBlock}. - {'send (e)'. #send}. - {'where (w)'. #where}. - {'peel to first like this'. #peelToFirst}. - #-. - {'return entered value'. #returnValue}. - #-. - {'toggle break on entry'. #toggleBreakOnEntry}. - {'senders of... (n)'. #browseSendersOfMessages}. - {'implementors of... (m)'. #browseMessages}. - {'inheritance (i)'. #methodHierarchy}. - #-. - {'versions (v)'. #browseVersions}. - #-. - {'references... (r)'. #browseVariableReferences}. - {'assignments... (a)'. #browseVariableAssignments}. - #-. - {'class refs (N)'. #browseClassRefs}. - {'browse full (b)'. #browseMethodFull}. - {'file out '. #fileOutMessage}. - #-. - {'mail out bug report'. #mailOutBugReport}. - {'more...'. #shiftedYellowButtonActivity}. - }. - ] ifTrue: [ - aMenu addList: { - {'browse class hierarchy'. #classHierarchy}. - {'browse class'. #browseClass}. - {'browse method (O)'. #openSingleMessageBrowser}. - {'implementors of sent messages'. #browseAllMessages}. - {'change sets with this method'. #findMethodInChangeSets}. - #-. - {'inspect instances'. #inspectInstances}. - {'inspect subinstances'. #inspectSubInstances}. - #-. - {'revert to previous version'. #revertToPreviousVersion}. - {'remove from current change set'. #removeFromCurrentChanges}. - {'revert & remove from changes'. #revertAndForget}. - #-. - {'more...'. #unshiftedYellowButtonActivity}. - } - ].! Item was added: + ----- Method: Debugger>>debuggerCodePaneMenu: (in category 'code pane menu') ----- + debuggerCodePaneMenu: aMenu + + + ^ aMenu + add: 'run to here' target: self selector: #runToSelection: argument: self codePaneSelectionInterval; + add: 'run until...' target: self selector: #runUntil; + addLine; + yourself + ! Item was added: + ----- Method: Debugger>>mainContextStackMenu: (in category 'context stack menu') ----- + mainContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, unshifted" + + ^ aMenu addList: #( + ('fullStack (f)' fullStack) + ('restart (r)' restart) + ('proceed (p)' proceed) + ('step (t)' doStep) + ('step through (T)' stepIntoBlock) + ('send (e)' send) + ('where (w)' where) + ('peel to first like this' peelToFirst) + - + ('return entered value' returnValue) + - + ('toggle break on entry' toggleBreakOnEntry) + ('senders of (n)' browseSendersOfMessages) + ('implementors of (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + - + ('versions (v)' browseVersions) + - + ('references (r)' browseVariableReferences) + ('assignments (a)' browseVariableAssignments) + - + ('class refs (N)' browseClassRefs) + ('browse full (b)' browseMethodFull) + ('file out ' fileOutMessage) + - + ('mail out bug report' mailOutBugReport)); + yourself + ! Item was added: + ----- Method: Debugger>>shiftedContextStackMenu: (in category 'context stack menu') ----- + shiftedContextStackMenu: aMenu + "Set up the menu appropriately for the context-stack-list, shifted" + + ^ aMenu addList: #( + ('browse class hierarchy' classHierarchy) + ('browse class' browseClass) + ('browse method (O)' openSingleMessageBrowser) + ('implementors of sent messages' browseAllMessages) + ('change sets with this method' findMethodInChangeSets) + - + ('inspect instances' inspectInstances) + ('inspect subinstances' inspectSubInstances) + - + ('revert to previous version' revertToPreviousVersion) + ('remove from current change set' removeFromCurrentChanges) + ('revert & remove from changes' revertAndForget)); + yourself + ! Item was removed: - ----- Method: DictionaryInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - inspect key - copy name - references - objects pointing to this value - senders of this key - refresh view - add key - rename key - remove - basic inspect' - lines: #(6 9) - selections: #(inspectSelection inspectKey copyName selectionReferences objectReferencesToSelection sendersOfSelectedKey refreshView addEntry renameEntry removeSelection inspectBasic) - ! Item was added: + ----- Method: DictionaryInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu addList: #( + ('inspect' inspectSelection) + ('inspect key' inspectKey) + ('copy name' copyName) + ('references' selectionReferences) + ('objects pointing to this value' objectReferencesToSelection) + ('senders of this key' sendersOfSelectedKey) + - + ('refresh view' refreshView) + ('add key' addEntry) + ('rename key' renameEntry) + - + ('remove' removeSelection) + ('basifc inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCatListSingletonWith: (in category 'toolbuilder') ----- buildSystemCatListSingletonWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategorySingleton; getIndex: #indexIsOne; setIndex: #indexIsOne:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was changed: ----- Method: FileContentsBrowser>>buildSystemCategoryListWith: (in category 'toolbuilder') ----- buildSystemCategoryListWith: builder | listSpec | listSpec := builder pluggableListSpec new. listSpec model: self; list: #systemCategoryList; getIndex: #systemCategoryListIndex; setIndex: #systemCategoryListIndex:; + menu: #packageListMenu:shifted:; - menu: #packageListMenu:; keyPress: #packageListKey:from:. ^listSpec! Item was removed: - ----- Method: FileContentsBrowser>>classListMenu: (in category 'menus') ----- - classListMenu: aMenu - - ^ aMenu - labels: - 'definition - comment - browse full (b) - class refs (N) - fileIn - fileOut - rename... - remove - remove existing' - lines: #(2 4 6 8) - selections: #(editClass editComment browseMethodFull browseClassRefs fileInClass fileOutClass renameClass removeClass removeUnmodifiedCategories) - - ! Item was changed: ----- Method: FileContentsBrowser>>classListMenu:shifted: (in category 'menus') ----- + classListMenu: aMenu shifted: aBool - classListMenu: aMenu shifted: ignored - "Answer the class list menu, ignoring the state of the shift key in this case" + ^ self menu: aMenu for: #(fileClassListMenu fileClassListMenuShifted:) shifted: aBool + ! - ^ self classListMenu: aMenu! Item was added: + ----- Method: FileContentsBrowser>>fileClassListMenu: (in category 'menus') ----- + fileClassListMenu: aMenu + "Answer the class list menu, ignoring the state of the shift key in this case" + + aMenu addList: #( + ('definition' editClass) + ('comment' editComment) + - + ('browse full (b)' browseMethodFull) + ('class refs (N)' browseClassRefs) + - + ('fileIn' fileInClass) + ('fileOut' fileOutClass) + - + ('rename...' renameClass) + ('remove' removeClass) + ('remove existing' removeUnmodifiedCategories)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageCategoryMenu: (in category 'menus') ----- + fileMessageCategoryMenu: aMenu + + ^ aMenu addList: #( + ('file in' fileInMessageCategories) + ('file out' fileOutMessageCategories) + - + ('reorganize' editMessageCategories) + - + ('add item...' addCategory) + ('rename...' renameCategory) + ('remove' removeMessageCategory) + - + ('remove existing' removeUnmodifiedMethods)); + yourself + ! Item was added: + ----- Method: FileContentsBrowser>>fileMessageListMenu: (in category 'menus') ----- + fileMessageListMenu: aMenu + + aMenu addList: #( + ('fileIn' fileInMessage) + ('fileOut' fileOutMessage) + - + ('senders (n)' browseSenders) + ('implementors (m)' browseImplementors) + ('method inheritance (h)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('remove' removeMessage)). + ^ aMenu + ! Item was added: + ----- Method: FileContentsBrowser>>filePackageListMenu: (in category 'menus') ----- + filePackageListMenu: aMenu + + ^ aMenu addList: #( + ('find class... (f)' findClass) + - + ('file in' fileInPackage) + ('file into new changeset' fileIntoNewChangeSet) + ('file out' fileOutPackage) + - + ('remove' removePackage) + - + ('remove existing' removeUnmodifiedClasses)); + yourself + ! Item was changed: ----- Method: FileContentsBrowser>>messageCategoryMenu: (in category 'menus') ----- messageCategoryMenu: aMenu + ^ self menu: aMenu for: #(fileMessageCategoryMenu fileMessageCategoryMenuShifted:) + ! - - ^ aMenu - labels: - 'fileIn - fileOut - reorganize - add item... - rename... - remove - remove existing' - lines: #(2 3 6) - selections: #(fileInMessageCategories fileOutMessageCategories editMessageCategories addCategory renameCategory removeMessageCategory removeUnmodifiedMethods)! Item was changed: ----- Method: FileContentsBrowser>>messageListMenu:shifted: (in category 'menus') ----- messageListMenu: aMenu shifted: aBool + ^ self menu: aMenu for: #(fileMessageListMenu fileMessageListMenuShifted:) shifted: aBool - ^ aMenu - labels: - 'fileIn - fileOut - senders (n) - implementors (m) - method inheritance (h) - versions (v) - remove' - lines: #(2 6) - selections: #(fileInMessage fileOutMessage - browseSenders browseImplementors methodHierarchy browseVersions - removeMessage). ! Item was removed: - ----- Method: FileContentsBrowser>>packageListMenu: (in category 'menus') ----- - packageListMenu: aMenu - ^ aMenu - labels: - 'find class... (f) - fileIn - file into new changeset - fileOut - remove - remove existing' - lines: #(1 4 5) - selections: #(findClass fileInPackage fileIntoNewChangeSet fileOutPackage removePackage removeUnmodifiedClasses)! Item was added: + ----- Method: FileContentsBrowser>>packageListMenu:shifted: (in category 'menus') ----- + packageListMenu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(filePackageListMenu filePackageListMenuShifted:) shifted: shifted + ! Item was changed: ----- Method: FileList>>fileContentsMenu:shifted: (in category 'file list menu') ----- fileContentsMenu: aMenu shifted: shifted "Construct aMenu to have items appropriate for the file browser's code pane, given the shift state provided" + ^ self menu: aMenu for: #(fileContentsMenu fileContentsMenuShifted:) shifted: shifted! - - | services maybeLine extraLines | - shifted ifTrue: - [^ aMenu addList: StringHolder shiftedYellowButtonMenuItems]. - fileName ifNotNil: - [services := OrderedCollection new. - (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: - [services add: self serviceGet]. - (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: - [services add: self serviceGetHex]. - (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: - [services add: self serviceGetEncodedText]. - maybeLine := services size. - (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: - [services addAll: - (self servicesFromSelectorSpecs: - #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. - - extraLines := OrderedCollection new. - maybeLine > 0 ifTrue: [extraLines add: maybeLine]. - services size > maybeLine ifTrue: [extraLines add: services size]. - aMenu - addServices: services - for: self - extraLines: extraLines]. - - aMenu addList: { - {'find...(f)' translated. #find}. - {'find again (g)' translated. #findAgain}. - {'set search string (h)' translated. #setSearchString}. - #-. - {'do again (j)' translated. #again}. - {'undo (z)' translated. #undo}. - #-. - {'copy (c)' translated. #copySelection}. - {'cut (x)' translated. #cut}. - {'paste (v)' translated. #paste}. - {'paste...' translated. #pasteRecent}. - #-. - {'do it (d)' translated. #doIt}. - {'print it (p)' translated. #printIt}. - {'inspect it (i)' translated. #inspectIt}. - {'fileIn selection (G)' translated. #fileItIn}. - #-. - {'accept (s)' translated. #accept}. - {'cancel (l)' translated. #cancel}. - #-. - {'more...' translated. #shiftedYellowButtonActivity}}. - - - ^ aMenu - ! Item was changed: ----- Method: FileList>>fileListMenu: (in category 'file list menu') ----- fileListMenu: aMenu + ^ self menu: aMenu for: #(fileListMenu fileListMenuShifted:) - - fileName - ifNil: [^ self noFileSelectedMenu: aMenu] - ifNotNil: [^ self fileSelectedMenu: aMenu]. ! Item was added: + ----- Method: FileList>>mainFileContentsMenu: (in category 'file list menu') ----- + mainFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + ^ aMenu addTranslatedList: #( + ('find...(f)' find) + ('find again (g)' findAgain) + ('set search string (h)' setSearchString) + - + ('do again (j)' again) + ('undo (z)' undo) + - + ('copy (c)' copySelection) + ('cut (x)' cut) + ('paste (v)' paste) + ('paste...' pasteRecent) + - + ('do it (d)' doIt) + ('print it (p)' printIt) + ('inspect it (i)' inspectIt) + ('fileIn selection (G)' fileItIn) + - + ('accept (s)' accept) + ('cancel (l)' cancel) + - + ('more...' shiftedYellowButtonActivity)); + yourself + ! Item was added: + ----- Method: FileList>>mainFileListMenu: (in category 'file list menu') ----- + mainFileListMenu: aMenu + + fileName + ifNil: [^ self noFileSelectedMenu: aMenu] + ifNotNil: [^ self fileSelectedMenu: aMenu]. + ! Item was added: + ----- Method: FileList>>mainVolumeMenu: (in category 'volume menu') ----- + mainVolumeMenu: aMenu + + ^ aMenu addTranslatedList: #( + ('recent...' recentDirs) + - + ('add server...' askServerInfo) + ('remove server...' removeServer) + - + ('delete directory...' deleteDirectory) + -); + yourself! Item was added: + ----- Method: FileList>>servicesFileContentsMenu: (in category 'file list menu') ----- + servicesFileContentsMenu: aMenu + "Construct aMenu to have items appropriate for the file browser's code pane, for the unshifted state" + + + fileName ifNotNil: [| services maybeLine extraLines | + services := OrderedCollection new. + (#(briefHex briefFile needToGetBriefHex needToGetBrief) includes: brevityState) ifTrue: + [services add: self serviceGet]. + (#(fullHex briefHex needToGetFullHex needToGetBriefHex) includes: brevityState) ifFalse: + [services add: self serviceGetHex]. + (#(needToGetShiftJIS needToGetEUCJP needToGetCNGB needToGetEUCKR needToGetUTF8) includes: brevityState) ifFalse: + [services add: self serviceGetEncodedText]. + maybeLine := services size. + (FileStream sourceFileSuffixes includes: self suffixOfSelectedFile) ifTrue: + [services addAll: + (self servicesFromSelectorSpecs: + #(fileIntoNewChangeSet: fileIn: browseChangesFile: browseFile:))]. + + extraLines := OrderedCollection new. + maybeLine > 0 ifTrue: [extraLines add: maybeLine]. + services size > maybeLine ifTrue: [extraLines add: services size]. + aMenu + addServices: services + for: self + extraLines: extraLines]. + ^ aMenu + ! Item was added: + ----- Method: FileList>>servicesVolumeMenu: (in category 'volume menu') ----- + servicesVolumeMenu: aMenu + + aMenu + addServices: (self itemsForDirectory: self directory) + for: self + extraLines: #(). + ^aMenu.! Item was added: + ----- Method: FileList>>shiftedFileContentsMenu: (in category 'file list menu') ----- + shiftedFileContentsMenu: aMenu + "Delegate the shifted menu to the default shifted menu" + + ^ aMenu addList: self class shiftedYellowButtonMenuItems; yourself + ! Item was changed: ----- Method: FileList>>volumeMenu: (in category 'volume menu') ----- volumeMenu: aMenu + ^ self menu: aMenu for: #(volumeMenu volumeMenuShifted:) + ! - aMenu addList: { - {'recent...' translated. #recentDirs}. - #-. - {'add server...' translated. #askServerInfo}. - {'remove server...' translated. #removeServer}. - #-. - {'delete directory...' translated. #deleteDirectory}. - #-}. - aMenu - addServices: (self itemsForDirectory: self directory) - for: self - extraLines: #(). - ^aMenu.! Item was changed: ----- Method: Inspector>>fieldListMenu: (in category 'menu commands') ----- fieldListMenu: aMenu "Arm the supplied menu with items for the field-list of the receiver" + ^ self menu: aMenu for: #(fieldListMenu fieldListMenuShifted:) - - aMenu addStayUpItemSpecial. - - aMenu addList: #( - ('inspect (i)' inspectSelection) - ('explore (I)' exploreSelection)). - - self addCollectionItemsTo: aMenu. - - aMenu addList: #( - - - ('method refs to this inst var' referencesToSelection) - ('methods storing into this inst var' defsOfSelection) - ('objects pointing to this value' objectReferencesToSelection) - ('chase pointers' chasePointers) - ('explore pointers' explorePointers) - - - ('browse full (b)' browseMethodFull) - ('browse class' browseClass) - ('browse hierarchy (h)' classHierarchy) - ('browse protocol (p)' browseFullProtocol) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('copy name (c)' copyName) - ('basic inspect' inspectBasic)). - - Smalltalk isMorphic ifTrue: - [aMenu addList: #( - - - ('tile for this value (t)' tearOffTile) - ('viewer for this value (v)' viewerForValue))]. - - ^ aMenu - - - " - - ('alias for this value' aliasForValue) - ('watcher for this slot' watcherForSlot)" - ! Item was added: + ----- Method: Inspector>>mainFieldListMenu: (in category 'menu commands') ----- + mainFieldListMenu: aMenu + "Arm the supplied menu with items for the field-list of the receiver" + + "gets overriden by subclasses, _whithout_ the " + aMenu addStayUpItemSpecial. + + aMenu addList: #( + ('inspect (i)' inspectSelection) + ('explore (I)' exploreSelection)). + + self addCollectionItemsTo: aMenu. + + aMenu addList: #( + - + ('method refs to this inst var' referencesToSelection) + ('methods storing into this inst var' defsOfSelection) + ('objects pointing to this value' objectReferencesToSelection) + ('chase pointers' chasePointers) + ('explore pointers' explorePointers) + - + ('browse full (b)' browseMethodFull) + ('browse class' browseClass) + ('browse hierarchy (h)' classHierarchy) + ('browse protocol (p)' browseFullProtocol) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('copy name (c)' copyName) + ('basic inspect' inspectBasic)). + + Smalltalk isMorphic ifTrue: + [aMenu addList: #( + - + ('tile for this value (t)' tearOffTile) + ('viewer for this value (v)' viewerForValue))]. + + ^ aMenu + + + " - + ('alias for this value' aliasForValue) + ('watcher for this slot' watcherForSlot)" + + ! Item was added: + ----- Method: MessageNames>>mainSelectorListMenu: (in category 'selector list') ----- + mainSelectorListMenu: aMenu + "Answer the menu associated with the selectorList" + + aMenu addList: #( + ('senders (n)' browseSenders 'browse senders of the chosen selector') + ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') + - + ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). + + ^ aMenu! Item was changed: ----- Method: MessageNames>>selectorListMenu: (in category 'selector list') ----- selectorListMenu: aMenu "Answer the menu associated with the selectorList" + ^ self menu: aMenu for: #(selectorListMenu selectorListMenuShifted:) + ! - - aMenu addList: #( - ('senders (n)' browseSenders 'browse senders of the chosen selector') - ('copy selector to clipboard' copyName 'copy the chosen selector to the clipboard, for subsequent pasting elsewhere') - - - ('show only implemented selectors' showOnlyImplementedSelectors 'remove from the selector-list all symbols that do not represent implemented methods')). - - ^ aMenu! Item was added: + ----- Method: MessageSet>>mainMessageListMenu: (in category 'message functions') ----- + mainMessageListMenu: aMenu + "Answer the message-list menu" + + aMenu addList: #( + ('what to show...' offerWhatToShowMenu) + ('toggle break on entry' toggleBreakOnEntry) + - + ('browse full (b)' browseMethodFull) + ('browse hierarchy (h)' classHierarchy) + ('browse method (O)' openSingleMessageBrowser) + ('browse protocol (p)' browseFullProtocol) + - + ('fileOut' fileOutMessage) + ('printOut' printOutMessage) + ('copy selector (c)' copySelector) + ('copy reference (C)' copyReference) + - + ('senders of... (n)' browseSendersOfMessages) + ('implementors of... (m)' browseMessages) + ('inheritance (i)' methodHierarchy) + ('versions (v)' browseVersions) + - + ('references... (r)' browseVariableReferences) + ('assignments... (a)' browseVariableAssignments) + ('class refs (N)' browseClassRefs) + - + ('remove method (x)' removeMessage) + ('explore method' exploreMethod) + ('inspect method' inspectMethod)). + ^ aMenu! Item was changed: ----- Method: MessageSet>>messageListMenu:shifted: (in category 'message functions') ----- messageListMenu: aMenu shifted: shifted "Answer the message-list menu" + ^ self menu: aMenu for: #(messageListMenu messageListMenuShifted:) shifted: shifted + ! - self - menuHook: aMenu - named: #messageListMenu - shifted: shifted. - Preferences useOnlyServicesInMenu ifTrue:[^aMenu]. - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList: #( - ('what to show...' offerWhatToShowMenu) - ('toggle break on entry' toggleBreakOnEntry) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('explore method' exploreMethod) - ('inspect method' inspectMethod) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: MessageSet>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- + messageListMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. + ! Item was changed: ----- Method: MessageSet>>shiftedMessageListMenu: (in category 'message functions') ----- shiftedMessageListMenu: aMenu "Fill aMenu with the items appropriate when the shift key is held down" + aMenu addStayUpItem. aMenu addList: #( ('toggle diffing (D)' toggleDiffing) ('implementors of sent messages' browseAllMessages) - ('local senders of...' browseLocalSendersOfMessages) ('local implementors of...' browseLocalImplementors) - ('spawn sub-protocol' spawnProtocol) ('spawn full protocol' spawnFullProtocol) - ('sample instance' makeSampleInstance) ('inspect instances' inspectInstances) ('inspect subinstances' inspectSubInstances)). self addExtraShiftedItemsTo: aMenu. aMenu addList: #( - ('change category...' changeCategory)). self canShowMultipleMessageCategories ifTrue: [aMenu addList: #(('show category (C)' showHomeCategory))]. aMenu addList: #( - ('change sets with this method' findMethodInChangeSets) ('revert to previous version' revertToPreviousVersion) ('remove from current change set' removeFromCurrentChanges) ('revert & remove from changes' revertAndForget) ('add to current change set' adoptMessageInCurrentChangeset) + ('copy up or copy down...' copyUpOrCopyDown)). - ('copy up or copy down...' copyUpOrCopyDown) - - - ('more...' unshiftedYellowButtonActivity)). ^ aMenu ! Item was changed: ----- Method: ObjectExplorer>>codePaneMenu:shifted: (in category 'menus') ----- codePaneMenu: aMenu shifted: shifted "Note that unless we override perform:orSendTo:, PluggableTextController will respond to all menu items" + ^ StringHolder codePaneMenu: aMenu shifted: shifted - ^ StringHolder basicNew codePaneMenu: aMenu shifted: shifted ! Item was added: + ----- Method: PackagePaneBrowser>>mainPackageMenu: (in category 'package list') ----- + mainPackageMenu: aMenu + "Answer a Menu of operations on class packages to be + displayed when the operate menu button is pressed." + + ^aMenu addList: #( + ('find class...' findClass) + ('recent classes...' recent) + - + ('reorganize' editSystemCategories) + ('update' updatePackages)); + yourself. + ! Item was changed: ----- Method: PackagePaneBrowser>>packageMenu: (in category 'package list') ----- packageMenu: aMenu - "Answer a Menu of operations on class packages to be - displayed when the operate menu button is pressed." + ^ self menu: aMenu for: #(packageListMenu packageListMenuShifted:)! - ^aMenu - labels: 'find class...\recent classes...\reorganize\update' withCRs - lines: #(2) - selections: #(#findClass #recent #editSystemCategories #updatePackages)! Item was changed: ----- Method: PointerFinder>>menu:shifted: (in category 'pointer-list') ----- menu: aMenu shifted: shifted + + ^ self menu: aMenu for: #(pointerListMenu pointerListMenuShifted:) shifted: shifted! - ^ aMenu - addList: #( - ('Inspect (i)' #inspectObject 'Live long and prosper!!') - - - ('Search again' #searchAgain 'Search again\for the same object' withCRs)); - yourself.! Item was added: + ----- Method: PointerFinder>>pointerListMenu: (in category 'pointer-list') ----- + pointerListMenu: aMenu + + + ^ aMenu + addList: #( + ('Inspect (i)' #inspectObject 'Live long and prosper!!') + - + ('Search again' #searchAgain 'Search again\for the same object' withCRs)); + yourself.! Item was removed: - ----- Method: RecentMessageSet>>messageListMenu:shifted: (in category 'message functions') ----- - messageListMenu: aMenu shifted: shifted - "Answer the message-list menu" - - shifted ifTrue: [^ self shiftedMessageListMenu: aMenu]. - aMenu addList:#( - ('what to show...' offerWhatToShowMenu) - - - ('browse full (b)' browseMethodFull) - ('browse hierarchy (h)' classHierarchy) - ('browse method (O)' openSingleMessageBrowser) - ('browse protocol (p)' browseFullProtocol) - - - ('fileOut (o)' fileOutMessage) - ('printOut' printOutMessage) - ('copy selector (c)' copySelector) - ('copy reference (C)' copyReference) - - - ('senders of... (n)' browseSendersOfMessages) - ('implementors of... (m)' browseMessages) - ('inheritance (i)' methodHierarchy) - ('versions (v)' browseVersions) - - - ('references... (r)' browseVariableReferences) - ('assignments... (a)' browseVariableAssignments) - ('class refs (N)' browseClassRefs) - - - ('remove method (x)' removeMessage) - ('remove from RecentSubmissions' removeFromRecentSubmissions) - - - ('more...' shiftedYellowButtonActivity)). - ^ aMenu! Item was added: + ----- Method: RecentMessageSet>>messageListMenuForRecentSubmission: (in category 'message functions') ----- + messageListMenuForRecentSubmission: aMenu + + aMenu addList:#( + ('remove from RecentSubmissions' removeFromRecentSubmissions)). + ^ aMenu! Item was added: + ----- Method: SelectorBrowser>>mainSelectorMenu: (in category 'selector list') ----- + mainSelectorMenu: aMenu + + + ^ aMenu addList: #( + ('senders (n)' senders) + ('implementors (m)' implementors) + ('copy selector to clipboard' copyName)); + yourself + ! Item was changed: ----- Method: SelectorBrowser>>selectorMenu: (in category 'selector list') ----- selectorMenu: aMenu + ^ self menu: aMenu for: #(selectorMenu selectorMenuShifted:) + ! - ^ aMenu labels: - 'senders (n) - implementors (m) - copy selector to clipboard' - lines: #() - selections: #(senders implementors copyName)! Item was removed: - ----- Method: SetInspector>>fieldListMenu: (in category 'menu') ----- - fieldListMenu: aMenu - - ^ aMenu labels: - 'inspect - copy name - objects pointing to this value - refresh view - remove - basic inspect' - lines: #( 5 8) - selections: #(inspectSelection copyName objectReferencesToSelection update removeSelection inspectBasic) - ! Item was added: + ----- Method: SetInspector>>mainFieldListMenu: (in category 'menu') ----- + mainFieldListMenu: aMenu + + ^ aMenu labels: #( + ('inspect' inspectSelection) + ('copy name' copyName) + ('objects pointing to this value' objectReferencesToSelection) + ('refresh view' update) + ('remove' removeSelection) + - + ('basic inspect' inspectBasic)); + yourself + ! Item was changed: ----- Method: StringHolder class>>open (in category '*Tools') ----- open ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace' + ! - "Not to be confused with our own class var 'Workspace'"! Item was added: + ----- Method: StringHolder>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- + buildMenu: aMenu withBuilders: builders shifted: aBoolean + " We let every builder modify the menu. + The builder should indicate whether to abort by returning nil." + | menu | + menu := aMenu. + builders do: [:builder | + menu := self perform: builder method selector withEnoughArguments: { aMenu . aBoolean }. + menu ifNil: [^ aMenu]]. + ^ menu + ! Item was changed: ----- Method: StringHolder>>codePaneMenu:shifted: (in category '*Tools-code pane menu') ----- codePaneMenu: aMenu shifted: shifted + ^ self menu: aMenu for: #(codePaneMenu codePaneMenuShifted:) shifted: shifted + ! - "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" - ^self class codePaneMenu: aMenu shifted: shifted! Item was added: + ----- Method: StringHolder>>codePaneMenuHook:shifted: (in category '*Tools-pluggable menus - hooks') ----- + codePaneMenuHook: aMenu shifted: aBoolean + + ^ self menuHook: aMenu named: #codePaneMenu shifted: aBoolean. + ! Item was added: + ----- Method: StringHolder>>mainCodePaneMenu:shifted: (in category '*Tools-code pane menu') ----- + mainCodePaneMenu: aMenu shifted: shifted + + "Fill in the given menu with additional items. The menu is prepoulated with the 'standard' text commands that the editor supports. Note that unless we override perform:orSendTo:, the editor will respond to all menu items in a text pane" + ^ self class codePaneMenu: aMenu shifted: shifted. + ! Item was added: + ----- Method: StringHolder>>menu:for: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection + + ^ self menu: aMenu for: aMenuSymbolOrCollection shifted: false! Item was added: + ----- Method: StringHolder>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- + menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean + + | builders | + builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class. + builders := aBoolean + ifTrue: [builders reject: [:builder | builder arguments = #(false)]] + ifFalse: [builders reject: [:builder | builder arguments = #(true)]]. + + ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean + ! Item was added: + ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- + menuBuildersFor: someMenus in: aClass + "Find all builders and sort them by + 1. Priority (default 500) + 2. selector name + 3. inheritance + " + ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | + |ma mb pa pb| + ma := a method. + mb := b method. + pa := self methodMenuPriority: ma. + pb := self methodMenuPriority: mb. + pa < pb or: [ + pa = pb and: [ + ma selector <= mb selector and: [ + mb methodClass inheritsFrom: ma methodClass]]]] + ! Item was added: + ----- Method: StringHolder>>menuPragmasFor:in: (in category '*Tools-pluggable menus') ----- + menuPragmasFor: aMenuSymbolOrCollection in: aClass + + ^ aMenuSymbolOrCollection isCollection + ifTrue: [aMenuSymbolOrCollection gather: [:aMenuSymbol | + Pragma allNamed: aMenuSymbol from: aClass to: Object]] + ifFalse: [Pragma allNamed: aMenuSymbolOrCollection from: aClass to: Object]! Item was added: + ----- Method: StringHolder>>methodMenuPriority: (in category '*Tools-pluggable menus') ----- + methodMenuPriority: aMethod + "The pirority of a menu method indicated by a pragma. + Defaults to 500" + ^ (aMethod pragmas detect: [:p | p keyword == #menuPriority: ] ifNone: [^ 500]) + argumentAt: 1 + ! Item was added: + ----- Method: VersionsBrowser>>listSelectionVersionsMenu: (in category 'menu') ----- + listSelectionVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + listIndex > 0 ifTrue:[ + (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( + ('compare to current' compareToCurrentVersion 'compare selected version to the current version') + ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. + "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" + aMenu addTranslatedList: #( + ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') + ('fileOut selected version' fileOutSelection 'file out the selected version') )]. + ^ aMenu! Item was added: + ----- Method: VersionsBrowser>>mainVersionsMenu: (in category 'menu') ----- + mainVersionsMenu: aMenu + "Fill aMenu with menu items appropriate to the receiver" + + + aMenu addTranslatedList: #( + ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') + ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') + ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') + - + ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') + ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') + - + ('senders (n)' browseSenders 'browse all senders of this selector') + ('implementors (m)' browseImplementors 'browse all implementors of this selector') + - + ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). + + ^aMenu! Item was added: + ----- Method: VersionsBrowser>>titleVersionsMenu: (in category 'menu') ----- + titleVersionsMenu: aMenu + "Add a menu title atop aMenu" + + + aMenu title: 'Versions' translated. + aMenu addStayUpItemSpecial. + ^ aMenu! Item was changed: ----- Method: VersionsBrowser>>versionsMenu: (in category 'menu') ----- versionsMenu: aMenu - "Fill aMenu with menu items appropriate to the receiver" + ^ self menu: aMenu for: #(versionsMenu versionsMenuShifted:) + ! - aMenu title: 'Versions' translated. - aMenu addStayUpItemSpecial. - - listIndex > 0 ifTrue:[ - (list size > 1 ) ifTrue: [ aMenu addTranslatedList: #( - ('compare to current' compareToCurrentVersion 'compare selected version to the current version') - ('compare to version...' compareToOtherVersion 'compare selected version to another selected version'))]. - "Note: Revert to selected should be visible for lists of length one for having the ability to revert to an accidentally deleted method" - aMenu addTranslatedList: #( - ('revert to selected version' fileInSelections 'resubmit the selected version, so that it becomes the current version') - ('fileOut selected version' fileOutSelection 'file out the selected version') )]. - - aMenu addTranslatedList: #( - ('remove from changes' removeMethodFromChanges 'remove this method from the current change set, if present') - ('edit current method (O)' openSingleMessageBrowser 'open a single-message browser on the current version of this method') - ('find original change set' findOriginalChangeSet 'locate the changeset which originally contained this version') - - - ('toggle diffing (D)' toggleDiffing 'toggle whether or not diffs should be shown here') - ('update list' reformulateList 'reformulate the list of versions, in case it somehow got out of synch with reality') - - - ('senders (n)' browseSenders 'browse all senders of this selector') - ('implementors (m)' browseImplementors 'browse all implementors of this selector') - - - ('help...' offerVersionsHelp 'provide an explanation of the use of this tool')). - - ^aMenu! From commits at source.squeak.org Wed Mar 25 12:24:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 12:24:51 2015 Subject: [squeak-dev] The Trunk: Services-Base-topa.54.mcz Message-ID: Tobias Pape uploaded a new version of Services-Base to project The Trunk: http://source.squeak.org/trunk/Services-Base-topa.54.mcz ==================== Summary ==================== Name: Services-Base-topa.54 Author: topa Time: 18 March 2015, 4:10:41.166 pm UUID: 81229201-d099-4bfc-81a2-269743063d2c Ancestors: Services-Base-cmm.53 Adapt to Pluggable menus (Tools-topa.556) =============== Diff against Services-Base-cmm.53 =============== Item was added: + ----- Method: Browser>>classCategoryMenuServices: (in category '*services-base') ----- + classCategoryMenuServices: aMenu + + + ServiceGui browser: self classCategoryMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was added: + ----- Method: Browser>>classListMenuServices: (in category '*services-base') ----- + classListMenuServices: aMenu + + + ServiceGui browser: self classMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was removed: - ----- Method: Browser>>menuHook:named:shifted: (in category '*services-base') ----- - menuHook: aMenu named: aSymbol shifted: aBool - "Enhance aMenu with registered services." - aSymbol - caseOf: - { [ #classListMenu ] -> [ ServiceGui browser: self classMenu: aMenu ]. - [ #codePaneMenu ] -> [ ServiceGui browser: self codePaneMenu: aMenu ]. - [ #messageCategoryMenu] -> [ ServiceGui browser: self messageCategoryMenu: aMenu ]. - [ #messageListMenu ] -> [ ServiceGui browser: self messageListMenu: aMenu ]. - [ #systemCategoryMenu ] -> [ ServiceGui browser: self classCategoryMenu: aMenu ] } - otherwise: [ "do nothing" ]! Item was added: + ----- Method: Browser>>messageCategoryMenuServices: (in category '*services-base') ----- + messageCategoryMenuServices: aMenu + + + ServiceGui browser: self messageCategoryMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was removed: - ----- Method: CodeHolder>>menuHook:named:shifted: (in category '*services-base') ----- - menuHook: aMenu named: aSymbol shifted: aBool - "Enhance aMenu with registered services." - aSymbol == #messageListMenu ifTrue: - [ServiceGui browser: self messageListMenu: aMenu]. - ^aMenu! Item was added: + ----- Method: CodeHolder>>messageListMenuServices: (in category '*services-base') ----- + messageListMenuServices: aMenu + + + + ServiceGui browser: self messageListMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! Item was added: + ----- Method: StringHolder>>codePaneMenuServices: (in category '*services-base') ----- + codePaneMenuServices: aMenu + + + ServiceGui browser: self codePaneMenu: aMenu. + ^ Preferences useOnlyServicesInMenu ifTrue: [nil] ifFalse: [aMenu]! From commits at source.squeak.org Wed Mar 25 12:25:27 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 12:25:29 2015 Subject: [squeak-dev] The Trunk: Protocols-topa.48.mcz Message-ID: Tobias Pape uploaded a new version of Protocols to project The Trunk: http://source.squeak.org/trunk/Protocols-topa.48.mcz ==================== Summary ==================== Name: Protocols-topa.48 Author: topa Time: 18 March 2015, 4:11:03.322 pm UUID: ea03703f-6b96-4212-bb99-bc4c3089ba9d Ancestors: Protocols-bf.47 Adapt to Pluggable menus (Tools-topa.556) =============== Diff against Protocols-bf.47 =============== Item was changed: ----- Method: Lexicon>>categoryListMenu:shifted: (in category 'category list') ----- categoryListMenu: aMenu shifted: aBoolean "Answer the menu for the category list" + ^ self menu: aMenu for: #(categoryListMenu categoryListMenuShifted:) shifted: aBoolean + ! - - ^ aMenu labels: 'find...(f)' lines: #() selections: #(obtainNewSearchString)! Item was added: + ----- Method: Lexicon>>mainCategoryListMenu: (in category 'category list') ----- + mainCategoryListMenu: aMenu + "Answer the menu for the category list" + + ^ aMenu addList: #('find...(f)' obtainNewSearchString); yourself! From commits at source.squeak.org Wed Mar 25 16:20:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 16:20:58 2015 Subject: [squeak-dev] The Trunk: HelpSystem-Core-mt.67.mcz Message-ID: Marcel Taeumel uploaded a new version of HelpSystem-Core to project The Trunk: http://source.squeak.org/trunk/HelpSystem-Core-mt.67.mcz ==================== Summary ==================== Name: HelpSystem-Core-mt.67 Author: mt Time: 25 March 2015, 5:20:51.722 pm UUID: 841bd9fa-4dc8-6742-bb26-285b46bd2c9d Ancestors: HelpSystem-Core-mt.66 Support added for html websites such as Swiki. =============== Diff against HelpSystem-Core-mt.66 =============== Item was changed: AbstractHelpTopic subclass: #ClassAPIHelpTopic instanceVariableNames: 'theClass withSubclasses withMethods subclassesAsSeparateTopic' classVariableNames: '' poolDictionaries: '' category: 'HelpSystem-Core-Model'! + + !ClassAPIHelpTopic commentStamp: 'mt 3/25/2015 15:03' prior: 0! + Show comments of a class, their subclasses and methods.! Item was added: + AbstractHelpTopic subclass: #HtmlHelpTopic + instanceVariableNames: 'url cache selectBlock convertBlock subtopicUrls' + classVariableNames: '' + poolDictionaries: '' + category: 'HelpSystem-Core-Model'! Item was added: + ----- Method: HtmlHelpTopic>>contents (in category 'accessing') ----- + contents + + | start end | + start := (self document findString: '' startingAt: start) + 1. + end := self document findString: '' startingAt: start. + + start > end ifTrue: [^ '']. + + ^ (self document copyFrom: start to: end - 1) asUnHtml withBlanksTrimmed! Item was added: + ----- Method: HtmlHelpTopic>>convertBlock (in category 'accessing') ----- + convertBlock + + ^ convertBlock ifNil: [ [:url | url] ]! Item was added: + ----- Method: HtmlHelpTopic>>convertBlock: (in category 'accessing') ----- + convertBlock: aBlock + + convertBlock := aBlock.! Item was added: + ----- Method: HtmlHelpTopic>>document (in category 'accessing') ----- + document + + ^ cache ifNil: [cache := (HTTPSocket httpGet: self url accept: 'text/html') contents]! Item was added: + ----- Method: HtmlHelpTopic>>hasSubtopics (in category 'testing') ----- + hasSubtopics + + ^ self subtopicUrls notEmpty! Item was added: + ----- Method: HtmlHelpTopic>>selectBlock (in category 'accessing') ----- + selectBlock + + ^ selectBlock ifNil: [ [:url | true] ]! Item was added: + ----- Method: HtmlHelpTopic>>selectBlock: (in category 'accessing') ----- + selectBlock: aBlock + "Which urls should be followed?" + + selectBlock := aBlock.! Item was added: + ----- Method: HtmlHelpTopic>>subtopicUrls (in category 'accessing') ----- + subtopicUrls + + ^ subtopicUrls ifNil: [ + | start end | + subtopicUrls := OrderedCollection new. + + start := self document findString: ' 0] whileTrue: [ + start := self document findString: '"' startingAt: start. + end := self document findString: '"' startingAt: start+1. + subtopicUrls addIfNotPresent: (self document copyFrom: start+1 to: end-1). + start := self document findString: ' 0 ifTrue: [start := self document findString: 'href' startingAt: start]]. + + subtopicUrls := subtopicUrls + select: self selectBlock + thenCollect: self convertBlock. + subtopicUrls]! Item was added: + ----- Method: HtmlHelpTopic>>subtopics (in category 'accessing') ----- + subtopics + + | start end urls | + urls := OrderedCollection new. + + start := self document findString: ' 0] whileTrue: [ + start := self document findString: 'href' startingAt: start. + start := (self document findString: '"' startingAt: start) + 1. + end := self document findString: '"' startingAt: start. + urls addIfNotPresent: (self document copyFrom: start to: end - 1). + start := self document findString: '>title (in category 'accessing') ----- + title + + | start end | + start := (self document findString: '' startingAt: start) + 1. + end := self document findString: '' startingAt: start. + + start > end ifTrue: [^ self url printStringLimitedTo: 10]. + + ^ self document copyFrom: start to: end - 1! Item was added: + ----- Method: HtmlHelpTopic>>url (in category 'accessing') ----- + url + + ^ url! Item was added: + ----- Method: HtmlHelpTopic>>url: (in category 'accessing') ----- + url: aString + + url := aString.! Item was changed: AbstractHelpTopic subclass: #PackageAPIHelpTopic instanceVariableNames: 'packageName' classVariableNames: '' poolDictionaries: '' category: 'HelpSystem-Core-Model'! + + !PackageAPIHelpTopic commentStamp: 'mt 3/25/2015 15:02' prior: 0! + List all classes and their method comments. No subclasses.! From commits at source.squeak.org Wed Mar 25 16:22:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 16:22:26 2015 Subject: [squeak-dev] The Trunk: Help-Squeak-SWiki-mt.1.mcz Message-ID: Marcel Taeumel uploaded a new version of Help-Squeak-SWiki to project The Trunk: http://source.squeak.org/trunk/Help-Squeak-SWiki-mt.1.mcz ==================== Summary ==================== Name: Help-Squeak-SWiki-mt.1 Author: mt Time: 25 March 2015, 5:22:23.433 pm UUID: 490df896-1294-534d-9b9e-8fb8f5cea929 Ancestors: Integrating the Squeak SWiki into the help browser. ==================== Snapshot ==================== SystemOrganization addCategory: #'Help-Squeak-SWiki'! CustomHelp subclass: #SWikiHelp instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'Help-Squeak-SWiki'! ----- Method: SWikiHelp class>>asHelpTopic (in category 'converting') ----- asHelpTopic ^ HtmlHelpTopic new url: 'http://wiki.squeak.org/squeak'; selectBlock: [:url | ((url beginsWith: '/squeak/') and: [(url includes: $.) not ".edit, .history, ..."]) and: [url last isDigit]]; convertBlock: [:url | 'http://wiki.squeak.org', url]; yourself! From marcel.taeumel at student.hpi.uni-potsdam.de Wed Mar 25 16:15:05 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Wed Mar 25 16:26:01 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: References: Message-ID: <1427300105822-4815097.post@n4.nabble.com> -- View this message in context: http://forum.world.st/The-Trunk-Help-Squeak-SWiki-mt-1-mcz-tp4815095p4815097.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From tim at rowledge.org Wed Mar 25 17:29:49 2015 From: tim at rowledge.org (tim Rowledge) Date: Wed Mar 25 17:29:56 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: <1427300105822-4815097.post@n4.nabble.com> References: <1427300105822-4815097.post@n4.nabble.com> Message-ID: On 25-03-2015, at 9:15 AM, Marcel Taeumel wrote: > That?s an interesting idea. Good stuff. Makes it even more important to clean up the swiki and improve the quality, currency and comprehensiveness. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother" said Pooh, as his trigger finger tired. From gettimothy at zoho.com Wed Mar 25 19:24:03 2015 From: gettimothy at zoho.com (gettimothy) Date: Wed Mar 25 19:24:08 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: References: <1427300105822-4815097.post@n4.nabble.com> Message-ID: <14c52601314.b3bdf126751280.3626886309263069309@zoho.com> ---- On Wed, 25 Mar 2015 13:29:49 -0400 tim Rowledge <tim@rowledge.org> wrote ---- On 25-03-2015, at 9:15 AM, Marcel Taeumel <marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > <http://forum.world.st/file/n4815097/help-browser-swiki.png> That?s an interesting idea. Good stuff. Makes it even more important to clean up the swiki and improve the quality, currency and comprehensiveness. That is very interesting. What code was used to load that Help Browser (apologies if this was covered previously) If that where the default Help, then Help development would improve simply because of the number of eyeballs on it tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim "Bother" said Pooh, as his trigger finger tired. tty -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150325/1db05491/attachment.htm From tinchodias at gmail.com Wed Mar 25 21:37:05 2015 From: tinchodias at gmail.com (Martin Dias) Date: Wed Mar 25 21:37:09 2015 Subject: [squeak-dev] Fuel issue tracker now on github In-Reply-To: References: Message-ID: Thanks Max! Mart?n El 24/03/2015 20:04, "Max Leske" escribi?: > Hi folks > > We?ve moved the issue tracker from Google code to github: > https://github.com/theseion/fuel/issues. > > Cheers, > Max > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150325/4425ffaf/attachment.htm From commits at source.squeak.org Wed Mar 25 22:55:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Wed Mar 25 22:55:06 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150325225504.2243.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007670.html Name: ToolBuilder-Kernel-dtl.66 Ancestors: ToolBuilder-Kernel-mt.65 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007671.html Name: ToolBuilder-Kernel-dtl.67 Ancestors: ToolBuilder-Kernel-dtl.66 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007672.html Name: ToolBuilder-Kernel-dtl.68 Ancestors: ToolBuilder-Kernel-dtl.67 Add UIManager>> builderClass. Clean up unreferenced code. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007673.html Name: ToolBuilder-MVC-dtl.35 Ancestors: ToolBuilder-MVC-fbs.34 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007674.html Name: ToolBuilder-MVC-dtl.36 Ancestors: ToolBuilder-MVC-dtl.35 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007675.html Name: ToolBuilder-Morphic-dtl.100 Ancestors: ToolBuilder-Morphic-mt.99 Remove toolBuilder instance variable from UIManager. A UIManager knows what kind of ToolBuilder it should use, so it does not need to hold on to a single instance. Create ToolBuilder instances as required, and do not reuse a ToolBuilder instance after it has done its job. This prevents confusing accumulation of registered widgets in a single ToolBuilder instance ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007676.html Name: ToolBuilder-Morphic-dtl.101 Ancestors: ToolBuilder-Morphic-dtl.100 Remove the toolBuilder instance variable from UIManager, replacing it with builderClass. The builderClass for a UIManager is determined by ToolBuilder class>>findDefault, possibly influenced by local project preferences. This will normally be established at first use following creation of a new MVC or Morphic project. ToolBuilder instances are created as required, so that a UIManager does not reuse a single instance (which would accumulate garbage it its registries). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007677.html Name: Tools-topa.557 Ancestors: Tools-eem.556 Browser: Fix message list icons for metaclasses ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007678.html Name: HelpSystem-Core-mt.66 Ancestors: HelpSystem-Core-mt.65 Help browser uses now the tool builder. To increase performance, the help system creates help topics now lazily (that is, the use of topic builders is not suggested but still possible for backwards compatibility). For example, "HelpBrowser openOn: SystemReference" opens now faster. New kinds of help topics should be implemented by subclassing AbstractHelpTopic. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007679.html Name: HelpSystem-Tests-mt.16 Ancestors: HelpSystem-Tests-fbs.15 Tests updated. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007680.html Name: Tools-topa.556 Ancestors: Tools-topa.555 Pluggable Menus for many tools ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007681.html Name: Tools-topa.558 Ancestors: Tools-topa.557, Tools-topa.556 Merge. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007682.html Name: Services-Base-topa.54 Ancestors: Services-Base-cmm.53 Adapt to Pluggable menus (Tools-topa.556) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007683.html Name: Protocols-topa.48 Ancestors: Protocols-bf.47 Adapt to Pluggable menus (Tools-topa.556) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007684.html Name: HelpSystem-Core-mt.67 Ancestors: HelpSystem-Core-mt.66 Support added for html websites such as Swiki. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007685.html Name: Help-Squeak-SWiki-mt.1 Ancestors: Integrating the Squeak SWiki into the help browser. ============================================= From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 26 14:14:31 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 26 14:25:35 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: <14c52601314.b3bdf126751280.3626886309263069309@zoho.com> References: <1427300105822-4815097.post@n4.nabble.com> <14c52601314.b3bdf126751280.3626886309263069309@zoho.com> Message-ID: <1427379271914-4815308.post@n4.nabble.com> If you load this package into your image, then you will see the SWiki node in the regular help browser because it is a subclass of CustomHelp. I don't think that this is in the regular update stream. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Help-Squeak-SWiki-mt-1-mcz-tp4815095p4815308.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Thu Mar 26 14:16:59 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Thu Mar 26 14:28:00 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: References: <1427300105822-4815097.post@n4.nabble.com> Message-ID: <1427379419796-4815309.post@n4.nabble.com> ...and we need a faster server for the swiki! It's *really* slow. ;-) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Help-Squeak-SWiki-mt-1-mcz-tp4815095p4815309.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Thu Mar 26 14:56:01 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 14:56:02 2015 Subject: [squeak-dev] The Trunk: Tools-topa.559.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.559.mcz ==================== Summary ==================== Name: Tools-topa.559 Author: topa Time: 26 March 2015, 3:55:33.711 pm UUID: 791af8f3-cdc7-452c-9457-ee3b6da86fac Ancestors: Tools-topa.558 Improve tool icons a tad =============== Diff against Tools-topa.558 =============== Item was changed: ----- Method: ToolIcons class>>icons (in category 'accessing') ----- icons + ^ Icons ifNil: [Icons := IdentityDictionary new]! - ^ Icons ifNil: [Icons := Dictionary new]! Item was changed: ----- Method: ToolIcons class>>no (in category 'private') ----- no + ^ Form - ^ Form extent: 12@12 depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1357600601 2162906969 2162906969 820729689 0 0 0 0 0 0 283858777 3488307033 4293613401 4293613401 4293613401 4293613401 3219871577 283858777 0 0 0 0 3488307033 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 3219871577 0 0 0 1357600601 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 820729689 0 0 2162906969 4293613401 4294628822 4294628822 4294628822 4294628822 4294628822 4294628822 4293613401 1894471513 0 0 2162906969 4293613401 4294628822 4294628822 4294628822 4294628822 4294628822 4294628822 4293613401 1894471513 0 0 820729689 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 820729689 0 0 0 3219871577 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 2951436121 0 0 0 0 283858777 3219871577 4293613401 4293613401 4293613401 4293613401 2951436121 283858777 0 0 0 0 0 0 820729689 1894471513 1894471513 820729689 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) - fromArray: #( 0 0 552294233 2683000665 4025177945 4293613401 4293613401 4025177945 2683000665 552294233 0 0 0 1089165145 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2683000665 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 4025177945 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4294492353 4294967295 4294967295 4294492353 4293613401 4293613401 4293613401 4293613401 4025177945 4293613401 4293613401 4294492353 4294967295 4294492353 4294492353 4294967295 4294492353 4293613401 4293613401 3756742489 2683000665 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 4294492353 4294492353 4293613401 4293613401 2162906969 552294233 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 283858777 0 820729689 4025177945 4293613401 4293613401 4293613401 4293613401 4293613401 4293613401 4025177945 820729689 0 0 0 283858777 2683000665 4025177945 4293613401 4293613401 3756742489 2162906969 283858777 0 0) offset: 0@0! Item was changed: ----- Method: ToolIcons class>>primitive (in category 'private') ----- primitive ^ Form extent: 12@12 depth: 32 + fromArray: #( 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 4288124823 4288124823 9934743 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 4288124823 4288782753 4288782753 4288124823 9934743 16777215 16777215 16777215 16777215 16777215 16777215 4288124823 4288782753 4288782753 4289045925 4289440683 4288124823 9934743 16777215 16777215 16777215 16777215 4288124823 4288782753 4288782753 4289045925 4289045925 4289440683 4288848546 4288124823 16777215 16777215 16777215 16777215 4288124823 4288782753 4289045925 4289045925 4289045925 4288848546 4288848546 4288124823 16777215 16777215 16777215 16777215 9934743 4288124823 4289440683 4289440683 4288848546 4288848546 4288124823 10658466 16777215 16777215 16777215 16777215 9934743 10592673 4288124823 4288848546 4288848546 4288124823 10658466 10658466 16777215 16777215 16777215 16777215 16777215 9934743 11250603 4288124823 4288124823 10658466 10658466 9934743 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215 16777215) - fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4282729797 4282729797 4282729797 4282729797 4282729797 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283979864 4283979864 4285098345 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283716692 4284374622 4285098345 4282729797 0 0 0 0 0 0 4282729797 4283979864 4283650899 4284374622 4284111450 4282729797 0 0 0 0 0 0 4282729797 4283979864 4285098345 4284111450 4284111450 4282729797 0 0 0 0 0 0 4282729797 4282729797 4282729797 4282729797 4282729797 4282729797 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) offset: 0@0! From leves at elte.hu Thu Mar 26 15:54:28 2015 From: leves at elte.hu (Levente Uzonyi) Date: Thu Mar 26 15:54:34 2015 Subject: [squeak-dev] Re: The Trunk: Help-Squeak-SWiki-mt.1.mcz In-Reply-To: <1427379419796-4815309.post@n4.nabble.com> References: <1427300105822-4815097.post@n4.nabble.com> <1427379419796-4815309.post@n4.nabble.com> Message-ID: 200-400ms page download time (from a server over 7000 km away) is better than what most websites have. Levente On Thu, 26 Mar 2015, Marcel Taeumel wrote: > ...and we need a faster server for the swiki! It's *really* slow. ;-) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/The-Trunk-Help-Squeak-SWiki-mt-1-mcz-tp4815095p4815309.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From commits at source.squeak.org Thu Mar 26 16:39:47 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 16:39:48 2015 Subject: [squeak-dev] The Trunk: Tools-topa.560.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.560.mcz ==================== Summary ==================== Name: Tools-topa.560 Author: topa Time: 26 March 2015, 5:39:25.846 pm UUID: caa9616b-fd72-4989-9491-56602ffcb862 Ancestors: Tools-topa.559 Change tool icons to allow dynamicity. Classes can now control their icon and these of their methods. =============== Diff against Tools-topa.559 =============== Item was added: + ----- Method: Behavior>>toolIcon (in category '*Tools-icons') ----- + toolIcon + "Tools can annotate me with an icon identified by the symbol this method returns. + Defaults to no icon" + ^ #blank! Item was added: + ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') ----- + toolIconSelector: aSymbol + "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns. + We customize this for, eg, overriden methods or methods with breaks. + Defaults to no icon" + + self methodDictionary at: aSymbol ifPresent: [ :method | + method literalsDo: [ :literal | + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) + ifTrue: [^ #breakpoint]. + (#(flag: needsWork notYetImplemented) includes: literal) + ifTrue: [^ #flag]. + (#(shouldBeImplemented subclassResponsibility) includes: literal) + ifTrue: [ + (self isSelectorOverridden: aSymbol) + ifTrue: [^ #abstract] + ifFalse: [^ #notOverridden]]. + literal == #shouldNotImplement + ifTrue: [^ #no]]]. + + (self isSelectorOverride: aSymbol) + ifTrue: [ + (self isSelectorOverridden: aSymbol) + ifTrue: [ ^ #arrowUpAndDown ] + ifFalse: [ ^ #arrowUp ] ] + ifFalse: [ + (self isSelectorOverridden: aSymbol) + ifTrue: [^ #arrowDown ]]. + + self methodDictionary at: aSymbol ifPresent: [ :method | + (method primitive ~= 0 and: [method isQuick not]) + ifTrue: [^ #primitive]]. + + + ^ #blank! Item was added: + ----- Method: Collection class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #collection! Item was added: + ----- Method: Exception class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #exception! Item was added: + ----- Method: Magnitude class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #magnitude! Item was added: + ----- Method: Morph class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #morph! Item was added: + ----- Method: PseudoClass>>toolIcon (in category '*Tools-icons') ----- + toolIcon + "For polymorphy with behaviors" + ^ self realClass ifNil: [#blank] ifNotNil: [:real | real toolIcon]! Item was added: + ----- Method: PseudoClass>>toolIconSelector: (in category '*Tools-icons') ----- + toolIconSelector: aSymbol + "For polymorphy with behaviors" + ^ self realClass ifNil: [#blank] ifNotNil: [:real | real toolIconSelector: aSymbol]! Item was added: + ----- Method: Stream class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #stream! Item was added: + ----- Method: String class>>toolIcon (in category '*Tools-icons') ----- + toolIcon + + ^ #string! Item was changed: ----- Method: ToolIcons class>>iconForClass: (in category 'support') ----- iconForClass: aClassNameSymbol - + self environment + at: aClassNameSymbol + ifPresent: [:global | + (global respondsTo: #toolIcon) ifTrue: [ + ^ global toolIcon]] + ifAbsent: [^ #blank]. - (Smalltalk at: aClassNameSymbol ifAbsent: [^ #blank]) withAllSuperclassesDo: [:class | - (self class includesSelector: class name asLowercase asSymbol) - ifTrue: [^ class name asLowercase asSymbol]]. ^ #blank! Item was changed: ----- Method: ToolIcons class>>iconForClass:selector: (in category 'support') ----- + iconForClass: aBehavior selector: aSelector + "Answer an icon to be shown for the selector aSymbol in aBehavior." + (aBehavior respondsTo: #toolIconSelector:) ifTrue: [ + ^ aBehavior toolIconSelector: aSelector]. + ^ #blank + ! - iconForClass: aClassDescription selector: aSelector - "Answer an icon to be shown for the selector aSymbol in aClassDescription." - | classDescription | - classDescription := (aClassDescription isKindOf: PseudoClass) - ifTrue: [aClassDescription realClass ifNil: [^ #blank ]] - ifFalse: [aClassDescription]. - classDescription methodDictionary at: aSelector ifPresent: [ :method | - method literalsDo: [ :literal | - (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) - ifTrue: [^ #breakpoint]. - (#(flag: needsWork notYetImplemented) includes: literal) - ifTrue: [^ #flag]. - (#(shouldBeImplemented subclassResponsibility) includes: literal) - ifTrue: [ - (classDescription isSelectorOverridden: aSelector) - ifTrue: [^ #abstract] - ifFalse: [^ #notOverridden]]. - literal == #shouldNotImplement - ifTrue: [^ #no]]]. - - (classDescription isSelectorOverride: aSelector) - ifTrue: [ - (classDescription isSelectorOverridden: aSelector) - ifTrue: [ ^ #arrowUpAndDown ] - ifFalse: [ ^ #arrowUp ] ] - ifFalse: [ - (classDescription isSelectorOverridden: aSelector) - ifTrue: [^ #arrowDown ]]. - - classDescription methodDictionary at: aSelector ifPresent: [ :method | - (method primitive ~= 0 and: [method isQuick not]) - ifTrue: [^ #primitive]]. - - - ^ #blank! Item was added: + ----- Method: ToolIcons class>>stream (in category 'private') ----- + stream + + ^ Form + extent: 12@12 + depth: 32 + fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294967295 4294967295 0 0 4294967295 4294967295 0 0 0 0 0 4294967295 4290038244 4292075503 4294967295 4294967295 4290038244 4292075503 4294967295 0 0 0 0 4294967295 4288921054 4284189380 4292535794 4294967295 4288921054 4284189380 4292535794 4294967295 0 0 0 4294967295 4288921054 4283597761 4284386245 4293850105 4289183968 4283597761 4284386245 4292995828 4294967295 0 0 4294967295 4288921054 4283597761 4283597761 4288461275 4289381089 4283597761 4283597761 4284583622 4293784313 4294967295 0 4294967295 4288921054 4283597761 4283597761 4288198106 4289381088 4283597761 4283597761 4284123588 4293192949 4294967295 0 4294967295 4288921054 4283597761 4283926211 4293127157 4289183968 4283597761 4283926211 4291812590 4294967295 0 0 4294967295 4288921054 4283794882 4291155690 4294967295 4288921054 4283794882 4291155690 4294967295 0 0 0 4294967295 4289381088 4290629607 4294967295 4294967295 4289381088 4290629607 4294967295 0 0 0 0 4294967295 4294967295 4294967295 0 4294967295 4294967295 4294967295 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) + offset: 0@0! From commits at source.squeak.org Thu Mar 26 17:45:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 17:45:28 2015 Subject: [squeak-dev] Squeak 4.5: Environments-cmm.57.mcz Message-ID: Tobias Pape uploaded a new version of Environments to project Squeak 4.5: http://source.squeak.org/squeak45/Environments-cmm.57.mcz ==================== Summary ==================== Name: Environments-cmm.57 Author: cmm Time: 24 March 2015, 2:15:46.253 pm UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 Ancestors: Environments-topa.56 Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. =============== Diff against Environments-topa.56 =============== Item was changed: ----- Method: Environment>>at:ifAbsentPut: (in category 'emulating') ----- at: aSymbol ifAbsentPut: aBlock + ^self at: aSymbol ifAbsent: [ + self at: aSymbol put: aBlock value ]! - ^ declarations - at: aSymbol - ifAbsentPut: aBlock! From Das.Linux at gmx.de Thu Mar 26 17:45:39 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 26 17:45:48 2015 Subject: [squeak-dev] The Trunk: Environments-cmm.57.mcz In-Reply-To: <1052294C-EDB9-4EC0-8156-443516A92B83@freudenbergs.de> References: <2E050535-AD51-492C-883C-8B3EAC53545E@gmx.de> <1052294C-EDB9-4EC0-8156-443516A92B83@freudenbergs.de> Message-ID: <776A1819-0422-467B-92BB-88BA38FCF754@gmx.de> Done Best -Tobias On 24.03.2015, at 20:38, Bert Freudenberg wrote: > >> On 24.03.2015, at 20:35, Tobias Pape wrote: >> >> Would it be sane to cherry-pick this to 4.5 as well? > > I'd think so. > > - Bert - > > >> >> best >> -Tobias >> >> On 24.03.2015, at 19:15, commits@source.squeak.org wrote: >> >>> Chris Muller uploaded a new version of Environments to project The Trunk: >>> http://source.squeak.org/trunk/Environments-cmm.57.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Environments-cmm.57 >>> Author: cmm >>> Time: 24 March 2015, 2:15:46.253 pm >>> UUID: 9352873e-a424-44ef-b624-9bf6fbbf4b74 >>> Ancestors: Environments-topa.56 >>> >>> Fix access to globals which were defined by: Smalltalk at: #MyGlobal ifAbsentPut: [myValue]. >>> >>> =============== Diff against Environments-topa.56 =============== >>> >>> Item was changed: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1625 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150326/61e9ef77/signature.pgp From commits at source.squeak.org Thu Mar 26 21:31:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 21:31:58 2015 Subject: [squeak-dev] The Trunk: System-topa.710.mcz Message-ID: Tobias Pape uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-topa.710.mcz ==================== Summary ==================== Name: System-topa.710 Author: topa Time: 26 March 2015, 10:31:31.508 pm UUID: ece5d55e-e9c3-4048-a6cc-46570ec16b3b Ancestors: System-eem.709 Port the wrapping breakpoint implementation from OB-SUnitintegration. (An addition to BreakPoint, no replacement) =============== Diff against System-eem.709 =============== Item was added: + ProtoObject subclass: #WrappedBreakpoint + instanceVariableNames: 'method' + classVariableNames: '' + poolDictionaries: '' + category: 'System-Tools'! + + !WrappedBreakpoint commentStamp: 'topa 3/26/2015 21:51' prior: 0! + I am a wrapper around an actual method that should be debugged. + Contrary to my siblings BreakPoint and BreakpointManager I do not need + to modify the original method nor its source but rather implant me in my + method's position. + + I am based on OBBreakpoint from the OmniBrowser framework. + + Instance Variables + method: + + method + - actual method I wrap + ! Item was added: + ----- Method: WrappedBreakpoint class>>on: (in category 'instance creation') ----- + on: aCompiledMethod + ^ self basicNew initializeOn: aCompiledMethod! Item was added: + ----- Method: WrappedBreakpoint>>doesNotUnderstand: (in category 'private') ----- + doesNotUnderstand: aMessage + ^ method + perform: aMessage selector + withArguments: aMessage arguments! Item was added: + ----- Method: WrappedBreakpoint>>flushCache (in category 'private') ----- + flushCache + method selector flushCache! Item was added: + ----- Method: WrappedBreakpoint>>hasBreakpoint (in category 'public') ----- + hasBreakpoint + ^ true! Item was added: + ----- Method: WrappedBreakpoint>>initializeOn: (in category 'initialization') ----- + initializeOn: aCompiledMethod + method := aCompiledMethod! Item was added: + ----- Method: WrappedBreakpoint>>install (in category 'public') ----- + install + method methodClass methodDictionary + at: method selector + put: self! Item was added: + ----- Method: WrappedBreakpoint>>literalsDo: (in category 'literals') ----- + literalsDo: aBlock + "This method is necessary to show the breakpoint-flag in the browser." + + aBlock value: #break. + method literalsDo: aBlock! Item was added: + ----- Method: WrappedBreakpoint>>printOn: (in category 'private') ----- + printOn: aStream + + aStream nextPutAll: 'Break in '. + method printOn: aStream.! Item was added: + ----- Method: WrappedBreakpoint>>printStringLimitedTo: (in category 'private') ----- + printStringLimitedTo: limit + "Answer a String whose characters are a description of the receiver. + If you want to print without a character limit, use fullPrintString." + | limitedString | + limitedString := String streamContents: [:s | self printOn: s] limitedTo: limit. + limitedString size < limit ifTrue: [^ limitedString]. + ^ limitedString , '...etc...'! Item was added: + ----- 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. + Debugger + openOn: process context: process suspendedContext + label: 'Breakpoint in ' , method methodClass name , '>>#' , method selector + contents: nil fullView: true. + Project spawnNewProcessIfThisIsUI: Processor activeProcess. + thisContext swapSender: nil. + Processor activeProcess terminate.! Item was added: + ----- Method: WrappedBreakpoint>>uninstall (in category 'public') ----- + uninstall + method methodClass methodDictionary + at: method selector + put: method! From commits at source.squeak.org Thu Mar 26 21:33:22 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 21:33:24 2015 Subject: [squeak-dev] The Trunk: Tools-topa.561.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.561.mcz ==================== Summary ==================== Name: Tools-topa.561 Author: topa Time: 26 March 2015, 10:32:58.963 pm UUID: 8a72e1f6-c1ad-45fe-bfe8-795e027af8fd Ancestors: Tools-topa.560 Split the 'more...' entry for class list menus, too. =============== Diff against Tools-topa.560 =============== Item was changed: ----- Method: Browser>>classListMenu: (in category 'class functions') ----- classListMenu: aMenu "Conveniently fit for backward compatibility with old browers stored in image segments" aMenu addList: #( - ('browse full (b)' browseMethodFull) ('browse hierarchy (h)' spawnHierarchy) ('browse protocol (p)' browseFullProtocol) - ('printOut' printOutClass) ('fileOut' fileOutClass) - ('show hierarchy' hierarchy) ('show definition' editClass) ('show comment' editComment) - ('references... (r)' browseVariableReferences) ('assignments... (a)' browseVariableAssignments) ('class refs (N)' browseClassRefs) - ('rename class ...' renameClass) ('copy class' copyClass) ('remove class (x)' removeClass) - + ('find method...' findMethod)). - ('find method...' findMethod) - - - ('more...' offerShiftedClassListMenu)). ^ aMenu ! Item was added: + ----- Method: Browser>>classListMenuMore: (in category 'class functions') ----- + classListMenuMore: aMenu + " The 'more..' link that toggles between shifted and unshifted menus + in class lists " + + + ^ aMenu addList: #(- ('more...' offerShiftedClassListMenu)); yourself + ! Item was changed: ----- Method: Browser>>shiftedClassListMenu: (in category 'class functions') ----- shiftedClassListMenu: aMenu "Set up the menu to apply to the receiver's class list when the shift key is down" ^ aMenu addList: #( - ('unsent methods' browseUnusedMethods 'browse all methods defined by this class that have no senders') ('unreferenced inst vars' showUnreferencedInstVars 'show a list of all instance variables that are not referenced in methods') ('unreferenced class vars' showUnreferencedClassVars 'show a list of all class variables that are not referenced in methods') ('subclass template' makeNewSubclass 'put a template into the code pane for defining of a subclass of this class') - ('sample instance' makeSampleInstance 'give me a sample instance of this class, if possible') ('inspect instances' inspectInstances 'open an inspector on all the extant instances of this class') ('inspect subinstances' inspectSubInstances 'open an inspector on all the extant instances of this class and of all of its subclasses') - ('add all meths to current chgs' addAllMethodsToCurrentChangeSet 'place all the methods defined by this class into the current change set') + ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them')); + yourself! - ('create inst var accessors' createInstVarAccessors 'compile instance-variable access methods for any instance variables that do not yet have them') - - - ('more...' offerUnshiftedClassListMenu 'return to the standard class-list menu'))! Item was added: + ----- Method: Browser>>shiftedClassListMenuMore: (in category 'class functions') ----- + shiftedClassListMenuMore: aMenu + " The 'more..' link that toggles between unshifted and shifted menus + in class lists " + + + ^ aMenu addList: #(- + ('more...' offerUnshiftedClassListMenu 'return to the standard class-list menu')); + yourself! From commits at source.squeak.org Thu Mar 26 21:35:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 21:35:05 2015 Subject: [squeak-dev] The Trunk: Tools-topa.562.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.562.mcz ==================== Summary ==================== Name: Tools-topa.562 Author: topa Time: 26 March 2015, 10:34:40.589 pm UUID: c1e03f1f-b7f2-46a1-b27d-5c2f42e19ef1 Ancestors: Tools-topa.561 Tool icons: See if a method identifies itself as having a breakpoint or a 'reportable slip' =============== Diff against Tools-topa.561 =============== Item was changed: ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') ----- toolIconSelector: aSymbol "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns. We customize this for, eg, overriden methods or methods with breaks. Defaults to no icon" self methodDictionary at: aSymbol ifPresent: [ :method | + method hasBreakpoint ifTrue: [^ #breakpoint]. + method literalsDo: [:literal | + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount: break) includes: literal) - method literalsDo: [ :literal | - (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) ifTrue: [^ #breakpoint]. (#(flag: needsWork notYetImplemented) includes: literal) ifTrue: [^ #flag]. (#(shouldBeImplemented subclassResponsibility) includes: literal) ifTrue: [ (self isSelectorOverridden: aSymbol) ifTrue: [^ #abstract] ifFalse: [^ #notOverridden]]. literal == #shouldNotImplement + ifTrue: [^ #no]]. + method hasReportableSlip ifTrue: [^ #breakpoint]]. - ifTrue: [^ #no]]]. (self isSelectorOverride: aSymbol) ifTrue: [ (self isSelectorOverridden: aSymbol) ifTrue: [ ^ #arrowUpAndDown ] ifFalse: [ ^ #arrowUp ] ] ifFalse: [ (self isSelectorOverridden: aSymbol) ifTrue: [^ #arrowDown ]]. self methodDictionary at: aSymbol ifPresent: [ :method | (method primitive ~= 0 and: [method isQuick not]) ifTrue: [^ #primitive]]. ^ #blank! From commits at source.squeak.org Thu Mar 26 22:27:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 22:27:11 2015 Subject: [squeak-dev] The Trunk: TrueType-cmm.35.mcz Message-ID: Chris Muller uploaded a new version of TrueType to project The Trunk: http://source.squeak.org/trunk/TrueType-cmm.35.mcz ==================== Summary ==================== Name: TrueType-cmm.35 Author: cmm Time: 26 March 2015, 5:27:01.756 pm UUID: 93cf2b3b-dd5a-477f-b8d2-e2b3de539016 Ancestors: TrueType-topa.34 Ran FixUnderscores on this package. =============== Diff against TrueType-topa.34 =============== Item was changed: ----- Method: MultiTTCFont>>indexFor: (in category 'all') ----- indexFor: char | triplet | map size > 511 ifTrue: [ + cacheIndex := 512 atRandom. - cacheIndex _ 512 atRandom. triplet := self cache at: cacheIndex. triplet ifNotNil: [map removeKey: (triplet at: 1) ifAbsent: []]. ^ cacheIndex ]. ^ (cacheIndex := cacheIndex + 1 \\ 512) + 1. ! Item was changed: ----- Method: TTCFontSet class>>getExistings: (in category 'private') ----- getExistings: fontArray | result em | + result := OrderedCollection new. - result _ OrderedCollection new. result add: fontArray. 1 to: 3 do: [:i | em := (fontArray collect: [:f | f emphasized: i]). (em at: 1) ~= (fontArray at: 1) ifTrue: [ result add: em. ]. ]. ^ result asArray. ! From commits at source.squeak.org Thu Mar 26 22:28:20 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 22:28:20 2015 Subject: [squeak-dev] The Trunk: Kernel-cmm.914.mcz Message-ID: Chris Muller uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-cmm.914.mcz ==================== Summary ==================== Name: Kernel-cmm.914 Author: cmm Time: 26 March 2015, 5:05:35.834 pm UUID: 2a496e8d-58d0-46cc-9989-f7525275bfd9 Ancestors: Kernel-eem.913 Include filed-in methods in the RecentMessages list. =============== Diff against Kernel-eem.913 =============== Item was changed: ----- Method: ClassDescription>>compile:classified:withStamp:notifying:logSource: (in category 'compiling') ----- + compile: text classified: category withStamp: changeStamp notifying: requestor logSource: logSource - compile: text classified: category withStamp: changeStamp notifying: requestor logSource: logSource - | methodAndNode selector | methodAndNode := self compile: text asString notifying: requestor trailer: (self defaultMethodTrailerIfLogSource: logSource) + ifFail: [ ^ nil ]. - ifFail: [ ^nil ]. selector := methodAndNode selector. + logSource ifTrue: + [ self + logMethodSource: text + forMethodWithNode: methodAndNode + inCategory: category + withStamp: changeStamp + notifying: requestor. + RecentMessages default + recordSelector: selector + forClass: methodAndNode method methodClass + inEnvironment: CurrentEnvironment signal ]. + self + addAndClassifySelector: selector + withMethod: methodAndNode method + inProtocol: category + notifying: requestor. + self instanceSide + noteCompilationOf: selector + meta: self isClassSide. + ^ selector! - logSource ifTrue: [ - self logMethodSource: text forMethodWithNode: methodAndNode - inCategory: category withStamp: changeStamp notifying: requestor. - ]. - self addAndClassifySelector: selector withMethod: methodAndNode - method inProtocol: category notifying: requestor. - self instanceSide noteCompilationOf: selector meta: self isClassSide. - ^selector! From commits at source.squeak.org Thu Mar 26 22:37:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 22:37:41 2015 Subject: [squeak-dev] The Trunk: System-cmm.711.mcz Message-ID: Chris Muller uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-cmm.711.mcz ==================== Summary ==================== Name: System-cmm.711 Author: cmm Time: 26 March 2015, 5:04:31.955 pm UUID: fa6a3065-f10d-4b53-bdea-3177e86664ed Ancestors: System-topa.710 - Log filed-in code to the changes file. =============== Diff against System-topa.710 =============== Item was changed: ----- Method: PositionableStream>>fileInAnnouncing: (in category '*System-Changes-fileIn/Out') ----- fileInAnnouncing: announcement "This is special for reading expressions from text that has been formatted with exclamation delimitors. The expressions are read and passed to the Compiler. Answer the result of compilation. Put up a progress report with the given announcement as the title." | val | announcement displayProgressFrom: 0 to: self size during: [:bar | [self atEnd] whileFalse: [bar value: self position. self skipSeparators. [ | chunk | val := (self peekFor: $!!) + ifTrue: [(Compiler evaluate: self nextChunk logged: true) scanFrom: self] - ifTrue: [(Compiler evaluate: self nextChunk logged: false) scanFrom: self] ifFalse: [chunk := self nextChunk. self checkForPreamble: chunk. Compiler evaluate: chunk logged: true]] on: InMidstOfFileinNotification do: [:ex | ex resume: true]. self skipStyleChunk]. self close]. "Note: The main purpose of this banner is to flush the changes file." Smalltalk logChange: '----End fileIn of ' , self name , '----'. self flag: #ThisMethodShouldNotBeThere. "sd" ^val! From commits at source.squeak.org Thu Mar 26 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150326225503.10786.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007686.html Name: Tools-topa.559 Ancestors: Tools-topa.558 Improve tool icons a tad ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007687.html Name: Tools-topa.560 Ancestors: Tools-topa.559 Change tool icons to allow dynamicity. Classes can now control their icon and these of their methods. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007688.html Name: System-topa.710 Ancestors: System-eem.709 Port the wrapping breakpoint implementation from OB-SUnitintegration. (An addition to BreakPoint, no replacement) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007689.html Name: Tools-topa.561 Ancestors: Tools-topa.560 Split the 'more...' entry for class list menus, too. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007690.html Name: Tools-topa.562 Ancestors: Tools-topa.561 Tool icons: See if a method identifies itself as having a breakpoint or a 'reportable slip' ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007691.html Name: TrueType-cmm.35 Ancestors: TrueType-topa.34 Ran FixUnderscores on this package. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007692.html Name: Kernel-cmm.914 Ancestors: Kernel-eem.913 Include filed-in methods in the RecentMessages list. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007693.html Name: System-cmm.711 Ancestors: System-topa.710 - Log filed-in code to the changes file. ============================================= From Das.Linux at gmx.de Thu Mar 26 23:25:49 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Thu Mar 26 23:26:00 2015 Subject: [squeak-dev] The Trunk: TrueType-cmm.35.mcz Message-ID: <2BE6C125-6051-4794-BB64-3326ECD60DBC@gmx.de> Thanks, these slipped when ported from Etoys? Best -Tobias On 26.03.2015, at 22:27, commits@source.squeak.org wrote: > Chris Muller uploaded a new version of TrueType to project The Trunk: > http://source.squeak.org/trunk/TrueType-cmm.35.mcz > > ==================== Summary ==================== > > Name: TrueType-cmm.35 > Author: cmm > Time: 26 March 2015, 5:27:01.756 pm > UUID: 93cf2b3b-dd5a-477f-b8d2-e2b3de539016 > Ancestors: TrueType-topa.34 > > Ran FixUnderscores on this package. > > =============== Diff against TrueType-topa.34 =============== > > Item was changed: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 1625 bytes Desc: Message signed with OpenPGP using GPGMail Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/d4b50619/signature.pgp From commits at source.squeak.org Thu Mar 26 23:27:56 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Thu Mar 26 23:27:59 2015 Subject: [squeak-dev] The Trunk: Tools-topa.563.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.563.mcz ==================== Summary ==================== Name: Tools-topa.563 Author: topa Time: 27 March 2015, 12:27:31.114 am UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b Ancestors: Tools-topa.562 Fix menu entry sort to actually match (intended) description =============== Diff against Tools-topa.562 =============== Item was changed: ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- menuBuildersFor: someMenus in: aClass "Find all builders and sort them by 1. Priority (default 500) 2. selector name 3. inheritance " ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | |ma mb pa pb| ma := a method. mb := b method. pa := self methodMenuPriority: ma. pb := self methodMenuPriority: mb. + pa <= pb or: [ - pa < pb or: [ pa = pb and: [ ma selector <= mb selector and: [ mb methodClass inheritsFrom: ma methodClass]]]] ! From commits at source.squeak.org Fri Mar 27 00:24:25 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 27 00:24:27 2015 Subject: [squeak-dev] The Trunk: Tools-topa.564.mcz Message-ID: Tobias Pape uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-topa.564.mcz ==================== Summary ==================== Name: Tools-topa.564 Author: topa Time: 27 March 2015, 1:24:02.733 am UUID: 8c4d15ea-663a-4c4e-b3c3-a31f6ac20214 Ancestors: Tools-topa.563 Amend to: Fix menu entry sort to actually match (intended) description =============== Diff against Tools-topa.563 =============== Item was changed: ----- Method: Browser>>classListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- classListMenuHook: aMenu shifted: aBoolean + ^ self menuHook: aMenu named: #classListMenu shifted: aBoolean. ! Item was changed: ----- Method: Browser>>messageCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- messageCategoryMenuHook: aMenu shifted: aBoolean + ^ self menuHook: aMenu named: #messageCategoryMenu shifted: aBoolean. ! Item was changed: ----- Method: Browser>>messageListMenuHook:shifted: (in category 'pluggable menus - hooks') ----- messageListMenuHook: aMenu shifted: aBoolean + ^ self menuHook: aMenu named: #messageListMenu shifted: aBoolean. ! Item was changed: ----- Method: Browser>>systemCategoryMenuHook:shifted: (in category 'pluggable menus - hooks') ----- systemCategoryMenuHook: aMenu shifted: aBoolean + ^ self menuHook: aMenu named: #systemCategoryMenu shifted: aBoolean. ! Item was changed: ----- Method: StringHolder>>buildMenu:withBuilders:shifted: (in category '*Tools-pluggable menus') ----- buildMenu: aMenu withBuilders: builders shifted: aBoolean " We let every builder modify the menu. The builder should indicate whether to abort by returning nil." | menu | menu := aMenu. builders do: [:builder | + menu := self perform: builder method selector withEnoughArguments: { menu . aBoolean }. - menu := self perform: builder method selector withEnoughArguments: { aMenu . aBoolean }. menu ifNil: [^ aMenu]]. ^ menu ! Item was changed: ----- Method: StringHolder>>codePaneMenuHook:shifted: (in category '*Tools-pluggable menus - hooks') ----- codePaneMenuHook: aMenu shifted: aBoolean + ^ self menuHook: aMenu named: #codePaneMenu shifted: aBoolean. ! Item was changed: ----- Method: StringHolder>>menu:for:shifted: (in category '*Tools-pluggable menus') ----- menu: aMenu for: aMenuSymbolOrCollection shifted: aBoolean | builders | + builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class shifted: aBoolean. + builders := self sortMenuBuilders: builders. - builders := self menuBuildersFor: aMenuSymbolOrCollection in: self class. - builders := aBoolean - ifTrue: [builders reject: [:builder | builder arguments = #(false)]] - ifFalse: [builders reject: [:builder | builder arguments = #(true)]]. - ^ self buildMenu: aMenu withBuilders: builders shifted: aBoolean ! Item was removed: - ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- - menuBuildersFor: someMenus in: aClass - "Find all builders and sort them by - 1. Priority (default 500) - 2. selector name - 3. inheritance - " - ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | - |ma mb pa pb| - ma := a method. - mb := b method. - pa := self methodMenuPriority: ma. - pb := self methodMenuPriority: mb. - pa <= pb or: [ - pa = pb and: [ - ma selector <= mb selector and: [ - mb methodClass inheritsFrom: ma methodClass]]]] - ! Item was added: + ----- Method: StringHolder>>menuBuildersFor:in:shifted: (in category '*Tools-pluggable menus') ----- + menuBuildersFor: someMenus in: aClass shifted: aBoolean + "Find all builders but reject the ones not matching the shift state " + | pragmas | + pragmas := (self menuPragmasFor: someMenus in: aClass) . + ^ aBoolean + ifTrue: [pragmas reject: [:builder | builder arguments = #(false)]] + ifFalse: [pragmas reject: [:builder | builder arguments = #(true)]]. + ! Item was added: + ----- Method: StringHolder>>sortMenuBuilders: (in category '*Tools-pluggable menus') ----- + sortMenuBuilders: builders + " Sort them by + 1. Priority (default 500) + 2. selector name + " + ^ builders sorted: [:a :b | + | ma mb pa pb | + ma := a method. + mb := b method. + pa := self methodMenuPriority: ma. + pb := self methodMenuPriority: mb. + pa < pb or: [pa = pb and: [ma selector <= mb selector]]] + ! From nicolas.cellier.aka.nice at gmail.com Fri Mar 27 01:31:43 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Mar 27 01:31:45 2015 Subject: [squeak-dev] The Trunk: Tools-topa.563.mcz In-Reply-To: <55149601.d518370a.7430.ffffd84cSMTPIN_ADDED_MISSING@mx.google.com> References: <55149601.d518370a.7430.ffffd84cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-03-27 0:27 GMT+01:00 : > Tobias Pape uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-topa.563.mcz > > ==================== Summary ==================== > > Name: Tools-topa.563 > Author: topa > Time: 27 March 2015, 12:27:31.114 am > UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b > Ancestors: Tools-topa.562 > > Fix menu entry sort to actually match (intended) description > > =============== Diff against Tools-topa.562 =============== > > Item was changed: > ----- Method: StringHolder>>menuBuildersFor:in: (in category > '*Tools-pluggable menus') ----- > menuBuildersFor: someMenus in: aClass > "Find all builders and sort them by > 1. Priority (default 500) > 2. selector name > 3. inheritance > " > ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | > |ma mb pa pb| > ma := a method. > mb := b method. > pa := self methodMenuPriority: ma. > pb := self methodMenuPriority: mb. > + pa <= pb or: [ > - pa < pb or: [ > I don't understand this. pa <= pb = false ==> (pa = pb = false) so the whole or: block becomes dead code no? > pa = pb and: [ > ma selector <= mb selector and: [ > mb methodClass inheritsFrom: ma > methodClass]]]] > ! > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/7a523855/attachment.htm From nicolas.cellier.aka.nice at gmail.com Fri Mar 27 01:33:52 2015 From: nicolas.cellier.aka.nice at gmail.com (Nicolas Cellier) Date: Fri Mar 27 01:33:54 2015 Subject: [squeak-dev] The Trunk: Tools-topa.563.mcz In-Reply-To: References: <55149601.d518370a.7430.ffffd84cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: 2015-03-27 2:31 GMT+01:00 Nicolas Cellier < nicolas.cellier.aka.nice@gmail.com>: > > > 2015-03-27 0:27 GMT+01:00 : > >> Tobias Pape uploaded a new version of Tools to project The Trunk: >> http://source.squeak.org/trunk/Tools-topa.563.mcz >> >> ==================== Summary ==================== >> >> Name: Tools-topa.563 >> Author: topa >> Time: 27 March 2015, 12:27:31.114 am >> UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b >> Ancestors: Tools-topa.562 >> >> Fix menu entry sort to actually match (intended) description >> >> =============== Diff against Tools-topa.562 =============== >> >> Item was changed: >> ----- Method: StringHolder>>menuBuildersFor:in: (in category >> '*Tools-pluggable menus') ----- >> menuBuildersFor: someMenus in: aClass >> "Find all builders and sort them by >> 1. Priority (default 500) >> 2. selector name >> 3. inheritance >> " >> ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | >> |ma mb pa pb| >> ma := a method. >> mb := b method. >> pa := self methodMenuPriority: ma. >> pb := self methodMenuPriority: mb. >> + pa <= pb or: [ >> - pa < pb or: [ >> > > I don't understand this. > pa <= pb = false ==> (pa = pb = false) > so the whole or: block becomes dead code no? > Oh, but it already changed, never mind :) > > >> pa = pb and: [ >> ma selector <= mb selector and: [ >> mb methodClass inheritsFrom: ma >> methodClass]]]] >> ! >> >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/147e7bfe/attachment-0001.htm From Das.Linux at gmx.de Fri Mar 27 06:27:47 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 27 06:27:50 2015 Subject: [squeak-dev] The Trunk: Tools-topa.563.mcz In-Reply-To: References: <55149601.d518370a.7430.ffffd84cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi On 27.03.2015, at 02:33, Nicolas Cellier wrote: > > > 2015-03-27 2:31 GMT+01:00 Nicolas Cellier : > > > 2015-03-27 0:27 GMT+01:00 : > Tobias Pape uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-topa.563.mcz > > ==================== Summary ==================== > > Name: Tools-topa.563 > Author: topa > Time: 27 March 2015, 12:27:31.114 am > UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b > Ancestors: Tools-topa.562 > > Fix menu entry sort to actually match (intended) description > > =============== Diff against Tools-topa.562 =============== > > Item was changed: > ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- > menuBuildersFor: someMenus in: aClass > "Find all builders and sort them by > 1. Priority (default 500) > 2. selector name > 3. inheritance > " > ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | > |ma mb pa pb| > ma := a method. > mb := b method. > pa := self methodMenuPriority: ma. > pb := self methodMenuPriority: mb. > + pa <= pb or: [ > - pa < pb or: [ > > I don't understand this. > pa <= pb = false ==> (pa = pb = false) > so the whole or: block becomes dead code no? > > Oh, but it already changed, never mind :) Thanks for watching, nevertheless :) Best -Tobias > > > pa = pb and: [ > ma selector <= mb selector and: [ > mb methodClass inheritsFrom: ma methodClass]]]] > ! > > > > > From Das.Linux at gmx.de Fri Mar 27 06:27:47 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 27 06:57:11 2015 Subject: [squeak-dev] The Trunk: Tools-topa.563.mcz In-Reply-To: References: <55149601.d518370a.7430.ffffd84cSMTPIN_ADDED_MISSING@mx.google.com> Message-ID: Hi On 27.03.2015, at 02:33, Nicolas Cellier wrote: > > > 2015-03-27 2:31 GMT+01:00 Nicolas Cellier : > > > 2015-03-27 0:27 GMT+01:00 : > Tobias Pape uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-topa.563.mcz > > ==================== Summary ==================== > > Name: Tools-topa.563 > Author: topa > Time: 27 March 2015, 12:27:31.114 am > UUID: 7fb2f85e-8ba3-4ec4-be83-3c9275f7f80b > Ancestors: Tools-topa.562 > > Fix menu entry sort to actually match (intended) description > > =============== Diff against Tools-topa.562 =============== > > Item was changed: > ----- Method: StringHolder>>menuBuildersFor:in: (in category '*Tools-pluggable menus') ----- > menuBuildersFor: someMenus in: aClass > "Find all builders and sort them by > 1. Priority (default 500) > 2. selector name > 3. inheritance > " > ^ (self menuPragmasFor: someMenus in: aClass) sorted: [:a :b | > |ma mb pa pb| > ma := a method. > mb := b method. > pa := self methodMenuPriority: ma. > pb := self methodMenuPriority: mb. > + pa <= pb or: [ > - pa < pb or: [ > > I don't understand this. > pa <= pb = false ==> (pa = pb = false) > so the whole or: block becomes dead code no? > > Oh, but it already changed, never mind :) Thanks for watching, nevertheless :) Best -Tobias > > > pa = pb and: [ > ma selector <= mb selector and: [ > mb methodClass inheritsFrom: ma methodClass]]]] > ! > > > > > From commits at source.squeak.org Fri Mar 27 10:36:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 27 10:36:32 2015 Subject: [squeak-dev] The Trunk: SUnitTools-topa.1.mcz Message-ID: Tobias Pape uploaded a new version of SUnitTools to project The Trunk: http://source.squeak.org/trunk/SUnitTools-topa.1.mcz ==================== Summary ==================== Name: SUnitTools-topa.1 Author: topa Time: 27 March 2015, 11:36:27.849 am UUID: f60dd685-e19c-481a-9634-83d439b37e67 Ancestors: Provide browser integration for SUnit. - Indicate test status via tool icons - Run tests from context menu - Debug tests from context menu - Switch between tested and testing code via context menu (heursitically) This is featurewise modeled after the OmniBrowser SUnit-Integration. ==================== Snapshot ==================== ----- Method: TestCase class>>isTestClass (in category '*SUnitTools-testing') ----- isTestClass ^ true! ----- Method: TestCase class>>toolIcon (in category '*SUnitTools-icons') ----- toolIcon | classHistory | self isAbstract ifTrue: [^ super toolIcon]. classHistory := TestResult historyFor: self. (classHistory at: #errors) ifNotEmpty: [^ #testRed]. (classHistory at: #failures) ifNotEmpty: [^ #testOrange]. (classHistory at: #passed) ifNotEmpty: [ ^ #testGreen]. ^ #testGray! ----- Method: TestCase class>>toolIconSelector: (in category '*SUnitTools-icons') ----- toolIconSelector: aSelector (self isMeta or: [self isAbstract or: [ (self allTestSelectors includes: aSelector) not]]) ifTrue: [^ super toolIconSelector: aSelector]. (self methodRaisedError: aSelector) ifTrue: [^ #testRed]. (self methodFailed: aSelector) ifTrue: [^ #testOrange]. (self methodPassed: aSelector) ifTrue: [^ #testGreen]. ^ #testGray! ----- Method: Browser>>hasClassWithTestsSelected (in category '*SUnitTools-class list functions') ----- hasClassWithTestsSelected ^ (self selectedClass isTestClass and: [self selectedClass isAbstract not])! ----- Method: Browser>>hasSystemCategoryWithTestsSelected (in category '*SUnitTools-system category functions') ----- hasSystemCategoryWithTestsSelected (systemOrganizer listAtCategoryNamed: (self selectedSystemCategory ifNil: [^ false])) detect: [:name | self class environment at: name ifPresent: [:cls | cls isTestClass and: [cls isAbstract not]] ifAbsent: [false]] ifNone: [^ false]. ^ true ! ----- Method: Browser>>testRunTests (in category '*SUnitTools-class list functions') ----- testRunTests self testRunSuite: self selectedClass suite. self changed: #classList. self changed: #messageList.! ----- Method: Browser>>testRunTestsCategory (in category '*SUnitTools-system category functions') ----- testRunTestsCategory | suite | suite :=TestSuite new. ((systemOrganizer listAtCategoryNamed: self selectedSystemCategory) collect: [:each | self class environment at: each]) select: [:each | each isTestClass and: [each isAbstract not]] thenDo: [:each | each addToSuiteFromSelectors: suite]. self testRunSuite: suite. self changed: #classList. self changed: #messageList.! ----- Method: Browser>>testsClassListMenu: (in category '*SUnitTools-menus') ----- testsClassListMenu: aMenu self hasClassWithTestsSelected ifFalse: [^ aMenu]. ^ aMenu addList: #( - ('run all tests' testRunTests)); yourself! ----- Method: Browser>>testsSystemCategoryMenu: (in category '*SUnitTools-menus') ----- testsSystemCategoryMenu: aMenu self hasSystemCategoryWithTestsSelected ifFalse: [^ aMenu]. ^ aMenu addList: #( - ('run all tests' testRunTestsCategory)); yourself! ----- Method: CodeHolder>>testBinarySelectorNames (in category '*SUnitTools-running') ----- testBinarySelectorNames ^ IdentityDictionary newFromPairs: #( #& 'conjunction' #| 'disjunction' #==> 'implication' #* 'multiply' #+ 'add' #- 'subtract' #/ 'divide' #// 'remainder' #\\ 'modulo' #<< 'shiftLeft' #>> 'shiftRight' #= 'equality' #== 'identity' #~= 'difference' #~~ 'mismatch' #< 'lessThan' #<= 'lessOrEqualThan' #> 'greaterThan' #>= 'greaterOrEqualThan' #<=> 'spaceshipOperator' #@ 'at' #, 'concatenation' #-> 'association' #=> 'binding' ) ! ----- Method: CodeHolder>>testBrowseClassNamed:possibleMessageNamed: (in category '*SUnitTools-running') ----- testBrowseClassNamed: aClassName possibleMessageNamed: aMessageName | cls selector | (self class environment hasClassNamed: aClassName) ifFalse: ["no dice" ^ self]. cls := self class environment classNamed: aClassName. (aMessageName notNil and: [cls includesLocalSelector: (selector := aMessageName asSymbol)]) ifTrue: [ToolSet browse: cls selector: selector] ifFalse: [ToolSet browseClass: cls].! ----- Method: CodeHolder>>testDebugTest (in category '*SUnitTools-message list functions') ----- testDebugTest | case selector cls | cls := self selectedClass ifNil: [^ self]. selector := self selectedMessageName ifNil: [^ self]. case := cls selector: selector. case debugAsFailure.! ----- Method: CodeHolder>>testFindTest (in category '*SUnitTools-running') ----- testFindTest | cls destClassName destMessage | cls := self selectedClass ifNil: [^ self]. cls isTestClass ifTrue: [" already there " ^ self]. destClassName := cls name asString, 'Test'. destMessage := self selectedMessageName ifNotNil: [:name | self testSelectorFrom: name]. self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage ! ----- Method: CodeHolder>>testFindTested (in category '*SUnitTools-running') ----- testFindTested | cls destClassName destMessage | cls := self selectedClass ifNil: [^ self]. cls isTestClass ifFalse: [" already there " ^ self]. destClassName := (cls name asString endsWith: 'Test') ifTrue: [cls name asString allButLast: 4] ifFalse: [^ self]. destMessage := self selectedMessageName ifNotNil: [:selector | | messageName | messageName := selector asString. (messageName beginsWith: 'test') "operate on test methods only" ifTrue: [ (self class environment classNamed: destClassName) ifNotNil: [:destClass | destClass selectors detect: [:destSelector | (self testSelectorFrom: destSelector) = messageName] ifNone: [nil]]] ifFalse: [nil]]. self testBrowseClassNamed: destClassName possibleMessageNamed: destMessage ! ----- Method: CodeHolder>>testRunSuite: (in category '*SUnitTools-running') ----- testRunSuite: suite | result | result := suite run. (result respondsTo: #dispatchResultsIntoHistory) ifTrue: [result dispatchResultsIntoHistory]. result hasPassed ifTrue: [^ self]. (result defects size = 1 ifTrue: [result defects anyOne] ifFalse: [UIManager default chooseFrom: (result defects collect: [:each | each class name , '>>' , each selector printString]) values: result defects title: ('{1} passes, {2} failures, {3} errors\\Debug a failure or error?' format: { result runCount . result failureCount . result errorCount}) withCRs] ) ifNotNil: [:defect | defect debug]. ! ----- Method: CodeHolder>>testRunTest (in category '*SUnitTools-message list functions') ----- testRunTest | suite | suite := self selectedClass selector: self selectedMessageName. self testRunSuite: suite. self changed: #messageList.! ----- Method: CodeHolder>>testSelectorFrom: (in category '*SUnitTools-running') ----- testSelectorFrom: aSelector | name | name := aSelector isBinary ifTrue: [self testBinarySelectorNames at: aSelector ifAbsent: [^ nil]] ifFalse: [aSelector asString]. ^ String streamContents: [:stream | stream nextPutAll: 'test'. (name findTokens: $:) do: [:each | stream nextPutAll: (each capitalized select: [:char | char isAlphaNumeric])]]! ----- Method: CodeHolder>>testsMessageListMenu: (in category '*SUnitTools-menus') ----- testsMessageListMenu: aMenu (self selectedClass isTestClass and: [self selectedClass isAbstract not and: [self selectedClass allTestSelectors includes: self selectedMessageName]]) ifFalse: [^ aMenu]. ^ aMenu addList: #( - ('run test' testRunTest) ('debug test' testDebugTest)); yourself! ----- Method: CodeHolder>>testsTestFindingMenu: (in category '*SUnitTools-menus') ----- testsTestFindingMenu: aMenu ^ self hasClassWithTestsSelected ifTrue: [aMenu add: 'find tested item' action: #testFindTested; yourself] ifFalse: [aMenu add: 'find test case' action: #testFindTest; yourself] ! ----- Method: Object>>isTestClass (in category '*SUnitTools-testing') ----- isTestClass ^ false! ----- Method: ToolIcons class>>testGray (in category '*SUnitTools-icons') ----- testGray ^ Form extent: 12@12 depth: 32 fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294177779 4291217094 4288585374 4288453788 4290953922 4294111986 0 0 0 0 0 0 4291217094 4291151301 4292796126 4292532954 4290690750 4290624957 0 0 0 0 0 0 4288585374 4292730333 4290953922 4290427578 4291414473 4287466893 0 0 0 0 0 0 4288387995 4292203989 4290493371 4290164406 4291019715 4287072135 0 0 0 0 0 0 4290822336 4290624957 4291414473 4291019715 4290230199 4289835441 0 0 0 0 0 0 4294111986 4290493371 4287269514 4286940549 4289769648 4293848814 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) offset: 0@0! ----- Method: ToolIcons class>>testGreen (in category '*SUnitTools-icons') ----- testGreen ^ Form extent: 12@12 depth: 32 fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4293720299 4288666780 4284466010 4284465241 4288599706 4293654250 0 0 0 0 0 0 4288666780 4288403095 4290962113 4290502586 4288007314 4288401048 0 0 0 0 0 0 4284465754 4290830784 4288008853 4287220872 4288992418 4283999824 0 0 0 0 0 0 4284398936 4290108596 4287351946 4286958211 4288532634 4283800910 0 0 0 0 0 0 4288533401 4288007057 4288926881 4288401561 4287677068 4288133778 0 0 0 0 0 0 4293653994 4288400279 4283867471 4283734348 4288067729 4293521384 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) offset: 0@0! ----- Method: ToolIcons class>>testOrange (in category '*SUnitTools-icons') ----- testOrange ^ Form extent: 12@12 depth: 32 fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294964456 4294953101 4294943038 4294942778 4294951813 4294963941 0 0 0 0 0 0 4294953101 4294952588 4294959549 4294958774 4294951038 4294688127 0 0 0 0 0 0 4294943293 4294959548 4294953862 4294951029 4294954132 4293888298 0 0 0 0 0 0 4294941751 4294957228 4294951287 4294949998 4294952328 4293165354 0 0 0 0 0 0 4294951298 4294950267 4294954131 4294952583 4294948207 4293110399 0 0 0 0 0 0 4294898405 4294424959 4293559850 4292902442 4292979327 4294438117 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) offset: 0@0! ----- Method: ToolIcons class>>testRed (in category '*SUnitTools-icons') ----- testRed ^ Form extent: 12@12 depth: 32 fromArray: #( 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4294960869 4294935167 4294716714 4294389034 4294344831 4294764005 0 0 0 0 0 0 4294935167 4294803840 4294687929 4294620593 4293950845 4293623680 0 0 0 0 0 0 4294585642 4294687928 4294477438 4294276206 4294284433 4292028973 0 0 0 0 0 0 4294061098 4294487209 4294276976 4294208615 4294150278 4291242543 0 0 0 0 0 0 4294082687 4293819516 4294284176 4294150277 4293163129 4291854213 0 0 0 0 0 0 4294698469 4293296000 4291635758 4290914863 4291657605 4294174183 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0) offset: 0@0! From cunningham.cb at gmail.com Fri Mar 27 15:55:47 2015 From: cunningham.cb at gmail.com (Chris Cunningham) Date: Fri Mar 27 15:55:49 2015 Subject: [squeak-dev] Old menu items in TextEditors that currently don't work Message-ID: Skipped content of type multipart/alternative-------------- next part -------------- A non-text attachment was scrubbed... Name: image.png Type: image/png Size: 3917 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/89581ff2/image.png From eliot.miranda at gmail.com Fri Mar 27 16:45:21 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 27 16:45:24 2015 Subject: [squeak-dev] slow display update on debugger proceed Message-ID: Hi All, Hi Bert, a while ago I complained about the, now seemingly more freq -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/11ebfb88/attachment.htm From Das.Linux at gmx.de Fri Mar 27 16:46:27 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 27 16:46:33 2015 Subject: [squeak-dev] slow display update on debugger proceed In-Reply-To: References: Message-ID: <96633A20-C0E3-49D3-A153-BB71935696DE@gmx.de> On 27.03.2015, at 17:45, Eliot Miranda wrote: > Hi All, Hi Bert, > > a while ago I complained about the, now seemingly more freq ack. here too. From eliot.miranda at gmail.com Fri Mar 27 16:47:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 27 16:47:55 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: Hi All, Hi Bert, a while ago I complained about extremely slow display update following proceed in the debugger. I can now confirm that it is nothing to do with the debugger simulating code and is simply the system being out of the defer updates state. Are there any fixes for this yet? Ah... I see a reply from Tobias, maybe all I need to do is update ;-) On Fri, Mar 27, 2015 at 9:45 AM, Eliot Miranda wrote: > Hi All, Hi Bert, > > a while ago I complained about the, now seemingly more freq > > -- > best, > Eliot > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/083e2c86/attachment.htm From Das.Linux at gmx.de Fri Mar 27 17:31:11 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 27 17:31:17 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: On 27.03.2015, at 17:47, Eliot Miranda wrote: > Hi All, Hi Bert, > > a while ago I complained about extremely slow display update following proceed in the debugger. I can now confirm that it is nothing to do with the debugger simulating code and is simply the system being out of the defer updates state. Are there any fixes for this yet? Ah... I see a reply from Tobias, maybe all I need to do is update ;-) Sadly, no. I have next to no knowledge of that part of Squeak. Best -Tobias From asqueaker at gmail.com Fri Mar 27 18:25:34 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 27 18:25:38 2015 Subject: [squeak-dev] The Trunk: Tools-topa.562.mcz In-Reply-To: <55147b8d.cd31370a.23fa.03c4SMTPIN_ADDED_MISSING@mx.google.com> References: <55147b8d.cd31370a.23fa.03c4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: What's a reportable slip? On Thu, Mar 26, 2015 at 4:34 PM, wrote: > Tobias Pape uploaded a new version of Tools to project The Trunk: > http://source.squeak.org/trunk/Tools-topa.562.mcz > > ==================== Summary ==================== > > Name: Tools-topa.562 > Author: topa > Time: 26 March 2015, 10:34:40.589 pm > UUID: c1e03f1f-b7f2-46a1-b27d-5c2f42e19ef1 > Ancestors: Tools-topa.561 > > Tool icons: See if a method identifies itself as having a breakpoint or a 'reportable slip' > > =============== Diff against Tools-topa.561 =============== > > Item was changed: > ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') ----- > toolIconSelector: aSymbol > "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns. > We customize this for, eg, overriden methods or methods with breaks. > Defaults to no icon" > > self methodDictionary at: aSymbol ifPresent: [ :method | > + method hasBreakpoint ifTrue: [^ #breakpoint]. > + method literalsDo: [:literal | > + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount: break) includes: literal) > - method literalsDo: [ :literal | > - (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) > ifTrue: [^ #breakpoint]. > (#(flag: needsWork notYetImplemented) includes: literal) > ifTrue: [^ #flag]. > (#(shouldBeImplemented subclassResponsibility) includes: literal) > ifTrue: [ > (self isSelectorOverridden: aSymbol) > ifTrue: [^ #abstract] > ifFalse: [^ #notOverridden]]. > literal == #shouldNotImplement > + ifTrue: [^ #no]]. > + method hasReportableSlip ifTrue: [^ #breakpoint]]. > - ifTrue: [^ #no]]]. > > (self isSelectorOverride: aSymbol) > ifTrue: [ > (self isSelectorOverridden: aSymbol) > ifTrue: [ ^ #arrowUpAndDown ] > ifFalse: [ ^ #arrowUp ] ] > ifFalse: [ > (self isSelectorOverridden: aSymbol) > ifTrue: [^ #arrowDown ]]. > > self methodDictionary at: aSymbol ifPresent: [ :method | > (method primitive ~= 0 and: [method isQuick not]) > ifTrue: [^ #primitive]]. > > > ^ #blank! > > From eliot.miranda at gmail.com Fri Mar 27 18:29:22 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Fri Mar 27 18:29:24 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: If there are any experts here I beg you to take a look. This is really impacting ,y productivity with VM development. I lose ~ 30seconds on almost every proceed in the debugger and I'm spending most of my time there-in simulating ARM execution right now. This is really painful. The ARM JIT and hence much faster Squeak on RPi and Android will arrive all the sooner if this is fixed. AdvThanksance On Fri, Mar 27, 2015 at 10:31 AM, Tobias Pape wrote: > > On 27.03.2015, at 17:47, Eliot Miranda wrote: > > > Hi All, Hi Bert, > > > > a while ago I complained about extremely slow display update > following proceed in the debugger. I can now confirm that it is nothing to > do with the debugger simulating code and is simply the system being out of > the defer updates state. Are there any fixes for this yet? Ah... I see a > reply from Tobias, maybe all I need to do is update ;-) > > Sadly, no. > I have next to no knowledge of that part of Squeak. > > Best > -Tobias > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/38c79d7c/attachment.htm From Das.Linux at gmx.de Fri Mar 27 18:36:28 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Fri Mar 27 18:36:34 2015 Subject: [squeak-dev] The Trunk: Tools-topa.562.mcz In-Reply-To: References: <55147b8d.cd31370a.23fa.03c4SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: <85ABEFF1-4766-4807-A3C1-744272C1BCFD@gmx.de> On 27.03.2015, at 19:25, Chris Muller wrote: > What's a reportable slip? To quote CompiledMethod>>#hasReportableSlip "Answer whether the receiver contains anything that should be brought to the attention of the author when filing out. Customize the lists here to suit your preferences. If slips do not get reported in spite of your best efforts here, make certain that the Preference 'checkForSlips' is set to true." Ie, references any of #doOnlyOnce: #halt #halt: #hottest #printDirectlyToDisplay #toRemove #personal #urgent #haltOnce #haltOnce: #haltIf: or Transcript AA BB CC DD EE Best -Tobias > > On Thu, Mar 26, 2015 at 4:34 PM, wrote: >> Tobias Pape uploaded a new version of Tools to project The Trunk: >> http://source.squeak.org/trunk/Tools-topa.562.mcz >> >> ==================== Summary ==================== >> >> Name: Tools-topa.562 >> Author: topa >> Time: 26 March 2015, 10:34:40.589 pm >> UUID: c1e03f1f-b7f2-46a1-b27d-5c2f42e19ef1 >> Ancestors: Tools-topa.561 >> >> Tool icons: See if a method identifies itself as having a breakpoint or a 'reportable slip' >> >> =============== Diff against Tools-topa.561 =============== >> >> Item was changed: >> ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') ----- >> toolIconSelector: aSymbol >> "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns. >> We customize this for, eg, overriden methods or methods with breaks. >> Defaults to no icon" >> >> self methodDictionary at: aSymbol ifPresent: [ :method | >> + method hasBreakpoint ifTrue: [^ #breakpoint]. >> + method literalsDo: [:literal | >> + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount: break) includes: literal) >> - method literalsDo: [ :literal | >> - (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) >> ifTrue: [^ #breakpoint]. >> (#(flag: needsWork notYetImplemented) includes: literal) >> ifTrue: [^ #flag]. >> (#(shouldBeImplemented subclassResponsibility) includes: literal) >> ifTrue: [ >> (self isSelectorOverridden: aSymbol) >> ifTrue: [^ #abstract] >> ifFalse: [^ #notOverridden]]. >> literal == #shouldNotImplement >> + ifTrue: [^ #no]]. >> + method hasReportableSlip ifTrue: [^ #breakpoint]]. >> - ifTrue: [^ #no]]]. >> >> (self isSelectorOverride: aSymbol) >> ifTrue: [ >> (self isSelectorOverridden: aSymbol) >> ifTrue: [ ^ #arrowUpAndDown ] >> ifFalse: [ ^ #arrowUp ] ] >> ifFalse: [ >> (self isSelectorOverridden: aSymbol) >> ifTrue: [^ #arrowDown ]]. >> >> self methodDictionary at: aSymbol ifPresent: [ :method | >> (method primitive ~= 0 and: [method isQuick not]) >> ifTrue: [^ #primitive]]. >> >> >> ^ #blank! From asqueaker at gmail.com Fri Mar 27 19:03:30 2015 From: asqueaker at gmail.com (Chris Muller) Date: Fri Mar 27 19:03:34 2015 Subject: [squeak-dev] The Trunk: Tools-topa.562.mcz In-Reply-To: <85ABEFF1-4766-4807-A3C1-744272C1BCFD@gmx.de> References: <55147b8d.cd31370a.23fa.03c4SMTPIN_ADDED_MISSING@mx.google.com> <85ABEFF1-4766-4807-A3C1-744272C1BCFD@gmx.de> Message-ID: Oh I see, at first I thought it might be a new kind of breakpoint but in fact a breakpoint is a new reportableSlip. It's for that warning when one files out. On Fri, Mar 27, 2015 at 1:36 PM, Tobias Pape wrote: > > On 27.03.2015, at 19:25, Chris Muller wrote: > >> What's a reportable slip? > > To quote CompiledMethod>>#hasReportableSlip > > "Answer whether the receiver contains anything that should be brought > to the attention of the author when filing out. Customize the lists here > to suit your preferences. If slips do not get reported in spite of your > best efforts here, make certain that the Preference 'checkForSlips' is set > to true." > > Ie, references any of #doOnlyOnce: #halt #halt: #hottest #printDirectlyToDisplay #toRemove #personal #urgent #haltOnce #haltOnce: #haltIf: > or Transcript AA BB CC DD EE > > Best > -Tobias >> >> On Thu, Mar 26, 2015 at 4:34 PM, wrote: >>> Tobias Pape uploaded a new version of Tools to project The Trunk: >>> http://source.squeak.org/trunk/Tools-topa.562.mcz >>> >>> ==================== Summary ==================== >>> >>> Name: Tools-topa.562 >>> Author: topa >>> Time: 26 March 2015, 10:34:40.589 pm >>> UUID: c1e03f1f-b7f2-46a1-b27d-5c2f42e19ef1 >>> Ancestors: Tools-topa.561 >>> >>> Tool icons: See if a method identifies itself as having a breakpoint or a 'reportable slip' >>> >>> =============== Diff against Tools-topa.561 =============== >>> >>> Item was changed: >>> ----- Method: Behavior>>toolIconSelector: (in category '*Tools-icons') ----- >>> toolIconSelector: aSymbol >>> "Tools can annotate the method identified by aSymbol with an icon identified by the symbol this method returns. >>> We customize this for, eg, overriden methods or methods with breaks. >>> Defaults to no icon" >>> >>> self methodDictionary at: aSymbol ifPresent: [ :method | >>> + method hasBreakpoint ifTrue: [^ #breakpoint]. >>> + method literalsDo: [:literal | >>> + (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount: break) includes: literal) >>> - method literalsDo: [ :literal | >>> - (#(halt halt: haltIfNil haltIf: haltOnce haltOnce: haltOnCount: halt:onCount:) includes: literal) >>> ifTrue: [^ #breakpoint]. >>> (#(flag: needsWork notYetImplemented) includes: literal) >>> ifTrue: [^ #flag]. >>> (#(shouldBeImplemented subclassResponsibility) includes: literal) >>> ifTrue: [ >>> (self isSelectorOverridden: aSymbol) >>> ifTrue: [^ #abstract] >>> ifFalse: [^ #notOverridden]]. >>> literal == #shouldNotImplement >>> + ifTrue: [^ #no]]. >>> + method hasReportableSlip ifTrue: [^ #breakpoint]]. >>> - ifTrue: [^ #no]]]. >>> >>> (self isSelectorOverride: aSymbol) >>> ifTrue: [ >>> (self isSelectorOverridden: aSymbol) >>> ifTrue: [ ^ #arrowUpAndDown ] >>> ifFalse: [ ^ #arrowUp ] ] >>> ifFalse: [ >>> (self isSelectorOverridden: aSymbol) >>> ifTrue: [^ #arrowDown ]]. >>> >>> self methodDictionary at: aSymbol ifPresent: [ :method | >>> (method primitive ~= 0 and: [method isQuick not]) >>> ifTrue: [^ #primitive]]. >>> >>> >>> ^ #blank! > > > From leves at elte.hu Fri Mar 27 21:37:26 2015 From: leves at elte.hu (Levente Uzonyi) Date: Fri Mar 27 21:37:29 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: Does it help if you revert WorldState >> interCyclePause: to its previous version (al 7/31/2007 16:12)? Levente On Fri, 27 Mar 2015, Eliot Miranda wrote: > If there are any experts here I beg you to take a look.? This is really impacting ,y productivity with VM development.? I lose ~ 30seconds on almost every proceed in the debugger and I'm spending most of my > time there-in simulating ARM execution right now.? This is really painful.? The ARM JIT and hence much faster Squeak on RPi and Android will arrive all the sooner if this is fixed. > AdvThanksance > > On Fri, Mar 27, 2015 at 10:31 AM, Tobias Pape wrote: > > On 27.03.2015, at 17:47, Eliot Miranda wrote: > > > Hi All, Hi Bert, > > > >? ? ?a while ago I complained about extremely slow display update following proceed in the debugger.? I can now confirm that it is nothing to do with the debugger simulating code and is simply > the system being out of the defer updates state.? Are there any fixes for this yet?? Ah... I see a reply from Tobias, maybe all I need to do is update ;-) > > Sadly, no. > I have next to no knowledge of that part of Squeak. > > Best > ? ? ? ? -Tobias > > > > > -- > best,Eliot > > From commits at source.squeak.org Fri Mar 27 22:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Fri Mar 27 22:55:03 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150327225503.19916.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007694.html Name: Tools-topa.563 Ancestors: Tools-topa.562 Fix menu entry sort to actually match (intended) description ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007695.html Name: Tools-topa.564 Ancestors: Tools-topa.563 Amend to: Fix menu entry sort to actually match (intended) description ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007696.html Name: SUnitTools-topa.1 Ancestors: Provide browser integration for SUnit. - Indicate test status via tool icons - Run tests from context menu - Debug tests from context menu - Switch between tested and testing code via context menu (heursitically) This is featurewise modeled after the OmniBrowser SUnit-Integration. ============================================= From commits at source.squeak.org Sat Mar 28 00:04:42 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 28 00:04:45 2015 Subject: [squeak-dev] The Trunk: System-eem.712.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-eem.712.mcz ==================== Summary ==================== Name: System-eem.712 Author: eem Time: 27 March 2015, 5:04:05.02 pm UUID: a8efc46a-90e7-449f-bfae-88a53ef28257 Ancestors: System-cmm.711 Fix allStoresInto: for pool variables. Shared pools are inherited and don't have to be declared in each subclass. =============== Diff against System-cmm.711 =============== Item was changed: ----- Method: SystemNavigation>>allStoresInto:from: (in category 'query') ----- allStoresInto: varName from: aClass "Answer a sequence of MewthodReferences for all the receiver's methods or any methods of a subclass/superclass that assign to the instance variable name." "self new allStoresInto: 'contents' from: Collection." + | result roots | - | result | result := OrderedCollection new. (aClass theNonMetaClass inheritsFrom: SharedPool) ifTrue: + [roots := self allClasses select: [:class| class sharedPools includes: aClass theNonMetaClass]. + roots do: + [:root| + root withAllSubclassesDo: + [:class| + (class whichMethodsStoreInto: varName), + (class class whichMethodsStoreInto: varName) do: - [self allBehaviorsDo: - [:class| - (class theNonMetaClass sharedPools includes: aClass theNonMetaClass) ifTrue: - [(class whichMethodsStoreInto: varName) do: [:eachMethod| + result add: eachMethod methodReference]]]]. - result add: eachMethod methodReference]]]]. aClass withAllSubAndSuperclassesDo: [ : class | + (class whichMethodsStoreInto: varName), + (class class whichMethodsStoreInto: varName) do: - (class whichMethodsStoreInto: varName) do: [ : eachMethod | result add: eachMethod methodReference ] ]. ^result! From ron at usmedrec.com Sat Mar 28 03:04:11 2015 From: ron at usmedrec.com (Ron Teitelbaum) Date: Sat Mar 28 03:04:05 2015 Subject: [squeak-dev] Squeak News Team Message-ID: <164701d06903$de429bf0$9ac7d3d0$@usmedrec.com> HI All, Hope everyone is doing well. Would anyone like to join the Squeak News Team to post articles on news.squeak.org. Please contact me if you are interested in helping out. I haven't had much time lately. I could use the help. All the best, Ron Teitelbaum -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/d9b4a67c/attachment.htm From eliot.miranda at gmail.com Sat Mar 28 06:37:29 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 28 06:37:32 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: On Fri, Mar 27, 2015 at 2:37 PM, Levente Uzonyi wrote: > Does it help if you revert WorldState >> interCyclePause: to its previous > version (al 7/31/2007 16:12)? No :(. But that's at least information. > > > Levente > > > On Fri, 27 Mar 2015, Eliot Miranda wrote: > > If there are any experts here I beg you to take a look. This is really >> impacting ,y productivity with VM development. I lose ~ 30seconds on >> almost every proceed in the debugger and I'm spending most of my >> time there-in simulating ARM execution right now. This is really >> painful. The ARM JIT and hence much faster Squeak on RPi and Android will >> arrive all the sooner if this is fixed. >> AdvThanksance >> >> On Fri, Mar 27, 2015 at 10:31 AM, Tobias Pape wrote: >> >> On 27.03.2015, at 17:47, Eliot Miranda >> wrote: >> >> > Hi All, Hi Bert, >> > >> > a while ago I complained about extremely slow display update >> following proceed in the debugger. I can now confirm that it is nothing to >> do with the debugger simulating code and is simply >> the system being out of the defer updates state. Are there any >> fixes for this yet? Ah... I see a reply from Tobias, maybe all I need to >> do is update ;-) >> >> Sadly, no. >> I have next to no knowledge of that part of Squeak. >> >> Best >> -Tobias >> >> >> >> >> -- >> best,Eliot >> >> > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150327/2eca29cc/attachment.htm From marcel.taeumel at student.hpi.uni-potsdam.de Sat Mar 28 16:49:26 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Mar 28 17:00:44 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: Message-ID: <1427561366671-4815777.post@n4.nabble.com> I will try to debug it if I can reproduce it. Trying "self halt" in a workspace followed by a proceed in the debugger did not make my image slow. So, how to reproduce that bug? Best, Marcel -- View this message in context: http://forum.world.st/slow-display-update-on-debugger-proceed-tp4815619p4815777.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Sat Mar 28 17:03:35 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sat Mar 28 17:14:49 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: References: Message-ID: <1427562215640-4815778.post@n4.nabble.com> Hmmm.... for the printer setup, I would favor #explore over #inspect. But using the object explorer as an inspection tool could be a global preference anyway. :) The ToolSet might evaluate such a preference and pass #inspect: to #explore: or vice versa. Best, Marcel -- View this message in context: http://forum.world.st/Old-menu-items-in-TextEditors-that-currently-don-t-work-tp4815598p4815778.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sat Mar 28 22:55:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sat Mar 28 22:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150328225502.9305.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007697.html Name: System-eem.712 Ancestors: System-cmm.711 Fix allStoresInto: for pool variables. Shared pools are inherited and don't have to be declared in each subclass. ============================================= From eliot.miranda at gmail.com Sat Mar 28 23:21:51 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Sat Mar 28 23:21:56 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: <1427561366671-4815777.post@n4.nabble.com> References: <1427561366671-4815777.post@n4.nabble.com> Message-ID: Hi Marcel, On Sat, Mar 28, 2015 at 9:49 AM, Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > I will try to debug it if I can reproduce it. Trying "self halt" in a > workspace followed by a proceed in the debugger did not make my image slow. > > So, how to reproduce that bug? > Try and create *lots* of large overlapping windows, including a transcript. Then write some code that writes something to the transcript and put a halt in it. Then proceed. That seems close to what I'm doing. HTH and thanks for taking a look! -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150328/b7abb46e/attachment-0001.htm From asqueaker at gmail.com Sun Mar 29 00:12:03 2015 From: asqueaker at gmail.com (Chris Muller) Date: Sun Mar 29 00:12:06 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: <1427562215640-4815778.post@n4.nabble.com> References: <1427562215640-4815778.post@n4.nabble.com> Message-ID: On Sat, Mar 28, 2015 at 12:03 PM, Marcel Taeumel wrote: > Hmmm.... for the printer setup, I would favor #explore over #inspect. +1 > But > using the object explorer as an inspection tool could be a global preference > anyway. :) I actually have need to use basicInspect in some cases, inspect in some cases, and explore in some other cases. They each already have their own purpose and command-gestures so I'm not sure what you mean how such a new preference would come into play..? From commits at source.squeak.org Sun Mar 29 00:42:33 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 00:42:35 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.69.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.69.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.69 Author: dtl Time: 28 March 2015, 8:42:26.128 pm UUID: 37be26fe-92e2-4f05-9298-ad1b771b3b8b Ancestors: ToolBuilder-Kernel-dtl.68 UIManager>>confirm:label: is unimplemented and unreferenced since 2009. Remove it. =============== Diff against ToolBuilder-Kernel-dtl.68 =============== Item was removed: - ----- Method: UIManager>>confirm:label: (in category 'ui requests') ----- - confirm: queryString label: titleString - - ^self subclassResponsibility! From Das.Linux at gmx.de Sun Mar 29 10:52:16 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 29 10:52:22 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.69.mcz Message-ID: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> On 29.03.2015, at 00:42, commits@source.squeak.org wrote: > David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: > http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.69.mcz > > ==================== Summary ==================== > > Name: ToolBuilder-Kernel-dtl.69 > Author: dtl > Time: 28 March 2015, 8:42:26.128 pm > UUID: 37be26fe-92e2-4f05-9298-ad1b771b3b8b > Ancestors: ToolBuilder-Kernel-dtl.68 > > UIManager>>confirm:label: is unimplemented and unreferenced since 2009. Remove it. > Regarding the whole UIManager api, don't you think implementing it would be a better move than removing? Best -Tobias > =============== Diff against ToolBuilder-Kernel-dtl.68 =============== > > Item was removed: From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 29 11:17:17 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 29 11:28:37 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: References: <1427562215640-4815778.post@n4.nabble.com> Message-ID: <1427627837169-4815883.post@n4.nabble.com> They are all basically the same kind of tool. We could merge the desired functionality into one to free the user from deciding which is "the right kind of tool" for inspection beforehand. We can collect some differences between those tools here if you like. :) Best, Marcel -- View this message in context: http://forum.world.st/Old-menu-items-in-TextEditors-that-currently-don-t-work-tp4815598p4815883.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From herbertkoenig at gmx.net Sun Mar 29 11:54:34 2015 From: herbertkoenig at gmx.net (=?windows-1252?Q?Herbert_K=F6nig?=) Date: Sun Mar 29 11:54:38 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: <1427627837169-4815883.post@n4.nabble.com> References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> Message-ID: <5517E7FA.5020803@gmx.net> Hi Marcel, Am 29.03.2015 um 13:17 schrieb Marcel Taeumel: > They are all basically the same kind of tool. Only in theory IMHO. > We could merge the desired > functionality into one to free the user from deciding which is "the right > kind of tool" for inspection beforehand. > > We can collect some differences between those tools here if you like. :) Live update in the inspector. Explorer takes much longer to open (try a RasPi). Uses much more screen space. For some objects Inspector's "all inst vars" is a great tool. Explorer is clumsier to navigate for the navigation possible in an Inspector. Explorer excels at visualizing and navigating (more static) object structures. To me they are different tools for different purposes. Cheers, Herbert From commits at source.squeak.org Sun Mar 29 12:37:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:37:53 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.787.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.787.mcz ==================== Summary ==================== Name: Morphic-mt.787 Author: mt Time: 29 March 2015, 2:37:16.164 pm UUID: f95fc2f0-dfc3-8e47-a3c4-9c833a454ac9 Ancestors: Morphic-topa.786 Establish a dependents-relationship between complex contents and the wrapper. Having this, views may perform partial updates on model changes. =============== Diff against Morphic-topa.786 =============== Item was changed: ----- Method: ListItemWrapper>>setItem: (in category 'initialization') ----- setItem: anObject + item ifNotNil: [:obj | obj removeDependent: self]. + item := anObject. + item ifNotNil: [:obj | obj addDependent: self].! - item := anObject! Item was changed: ----- Method: ListItemWrapper>>setItem:model: (in category 'initialization') ----- setItem: anObject model: aModel + model := aModel. + self setItem: anObject.! - item := anObject. - model := aModel.! Item was removed: - ----- Method: PluggableListItemWrapper>>item (in category 'accessing') ----- - item - ^item! Item was removed: - ----- Method: PluggableListItemWrapper>>item: (in category 'accessing') ----- - item: newItem - item := newItem! From commits at source.squeak.org Sun Mar 29 12:39:14 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:39:16 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.70.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.70.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.70 Author: mt Time: 29 March 2015, 2:39:08.547 pm UUID: 294b0f5a-5be8-a84b-9ba8-dde998bebf97 Ancestors: ToolBuilder-Kernel-dtl.69 Added support for a help text to input field spec to give users a cue which kind of input is expected. =============== Diff against ToolBuilder-Kernel-dtl.69 =============== Item was changed: PluggableTextSpec subclass: #PluggableInputFieldSpec + instanceVariableNames: 'helpText' - instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !PluggableInputFieldSpec commentStamp: 'ar 2/12/2005 23:13' prior: 0! PluggableInputField is intended as a HINT for the builder that this widget will be used as a single line input field. Unless explicitly supported it will be automatically substituted by PluggableText.! Item was added: + ----- Method: PluggableInputFieldSpec>>helpText (in category 'accessing') ----- + helpText + + ^ helpText! Item was added: + ----- Method: PluggableInputFieldSpec>>helpText: (in category 'accessing') ----- + helpText: aSelectorOrString + + helpText := aSelectorOrString.! From commits at source.squeak.org Sun Mar 29 12:40:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:40:50 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.102.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.102.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.102 Author: mt Time: 29 March 2015, 2:40:44.398 pm UUID: fbd5d4b4-6646-6841-b171-233db3ff0f19 Ancestors: ToolBuilder-Morphic-dtl.101 Added support for a help text to input fields to give users a cue which kind of input is expected. =============== Diff against ToolBuilder-Morphic-dtl.101 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableInputField: (in category 'pluggable widgets') ----- buildPluggableInputField: aSpec | widget | widget := self buildPluggableText: aSpec. widget acceptOnCR: true. widget hideScrollBarsIndefinitely. + widget getHelpTextSelector: aSpec helpText. ^widget! Item was changed: PluggableTextMorph subclass: #PluggableTextMorphPlus + instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler getHelpTextSelector' - instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTextMorphPlus commentStamp: 'ar 2/11/2005 21:53' prior: 0! A pluggable text morph with support for color.! Item was added: + ----- Method: PluggableTextMorphPlus>>drawHelpTextOn: (in category 'drawing') ----- + drawHelpTextOn: aCanvas + + | helpText | + + (self getHelpTextSelector notNil and: [textMorph contents isEmpty]) + ifFalse: [^ self]. + + helpText := self getHelpTextSelector isSymbol + ifTrue: [self model perform: self getHelpTextSelector] + ifFalse: [self getHelpTextSelector]. + helpText ifNil: [^ self]. + + aCanvas + drawString: helpText + at: self innerBounds topLeft + (5@2) + font: textMorph textStyle defaultFont + color: (Color gray: 0.7).! Item was added: + ----- Method: PluggableTextMorphPlus>>drawOn: (in category 'drawing') ----- + drawOn: aCanvas + + super drawOn: aCanvas. + self drawHelpTextOn: aCanvas.! Item was added: + ----- Method: PluggableTextMorphPlus>>getHelpTextSelector (in category 'accessing') ----- + getHelpTextSelector + + ^ getHelpTextSelector! Item was added: + ----- Method: PluggableTextMorphPlus>>getHelpTextSelector: (in category 'accessing') ----- + getHelpTextSelector: aSymbol + + getHelpTextSelector := aSymbol.! From commits at source.squeak.org Sun Mar 29 12:42:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:42:40 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.103.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.103.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.103 Author: mt Time: 29 March 2015, 2:42:29.875 pm UUID: 256ddc14-bdbe-8d40-93f2-6fcb546f87de Ancestors: ToolBuilder-Morphic-mt.102 Fix path selection to match against item identity instead of equality, which would fail, for example, in the case of string listings having duplicates. =============== Diff against ToolBuilder-Morphic-mt.102 =============== Item was changed: ----- Method: PluggableTreeMorph>>selectPath:in: (in category 'selection') ----- selectPath: path in: listItem path isEmpty ifTrue: [^self setSelectedMorph: nil]. listItem withSiblingsDo: [:each | + (each complexContents item == path first) ifTrue: [ - (each complexContents item = path first) ifTrue: [ each isExpanded ifFalse: [ each toggleExpandedState. self adjustSubmorphPositions. ]. each changed. path size = 1 ifTrue: [ ^self setSelectedMorph: each ]. each firstChild ifNil: [^self setSelectedMorph: nil]. ^self selectPath: path allButFirst in: each firstChild ]. ]. + ^self setSelectedMorph: nil! - ^self setSelectedMorph: nil - - ! From commits at source.squeak.org Sun Mar 29 12:44:48 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:44:50 2015 Subject: [squeak-dev] The Trunk: Tools-mt.565.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.565.mcz ==================== Summary ==================== Name: Tools-mt.565 Author: mt Time: 29 March 2015, 2:44:29.709 pm UUID: f8216267-8713-0449-bef6-35fecc620960 Ancestors: Tools-topa.564 Refactored toggle/expand code in IndentingListItemMorph. =============== Diff against Tools-topa.564 =============== Item was changed: + ----- Method: IndentingListItemMorph>>addChildrenForList:addingTo:withExpandedItems: (in category 'container protocol - private') ----- - ----- Method: IndentingListItemMorph>>addChildrenForList:addingTo:withExpandedItems: (in category 'private-container protocol') ----- addChildrenForList: hostList addingTo: morphList withExpandedItems: expandedItems firstChild ifNotNil: [ firstChild withSiblingsDo: [ :aNode | aNode delete]. ]. firstChild := nil. complexContents hasContents ifFalse: [^self]. firstChild := hostList addMorphsTo: morphList from: complexContents contents allowSorting: true withExpandedItems: expandedItems atLevel: indentLevel + 1. ! Item was changed: + ----- Method: IndentingListItemMorph>>canExpand (in category 'testing') ----- - ----- Method: IndentingListItemMorph>>canExpand (in category 'accessing') ----- canExpand ^complexContents hasContents! Item was added: + ----- Method: IndentingListItemMorph>>collapse (in category 'container protocol') ----- + collapse + + self isExpanded ifFalse: [^ self]. + + self isExpanded: false. + + firstChild ifNotNil: [:collapsingNode | + | toDelete | + toDelete := OrderedCollection new. + collapsingNode withSiblingsDo: [:aNode | aNode recursiveAddTo: toDelete]. + container noteRemovalOfAll: toDelete]. + + self changed.! Item was changed: + ----- Method: IndentingListItemMorph>>complexContents (in category 'accessing') ----- - ----- Method: IndentingListItemMorph>>complexContents (in category 'private-container protocol') ----- complexContents ^complexContents! Item was added: + ----- Method: IndentingListItemMorph>>expand (in category 'container protocol') ----- + expand + + | newChildren c | + + (self isExpanded or: [self canExpand not]) + ifTrue: [^ self]. + + (c := self getChildren) ifEmpty: [ + "Due to the guessing in #canExpand, it may still fail here." + ^ self]. + + self isExpanded: true. + + newChildren := container + addSubmorphsAfter: self + fromCollection: c + allowSorting: true. + + firstChild := newChildren first.! Item was changed: + ----- Method: IndentingListItemMorph>>hasIcon (in category 'testing') ----- - ----- Method: IndentingListItemMorph>>hasIcon (in category 'accessing') ----- hasIcon "Answer whether the receiver has an icon." ^ icon notNil! Item was changed: + ----- Method: IndentingListItemMorph>>highlight (in category 'container protocol - private') ----- - ----- Method: IndentingListItemMorph>>highlight (in category 'private-container protocol') ----- highlight (self valueOfProperty: #wasRefreshed ifAbsent: [false]) ifFalse: [self color: complexContents highlightingColor] ifTrue: [self color: self color negated]. self changed. ! Item was changed: + ----- Method: IndentingListItemMorph>>isFirstItem (in category 'testing') ----- - ----- Method: IndentingListItemMorph>>isFirstItem (in category 'accessing') ----- isFirstItem ^owner submorphs first == self! Item was changed: + ----- Method: IndentingListItemMorph>>isSoleItem (in category 'testing') ----- - ----- Method: IndentingListItemMorph>>isSoleItem (in category 'accessing') ----- isSoleItem ^self isFirstItem and: [ owner submorphs size = 1 ]! Item was changed: + ----- Method: IndentingListItemMorph>>openPath: (in category 'container protocol - private') ----- - ----- Method: IndentingListItemMorph>>openPath: (in category 'private-container protocol') ----- openPath: anArray | found | anArray isEmpty ifTrue: [^ container setSelectedMorph: nil]. found := nil. self withSiblingsDo: [:each | found ifNil: [(each complexContents asString = anArray first or: [anArray first isNil]) ifTrue: [found := each]]]. found ifNil: ["try again with no case sensitivity" self withSiblingsDo: [:each | found ifNil: [(each complexContents asString sameAs: anArray first) ifTrue: [found := each]]]]. found ifNotNil: [found isExpanded ifFalse: [found toggleExpandedState. container adjustSubmorphPositions]. found changed. anArray size = 1 ifTrue: [^ container setSelectedMorph: found]. ^ found firstChild ifNil: [container setSelectedMorph: nil] ifNotNil: [found firstChild openPath: anArray allButFirst]]. ^ container setSelectedMorph: nil! Item was changed: + ----- Method: IndentingListItemMorph>>recursiveAddTo: (in category 'container protocol - private') ----- - ----- Method: IndentingListItemMorph>>recursiveAddTo: (in category 'private-container protocol') ----- recursiveAddTo: aCollection firstChild ifNotNil: [ firstChild withSiblingsDo: [ :aNode | aNode recursiveAddTo: aCollection]. ]. aCollection add: self ! Item was changed: + ----- Method: IndentingListItemMorph>>recursiveDelete (in category 'container protocol - private') ----- - ----- Method: IndentingListItemMorph>>recursiveDelete (in category 'private-container protocol') ----- recursiveDelete firstChild ifNotNil: [ firstChild withSiblingsDo: [ :aNode | aNode recursiveDelete]. ]. self delete ! Item was changed: + ----- Method: IndentingListItemMorph>>toggleExpandedState (in category 'container protocol') ----- - ----- Method: IndentingListItemMorph>>toggleExpandedState (in category 'private-container protocol') ----- toggleExpandedState + self isExpanded + ifTrue: [self collapse] + ifFalse: [self expand].! - | newChildren toDelete c | - - isExpanded := isExpanded not. - toDelete := OrderedCollection new. - firstChild ifNotNil: [ - firstChild withSiblingsDo: [ :aNode | aNode recursiveAddTo: toDelete]. - ]. - container noteRemovalOfAll: toDelete. - (isExpanded and: [complexContents hasContents]) ifFalse: [ - ^self changed - ]. - (c := self getChildren) isEmpty ifTrue: [^self changed]. - newChildren := container - addSubmorphsAfter: self - fromCollection: c - allowSorting: true. - firstChild := newChildren first. - ! From commits at source.squeak.org Sun Mar 29 12:47:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 12:47:40 2015 Subject: [squeak-dev] The Trunk: Tools-mt.566.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.566.mcz ==================== Summary ==================== Name: Tools-mt.566 Author: mt Time: 29 March 2015, 2:47:21.94 pm UUID: ff526900-5073-ea40-8f56-f5ee42b8cde9 Ancestors: Tools-mt.565 Established a dependents-replationship between list item wrappers and list item morphs to support partial model updates. Added support for the #contents model update in list item wrappers. That is, tree models may now update their children and notify about this. The whole tree view/morph does not have to be refreshed but only parts of it. =============== Diff against Tools-mt.565 =============== Item was changed: ----- Method: IndentingListItemMorph>>initWithContents:prior:forList:indentLevel: (in category 'initialization') ----- initWithContents: anObject prior: priorMorph forList: hostList indentLevel: newLevel container := hostList. + complexContents := anObject. + anObject addDependent: self. + self initWithContents: self getLabel font: Preferences standardListFont emphasis: nil. indentLevel := 0. isExpanded := false. nextSibling := firstChild := nil. priorMorph ifNotNil: [ priorMorph nextSibling: self. ]. indentLevel := newLevel. icon := self getIcon. self extent: self minWidth @ self minHeight! Item was added: + ----- Method: IndentingListItemMorph>>update: (in category 'updating') ----- + update: aspect + "See ListItemWrapper and subclasses for possible change aspects." + + aspect = #contents ifTrue: [ + self isExpanded ifTrue: [ + self toggleExpandedState]. + self canExpand ifTrue: [self toggleExpandedState]]. + + super update: aspect.! From Das.Linux at gmx.de Sun Mar 29 12:53:23 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 29 12:53:28 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.70.mcz Message-ID: <80F1258A-BCEE-481D-948B-7AA099B30D29@gmx.de> On 29.03.2015, at 12:39, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: > http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.70.mcz > > ==================== Summary ==================== > > Name: ToolBuilder-Kernel-mt.70 > Author: mt > Time: 29 March 2015, 2:39:08.547 pm > UUID: 294b0f5a-5be8-a84b-9ba8-dde998bebf97 > Ancestors: ToolBuilder-Kernel-dtl.69 > > Added support for a help text to input field spec to give users a cue which kind of input is expected. What about #help that already is in ToolBuilderSpec? Best -Tobias > > =============== Diff against ToolBuilder-Kernel-dtl.69 =============== > > Item was changed: > PluggableTextSpec subclass: #PluggableInputFieldSpec > + instanceVariableNames: 'helpText' > - instanceVariableNames: '' > classVariableNames: '' > poolDictionaries: '' > category: 'ToolBuilder-Kernel'! > > !PluggableInputFieldSpec commentStamp: 'ar 2/12/2005 23:13' prior: 0! > PluggableInputField is intended as a HINT for the builder that this widget will be used as a single line input field. Unless explicitly supported it will be automatically substituted by PluggableText.! > > Item was added: From lewis at mail.msen.com Sun Mar 29 13:36:42 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 29 13:36:43 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> Message-ID: <20150329133642.GA12432@shell.msen.com> On Sun, Mar 29, 2015 at 12:52:16PM +0200, Tobias Pape wrote: > > On 29.03.2015, at 00:42, commits@source.squeak.org wrote: > > > David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: > > http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.69.mcz > > > > ==================== Summary ==================== > > > > Name: ToolBuilder-Kernel-dtl.69 > > Author: dtl > > Time: 28 March 2015, 8:42:26.128 pm > > UUID: 37be26fe-92e2-4f05-9298-ad1b771b3b8b > > Ancestors: ToolBuilder-Kernel-dtl.68 > > > > UIManager>>confirm:label: is unimplemented and unreferenced since 2009. Remove it. > > > > Regarding the whole UIManager api, don't you think implementing it would be a better > move than removing? > Best > -Tobias Possibly yes. It looked like leftover cruft from the early days when ToolBuilder was first brought into the image (there were a few loose ends at that time). But I can see how it might be useful in some cases. Try this in an MVC project: UIManager default confirm: 'Does this need a label?' Dave From leves at elte.hu Sun Mar 29 15:22:47 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 29 15:22:51 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: <1427627837169-4815883.post@n4.nabble.com> References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> Message-ID: I consider explorer and inspector to be entirely different. When I want to explore an object graph, I use the explorer. When I want to directly manipulate a single object, or evaluate expressions in its context, then I use an inspector. Based on my experience, these things rarely mix, which is probably why these tools coexist. It's probably possible to mix the two tools and get a usable result, but please don't make the same mistake what the Pharo guys did. Levente On Sun, 29 Mar 2015, Marcel Taeumel wrote: > They are all basically the same kind of tool. We could merge the desired > functionality into one to free the user from deciding which is "the right > kind of tool" for inspection beforehand. > > We can collect some differences between those tools here if you like. :) > > Best, > Marcel > > > > -- > View this message in context: http://forum.world.st/Old-menu-items-in-TextEditors-that-currently-don-t-work-tp4815598p4815883.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 29 16:08:02 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 29 16:19:23 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-mt.70.mcz In-Reply-To: <80F1258A-BCEE-481D-948B-7AA099B30D29@gmx.de> References: <80F1258A-BCEE-481D-948B-7AA099B30D29@gmx.de> Message-ID: <1427645282375-4815930.post@n4.nabble.com> My guess would be that this maps to #balloonText for Morphic. Not sure. But you are right. We can just use #help from the specs to set the help text in the text fields. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ToolBuilder-Kernel-mt-70-mcz-tp4815894p4815930.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 29 16:09:27 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 29 16:20:47 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> Message-ID: <1427645367443-4815931.post@n4.nabble.com> The correct interface seems to be #confirm:title:. ;-) And this is already implemented. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ToolBuilder-Kernel-dtl-69-mcz-tp4815835p4815931.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Mar 29 18:19:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 18:19:15 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-dtl.37.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-dtl.37.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.37 Author: dtl Time: 29 March 2015, 2:19:13.638 pm UUID: 06a0a625-135c-4d86-a6d7-b21895f441f7 Ancestors: ToolBuilder-MVC-dtl.36 Add missing implementation of #confirm:trueChoice:falseChoice: for MVC =============== Diff against ToolBuilder-MVC-dtl.36 =============== Item was added: + ----- Method: MVCUIManager>>confirm:trueChoice:falseChoice: (in category 'ui requests') ----- + confirm: queryString trueChoice: trueChoice falseChoice: falseChoice + "Put up a yes/no menu with caption queryString. The actual wording for the two choices will be as provided in the trueChoice and falseChoice parameters. Answer true if the response is the true-choice, false if it's the false-choice. + This is a modal question -- the user must respond one way or the other." + ^PopUpMenu confirm: queryString trueChoice: trueChoice falseChoice: falseChoice! From lewis at mail.msen.com Sun Mar 29 18:26:24 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 29 18:26:27 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <1427645367443-4815931.post@n4.nabble.com> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> <1427645367443-4815931.post@n4.nabble.com> Message-ID: <20150329182624.GA56451@shell.msen.com> On Sun, Mar 29, 2015 at 09:09:27AM -0700, Marcel Taeumel wrote: > The correct interface seems to be #confirm:title:. ;-) And this is already > implemented. > You are right, #confirm:title: would be better than #confirm:label: and it is already implemented in UserDialogBoxMorph for Morphic. UIManager currently supports these three methods: UIManager default confirm: 'Do you like chocolate?' UIManager default confirm: 'Do you like chocolate?' orCancel: [self halt]. UIManager default confirm: 'Do you like chocolate?' trueChoice: 'trueButtonLabel' falseChoice: 'falseButtonLabel'. If we add #confirm:title: to UIManager, then we should probably do it for all three methods. Dave From Das.Linux at gmx.de Sun Mar 29 19:02:48 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 29 19:02:57 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <20150329182624.GA56451@shell.msen.com> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> <1427645367443-4815931.post@n4.nabble.com> <20150329182624.GA56451@shell.msen.com> Message-ID: <40DFEFD5-4942-4E02-BBC3-2947BF75A353@gmx.de> On 29.03.2015, at 20:26, David T. Lewis wrote: > On Sun, Mar 29, 2015 at 09:09:27AM -0700, Marcel Taeumel wrote: >> The correct interface seems to be #confirm:title:. ;-) And this is already >> implemented. >> > > You are right, #confirm:title: would be better than #confirm:label: and it > is already implemented in UserDialogBoxMorph for Morphic. > > UIManager currently supports these three methods: > > UIManager default confirm: 'Do you like chocolate?' > UIManager default confirm: 'Do you like chocolate?' orCancel: [self halt]. > UIManager default confirm: 'Do you like chocolate?' trueChoice: 'trueButtonLabel' falseChoice: 'falseButtonLabel'. > > If we add #confirm:title: to UIManager, then we should probably do it for > all three methods. Ack :) Best -Tobias From lecteur at zogotounga.net Sun Mar 29 19:52:26 2015 From: lecteur at zogotounga.net (=?windows-1252?Q?St=E9phane_Rollandin?=) Date: Sun Mar 29 19:52:26 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> Message-ID: <551857FA.2000505@zogotounga.net> > I consider explorer and inspector to be entirely different. > When I want to explore an object graph, I use the explorer. > When I want to directly manipulate a single object, or evaluate > expressions in its context, then I use an inspector. > Based on my experience, these things rarely mix, which is probably why > these tools coexist. > It's probably possible to mix the two tools and get a usable result, but > please don't make the same mistake what the Pharo guys did. +1 Stef From Das.Linux at gmx.de Sun Mar 29 19:57:35 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 29 19:57:40 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: <551857FA.2000505@zogotounga.net> References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> <551857FA.2000505@zogotounga.net> Message-ID: <9808F6B5-4285-4981-AC2C-0A82395153DA@gmx.de> On 29.03.2015, at 21:52, St?phane Rollandin wrote: >> I consider explorer and inspector to be entirely different. >> When I want to explore an object graph, I use the explorer. >> When I want to directly manipulate a single object, or evaluate >> expressions in its context, then I use an inspector. Just to chime in, I typically _exclusviely_ use the explorer, except I have situations where the explorer is too slow (like really large arrays) I really like having an overview. Best -Tobias >> Based on my experience, these things rarely mix, which is probably why >> these tools coexist. >> It's probably possible to mix the two tools and get a usable result, but >> please don't make the same mistake what the Pharo guys did. > > +1 > > Stef From leves at elte.hu Sun Mar 29 20:24:17 2015 From: leves at elte.hu (Levente Uzonyi) Date: Sun Mar 29 20:24:21 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: <9808F6B5-4285-4981-AC2C-0A82395153DA@gmx.de> References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> <551857FA.2000505@zogotounga.net> <9808F6B5-4285-4981-AC2C-0A82395153DA@gmx.de> Message-ID: On Sun, 29 Mar 2015, Tobias Pape wrote: > > On 29.03.2015, at 21:52, St?phane Rollandin wrote: > >>> I consider explorer and inspector to be entirely different. >>> When I want to explore an object graph, I use the explorer. >>> When I want to directly manipulate a single object, or evaluate >>> expressions in its context, then I use an inspector. > > Just to chime in, I typically _exclusviely_ use the explorer, except > I have situations where the explorer is too slow (like really large arrays) > I really like having an overview. You can't evaluate expressions in the context of the object with an explorer. You can use #instVarAt: and #instVarAt:put:, but that's tedious. An object can hide its internals from the explorer (e.g.: Set/Dictionary). Sometimes you don't care about other objects, just the one you're inspecting. Levente > > Best > -Tobias > >>> Based on my experience, these things rarely mix, which is probably why >>> these tools coexist. >>> It's probably possible to mix the two tools and get a usable result, but >>> please don't make the same mistake what the Pharo guys did. >> >> +1 >> >> Stef > > > > From Das.Linux at gmx.de Sun Mar 29 20:31:03 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Sun Mar 29 20:31:08 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> <551857FA.2000505@zogotounga.net> <9808F6B5-4285-4981-AC2C-0A82395153DA@gmx.de> Message-ID: On 29.03.2015, at 22:24, Levente Uzonyi wrote: > On Sun, 29 Mar 2015, Tobias Pape wrote: > >> >> On 29.03.2015, at 21:52, St?phane Rollandin wrote: >> >>>> I consider explorer and inspector to be entirely different. >>>> When I want to explore an object graph, I use the explorer. >>>> When I want to directly manipulate a single object, or evaluate >>>> expressions in its context, then I use an inspector. >> >> Just to chime in, I typically _exclusviely_ use the explorer, except >> I have situations where the explorer is too slow (like really large arrays) >> I really like having an overview. > > You can't evaluate expressions in the context of the object with an explorer. You can use #instVarAt: and #instVarAt:put:, but that's tedious. ? I just select them in the explorer and self is the selected object then. Granted, I have to use accessors to change istvars, but well, typically this suffices. > An object can hide its internals from the explorer (e.g.: Set/Dictionary). Yes. but I'm mostly fine with this. > > Sometimes you don't care about other objects, just the one you're inspecting. I didn't want to say the inspector is unnecessary but that I only use it in special situations and the explorer 85% of the time. Best -Tobias > > Levente > >> >> Best >> -Tobias >> >>>> Based on my experience, these things rarely mix, which is probably why >>>> these tools coexist. >>>> It's probably possible to mix the two tools and get a usable result, but >>>> please don't make the same mistake what the Pharo guys did. >>> >>> +1 >>> >>> Stef From marcel.taeumel at student.hpi.uni-potsdam.de Sun Mar 29 20:33:53 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Sun Mar 29 20:45:17 2015 Subject: [squeak-dev] Re: Old menu items in TextEditors that currently don't work In-Reply-To: References: <1427562215640-4815778.post@n4.nabble.com> <1427627837169-4815883.post@n4.nabble.com> <551857FA.2000505@zogotounga.net> <9808F6B5-4285-4981-AC2C-0A82395153DA@gmx.de> Message-ID: <1427661233222-4815960.post@n4.nabble.com> No, you don't have to use accessors. Select the object in the tree and it will be "self" like in an inspector. You can also access and write inst vars directly. Best, Marcel -- View this message in context: http://forum.world.st/Old-menu-items-in-TextEditors-that-currently-don-t-work-tp4815598p4815960.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Sun Mar 29 21:05:24 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 21:05:27 2015 Subject: [squeak-dev] The Trunk: Morphic-dtl.787.mcz Message-ID: David T. Lewis uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-dtl.787.mcz ==================== Summary ==================== Name: Morphic-dtl.787 Author: dtl Time: 29 March 2015, 5:04:13.048 pm UUID: 432e13de-c7e6-4d70-83ce-2992da504a5b Ancestors: Morphic-topa.786 UserDialogBoxMorph constructor for UIManager access =============== Diff against Morphic-topa.786 =============== Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:orCancel:at: (in category 'utilities') ----- confirm: aString orCancel: cancelBlock at: aPointOrNil + ^self + confirm: aString + orCancel: cancelBlock + title: 'Please confirm:' + at: aPointOrNil! - - ^(self new - title: 'Please confirm:'; - label: aString; - addSelectedButton: ' Yes ' translated value: true; - addButton: ' No ' translated value: false; - addCancelButton: ' Cancel ' translated value: nil; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil) - ifNil: [ cancelBlock value ]! Item was added: + ----- Method: UserDialogBoxMorph class>>confirm:orCancel:title:at: (in category 'utilities') ----- + confirm: aString orCancel: cancelBlock title: titleString at: aPointOrNil + + ^(self new + title: titleString; + label: aString; + addSelectedButton: ' Yes ' translated value: true; + addButton: ' No ' translated value: false; + addCancelButton: ' Cancel ' translated value: nil; + runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil) + ifNil: [ cancelBlock value ]! From commits at source.squeak.org Sun Mar 29 21:09:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 21:09:07 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.71.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-dtl.71.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-dtl.71 Author: dtl Time: 29 March 2015, 5:09:02.348 pm UUID: 367a75ee-64d0-4132-b36e-3e1be1e0b2e7 Ancestors: ToolBuilder-Kernel-mt.70 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. =============== Diff against ToolBuilder-Kernel-mt.70 =============== Item was added: + ----- Method: UIManager>>confirm:orCancel:title: (in category 'ui requests') ----- + confirm: aString orCancel: cancelBlock title: titleString + "Put up a yes/no/cancel menu with caption aString, and titleString to label the dialog. + Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. + This is a modal question--the user must respond yes or no." + ^self subclassResponsibility! Item was added: + ----- Method: UIManager>>confirm:title: (in category 'ui requests') ----- + confirm: queryString title: titleString + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + Answer true if the response is yes, false if no. This is a modal question--the user + must respond yes or no." + ^self subclassResponsibility! Item was added: + ----- Method: UIManager>>confirm:title:trueChoice:falseChoice: (in category 'ui requests') ----- + confirm: queryString title: titleString trueChoice: trueChoice falseChoice: falseChoice + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + The actual wording for the two choices will be as provided in the trueChoice and + falseChoice parameters. Answer true if the response is the true-choice, false if it + is the false-choice. This is a modal question -- the user must respond one way or + the other." + ^self subclassResponsibility! From commits at source.squeak.org Sun Mar 29 21:09:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 21:09:52 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-dtl.104.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-dtl.104.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-dtl.104 Author: dtl Time: 29 March 2015, 5:09:47.52 pm UUID: da56cb58-02d6-4ed0-89f6-ecb2b7bafce2 Ancestors: ToolBuilder-Morphic-mt.103 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. =============== Diff against ToolBuilder-Morphic-mt.103 =============== Item was added: + ----- Method: MorphicUIManager>>confirm:orCancel:title: (in category 'ui requests') ----- + confirm: aString orCancel: cancelBlock title: titleString + "Put up a yes/no/cancel menu with caption aString, and titleString to label the dialog. + Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. + This is a modal question--the user must respond yes or no." + ^ UserDialogBoxMorph + confirm: aString + orCancel: cancelBlock + title: titleString + at: nil! Item was added: + ----- Method: MorphicUIManager>>confirm:title: (in category 'ui requests') ----- + confirm: queryString title: titleString + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + Answer true if the response is yes, false if no. This is a modal question--the user + must respond yes or no." + ^UserDialogBoxMorph confirm: queryString title: titleString! Item was added: + ----- Method: MorphicUIManager>>confirm:title:trueChoice:falseChoice: (in category 'ui requests') ----- + confirm: queryString title: titleString trueChoice: trueChoice falseChoice: falseChoice + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + The actual wording for the two choices will be as provided in the trueChoice and + falseChoice parameters. Answer true if the response is the true-choice, false if it + is the false-choice. This is a modal question -- the user must respond one way or + the other." + ^ UserDialogBoxMorph confirm: queryString title: titleString trueChoice: trueChoice falseChoice: falseChoice ! From commits at source.squeak.org Sun Mar 29 21:10:55 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 21:10:57 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-MVC-dtl.38.mcz Message-ID: David T. Lewis uploaded a new version of ToolBuilder-MVC to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-MVC-dtl.38.mcz ==================== Summary ==================== Name: ToolBuilder-MVC-dtl.38 Author: dtl Time: 29 March 2015, 5:10:54.703 pm UUID: b9fbc8b7-4f34-4575-a651-3400866d6880 Ancestors: ToolBuilder-MVC-dtl.37 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. =============== Diff against ToolBuilder-MVC-dtl.37 =============== Item was added: + ----- Method: MVCUIManager>>confirm:orCancel:title: (in category 'ui requests') ----- + confirm: aString orCancel: cancelBlock title: titleString + "Put up a yes/no/cancel menu with caption aString, and titleString to label the dialog. + Answer true if the response is yes, false if no. If cancel is chosen, evaluate cancelBlock. + This is a modal question--the user must respond yes or no." + ^ PopUpMenu + confirm: (self dialogStringFromQuery: aString withTitle: titleString) + orCancel: cancelBlock! Item was added: + ----- Method: MVCUIManager>>confirm:title: (in category 'ui requests') ----- + confirm: queryString title: titleString + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + Answer true if the response is yes, false if no. This is a modal question--the user + must respond yes or no." + ^PopUpMenu confirm: (self dialogStringFromQuery: queryString withTitle: titleString) + ! Item was added: + ----- Method: MVCUIManager>>confirm:title:trueChoice:falseChoice: (in category 'ui requests') ----- + confirm: queryString title: titleString trueChoice: trueChoice falseChoice: falseChoice + "Put up a yes/no menu with caption queryString, and titleString to label the dialog. + The actual wording for the two choices will be as provided in the trueChoice and + falseChoice parameters. Answer true if the response is the true-choice, false if it + is the false-choice. This is a modal question -- the user must respond one way or + the other." + ^ PopUpMenu + confirm: (self dialogStringFromQuery: queryString withTitle: titleString) + trueChoice: trueChoice + falseChoice: falseChoice! Item was added: + ----- Method: MVCUIManager>>dialogStringFromQuery:withTitle: (in category 'private') ----- + dialogStringFromQuery: queryString withTitle: titleString + "In Morphic, it is common to display a simple dialog that has a title bar. In MVC, simple + dialogs are simple. If the UIManager requests a dialog with title, add the title as a simply + decorated line at the top of the dialog text." + ^String streamContents: [ :strm | + strm nextPutAll: '- '; + nextPutAll: titleString; + nextPutAll: ' -'; + nextPut: Character cr; + nextPutAll: queryString ] + ! From lewis at mail.msen.com Sun Mar 29 21:13:03 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Sun Mar 29 21:13:07 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <40DFEFD5-4942-4E02-BBC3-2947BF75A353@gmx.de> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> <1427645367443-4815931.post@n4.nabble.com> <20150329182624.GA56451@shell.msen.com> <40DFEFD5-4942-4E02-BBC3-2947BF75A353@gmx.de> Message-ID: <20150329211303.GA82287@shell.msen.com> On Sun, Mar 29, 2015 at 09:02:48PM +0200, Tobias Pape wrote: > > On 29.03.2015, at 20:26, David T. Lewis wrote: > > > On Sun, Mar 29, 2015 at 09:09:27AM -0700, Marcel Taeumel wrote: > >> The correct interface seems to be #confirm:title:. ;-) And this is already > >> implemented. > >> > > > > You are right, #confirm:title: would be better than #confirm:label: and it > > is already implemented in UserDialogBoxMorph for Morphic. > > > > UIManager currently supports these three methods: > > > > UIManager default confirm: 'Do you like chocolate?' > > UIManager default confirm: 'Do you like chocolate?' orCancel: [self halt]. > > UIManager default confirm: 'Do you like chocolate?' trueChoice: 'trueButtonLabel' falseChoice: 'falseButtonLabel'. > > > > If we add #confirm:title: to UIManager, then we should probably do it for > > all three methods. > > Ack :) > Done. Pictures of the corresponding Morphic and MVC dialog boxes attached. Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: MVC.png Type: image/png Size: 8687 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150329/93565aa8/MVC-0001.png -------------- next part -------------- A non-text attachment was scrubbed... Name: Morphic.png Type: image/png Size: 8871 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150329/93565aa8/Morphic-0001.png From commits at source.squeak.org Sun Mar 29 21:55:04 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Sun Mar 29 21:55:06 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150329215504.19068.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007698.html Name: ToolBuilder-Kernel-dtl.69 Ancestors: ToolBuilder-Kernel-dtl.68 UIManager>>confirm:label: is unimplemented and unreferenced since 2009. Remove it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007699.html Name: Morphic-mt.787 Ancestors: Morphic-topa.786 Establish a dependents-relationship between complex contents and the wrapper. Having this, views may perform partial updates on model changes. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007700.html Name: ToolBuilder-Kernel-mt.70 Ancestors: ToolBuilder-Kernel-dtl.69 Added support for a help text to input field spec to give users a cue which kind of input is expected. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007701.html Name: ToolBuilder-Morphic-mt.102 Ancestors: ToolBuilder-Morphic-dtl.101 Added support for a help text to input fields to give users a cue which kind of input is expected. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007702.html Name: ToolBuilder-Morphic-mt.103 Ancestors: ToolBuilder-Morphic-mt.102 Fix path selection to match against item identity instead of equality, which would fail, for example, in the case of string listings having duplicates. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007703.html Name: Tools-mt.565 Ancestors: Tools-topa.564 Refactored toggle/expand code in IndentingListItemMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007704.html Name: Tools-mt.566 Ancestors: Tools-mt.565 Established a dependents-replationship between list item wrappers and list item morphs to support partial model updates. Added support for the #contents model update in list item wrappers. That is, tree models may now update their children and notify about this. The whole tree view/morph does not have to be refreshed but only parts of it. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007705.html Name: ToolBuilder-MVC-dtl.37 Ancestors: ToolBuilder-MVC-dtl.36 Add missing implementation of #confirm:trueChoice:falseChoice: for MVC ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007706.html Name: Morphic-dtl.787 Ancestors: Morphic-topa.786 UserDialogBoxMorph constructor for UIManager access ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007707.html Name: ToolBuilder-Kernel-dtl.71 Ancestors: ToolBuilder-Kernel-mt.70 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007708.html Name: ToolBuilder-Morphic-dtl.104 Ancestors: ToolBuilder-Morphic-mt.103 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007709.html Name: ToolBuilder-MVC-dtl.38 Ancestors: ToolBuilder-MVC-dtl.37 Allow the UIManager to specify titles for confirm dialogs. In Morphic, this is the text of the title bar. In MVC, it is a line of text added to the top of the dialog prompt. #confirm:title replaces #confirm:label: which was defined previously in UIManager, but not implemented for Morphic or MVC. #title is consistent with other UIManager method naming and matches the implementation in UserDialogBoxMorph. ============================================= From Das.Linux at gmx.de Mon Mar 30 05:07:54 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 30 05:07:58 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-dtl.69.mcz In-Reply-To: <20150329211303.GA82287@shell.msen.com> References: <152DA534-4AB3-4A1C-905A-700A8839F40E@gmx.de> <1427645367443-4815931.post@n4.nabble.com> <20150329182624.GA56451@shell.msen.com> <40DFEFD5-4942-4E02-BBC3-2947BF75A353@gmx.de> <20150329211303.GA82287@shell.msen.com> Message-ID: <50B1A9D6-1255-4C8C-9ACB-F1633E4665F2@gmx.de> Hey On 29.03.2015, at 23:13, David T. Lewis wrote: > On Sun, Mar 29, 2015 at 09:02:48PM +0200, Tobias Pape wrote: >> >> On 29.03.2015, at 20:26, David T. Lewis wrote: >> >>> On Sun, Mar 29, 2015 at 09:09:27AM -0700, Marcel Taeumel wrote: >>>> The correct interface seems to be #confirm:title:. ;-) And this is already >>>> implemented. >>>> >>> >>> You are right, #confirm:title: would be better than #confirm:label: and it >>> is already implemented in UserDialogBoxMorph for Morphic. >>> >>> UIManager currently supports these three methods: >>> >>> UIManager default confirm: 'Do you like chocolate?' >>> UIManager default confirm: 'Do you like chocolate?' orCancel: [self halt]. >>> UIManager default confirm: 'Do you like chocolate?' trueChoice: 'trueButtonLabel' falseChoice: 'falseButtonLabel'. >>> >>> If we add #confirm:title: to UIManager, then we should probably do it for >>> all three methods. >> >> Ack :) >> > > Done. > > Pictures of the corresponding Morphic and MVC dialog boxes attached. Cool! Thank you. Best -Tobias From commits at source.squeak.org Mon Mar 30 06:47:07 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 06:47:08 2015 Subject: [squeak-dev] The Trunk: Collections-mt.605.mcz Message-ID: Marcel Taeumel uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections-mt.605.mcz ==================== Summary ==================== Name: Collections-mt.605 Author: mt Time: 30 March 2015, 8:46:49.164 am UUID: b661cec7-af10-7a42-9c4c-a09449425548 Ancestors: Collections-ul.604 Support #withBlanksTrimmed in texts. =============== Diff against Collections-ul.604 =============== Item was added: + ----- Method: String class>>noSeparators (in category 'accessing') ----- + noSeparators + ^ CSNonSeparators! Item was added: + ----- Method: Text>>withBlanksTrimmed (in category 'converting') ----- + withBlanksTrimmed + "Return a copy of the receiver from which leading and trailing blanks have been trimmed." + + | first last | + first := string indexOfAnyOf: String noSeparators startingAt: 1 ifAbsent: [0]. + first = 0 ifTrue: [ ^'' ]. "no non-separator character" + last := string lastIndexOfAnyOf: String noSeparators startingAt: self size ifAbsent: [self size]. + (first = 1 and: [ last = self size ]) ifTrue: [ ^self copy ]. + ^self + copyFrom: first + to: last + ! From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 30 06:39:06 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 30 06:50:33 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-dtl.787.mcz In-Reply-To: References: Message-ID: <1427697546842-4815997.post@n4.nabble.com> Please update your image before commit. ;-) You should have got a warning anyway? I will merge it. Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-dtl-787-mcz-tp4815964p4815997.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Mar 30 06:53:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 06:53:56 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.788.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.788.mcz ==================== Summary ==================== Name: Morphic-mt.788 Author: mt Time: 30 March 2015, 8:53:20.655 am UUID: 7c0e8d59-6df5-4142-a51f-3d9afe605a7f Ancestors: Morphic-mt.787, Morphic-dtl.787 Text morphs and pluggable text morphs behave more selection-preserving on setting new contents now. Avoids jerky scrolling behavior when updating contents while scrolling them. =============== Diff against Morphic-mt.787 =============== Item was changed: ----- Method: PluggableTextMorph>>setText: (in category 'model access') ----- setText: aText - scrollBar setValue: 0.0. textMorph ifNil: [textMorph := self textMorphClass new contents: aText wrappedTo: self innerBounds width-6. textMorph setEditView: self. scroller addMorph: textMorph] ifNotNil: [textMorph newContents: aText]. self hasUnacceptedEdits: false. self setScrollDeltas.! Item was changed: ----- Method: PluggableTextMorph>>update: (in category 'updating') ----- update: aSymbol aSymbol ifNil: [^self]. aSymbol == #flash ifTrue: [^self flash]. + aSymbol == getTextSelector + ifTrue: [ + self setText: self getText. + getSelectionSelector + ifNotNil: [self setSelection: self getSelection]. + ^ self]. - aSymbol == getTextSelector - ifTrue: - [self setText: self getText. - ^self setSelection: self getSelection]. aSymbol == getSelectionSelector ifTrue: [^self setSelection: self getSelection]. (aSymbol == #autoSelect and: [getSelectionSelector notNil]) ifTrue: [self handleEdit: [(textMorph editor) abandonChangeText; "no replacement!!" setSearch: model autoSelectString; againOrSame: true]]. aSymbol == #clearUserEdits ifTrue: [^self hasUnacceptedEdits: false]. aSymbol == #wantToChange ifTrue: [self canDiscardEdits ifFalse: [^self promptForCancel]. ^self]. aSymbol == #appendEntry ifTrue: [self handleEdit: [self appendEntry]. ^self refreshWorld]. aSymbol == #clearText ifTrue: [self handleEdit: [self changeText: Text new]. ^self refreshWorld]. aSymbol == #bs ifTrue: [self handleEdit: [self bsText]. ^self refreshWorld]. aSymbol == #codeChangedElsewhere ifTrue: [self hasEditingConflicts: true. ^self changed]. aSymbol == #saveContents ifTrue: [^self saveContentsInFile]! Item was changed: ----- Method: TextMorph>>newContents: (in category 'accessing') ----- newContents: stringOrText "Accept new text contents." + | newText embeddedMorphs oldSelection | - | newText embeddedMorphs | "If my text is all the same font, use the font for my new contents" newText := stringOrText isString ifTrue: [ | textSize | (text notNil and: [ (textSize := text size) > 0 and: [ (text runLengthFor: 1) = textSize ]]) ifTrue: [ | attribs | attribs := text attributesAt: 1 forStyle: textStyle. Text string: stringOrText copy attributes: attribs. ] ifFalse: [ Text fromString: stringOrText copy ] ] ifFalse: [ stringOrText copy asText. "should be veryDeepCopy?" ]. (text = newText and: [text runs = newText runs]) ifTrue: [^ self]. "No substantive change" text ifNotNil: [(embeddedMorphs := text embeddedMorphs) ifNotNil: [self removeAllMorphsIn: embeddedMorphs. embeddedMorphs do: [:m | m delete]]]. + oldSelection := editor ifNotNil: [:ed | ed selectionInterval]. text := newText. "add all morphs off the visible region; they'll be moved into the right place when they become visible. (this can make the scrollable area too large, though)" newText embeddedMorphs do: [:m | self addMorph: m. m position: -1000 @ 0]. self releaseParagraph. "update the paragraph cache" self paragraph. + oldSelection ifNotNil: [:sel | self selectFrom: sel first to: sel last]. "re-instantiate to set bounds" self world ifNotNil: [self world startSteppingSubmorphsOf: self]! Item was changed: ----- Method: UserDialogBoxMorph class>>confirm:orCancel:at: (in category 'utilities') ----- confirm: aString orCancel: cancelBlock at: aPointOrNil + ^self + confirm: aString + orCancel: cancelBlock + title: 'Please confirm:' + at: aPointOrNil! - - ^(self new - title: 'Please confirm:'; - label: aString; - addSelectedButton: ' Yes ' translated value: true; - addButton: ' No ' translated value: false; - addCancelButton: ' Cancel ' translated value: nil; - runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil) - ifNil: [ cancelBlock value ]! Item was added: + ----- Method: UserDialogBoxMorph class>>confirm:orCancel:title:at: (in category 'utilities') ----- + confirm: aString orCancel: cancelBlock title: titleString at: aPointOrNil + + ^(self new + title: titleString; + label: aString; + addSelectedButton: ' Yes ' translated value: true; + addButton: ' No ' translated value: false; + addCancelButton: ' Cancel ' translated value: nil; + runModalIn: ActiveWorld forHand: ActiveHand at: aPointOrNil) + ifNil: [ cancelBlock value ]! From commits at source.squeak.org Mon Mar 30 07:43:28 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 07:43:30 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.789.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.789.mcz ==================== Summary ==================== Name: Morphic-mt.789 Author: mt Time: 30 March 2015, 9:42:48.194 am UUID: 3a9c98fb-5fca-974f-8b32-e0059e13aeb0 Ancestors: Morphic-mt.788 Refactored interface for getting and setting balloonTexts. Do not modify the given text on setting anymore but only on getting because we do not yet now how balloonTexts will be rendered. =============== Diff against Morphic-mt.788 =============== Item was changed: ----- Method: ClickExerciser>>initButtons (in category 'initialization') ----- initButtons + | aButton positions | + aButton := ThreePhaseButtonMorph checkBox. + positions := ((0@0) rect: aButton extent negated) corners + self center . + buttons := positions collect: [ :p | ThreePhaseButtonMorph checkBox position: p; state: #on ] . + buttons with: self allSelectors do: [ :b :s | b balloonText: s asString ] . + self removeAllMorphs . + self addAllMorphs: buttons . - | aButton positions | - aButton := ThreePhaseButtonMorph checkBox. - positions := ((0@0) rect: aButton extent negated) corners + self center . - buttons := positions collect: [ :p | ThreePhaseButtonMorph checkBox position: p; state: #on ] . - buttons with: self allSelectors collect: [ :b :s | b setBalloonText: s asString maxLineLength: s size ] . - self removeAllMorphs . - self addAllMorphs: buttons . ! Item was changed: ----- Method: Morph>>balloonText (in category 'accessing') ----- balloonText "Answer balloon help text or nil, if no help is available. NB: subclasses may override such that they programatically construct the text, for economy's sake, such as model phrases in a Viewer" + | result | - | text balloonSelector aString | extension ifNil: [^nil]. + + extension balloonText + ifNotNil: [:balloonText | result := balloonText] + ifNil: [extension balloonTextSelector + ifNotNil: [:balloonSelector | + result := ScriptingSystem helpStringOrNilFor: balloonSelector. + (result isNil and: [balloonSelector == #methodComment]) + ifTrue: [result := self methodCommentAsBalloonHelp]. + ((result isNil and: [balloonSelector numArgs = 0]) + and: [self respondsTo: balloonSelector]) + ifTrue: [result := self perform: balloonSelector]]]. + + ^ result ifNotNil: [:balloonText | + balloonText asString withNoLineLongerThan: Preferences maxBalloonHelpLineLength]! - (text := extension balloonText) ifNotNil: [^text]. - (balloonSelector := extension balloonTextSelector) ifNotNil: - [aString := ScriptingSystem helpStringOrNilFor: balloonSelector. - (aString isNil and: [balloonSelector == #methodComment]) - ifTrue: [aString := self methodCommentAsBalloonHelp]. - ((aString isNil and: [balloonSelector numArgs = 0]) - and: [self respondsTo: balloonSelector]) - ifTrue: [aString := self perform: balloonSelector]]. - ^aString ifNotNil: - [aString asString - withNoLineLongerThan: Preferences maxBalloonHelpLineLength]! Item was added: + ----- Method: Morph>>balloonText: (in category 'accessing') ----- + balloonText: aString + + self assureExtension balloonText: aString.! Item was changed: ----- Method: Morph>>setBalloonText: (in category 'halos and balloon help') ----- setBalloonText: stringOrText "Set receiver's balloon help text. Pass nil to remove the help." + self flag: #deprecated. "mt: Use #balloonText:." self setBalloonText: stringOrText maxLineLength: Preferences maxBalloonHelpLineLength! Item was changed: ----- Method: Morph>>setBalloonText:maxLineLength: (in category 'halos and balloon help') ----- setBalloonText: stringOrText maxLineLength: aLength "Set receiver's balloon help text. Pass nil to remove the help." + + self flag: #deprecated. "mt: Use #balloonText:." (extension isNil and: [stringOrText isNil]) ifTrue: [^ self]. self assureExtension balloonText: (stringOrText ifNotNil: [stringOrText asString withNoLineLongerThan: aLength])! From commits at source.squeak.org Mon Mar 30 07:47:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 07:47:05 2015 Subject: [squeak-dev] The Trunk: ST80-mt.177.mcz Message-ID: Marcel Taeumel uploaded a new version of ST80 to project The Trunk: http://source.squeak.org/trunk/ST80-mt.177.mcz ==================== Summary ==================== Name: ST80-mt.177 Author: mt Time: 30 March 2015, 9:46:51.231 am UUID: 411c02bb-c316-5245-980b-509148ffe3d1 Ancestors: ST80-cmm.176 Marked method as deprecated. May be removed anyway? =============== Diff against ST80-cmm.176 =============== Item was changed: ----- Method: View>>setBalloonText: (in category 'morphic compatibility') ----- setBalloonText: aString "Unfortunately we just ignore this help text because we are not morphic" + + self flag: #deprecated. "mt: Use #balloonText: or just remove."! - ! From commits at source.squeak.org Mon Mar 30 07:49:30 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 07:49:32 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Kernel-mt.72.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.72.mcz ==================== Summary ==================== Name: ToolBuilder-Kernel-mt.72 Author: mt Time: 30 March 2015, 9:49:25.642 am UUID: 010594ce-f5e2-684e-9675-7915430cce4d Ancestors: ToolBuilder-Kernel-dtl.71 Revert #helpText because #help was already there. =============== Diff against ToolBuilder-Kernel-dtl.71 =============== Item was changed: PluggableTextSpec subclass: #PluggableInputFieldSpec + instanceVariableNames: '' - instanceVariableNames: 'helpText' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Kernel'! !PluggableInputFieldSpec commentStamp: 'ar 2/12/2005 23:13' prior: 0! PluggableInputField is intended as a HINT for the builder that this widget will be used as a single line input field. Unless explicitly supported it will be automatically substituted by PluggableText.! Item was removed: - ----- Method: PluggableInputFieldSpec>>helpText (in category 'accessing') ----- - helpText - - ^ helpText! Item was removed: - ----- Method: PluggableInputFieldSpec>>helpText: (in category 'accessing') ----- - helpText: aSelectorOrString - - helpText := aSelectorOrString.! From commits at source.squeak.org Mon Mar 30 07:52:26 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 07:52:27 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.105.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.105.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.105 Author: mt Time: 30 March 2015, 9:52:15.9 am UUID: 90b7acde-6e7e-f14d-8e79-037ee8428da1 Ancestors: ToolBuilder-Morphic-dtl.104 Custom #balloonText in pluggable text morphs to use model data. =============== Diff against ToolBuilder-Morphic-dtl.104 =============== Item was added: + ----- Method: PluggableTextMorphPlus>>balloonText (in category 'accessing') ----- + balloonText + "Overridden to send selector to model and not self. Do not use #perform:orSendTo: because super does more than just the send.." + + self balloonTextSelector ifNotNil: [:selector | + (self model respondsTo: selector) ifTrue: [ + ^ self model perform: selector]]. + + ^ super balloonText! From commits at source.squeak.org Mon Mar 30 07:54:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 07:54:50 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.106.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.106.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.106 Author: mt Time: 30 March 2015, 9:54:42.858 am UUID: f3c5f60f-b54f-b044-ab99-a27c5d2f03a4 Ancestors: ToolBuilder-Morphic-mt.105 Draw the balloon text in a pluggable text morph if no content is present. Revert the #helpText thing. See ToolBuilder-Kernel-mt.72. =============== Diff against ToolBuilder-Morphic-mt.105 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildHelpFor:spec: (in category 'pluggable widgets') ----- buildHelpFor: widget spec: aSpec + aSpec help ifNotNil: [:stringOrSymbol | + stringOrSymbol isSymbol + ifTrue: [widget balloonTextSelector: stringOrSymbol] + ifFalse: [widget balloonText: stringOrSymbol]].! - aSpec help - ifNotNil: [widget setBalloonText: aSpec help]! Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableInputField: (in category 'pluggable widgets') ----- buildPluggableInputField: aSpec | widget | widget := self buildPluggableText: aSpec. widget acceptOnCR: true. widget hideScrollBarsIndefinitely. - widget getHelpTextSelector: aSpec helpText. ^widget! Item was changed: PluggableTextMorph subclass: #PluggableTextMorphPlus + instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler' - instanceVariableNames: 'getColorSelector acceptAction unstyledAcceptText styler getHelpTextSelector' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableTextMorphPlus commentStamp: 'ar 2/11/2005 21:53' prior: 0! A pluggable text morph with support for color.! Item was added: + ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- + drawBalloonTextOn: aCanvas + "Show balloon text in the text morph if it has no contents." + + textMorph contents ifNotEmpty: [^ self]. + + self balloonText ifNotNil: [:text | + aCanvas + drawString: text + at: self innerBounds topLeft + (5@2) + font: textMorph textStyle defaultFont + color: (Color gray: 0.7)].! Item was removed: - ----- Method: PluggableTextMorphPlus>>drawHelpTextOn: (in category 'drawing') ----- - drawHelpTextOn: aCanvas - - | helpText | - - (self getHelpTextSelector notNil and: [textMorph contents isEmpty]) - ifFalse: [^ self]. - - helpText := self getHelpTextSelector isSymbol - ifTrue: [self model perform: self getHelpTextSelector] - ifFalse: [self getHelpTextSelector]. - helpText ifNil: [^ self]. - - aCanvas - drawString: helpText - at: self innerBounds topLeft + (5@2) - font: textMorph textStyle defaultFont - color: (Color gray: 0.7).! Item was changed: ----- Method: PluggableTextMorphPlus>>drawOn: (in category 'drawing') ----- drawOn: aCanvas super drawOn: aCanvas. + self drawBalloonTextOn: aCanvas.! - self drawHelpTextOn: aCanvas.! Item was removed: - ----- Method: PluggableTextMorphPlus>>getHelpTextSelector (in category 'accessing') ----- - getHelpTextSelector - - ^ getHelpTextSelector! Item was removed: - ----- Method: PluggableTextMorphPlus>>getHelpTextSelector: (in category 'accessing') ----- - getHelpTextSelector: aSymbol - - getHelpTextSelector := aSymbol.! From commits at source.squeak.org Mon Mar 30 09:02:34 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:02:35 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.790.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.790.mcz ==================== Summary ==================== Name: Morphic-mt.790 Author: mt Time: 30 March 2015, 11:01:51.98 am UUID: 3c6e6fbe-1550-9f4a-bf0c-df2afe94ef69 Ancestors: Morphic-mt.789 Fixed object explorer wrapper to set #parent for external #explorerContents. =============== Diff against Morphic-mt.789 =============== Item was changed: ----- Method: ObjectExplorerWrapper>>contents (in category 'accessing') ----- contents + (self object respondsTo: #explorerContents) ifTrue: [ + ^ self object explorerContents + do: [:wrapper | wrapper parent: self]; + yourself]. - (self object respondsTo: #explorerContents) ifTrue: [^ self object explorerContents]. "For all others, show named vars first, then indexed vars" ^(self object class allInstVarNames asOrderedCollection withIndexCollect: [:each :index | self class with: (self object instVarAt: index) name: each model: self object parent: self]) , ((1 to: self object basicSize) collect: [:index | self class with: (self object basicAt: index) name: index printString model: self object parent: self])! Item was added: + ----- Method: ObjectExplorerWrapper>>parent: (in category 'accessing') ----- + parent: aWrapper + + parent := aWrapper.! Item was changed: ----- Method: ObjectExplorerWrapper>>setItem:name:model:parent: (in category 'initialization') ----- setItem: anObject name: aString model: aModel parent: itemParent + self parent: itemParent. - parent := itemParent. self setItem: anObject name: aString model: aModel! From commits at source.squeak.org Mon Mar 30 09:04:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:04:53 2015 Subject: [squeak-dev] The Trunk: Tools-mt.567.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.567.mcz ==================== Summary ==================== Name: Tools-mt.567 Author: mt Time: 30 March 2015, 11:04:29.662 am UUID: 8188486e-cd12-6b46-825a-9d43c3b3452a Ancestors: Tools-mt.566 Fix the use of inspector in object explorer (i.e., keyboard shortcuts and menus). =============== Diff against Tools-mt.566 =============== Item was removed: - ----- Method: ObjectExplorer>>chasePointers (in category 'menus - callbacks') ----- - chasePointers - "Open a PointerFinder on the selected item" - | path sel savedRoot saved | - path := OrderedCollection new. - sel := currentSelection. - [ sel isNil ] whileFalse: [ path addFirst: sel asString. sel := sel parent ]. - path addFirst: #openPath. - path := path asArray. - savedRoot := self rootObject. - saved := self object. - [ self rootObject: nil. - self changed: #getList. - (Smalltalk includesKey: #PointerFinder) - ifTrue: [PointerFinder on: saved] - ifFalse: [self objectReferencesToSelection ]] - ensure: [ self rootObject: savedRoot. - self changed: #getList. - self changed: path. - ]! Item was removed: - ----- Method: ObjectExplorer>>defsOfSelection (in category 'menus - callbacks') ----- - defsOfSelection - "Open a browser on all defining references to the selected instance variable, if that's what's currently selected." - | aClass sel | - - (aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash]. - sel := self selector. - self systemNavigation browseAllStoresInto: sel from: aClass! Item was removed: - ----- Method: ObjectExplorer>>doesNotUnderstand: (in category 'error handling') ----- - doesNotUnderstand: aMessage - inspector ifNotNil: [ (inspector respondsTo: aMessage selector) ifTrue: [ ^inspector perform: aMessage selector withArguments: aMessage arguments ]]. - ^super doesNotUnderstand: aMessage! Item was removed: - ----- Method: ObjectExplorer>>explorePointers (in category 'menus - callbacks') ----- - explorePointers - "Open a PointerExplorer on the current selection" - PointerExplorer new openExplorerFor: self object! Item was removed: - ----- Method: ObjectExplorer>>exploreSelection (in category 'menus - callbacks') ----- - exploreSelection - "Open an ObjectExplorer on the current selection" - self object explore! Item was changed: ----- Method: ObjectExplorer>>explorerKey:from:event: (in category 'menus') ----- explorerKey: aChar from: view event: event event anyModifierKeyPressed ifFalse: [^ false]. currentSelection ifNotNil: [ + self updateInspectorForSelection. - inspector ifNil: [inspector := Inspector new]. - inspector - inspect: self parentObject; - object: self object. + aChar == $i ifTrue: [self inspector inspectSelection. ^ true]. + aChar == $I ifTrue: [self inspector exploreSelection. ^ true]. - aChar == $i ifTrue: [self inspectSelection. ^ true]. - aChar == $I ifTrue: [self exploreSelection. ^ true]. + aChar == $b ifTrue: [self inspector browseMethodFull. ^ true]. + aChar == $h ifTrue: [self inspector classHierarchy. ^ true]. - aChar == $b ifTrue: [inspector browseMethodFull. ^ true]. - aChar == $h ifTrue: [inspector classHierarchy. ^ true]. aChar == $c ifTrue: [Clipboard clipboardText: self currentSelection key. ^ true]. + aChar == $p ifTrue: [self inspector browseFullProtocol. ^ true]. + aChar == $N ifTrue: [self inspector browseClassRefs. ^ true]. + aChar == $t ifTrue: [self inspector tearOffTile. ^ true]. + aChar == $v ifTrue: [self inspector viewerForValue. ^ true]]. - aChar == $p ifTrue: [inspector browseFullProtocol. ^ true]. - aChar == $N ifTrue: [inspector browseClassRefs. ^ true]. - aChar == $t ifTrue: [inspector tearOffTile. ^ true]. - aChar == $v ifTrue: [inspector viewerForValue. ^ true]]. ^ false! Item was changed: ----- Method: ObjectExplorer>>genericMenu: (in category 'menus') ----- genericMenu: aMenu "Borrow a menu from my inspector" + - | insideObject menu parentObject | currentSelection + ifNil: [ + aMenu - ifNil: [menu := aMenu. - menu add: '*nothing selected*' target: self selector: #yourself] + ifNotNil: [ + self updateInspectorForSelection. + aMenu defaultTarget: self inspector. + self inspector fieldListMenu: aMenu. + - ifNotNil: [insideObject := self object. - parentObject := self parentObject. - inspector - ifNil: [inspector := Inspector new]. - inspector inspect: parentObject; - object: insideObject. - aMenu defaultTarget: inspector. - inspector fieldListMenu: aMenu. - aMenu items - do: [:i | (#(#inspectSelection #exploreSelection #referencesToSelection #defsOfSelection #objectReferencesToSelection #chasePointers #explorePointers) includes: i selector) - ifTrue: [i target: self]]. aMenu addLine; add: 'monitor changes' target: self selector: #monitor: argument: currentSelection]. monitorList isEmptyOrNil ifFalse: [aMenu addLine; add: 'stop monitoring all' target: self selector: #stopMonitoring]. ^ aMenu! Item was removed: - ----- Method: ObjectExplorer>>inspectSelection (in category 'menus - callbacks') ----- - inspectSelection - "Open an Inspector on the current selection" - self object inspect! Item was added: + ----- Method: ObjectExplorer>>inspector (in category 'accessing - other') ----- + inspector + + ^ inspector ifNil: [inspector := Inspector new]! Item was changed: + ----- Method: ObjectExplorer>>monitor: (in category 'monitoring') ----- - ----- Method: ObjectExplorer>>monitor: (in category 'menus - callbacks') ----- monitor: aBinding "Start stepping and watching the given binding for changes." aBinding ifNil: [ ^self ]. self world ifNil: [ ^self ]. self monitorList add: aBinding. self world startStepping: self at: Time millisecondClockValue selector: #step arguments: #() stepTime: 2000.! Item was removed: - ----- Method: ObjectExplorer>>objectReferencesToSelection (in category 'menus - callbacks') ----- - objectReferencesToSelection - "Open a browser on all references to the selected instance variable, if that's what currently selected. " - self systemNavigation - browseAllObjectReferencesTo: self object - except: (Array with: self parentObject with: currentSelection with: inspector) - ifNone: [:obj | self changed: #flash]. - ! Item was removed: - ----- Method: ObjectExplorer>>referencesToSelection (in category 'menus - callbacks') ----- - referencesToSelection - "Open a browser on all references to the selected instance variable, if that's what's currently selected." - | aClass sel | - - (aClass := self parentObject class) isVariable ifTrue: [^ self changed: #flash]. - sel := self selector. - self systemNavigation browseAllAccessesTo: sel from: aClass! Item was added: + ----- Method: ObjectExplorer>>updateInspectorForSelection (in category 'accessing - other') ----- + updateInspectorForSelection + "Reuse the inspector for some callbacks." + + self inspector inspect: (self parentObject ifNil: [self object]). + + self parentObject + ifNil: [self inspector toggleIndex: 1. "self"] + ifNotNil: [ + self inspector toggleIndex: (self inspector fieldList indexOf: self currentSelection key)]. + self assert: self inspector selection == self object.! From commits at source.squeak.org Mon Mar 30 09:06:02 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:06:04 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.107.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.107.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.107 Author: mt Time: 30 March 2015, 11:05:54.366 am UUID: 6b98b55a-8662-944b-baab-7166bf663019 Ancestors: ToolBuilder-Morphic-mt.106 Fix drawing of balloonText in text fields to consider the actual bounds. =============== Diff against ToolBuilder-Morphic-mt.106 =============== Item was changed: ----- Method: PluggableTextMorphPlus>>drawBalloonTextOn: (in category 'drawing') ----- drawBalloonTextOn: aCanvas "Show balloon text in the text morph if it has no contents." textMorph contents ifNotEmpty: [^ self]. self balloonText ifNotNil: [:text | aCanvas drawString: text + in: (self innerBounds insetBy: (5@2 corner: 0@0)) - at: self innerBounds topLeft + (5@2) font: textMorph textStyle defaultFont color: (Color gray: 0.7)].! From commits at source.squeak.org Mon Mar 30 09:15:50 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:15:51 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.791.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.791.mcz ==================== Summary ==================== Name: Morphic-mt.791 Author: mt Time: 30 March 2015, 11:15:05.11 am UUID: 2477a56b-ef43-7746-a965-0fbd71e8cb99 Ancestors: Morphic-mt.790 Defer line-breaking in balloon-texts until actual display time. Having this, even text objects can be stored as balloon-texts and an appropriate renderer may display that. =============== Diff against Morphic-mt.790 =============== Item was changed: ----- Method: Morph>>balloonText (in category 'accessing') ----- balloonText "Answer balloon help text or nil, if no help is available. NB: subclasses may override such that they programatically construct the text, for economy's sake, such as model phrases in a Viewer" | result | extension ifNil: [^nil]. extension balloonText ifNotNil: [:balloonText | result := balloonText] ifNil: [extension balloonTextSelector ifNotNil: [:balloonSelector | result := ScriptingSystem helpStringOrNilFor: balloonSelector. (result isNil and: [balloonSelector == #methodComment]) ifTrue: [result := self methodCommentAsBalloonHelp]. ((result isNil and: [balloonSelector numArgs = 0]) and: [self respondsTo: balloonSelector]) ifTrue: [result := self perform: balloonSelector]]]. + ^ result! - - ^ result ifNotNil: [:balloonText | - balloonText asString withNoLineLongerThan: Preferences maxBalloonHelpLineLength]! Item was changed: ----- Method: Morph>>setBalloonText: (in category 'halos and balloon help') ----- setBalloonText: stringOrText "Set receiver's balloon help text. Pass nil to remove the help." self flag: #deprecated. "mt: Use #balloonText:." + self balloonText: stringOrText.! - self setBalloonText: stringOrText maxLineLength: Preferences maxBalloonHelpLineLength! Item was changed: ----- Method: Morph>>showBalloon:hand: (in category 'halos and balloon help') ----- showBalloon: msgString hand: aHand "Pop up a balloon containing the given string, first removing any existing BalloonMorphs in the world." | w balloon h | (w := self world) ifNil: [^ self]. h := aHand. h ifNil:[ h := w activeHand]. + balloon := BalloonMorph + string: (msgString asString withNoLineLongerThan: Preferences maxBalloonHelpLineLength) + for: self balloonHelpAligner. - balloon := BalloonMorph string: msgString for: self balloonHelpAligner. balloon popUpFor: self hand: h.! From commits at source.squeak.org Mon Mar 30 09:18:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:18:53 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.792.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.792.mcz ==================== Summary ==================== Name: Morphic-mt.792 Author: mt Time: 30 March 2015, 11:18:11.286 am UUID: 39a16136-7792-1345-9ca5-577960dc6494 Ancestors: Morphic-mt.791 Fix typos. =============== Diff against Morphic-mt.791 =============== Item was changed: ----- Method: ClickExerciser class>>descriptionForPartsBin (in category 'parts bin') ----- descriptionForPartsBin + "ClickExerciser descriptionForPartsBin" + ^ self partName: 'Exercise Click' - "WizClickExample descriptionForPartsBin" - ^ self partName: 'ExersizeClick' categories: #('Demo') + documentation: 'An exerciser for click, double-click, and drag-click in morphic'! - documentation: 'An exersizer for double-click in moprhic'! From commits at source.squeak.org Mon Mar 30 09:20:51 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 09:20:53 2015 Subject: [squeak-dev] The Trunk: SUnitTools-topa.2.mcz Message-ID: Tobias Pape uploaded a new version of SUnitTools to project The Trunk: http://source.squeak.org/trunk/SUnitTools-topa.2.mcz ==================== Summary ==================== Name: SUnitTools-topa.2 Author: topa Time: 30 March 2015, 11:20:45.675 am UUID: 39c2ee8e-382f-4c49-b0a6-b9717d7ec5d2 Ancestors: SUnitTools-topa.1 Push up #hasClassWithTestsSelected to not upset, eg, ChangeSorter. Reported by Karl Ramberg. Thanks. =============== Diff against SUnitTools-topa.1 =============== Item was removed: - ----- Method: Browser>>hasClassWithTestsSelected (in category '*SUnitTools-class list functions') ----- - hasClassWithTestsSelected - - ^ (self selectedClass isTestClass and: [self selectedClass isAbstract not])! Item was added: + ----- Method: StringHolder>>hasClassWithTestsSelected (in category '*SUnitTools-testing') ----- + hasClassWithTestsSelected + + ^ self selectedClass + ifNil: [false] + ifNotNil: [:cls | + cls isTestClass and: [cls isAbstract not]]! From lewis at mail.msen.com Mon Mar 30 12:34:26 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Mon Mar 30 12:34:29 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-dtl.787.mcz In-Reply-To: <1427697546842-4815997.post@n4.nabble.com> References: <1427697546842-4815997.post@n4.nabble.com> Message-ID: <20150330123426.GA36828@shell.msen.com> On Sun, Mar 29, 2015 at 11:39:06PM -0700, Marcel Taeumel wrote: > Please update your image before commit. ;-) You should have got a warning > anyway? > > I will merge it. > Thanks Marcel, Actually, I did receive a warning, and I did update my image before doing the commit in order to bring in Morphic-topa.786. Morphic-mt-787.mcz was not yet in the repository at that time. I may have let a few minutes go by between the time I updated and the time that I committed Morphic-dtl.787. We must have both been doing a .787 update at about the same time :-) Thanks for the merge. Dave From Das.Linux at gmx.de Mon Mar 30 12:34:45 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 30 12:34:51 2015 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: Message-ID: <5BE22D85-14E6-472B-9A5A-7B386C10043C@gmx.de> workin on it. On 03.03.2015, at 16:57, Levente Uzonyi wrote: > We've had this issue before. Everything is there, but not where jenkins is looking for: > > /var/lib/jenkins/.rvm/src/ruby-1.9.3-p194/bin/gem > /var/lib/jenkins/.rvm/src/ruby-1.9.3-p392/bin/gem > /var/lib/jenkins/.rvm/src/ruby-2.0.0-p0/bin/gem > /var/lib/jenkins/.rvm/src/rubygems-1.8.25/bin/gem > > Levente > > On Tue, 3 Mar 2015, Frank Shearar wrote: > >> On 3 March 2015 at 14:43, Frank Shearar wrote: >>> On 3 March 2015 at 14:38, Levente Uzonyi wrote: >>>> On Tue, 3 Mar 2015, Frank Shearar wrote: >>>> >>>>> Yep, this is the problem that I was trying to resolve the other week >>>>> with Eliot. I don't think it's a Cog bug, I think it's a bug in our >>>>> security settings or something. >>>>> >>>>> I had a look, things looked OK, but this is well beyond my >>>>> rememberings of Linux security, hence why it's still broken. >>>> >>>> >>>> Changes of the files in limits.d are only applied to new sessions. The >>>> squeak.conf file was created after jenkins was started. So restarting >>>> jenkins should fix the problem. >>> >>> Oh, because Jenkins spins up the VMs, so the Cog processes inherit the >>> permissions that Jenkins had? I'll reboot Jenkins then! >> >> Rebooted, and now I see failures like "bundle gem not installed". So I >> added a new build step to install that gem, but it seems that the gem >> package isn't installed on that box? I don't have my credentials with >> me so I can't look into the problem. I may only be able to dig into >> the problem a few days from now. >> >> frank >> >>> frank >>> >>>> Levente >>>> >>>> >>>>> >>>>> frank >>>>> >>>>> On 2 March 2015 at 17:37, Levente Uzonyi wrote: From Das.Linux at gmx.de Mon Mar 30 13:16:50 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 30 13:16:54 2015 Subject: [squeak-dev] New Cog VMs available In-Reply-To: <5BE22D85-14E6-472B-9A5A-7B386C10043C@gmx.de> References: <5BE22D85-14E6-472B-9A5A-7B386C10043C@gmx.de> Message-ID: Hi On 30.03.2015, at 14:34, Tobias Pape wrote: > workin on it. > > > On 03.03.2015, at 16:57, Levente Uzonyi wrote: > >> We've had this issue before. Everything is there, but not where jenkins is looking for: >> >> /var/lib/jenkins/.rvm/src/ruby-1.9.3-p194/bin/gem >> /var/lib/jenkins/.rvm/src/ruby-1.9.3-p392/bin/gem >> /var/lib/jenkins/.rvm/src/ruby-2.0.0-p0/bin/gem >> /var/lib/jenkins/.rvm/src/rubygems-1.8.25/bin/gem After poking around for an hour, (and in the process installing and deinstalling ruby1.8 on box3) I found that I just had to check 'Run the build in a RVM-managed environment' in the Jenkins Job configuration. Then i had the infamous 'Bit size mismatch' error, which a few builds later disappeared (and I don't know why?) TL;DR: http://build.squeak.org/job/SqueakTrunk/lastSuccessfulBuild/artifact/target/TrunkImage.zip is current as of today. Best -Tobias >> >> Levente >> >> On Tue, 3 Mar 2015, Frank Shearar wrote: >> >>> On 3 March 2015 at 14:43, Frank Shearar wrote: >>>> On 3 March 2015 at 14:38, Levente Uzonyi wrote: >>>>> On Tue, 3 Mar 2015, Frank Shearar wrote: >>>>> >>>>> >>>>> >>>>> Changes of the files in limits.d are only applied to new sessions. The >>>>> squeak.conf file was created after jenkins was started. So restarting >>>>> jenkins should fix the problem. >>>> >>>> Oh, because Jenkins spins up the VMs, so the Cog processes inherit the >>>> permissions that Jenkins had? I'll reboot Jenkins then! >>> >>> Rebooted, and now I see failures like "bundle gem not installed". So I >>> added a new build step to install that gem, but it seems that the gem >>> package isn't installed on that box? I don't have my credentials with >>> me so I can't look into the problem. I may only be able to dig into >>> the problem a few days from now. >>> >>> frank >>> >>>> frank >>>> >>>>> Levente From Das.Linux at gmx.de Mon Mar 30 13:26:24 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Mon Mar 30 13:26:27 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] In-Reply-To: References: <51F6FCBD-B10C-4A2E-B983-50537ED42B1E@gmx.de> Message-ID: <268314FB-0D10-4D5D-BF13-B7EBF1EA2A70@gmx.de> Hi On 24.03.2015, at 14:16, Frank Shearar wrote: > On 24 March 2015 at 11:07, Tobias Pape wrote: >> Hey Frank >> On 24.03.2015, at 12:02, Frank Shearar wrote: >> >>> On 24 March 2015 at 10:05, Tobias Pape wrote: >>> >>> Yep. That's when last we had a build that actually succeeded. >>> >>> We've had several unrelated issues breaking the build. The current one >>> is a strange misconfiguration of Ruby somewhere on build.squeak.org. >>> As should be clearly apparent, I haven't had the time to fix the >>> latest issue. >>> >> >> This message was not meant to be pushy, especially not towards you :) >> Just a reminder for the rest of us to ?do something? > > Even if you'd intended to be pushy, I'd be OK with that :) There's > little point in a CI system that no one watches, so I'm happy to see > someone flagging up a CI issue. I just, as I said, haven't had the > time to address the issue. Levente had a look on the machine and it > does have gem installed, so there's presumably some little bit of > configuration missing somewhere to set the PATH correctly. I had a look and it was a jenkins configuration thing, see other mail :) Best -Tobias > > frank > >> Best >> -Tobias From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 30 13:15:28 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 30 13:26:55 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: References: <1427561366671-4815777.post@n4.nabble.com> Message-ID: <1427721328157-4816091.post@n4.nabble.com> busy-image.png I tried this. No slowdown detected. :-/ Best, Marcel -- View this message in context: http://forum.world.st/slow-display-update-on-debugger-proceed-tp4815619p4816091.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Mon Mar 30 13:58:10 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 13:58:11 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.793.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.793.mcz ==================== Summary ==================== Name: Morphic-mt.793 Author: mt Time: 30 March 2015, 3:57:32.562 pm UUID: 229243f9-466f-da4c-ac19-b77b846ca678 Ancestors: Morphic-mt.792 Attempt to fix the proceed-bug, which, under certain conditions, caused flickering and slow display update after proceeding a UI process. =============== Diff against Morphic-mt.792 =============== Item was changed: ----- Method: Debugger>>morphicResumeProcess: (in category '*Morphic-opening') ----- morphicResumeProcess: aTopView + | processToResume | + processToResume := interruptedProcess. + interruptedProcess := nil. "Before delete, so release doesn't terminate it" + aTopView delete. + World displayWorld. "We have to redraw *before* resuming the old process." + Smalltalk installLowSpaceWatcher. "restart low space handler" + savedCursor ifNotNil: [Cursor currentCursor: savedCursor]. + processToResume isTerminated ifFalse: [ - interruptedProcess isTerminated ifFalse: [ errorWasInUIProcess + ifTrue: [Project resumeProcess: processToResume] + ifFalse: [processToResume resume]]. - ifTrue: [Project resumeProcess: interruptedProcess] - ifFalse: [interruptedProcess resume]]. "if old process was terminated, just terminate current one" - interruptedProcess := nil. "Before delete, so release doesn't terminate it" - aTopView delete. - World displayWorld. - Smalltalk installLowSpaceWatcher. "restart low space handler" errorWasInUIProcess == false ifFalse: [Processor terminateActive]! From marcel.taeumel at student.hpi.uni-potsdam.de Mon Mar 30 13:49:49 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Mon Mar 30 14:01:15 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: <1427721328157-4816091.post@n4.nabble.com> References: <1427561366671-4815777.post@n4.nabble.com> <1427721328157-4816091.post@n4.nabble.com> Message-ID: <1427723389073-4816097.post@n4.nabble.com> I fixed something: http://forum.world.st/The-Trunk-Morphic-mt-793-mcz-td4816096.html There was the possibility, that two UI processes were running after proceed, which may have caused the slow display update. Now, it's more like the MVC-version (#mvcResumeProcess:) of resuming the process, which first makes the redraw and them resumes the interrupted process. Eliot, does this work for you? Best, Marcel -- View this message in context: http://forum.world.st/slow-display-update-on-debugger-proceed-tp4815619p4816097.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From leves at elte.hu Mon Mar 30 17:01:41 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Mar 30 17:01:49 2015 Subject: [squeak-dev] The Trunk: Collections-mt.605.mcz In-Reply-To: References: Message-ID: On Mon, 30 Mar 2015, commits@source.squeak.org wrote: > Marcel Taeumel uploaded a new version of Collections to project The Trunk: > http://source.squeak.org/trunk/Collections-mt.605.mcz > > ==================== Summary ==================== > > Name: Collections-mt.605 > Author: mt > Time: 30 March 2015, 8:46:49.164 am > UUID: b661cec7-af10-7a42-9c4c-a09449425548 > Ancestors: Collections-ul.604 > > Support #withBlanksTrimmed in texts. > > =============== Diff against Collections-ul.604 =============== > > Item was added: > + ----- Method: String class>>noSeparators (in category 'accessing') ----- > + noSeparators > + ^ CSNonSeparators! I like the idea of a shared CharacterSet with the non-separator characters, but IMHO it should be on the class side of CharacterSet and I prefer the name #nonSeparators. Any objections? Levente > > Item was added: > + ----- Method: Text>>withBlanksTrimmed (in category 'converting') ----- > + withBlanksTrimmed > + "Return a copy of the receiver from which leading and trailing blanks have been trimmed." > + > + | first last | > + first := string indexOfAnyOf: String noSeparators startingAt: 1 ifAbsent: [0]. > + first = 0 ifTrue: [ ^'' ]. "no non-separator character" > + last := string lastIndexOfAnyOf: String noSeparators startingAt: self size ifAbsent: [self size]. > + (first = 1 and: [ last = self size ]) ifTrue: [ ^self copy ]. > + ^self > + copyFrom: first > + to: last > + ! > > > From leves at elte.hu Mon Mar 30 17:02:29 2015 From: leves at elte.hu (Levente Uzonyi) Date: Mon Mar 30 17:02:34 2015 Subject: [squeak-dev] The Squeak Trunk image on the ci was last saved on 2014-12-08 *sadface* [EOM] In-Reply-To: <268314FB-0D10-4D5D-BF13-B7EBF1EA2A70@gmx.de> References: <51F6FCBD-B10C-4A2E-B983-50537ED42B1E@gmx.de> <268314FB-0D10-4D5D-BF13-B7EBF1EA2A70@gmx.de> Message-ID: Great! Thanks for fixing it. Levente On Mon, 30 Mar 2015, Tobias Pape wrote: > Hi > > > On 24.03.2015, at 14:16, Frank Shearar wrote: > >> On 24 March 2015 at 11:07, Tobias Pape wrote: >>> Hey Frank >>> On 24.03.2015, at 12:02, Frank Shearar wrote: >>> >>>> On 24 March 2015 at 10:05, Tobias Pape wrote: >>>> >>>> Yep. That's when last we had a build that actually succeeded. >>>> >>>> We've had several unrelated issues breaking the build. The current one >>>> is a strange misconfiguration of Ruby somewhere on build.squeak.org. >>>> As should be clearly apparent, I haven't had the time to fix the >>>> latest issue. >>>> >>> >>> This message was not meant to be pushy, especially not towards you :) >>> Just a reminder for the rest of us to ?do something? >> >> Even if you'd intended to be pushy, I'd be OK with that :) There's >> little point in a CI system that no one watches, so I'm happy to see >> someone flagging up a CI issue. I just, as I said, haven't had the >> time to address the issue. Levente had a look on the machine and it >> does have gem installed, so there's presumably some little bit of >> configuration missing somewhere to set the PATH correctly. > > I had a look and it was a jenkins configuration thing, > see other mail :) > > Best > -Tobias > >> >> frank >> >>> Best >>> -Tobias > > > > From eliot.miranda at gmail.com Mon Mar 30 17:03:58 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Mon Mar 30 17:04:07 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-dtl.787.mcz In-Reply-To: <20150330123426.GA36828@shell.msen.com> References: <1427697546842-4815997.post@n4.nabble.com> <20150330123426.GA36828@shell.msen.com> Message-ID: <56A2A98A-3001-4CFA-8727-EDCEB2248E8E@gmail.com> On Mar 30, 2015, at 5:34 AM, "David T. Lewis" wrote: > On Sun, Mar 29, 2015 at 11:39:06PM -0700, Marcel Taeumel wrote: >> Please update your image before commit. ;-) You should have got a warning >> anyway? >> >> I will merge it. > > Thanks Marcel, > > Actually, I did receive a warning, and I did update my image before doing the commit > in order to bring in Morphic-topa.786. Morphic-mt-787.mcz was not yet in the repository > at that time. I may have let a few minutes go by between the time I updated and the > time that I committed Morphic-dtl.787. > > We must have both been doing a .787 update at about the same time :-) > > Thanks for the merge. The 787 update was just too fast: -------------- next part -------------- A non-text attachment was scrubbed... Name: mazda-787b-10.jpg Type: image/jpeg Size: 40612 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150330/fe3f6320/mazda-787b-10-0001.jpg -------------- next part -------------- > > Dave > > From commits at source.squeak.org Mon Mar 30 21:55:03 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Mon Mar 30 21:55:04 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150330215503.4584.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007710.html Name: Collections-mt.605 Ancestors: Collections-ul.604 Support #withBlanksTrimmed in texts. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007711.html Name: Morphic-mt.788 Ancestors: Morphic-mt.787, Morphic-dtl.787 Text morphs and pluggable text morphs behave more selection-preserving on setting new contents now. Avoids jerky scrolling behavior when updating contents while scrolling them. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007712.html Name: Morphic-mt.789 Ancestors: Morphic-mt.788 Refactored interface for getting and setting balloonTexts. Do not modify the given text on setting anymore but only on getting because we do not yet now how balloonTexts will be rendered. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007713.html Name: ST80-mt.177 Ancestors: ST80-cmm.176 Marked method as deprecated. May be removed anyway? ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007714.html Name: ToolBuilder-Kernel-mt.72 Ancestors: ToolBuilder-Kernel-dtl.71 Revert #helpText because #help was already there. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007715.html Name: ToolBuilder-Morphic-mt.105 Ancestors: ToolBuilder-Morphic-dtl.104 Custom #balloonText in pluggable text morphs to use model data. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007716.html Name: ToolBuilder-Morphic-mt.106 Ancestors: ToolBuilder-Morphic-mt.105 Draw the balloon text in a pluggable text morph if no content is present. Revert the #helpText thing. See ToolBuilder-Kernel-mt.72. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007717.html Name: Morphic-mt.790 Ancestors: Morphic-mt.789 Fixed object explorer wrapper to set #parent for external #explorerContents. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007718.html Name: Tools-mt.567 Ancestors: Tools-mt.566 Fix the use of inspector in object explorer (i.e., keyboard shortcuts and menus). ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007719.html Name: ToolBuilder-Morphic-mt.107 Ancestors: ToolBuilder-Morphic-mt.106 Fix drawing of balloonText in text fields to consider the actual bounds. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007720.html Name: Morphic-mt.791 Ancestors: Morphic-mt.790 Defer line-breaking in balloon-texts until actual display time. Having this, even text objects can be stored as balloon-texts and an appropriate renderer may display that. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007721.html Name: Morphic-mt.792 Ancestors: Morphic-mt.791 Fix typos. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007722.html Name: SUnitTools-topa.2 Ancestors: SUnitTools-topa.1 Push up #hasClassWithTestsSelected to not upset, eg, ChangeSorter. Reported by Karl Ramberg. Thanks. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007723.html Name: Morphic-mt.793 Ancestors: Morphic-mt.792 Attempt to fix the proceed-bug, which, under certain conditions, caused flickering and slow display update after proceeding a UI process. ============================================= From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 31 07:51:11 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 31 08:02:45 2015 Subject: [squeak-dev] Re: The Trunk: Collections-mt.605.mcz In-Reply-To: References: Message-ID: <1427788271576-4816279.post@n4.nabble.com> Sounds good! :) Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Collections-mt-605-mcz-tp4815995p4816279.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From frank.shearar at gmail.com Tue Mar 31 08:30:26 2015 From: frank.shearar at gmail.com (Frank Shearar) Date: Tue Mar 31 08:30:29 2015 Subject: [squeak-dev] New Cog VMs available In-Reply-To: References: <5BE22D85-14E6-472B-9A5A-7B386C10043C@gmx.de> Message-ID: On 30 March 2015 at 14:16, Tobias Pape wrote: > Hi > > On 30.03.2015, at 14:34, Tobias Pape wrote: > >> workin on it. >> >> >> On 03.03.2015, at 16:57, Levente Uzonyi wrote: >> >>> We've had this issue before. Everything is there, but not where jenkins is looking for: >>> >>> /var/lib/jenkins/.rvm/src/ruby-1.9.3-p194/bin/gem >>> /var/lib/jenkins/.rvm/src/ruby-1.9.3-p392/bin/gem >>> /var/lib/jenkins/.rvm/src/ruby-2.0.0-p0/bin/gem >>> /var/lib/jenkins/.rvm/src/rubygems-1.8.25/bin/gem > > After poking around for an hour, (and in the process installing and deinstalling > ruby1.8 on box3) I found that I just had to check > 'Run the build in a RVM-managed environment' > in the Jenkins Job configuration. > > Then i had the infamous 'Bit size mismatch' error, which a few builds later > disappeared (and I don't know why?) > > TL;DR: http://build.squeak.org/job/SqueakTrunk/lastSuccessfulBuild/artifact/target/TrunkImage.zip is current as of today. Fabulous! Thank you very much, Tobias! frank > Best > -Tobias > > >>> >>> Levente >>> >>> On Tue, 3 Mar 2015, Frank Shearar wrote: >>> >>>> On 3 March 2015 at 14:43, Frank Shearar wrote: >>>>> On 3 March 2015 at 14:38, Levente Uzonyi wrote: >>>>>> On Tue, 3 Mar 2015, Frank Shearar wrote: >>>>>> >>>>>> >>>>>> >>>>>> Changes of the files in limits.d are only applied to new sessions. The >>>>>> squeak.conf file was created after jenkins was started. So restarting >>>>>> jenkins should fix the problem. >>>>> >>>>> Oh, because Jenkins spins up the VMs, so the Cog processes inherit the >>>>> permissions that Jenkins had? I'll reboot Jenkins then! >>>> >>>> Rebooted, and now I see failures like "bundle gem not installed". So I >>>> added a new build step to install that gem, but it seems that the gem >>>> package isn't installed on that box? I don't have my credentials with >>>> me so I can't look into the problem. I may only be able to dig into >>>> the problem a few days from now. >>>> >>>> frank >>>> >>>>> frank >>>>> >>>>>> Levente > > > From commits at source.squeak.org Tue Mar 31 09:39:15 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 09:39:16 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.794.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.794.mcz ==================== Summary ==================== Name: Morphic-mt.794 Author: mt Time: 31 March 2015, 11:38:42.253 am UUID: 765a2201-af4c-0948-b90d-72414d335160 Ancestors: Morphic-mt.793 New-style balloon morph added and used. Can be switched back to old-style balloon morphs via preferences. New-style balloon morphs support: - text (not only strings) - layouting via text paragraph (not hard-cutted via: #noLineLongerThan:) - positioning at current hand position (if not supplied with other reference point) In general, new-style balloon morphs have an improved readability. =============== Diff against Morphic-mt.793 =============== Item was changed: ----- Method: BalloonMorph class>>string:for:corner: (in category 'instance creation') ----- string: str for: morph corner: cornerName "Make up and return a balloon for morph. Find the quadrant that clips the text the least, using cornerName as a tie-breaker. tk 9/12/97" | tm vertices | + tm := self + getTextMorph: (str asString withNoLineLongerThan: Preferences maxBalloonHelpLineLength) + for: morph. - tm := self getTextMorph: str for: morph. vertices := self getVertices: tm bounds. vertices := self getBestLocation: vertices for: morph corner: cornerName. ^ self new color: morph balloonColor; setVertices: vertices; addMorph: tm; setTarget: morph! Item was changed: ----- Method: MenuMorph>>showKeyboardHelp (in category 'keystroke helpers') ----- showKeyboardHelp | help | + help := self balloonMorphClass + string: 'Enter text to narrow selection\down to matching items ' withCRs - help := BalloonMorph - string: 'Enter text to\narrow selection down\to matching items ' withCRs for: self corner: #topLeft. + help popUpAt: self topCenter forHand: self activeHand! - help popUpForHand: self activeHand! Item was added: + ----- Method: Morph>>balloonMorphClass (in category 'halos and balloon help') ----- + balloonMorphClass + + ^ NewBalloonMorph useNewBalloonMorph + ifTrue: [NewBalloonMorph] + ifFalse: [BalloonMorph]! Item was changed: ----- Method: Morph>>showBalloon:hand: (in category 'halos and balloon help') ----- showBalloon: msgString hand: aHand "Pop up a balloon containing the given string, first removing any existing BalloonMorphs in the world." | w balloon h | (w := self world) ifNil: [^ self]. h := aHand. h ifNil:[ h := w activeHand]. + balloon := self balloonMorphClass + string: msgString - balloon := BalloonMorph - string: (msgString asString withNoLineLongerThan: Preferences maxBalloonHelpLineLength) for: self balloonHelpAligner. balloon popUpFor: self hand: h.! Item was added: + Morph subclass: #NewBalloonMorph + instanceVariableNames: 'balloonOwner textMorph maximumWidth orientation hasTail' + classVariableNames: 'UseNewBalloonMorph' + poolDictionaries: '' + category: 'Morphic-Widgets'! + + !NewBalloonMorph commentStamp: 'mt 3/31/2015 10:15' prior: 0! + A balloon is a bubble with an optional tail. It contains rich text, which describes something about its balloon-owner.! Item was added: + ----- Method: NewBalloonMorph class>>string:for: (in category 'instance creation') ----- + string: str for: morph + + ^ self string: str for: morph corner: #bottomLeft! Item was added: + ----- Method: NewBalloonMorph class>>string:for:corner: (in category 'instance creation') ----- + string: message for: morph corner: symbol + + ^ self new + balloonOwner: morph; + setText: message; + orientation: symbol; + yourself! Item was added: + ----- Method: NewBalloonMorph class>>useNewBalloonMorph (in category 'preferences') ----- + useNewBalloonMorph + + + ^ UseNewBalloonMorph ifNil: [true]! Item was added: + ----- Method: NewBalloonMorph class>>useNewBalloonMorph: (in category 'preferences') ----- + useNewBalloonMorph: aBoolean + + UseNewBalloonMorph := aBoolean.! Item was added: + ----- Method: NewBalloonMorph>>balloonOwner (in category 'accessing') ----- + balloonOwner + + ^ balloonOwner! Item was added: + ----- Method: NewBalloonMorph>>balloonOwner: (in category 'accessing') ----- + balloonOwner: aMorph + + balloonOwner := aMorph.! Item was added: + ----- Method: NewBalloonMorph>>bubbleBounds (in category 'geometry') ----- + bubbleBounds + + ^ self bounds insetBy: (0 @ self tailHeight corner: 0 @ self tailHeight)! Item was added: + ----- Method: NewBalloonMorph>>bubbleInset (in category 'geometry') ----- + bubbleInset + + ^ 5@2! Item was added: + ----- Method: NewBalloonMorph>>defaultBorderColor (in category 'initialization') ----- + defaultBorderColor + + ^ self defaultColor muchDarker"Color black"! Item was added: + ----- Method: NewBalloonMorph>>defaultBorderWidth (in category 'initialization') ----- + defaultBorderWidth + + ^ 1! Item was added: + ----- Method: NewBalloonMorph>>defaultColor (in category 'initialization') ----- + defaultColor + + ^ BalloonMorph balloonColor! Item was added: + ----- Method: NewBalloonMorph>>drawDropShadowOn: (in category 'drawing') ----- + drawDropShadowOn: aCanvas + + aCanvas + translateBy: self shadowOffset + during: [ :shadowCanvas | + (shadowCanvas isVisible: self bubbleBounds) ifTrue: [ + self wantsRoundedCorners + ifTrue: [shadowCanvas fillRoundRect: self bubbleBounds radius: self class preferredCornerRadius fillStyle: self shadowColor] + ifFalse: [shadowCanvas fillRectangle: self bubbleBounds fillStyle: self shadowColor]]. + + self hasTail ifTrue: [ + shadowCanvas + drawPolygon: self verticesForTail + fillStyle: self shadowColor]]. + + ! Item was added: + ----- Method: NewBalloonMorph>>drawOn: (in category 'drawing') ----- + drawOn: aCanvas + + "Bubble." + self wantsRoundedCorners + ifTrue: [aCanvas + frameAndFillRoundRect: self bubbleBounds + radius: self class preferredCornerRadius fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: self borderStyle color] + ifFalse: [aCanvas + fillRectangle: self bubbleBounds + fillStyle: self fillStyle borderStyle: self borderStyle]. + + "Tail." + self hasTail ifTrue: [ + self verticesForTail in: [:points | + | pixelOffset | + pixelOffset := points first y < points second y + ifFalse: [points first x < points second x + ifTrue: [self borderStyle width negated @ self borderStyle width] "bottomLeft" + ifFalse: [self borderStyle width @ self borderStyle width]] "bottomRight" + ifTrue: [points first x < points second x + ifTrue: [self borderStyle width negated @ self borderStyle width negated] "topLeft" + ifFalse: [self borderStyle width @ self borderStyle width negated]]. "topRight" + + aCanvas + drawPolygon: points + fillStyle: self fillStyle. + aCanvas + line: points first + to: points second + pixelOffset + width: self borderStyle width + color: self borderStyle color. + aCanvas + line: points first + to: points third + pixelOffset + width: self borderStyle width + color: self borderStyle color]]! Item was added: + ----- Method: NewBalloonMorph>>hasTail (in category 'accessing') ----- + hasTail + + ^ hasTail ifNil: [true]! Item was added: + ----- Method: NewBalloonMorph>>hasTail: (in category 'accessing') ----- + hasTail: aBoolean + + hasTail := aBoolean.! Item was added: + ----- Method: NewBalloonMorph>>initialize (in category 'initialization') ----- + initialize + + super initialize. + + self + borderWidth: self defaultBorderWidth; + borderColor: self defaultBorderColor; + color: (self defaultColor alpha: 1.0); "no alpha due to drop shadow" + hasDropShadow: true; + shadowOffset: 1@1; + shadowColor: (self color muchDarker muchDarker alpha: 0.333); + orientation: #bottomLeft. + + MenuMorph roundedMenuCorners + ifTrue: [self cornerStyle: #rounded]. + + textMorph := TextMorph new + wrapFlag: false; + lock; + yourself. + + self addMorph: textMorph.! Item was added: + ----- Method: NewBalloonMorph>>maximumWidth (in category 'accessing') ----- + maximumWidth + + ^ maximumWidth ifNil: [ + maximumWidth := (self balloonOwner balloonFont widthOf: $m) * Preferences maxBalloonHelpLineLength]! Item was added: + ----- Method: NewBalloonMorph>>maximumWidth: (in category 'accessing') ----- + maximumWidth: anInteger + + maximumWidth := anInteger.! Item was added: + ----- Method: NewBalloonMorph>>morphicLayerNumber (in category 'WiW support') ----- + morphicLayerNumber + + "helpful for insuring some morphs always appear in front of or behind others. + smaller numbers are in front" + + ^5 "Balloons are very front-like things"! Item was added: + ----- Method: NewBalloonMorph>>move: (in category 'geometry') ----- + move: targetPoint + + self perform: (self orientation, #:) asSymbol with: targetPoint.! Item was added: + ----- Method: NewBalloonMorph>>orientation (in category 'accessing') ----- + orientation + "Encodes the position of the tail. #topLeft, #topRight, #bottomLeft, #bottomRight" + + ^ orientation! Item was added: + ----- Method: NewBalloonMorph>>orientation: (in category 'accessing') ----- + orientation: aSymbol + + orientation := aSymbol. + self changed.! Item was added: + ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') ----- + popUpAt: point forHand: aHand + "Pop up the receiver as balloon help for the given hand" + + #(bottomLeft bottomRight topLeft topRight) detect: [:nextOrientation | + self orientation: nextOrientation. + self move: point. + self bounds: (self bounds translatedToBeWithin: aHand world bounds). + (self bounds perform: self orientation) = point] ifNone: ["Keep last try."]. + + aHand world addMorphFront: self. + aHand balloonHelp: self.! Item was added: + ----- Method: NewBalloonMorph>>popUpFor:hand: (in category 'initialization') ----- + popUpFor: aMorph hand: aHand + "Pop up the receiver as balloon help for the given hand" + + self balloonOwner: aMorph. + self popUpForHand: aHand.! Item was added: + ----- Method: NewBalloonMorph>>popUpForHand: (in category 'initialization') ----- + popUpForHand: aHand + + self popUpAt: aHand position forHand: aHand.! Item was added: + ----- Method: NewBalloonMorph>>setText: (in category 'initialization') ----- + setText: stringOrText + + | text | + text := stringOrText asText. + text addAttribute: (TextFontReference toFont: (self balloonOwner ifNil: [BalloonMorph]) balloonFont). + + self textMorph wrapFlag: false. + self textMorph newContents: text. + self textMorph fullBounds. + + (self maximumWidth > 0 and: [self textMorph width > self maximumWidth]) + ifTrue: [ + self textMorph + wrapFlag: true; + width: self maximumWidth]. + + self updateLayout.! Item was added: + ----- Method: NewBalloonMorph>>tailHeight (in category 'geometry') ----- + tailHeight + + ^ 8! Item was added: + ----- Method: NewBalloonMorph>>tailPosition (in category 'geometry') ----- + tailPosition + + ^ self innerBounds perform: self orientation! Item was added: + ----- Method: NewBalloonMorph>>tailWidth (in category 'geometry') ----- + tailWidth + + ^ 15! Item was added: + ----- Method: NewBalloonMorph>>textMorph (in category 'accessing - ui') ----- + textMorph + + ^ textMorph! Item was added: + ----- Method: NewBalloonMorph>>updateLayout (in category 'layout') ----- + updateLayout + + self textMorph fullBounds. + self extent: self textMorph extent + (2* self bubbleInset) + (0 @ (2*self tailHeight)). + self textMorph center: self center.! Item was added: + ----- Method: NewBalloonMorph>>verticesForTail (in category 'drawing') ----- + verticesForTail + + | offset factorX factorY tpos bpos | + offset := 5 + (self wantsRoundedCorners + ifTrue: [self class preferredCornerRadius] + ifFalse: [0]). + tpos := self tailPosition. + factorX := tpos x < self center x ifTrue: [1] ifFalse: [-1]. + factorY := tpos y > self center y ifTrue: [1] ifFalse: [-1]. + bpos := self bubbleBounds perform: self orientation. + + ^ { + tpos. + bpos + (((offset + self tailWidth) * factorX) @ (self borderStyle width negated * factorY)). + bpos + ((offset * factorX) @ (self borderStyle width negated * factorY)).}! From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 31 09:30:39 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 31 09:42:13 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.794.mcz In-Reply-To: References: Message-ID: <1427794239923-4816305.post@n4.nabble.com> -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-794-mcz-tp4816304p4816305.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 31 09:33:07 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 31 09:44:43 2015 Subject: [squeak-dev] Re: The Trunk: Morphic-mt.794.mcz In-Reply-To: <1427794239923-4816305.post@n4.nabble.com> References: <1427794239923-4816305.post@n4.nabble.com> Message-ID: <1427794387787-4816306.post@n4.nabble.com> Having (rich) text support, we could display a method's source code in a balloon help (e.g. in a system browser). Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-Morphic-mt-794-mcz-tp4816304p4816306.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Mar 31 09:48:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 09:48:25 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.795.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.795.mcz ==================== Summary ==================== Name: Morphic-mt.795 Author: mt Time: 31 March 2015, 11:47:43.755 am UUID: 63a8f18d-ec06-d646-8a81-0fd3a455cc47 Ancestors: Morphic-mt.794 Backwards-compatibility in old-style balloon morphs for being opened at a specific position. =============== Diff against Morphic-mt.794 =============== Item was added: + ----- Method: BalloonMorph>>popUpAt:forHand: (in category 'initialization') ----- + popUpAt: aPoint forHand: aHand + + self popUpForHand: aHand.! From commits at source.squeak.org Tue Mar 31 09:51:17 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 09:51:19 2015 Subject: [squeak-dev] The Trunk: MorphicExtras-mt.158.mcz Message-ID: Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk: http://source.squeak.org/trunk/MorphicExtras-mt.158.mcz ==================== Summary ==================== Name: MorphicExtras-mt.158 Author: mt Time: 31 March 2015, 11:50:53.299 am UUID: fc9c79dc-8f8a-f247-8cff-60a50ca2d16f Ancestors: MorphicExtras-mt.157 Classify new-style balloon morphs as valid balloon help. =============== Diff against MorphicExtras-mt.157 =============== Item was added: + ----- Method: NewBalloonMorph>>isBalloonHelp (in category '*MorphicExtras-classification') ----- + isBalloonHelp + ^ true! From commits at source.squeak.org Tue Mar 31 09:58:13 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 09:58:15 2015 Subject: [squeak-dev] The Trunk: Tools-mt.568.mcz Message-ID: Marcel Taeumel uploaded a new version of Tools to project The Trunk: http://source.squeak.org/trunk/Tools-mt.568.mcz ==================== Summary ==================== Name: Tools-mt.568 Author: mt Time: 31 March 2015, 11:57:54.177 am UUID: 852a3dac-ba3b-9e42-9bf1-937c81eea6e0 Ancestors: Tools-mt.567 Help message added to object explorer code pane. =============== Diff against Tools-mt.567 =============== Item was changed: ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') ----- buildWith: builder | windowSpec treeSpec textSpec | windowSpec := builder pluggableWindowSpec new. windowSpec model: self; children: OrderedCollection new; label: #label. treeSpec := builder pluggableTreeSpec new. treeSpec model: self; nodeClass: self class nodeClass; roots: #getList; keyPress: #explorerKey:from:event:; getSelected: #currentSelection; setSelected: #currentSelection:; setSelectedParent: #currentParent:; menu: #genericMenu:; autoDeselect: false; columns: (ObjectExplorerWrapper showContentsInColumns ifTrue: [{ [:listMorph | (listMorph scroller submorphs collect: [:item | item preferredWidthOfColumn: 1]) max]. nil "take all the space"}] ifFalse: []); frame: (0@0 corner: 1@0.85). windowSpec children add: treeSpec. textSpec := builder pluggableTextSpec new. textSpec model: self; menu: #codePaneMenu:shifted:; + help: 'Evaluate expressions for the current tree selection...' translated; frame: (0@0.85 corner: 1@1). windowSpec children add: textSpec. ^ builder build: windowSpec! From bert at freudenbergs.de Tue Mar 31 14:00:28 2015 From: bert at freudenbergs.de (Bert Freudenberg) Date: Tue Mar 31 14:00:30 2015 Subject: [squeak-dev] New trunk image available (was: New Cog VMs available) In-Reply-To: References: <5BE22D85-14E6-472B-9A5A-7B386C10043C@gmx.de> Message-ID: <812FDD32-42E6-4BD6-BBAC-B54F197AC545@freudenbergs.de> On 30.03.2015, at 15:16, Tobias Pape wrote: > > After poking around for an hour, (and in the process installing and deinstalling > ruby1.8 on box3) I found that I just had to check > 'Run the build in a RVM-managed environment' > in the Jenkins Job configuration. > > Then i had the infamous 'Bit size mismatch' error, which a few builds later > disappeared (and I don't know why?) > > TL;DR: http://build.squeak.org/job/SqueakTrunk/lastSuccessfulBuild/artifact/target/TrunkImage.zip is current as of today. > > Best > -Tobias Awesome! - Bert - -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 4115 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/4144b402/smime.bin From commits at source.squeak.org Tue Mar 31 15:30:52 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 15:30:54 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.796.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.796.mcz ==================== Summary ==================== Name: Morphic-mt.796 Author: mt Time: 31 March 2015, 5:30:16.582 pm UUID: 4b95c232-4447-6f41-a251-e2a3f4196f23 Ancestors: Morphic-mt.795 Indicate hovered item in lists. Can be turned off via preference. Redraw of the highlight is fast because we only invalidate the rectangles from the affected rows. Extended #handleMouseMove: and not #mouseMove: because there is a mouse-button guard in #handleMouseMove:, which is exploited in the multi-selection list morphs. =============== Diff against Morphic-mt.795 =============== Item was changed: ----- Method: LazyListMorph>>drawOn: (in category 'drawing') ----- drawOn: aCanvas | | listItems size = 0 ifTrue: [ ^self ]. + - self drawPreSelectionOn: aCanvas; drawSelectionOn: aCanvas. (self topVisibleRowForCanvas: aCanvas) to: (self bottomVisibleRowForCanvas: aCanvas) do: [ :row | (listSource itemSelectedAmongMultiple: row) ifTrue: [ + self drawBackgroundForMulti: row on: aCanvas. ]]. + + PluggableListMorph highlightHoveredRow ifTrue: [ + listSource hoverRow > 0 ifTrue: [ + self highlightHoverRow: listSource hoverRow on: aCanvas ] ]. + + (self topVisibleRowForCanvas: aCanvas) to: (self bottomVisibleRowForCanvas: aCanvas) do: [ :row | - self drawBackgroundForMulti: row on: aCanvas. ]. self display: (self item: row) atRow: row on: aCanvas. ]. listSource potentialDropRow > 0 ifTrue: [ self highlightPotentialDropRow: listSource potentialDropRow on: aCanvas ].! Item was added: + ----- Method: LazyListMorph>>highlightHoverRow:on: (in category 'drawing') ----- + highlightHoverRow: row on: aCanvas + | drawBounds | + drawBounds := self drawBoundsForRow: row. + drawBounds := drawBounds intersect: self bounds. + aCanvas fillRectangle: drawBounds color: (self class listSelectionColor darker alpha: 0.3).! Item was added: + ----- Method: LazyListMorph>>rowChanged: (in category 'updating') ----- + rowChanged: anInteger + + self invalidRect: (self drawBoundsForRow: anInteger).! Item was changed: ScrollPane subclass: #PluggableListMorph + instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow hoverRow listMorph hScrollRangeCache keystrokePreviewSelector priorSelection getIconSelector' + classVariableNames: 'ClearFilterAutomatically FilterableLists HighlightHoveredRow' - instanceVariableNames: 'list getListSelector getListSizeSelector getListElementSelector getIndexSelector setIndexSelector keystrokeActionSelector autoDeselect lastKeystrokeTime lastKeystrokes lastClickTime doubleClickSelector handlesBasicKeys potentialDropRow listMorph hScrollRangeCache keystrokePreviewSelector priorSelection getIconSelector' - classVariableNames: 'ClearFilterAutomatically FilterableLists' poolDictionaries: '' category: 'Morphic-Pluggable Widgets'! !PluggableListMorph commentStamp: 'cmm 8/21/2011 23:37' prior: 0! When a PluggableListMorph is in focus, type in a letter (or several letters quickly) to go to the next item that begins with that letter (if FilterableLists is false). Special keys (up, down, home, etc.) are also supported.! Item was added: + ----- Method: PluggableListMorph class>>highlightHoveredRow (in category 'preferences') ----- + highlightHoveredRow + + + ^ HighlightHoveredRow ifNil: [true]! Item was added: + ----- Method: PluggableListMorph class>>highlightHoveredRow: (in category 'preferences') ----- + highlightHoveredRow: aBoolean + + HighlightHoveredRow := aBoolean.! Item was changed: ----- Method: PluggableListMorph>>handleMouseMove: (in category 'events-processing') ----- handleMouseMove: anEvent "Reimplemented because we really want #mouseMove when a morph is dragged around" anEvent wasHandled ifTrue:[^self]. "not interested" + self hoverRow: (self rowAtLocation: anEvent position). (anEvent anyButtonPressed and:[anEvent hand mouseFocus == self]) ifFalse:[^self]. anEvent wasHandled: true. self mouseMove: anEvent. (self handlesMouseStillDown: anEvent) ifTrue:[ "Step at the new location" self startStepping: #handleMouseStillDown: at: Time millisecondClockValue arguments: {anEvent copy resetHandlerFields} stepTime: 1]. ! Item was added: + ----- Method: PluggableListMorph>>hoverItem (in category 'accessing') ----- + hoverItem + + ^ self hoverRow = 0 + ifTrue: [nil] + ifFalse: [self getListItem: self hoverRow]! Item was added: + ----- Method: PluggableListMorph>>hoverRow (in category 'accessing') ----- + hoverRow + + ^ hoverRow ifNil: [0]! Item was added: + ----- Method: PluggableListMorph>>hoverRow: (in category 'accessing') ----- + hoverRow: anInteger + + hoverRow = anInteger ifTrue: [^ self]. + + hoverRow ifNotNil: [self listMorph rowChanged: hoverRow]. + hoverRow := anInteger. + hoverRow ifNotNil: [self listMorph rowChanged: hoverRow].! Item was changed: ----- Method: PluggableListMorph>>mouseLeave: (in category 'events') ----- mouseLeave: event "The mouse has left the area of the receiver" super mouseLeave: event. + + self hoverRow: nil. + Preferences mouseOverForKeyboardFocus ifTrue:[ + event hand releaseKeyboardFocus: self].! - event hand releaseKeyboardFocus: self]! Item was changed: ----- Method: PluggableListMorph>>mouseLeaveDragging: (in category 'events') ----- mouseLeaveDragging: anEvent + + self hoverRow: nil. (self dropEnabled and:[anEvent hand hasSubmorphs]) ifFalse: ["no d&d" ^ super mouseLeaveDragging: anEvent]. self resetPotentialDropRow. anEvent hand releaseMouseFocus: self. "above is ugly but necessary for now" ! From Das.Linux at gmx.de Tue Mar 31 16:01:05 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 31 16:01:13 2015 Subject: [squeak-dev] Bug whith contextOn:do: Message-ID: <85F38DF9-1002-49A4-B11B-0DF96E0A7E76@gmx.de> Hey fellow Squeakers [Attention: low level lengthy stuff] I today encountered a strange behavior. When running the Startup code, somewhen ContextPart>>#complete is called, which, in the process issues #contextOn:do:, which subsequently somewhere interanlly does a jump: contextOn: exceptionClass do: block "Create an #on:do: context that is ready to return from executing its receiver" | ctxt chain | ctxt := thisContext. [chain := thisContext sender cut: ctxt. ctxt jump] on: exceptionClass do: block. "jump above will resume here without unwinding chain" ^ chain The idea is that we end up right before '^ chain' as the comment indicates. so what happens is that ctxt is the context of #contextOn:do: itself and it gets send #jump in the closure. Jump now does the following: jump "Abandon thisContext and resume self instead (using the same current process). You may want to save thisContext's sender before calling this so you can jump back to it. Self MUST BE a top context (ie. a suspended context or a abandoned context that was jumped out of). A top context already has its return value on its stack (see Interpreter>>primitiveSuspend and other suspending primitives). thisContext's sender is converted to a top context (by pushing a nil return value on its stack) so it can be jump back to." | top | "Make abandoned context a top context (has return value (nil)) so it can be jumped back to" thisContext sender push: nil. "Pop self return value then return it to self (since we jump to self by returning to it)" stackp = 0 ifTrue: [self stepToSendOrReturn]. stackp = 0 ifTrue: [self push: nil]. "must be quick return self/constant" top := self pop. thisContext privSender: self. ^ top So. bytecode for #contextOn:do: is: 29 <8A 01> push: (Array new: 1) 31 <6B> popIntoTemp: 3 32 <89> pushThisContext: 33 <6A> popIntoTemp: 2 34 <12> pushTemp: 2 35 <13> pushTemp: 3 36 <8F 20 00 0A> closureNumCopied: 2 numArgs: 0 bytes 40 to 49 40 <89> pushThisContext: 41 send: sender 42 <10> pushTemp: 0 43 send: cut: 44 <8E 00 01> popIntoTemp: 0 inVectorAt: 1 47 <10> pushTemp: 0 48 send: jump 49 <7D> blockReturn 50 <10> pushTemp: 0 51 <11> pushTemp: 1 52 send: on:do: 53 <87> pop 54 <8C 00 03> pushTemp: 0 inVectorAt: 3 57 <7C> returnTop The jump lands right at 53 and does a pop. HOWEVER, at this point the stack of this context is empty and the pop actually pops the 3rd temp from the temps that 'just happens' to be right under the stack. This should be fatal. HOWEVER again, Squeak actually does not pop but only decrement the SP so the temp access still works(this _could_ be fine but some implementations (Eg, RSqueak) tried to separate temps and stack; which is not possible currently). What could be the problem here? - are the 'stackp = 0'-checks in #jump wrong and they actually should check for the actual stack depth _after_ temps? - should we put in a "sacrificial anode" in #contextOn:do: so that the pop does not pop the empty stack? (like this: contextOn: exceptionClass do: block "Create an #on:do: context that is ready to return from executing its receiver" | ctxt chain | ctxt := thisContext. [chain := thisContext sender cut: ctxt. ctxt push: nil. "sacrifical anode" ctxt jump ] on: exceptionClass do: block. "jump above will resume here without unwinding chain" ^ chain - Or is there an even better way? Best -Tobias From commits at source.squeak.org Tue Mar 31 16:01:54 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 16:01:56 2015 Subject: [squeak-dev] The Trunk: ToolBuilder-Morphic-mt.108.mcz Message-ID: Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk: http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.108.mcz ==================== Summary ==================== Name: ToolBuilder-Morphic-mt.108 Author: mt Time: 31 March 2015, 6:01:50.569 pm UUID: 790df11a-d082-fa48-a59d-43eeffc5c092 Ancestors: ToolBuilder-Morphic-mt.107 Support added for list item-specific balloon help. (Similar to the one in tree morphs.) =============== Diff against ToolBuilder-Morphic-mt.107 =============== Item was changed: ----- Method: MorphicToolBuilder>>buildPluggableList: (in category 'pluggable widgets') ----- buildPluggableList: aSpec | widget listClass getIndex setIndex | aSpec getSelected ifNil:[ listClass := self listClass. getIndex := aSpec getIndex. setIndex := aSpec setIndex. ] ifNotNil:[ listClass := self listByItemClass. getIndex := aSpec getSelected. setIndex := aSpec setSelected. ]. widget := listClass on: aSpec model list: aSpec list selected: getIndex changeSelected: setIndex menu: aSpec menu keystroke: aSpec keyPress. self register: widget id: aSpec name. widget getListElementSelector: aSpec listItem. widget getListSizeSelector: aSpec listSize. widget getIconSelector: aSpec icon. + widget getHelpSelector: aSpec help. widget doubleClickSelector: aSpec doubleClick. widget dragItemSelector: aSpec dragItem. widget dropItemSelector: aSpec dropItem. widget wantsDropSelector: aSpec dropAccept. widget autoDeselect: aSpec autoDeselect. widget keystrokePreviewSelector: aSpec keystrokePreview. aSpec color isNil ifTrue: [widget borderWidth: 1; borderColor: Color lightGray; color: Color white] ifFalse: [widget color: aSpec color]. - self buildHelpFor: widget spec: aSpec. self setFrame: aSpec frame in: widget. parent ifNotNil:[self add: widget to: parent]. panes ifNotNil:[ aSpec list ifNotNil:[panes add: aSpec list]. ]. ^widget! Item was changed: PluggableListMorph subclass: #PluggableListMorphPlus + instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector getHelpSelector' - instanceVariableNames: 'dragItemSelector dropItemSelector wantsDropSelector' classVariableNames: '' poolDictionaries: '' category: 'ToolBuilder-Morphic'! !PluggableListMorphPlus commentStamp: 'ar 7/15/2005 11:10' prior: 0! Extensions for PluggableListMorph needed by ToolBuilder! Item was added: + ----- Method: PluggableListMorphPlus>>balloonText (in category 'accessing') ----- + balloonText + "Overridden to send selector to model and not self. Do not use #perform:orSendTo: because super does more than just the send.." + + self getHelpSelector ifNotNil: [:selector | + ((self model respondsTo: selector) and: [self hoverRow > 0]) ifTrue: [ + ^ self model perform: selector with: self hoverRow]]. + + ^ super balloonText! Item was added: + ----- Method: PluggableListMorphPlus>>getHelpSelector (in category 'accessing') ----- + getHelpSelector + + ^ getHelpSelector! Item was added: + ----- Method: PluggableListMorphPlus>>getHelpSelector: (in category 'accessing') ----- + getHelpSelector: aSelector + "Get help for list entries." + + getHelpSelector := aSelector.! Item was added: + ----- Method: PluggableListMorphPlus>>hoverRow: (in category 'accessing') ----- + hoverRow: anInteger + + self hoverRow ~= anInteger ifTrue: [ + super hoverRow: anInteger. + self wantsBalloon ifTrue: [ + self activeHand + removePendingBalloonFor: self; + triggerBalloonFor: self after: self balloonHelpDelayTime]]. + + ! From marcel.taeumel at student.hpi.uni-potsdam.de Tue Mar 31 15:54:33 2015 From: marcel.taeumel at student.hpi.uni-potsdam.de (Marcel Taeumel) Date: Tue Mar 31 16:06:10 2015 Subject: [squeak-dev] Re: The Trunk: ToolBuilder-Morphic-mt.108.mcz In-Reply-To: References: Message-ID: <1427817273288-4816406.post@n4.nabble.com> You can try it out by loading the attached change set. This will add source code previews to the message list in the system browser: Here is the changeset: browser-help.cs Best, Marcel -- View this message in context: http://forum.world.st/The-Trunk-ToolBuilder-Morphic-mt-108-mcz-tp4816403p4816406.html Sent from the Squeak - Dev mailing list archive at Nabble.com. From commits at source.squeak.org Tue Mar 31 16:19:39 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 16:19:41 2015 Subject: [squeak-dev] The Inbox: Monticello-tfel.608.mcz Message-ID: A new version of Monticello was added to project The Inbox: http://source.squeak.org/inbox/Monticello-tfel.608.mcz ==================== Summary ==================== Name: Monticello-tfel.608 Author: tfel Time: 31 March 2015, 6:19:34.129 pm UUID: 62e1b3e7-bfeb-ca4d-97e6-118c603be2d8 Ancestors: Monticello-bf.607 add a menu item to browse patch against another version in the repository =============== Diff against Monticello-bf.607 =============== Item was changed: ----- Method: ChangeList>>changeTo: (in category '*monticello') ----- changeTo: changeSubset | newList newChangeList | newChangeList := OrderedCollection new. newList := OrderedCollection new. 1 to: changeList size do: [:i | (changeSubset includes: (changeList at: i)) ifTrue: [newChangeList add: (changeList at: i). newList add: (list at: i)]]. newChangeList size < changeList size ifTrue: [changeList := newChangeList. list := newList. listIndex := 0. listSelections := Array new: list size withAll: false]. self changed: #list ! Item was changed: ----- Method: CrLfFileStream>>lineEndingConvention: (in category '*monticello') ----- lineEndingConvention: aSymbol lineEndConvention := aSymbol! Item was changed: ----- Method: MCAddition>>intializeWithDefinition: (in category 'initializing') ----- intializeWithDefinition: aDefinition definition := aDefinition! Item was changed: ----- Method: MCAncestry>>commonAncestorWith: (in category 'ancestry') ----- commonAncestorWith: aNode | commonAncestors | commonAncestors := self commonAncestorsWith: aNode. ^ commonAncestors at: 1 ifAbsent: [nil]! Item was changed: ----- Method: MCAncestry>>commonAncestorsWith: (in category 'ancestry') ----- commonAncestorsWith: aVersionInfo | sharedAncestors mergedOrder sorter | sorter := MCVersionSorter new addVersionInfo: self; addVersionInfo: aVersionInfo. mergedOrder := sorter sortedVersionInfos. sharedAncestors := (sorter allAncestorsOf: self) intersection: (sorter allAncestorsOf: aVersionInfo). ^ mergedOrder select: [:ea | sharedAncestors includes: ea]! Item was changed: ----- Method: MCAncestry>>initialize (in category 'initialize-release') ----- initialize ancestors := #(). stepChildren := #()! Item was changed: ----- Method: MCCacheRepository>>cacheForPackage: (in category 'as yet unclassified') ----- cacheForPackage: aPackage packageCaches ifNil: [packageCaches := Dictionary new]. ^ packageCaches at: aPackage ifAbsentPut: [MCPackageCache new]! Item was changed: ----- Method: MCCacheRepository>>seenFileNames (in category 'as yet unclassified') ----- seenFileNames ^ seenFiles ifNil: [seenFiles := OrderedCollection new]! Item was changed: ----- Method: MCChangeSelectionRequest>>label: (in category 'accessing') ----- label: aString label := aString! Item was changed: ----- Method: MCChangeSelectionRequest>>patch: (in category 'accessing') ----- patch: aPatch patch := aPatch! Item was changed: ----- Method: MCChangeSelector>>kept (in category 'as yet unclassified') ----- kept ^ kept ifNil: [kept := Set new]! Item was changed: ----- Method: MCChangeSelector>>listSelectionAt:put: (in category 'as yet unclassified') ----- listSelectionAt: aNumber put: aBoolean | item | item := self items at: aNumber. aBoolean ifTrue: [self kept add: item ] ifFalse: [self kept remove: item ifAbsent: []]! Item was changed: ----- Method: MCChangeSelector>>selectNone (in category 'as yet unclassified') ----- selectNone kept := Set new. self changed: #list! Item was changed: ----- Method: MCCodeTool>>browseVersions (in category 'menus') ----- browseVersions "Create and schedule a message set browser on all versions of the currently selected message selector." | class selector compiledMethod | class := self selectedClassOrMetaClass. selector := self selectedMessageName. compiledMethod := class compiledMethodAt: selector ifAbsent: [ ^self ]. VersionsBrowser browseVersionsOf: compiledMethod class: class theNonMetaClass meta: class isMeta category: self selectedMessageCategoryName selector: selector! Item was changed: ----- Method: MCCodeTool>>copySelector (in category 'menus') ----- copySelector "Copy the selected selector to the clipboard" | selector | (selector := self selectedMessageName) ifNotNil: [Clipboard clipboardText: selector asString]! Item was changed: ----- Method: MCCodeTool>>findMethodInChangeSets (in category 'menus') ----- findMethodInChangeSets "Find and open a changeSet containing the current method." | aName | (aName := self selectedMessageName) ifNotNil: [ ChangeSorter browseChangeSetsWithClass: self selectedClassOrMetaClass selector: aName]! Item was changed: ----- Method: MCConflict>>chooseLocal (in category 'as yet unclassified') ----- chooseLocal chooseRemote := false! Item was changed: ----- Method: MCConflict>>chooseRemote (in category 'as yet unclassified') ----- chooseRemote chooseRemote := true! Item was changed: ----- Method: MCConflict>>clearChoice (in category 'as yet unclassified') ----- clearChoice chooseRemote := nil! Item was changed: ----- Method: MCConflict>>operation: (in category 'as yet unclassified') ----- operation: anOperation operation := anOperation! Item was changed: ----- Method: MCConflict>>summary (in category 'as yet unclassified') ----- summary | attribute | attribute := self isResolved ifTrue: [self remoteChosen ifTrue: [#underlined] ifFalse: [#struckOut]] ifFalse: [#bold]. ^ Text string: operation summary attribute: (TextEmphasis perform: attribute)! Item was changed: ----- Method: MCDefinitionIndex>>definitionLike:ifPresent:ifAbsent: (in category 'as yet unclassified') ----- definitionLike: aDefinition ifPresent: foundBlock ifAbsent: errorBlock | definition | definition := definitions at: aDefinition description ifAbsent: []. ^ definition ifNil: errorBlock ifNotNil: [foundBlock value: definition]! Item was changed: ----- Method: MCDefinitionIndex>>initialize (in category 'as yet unclassified') ----- initialize definitions := Dictionary new! Item was changed: ----- Method: MCDependencySorter class>>sortItems: (in category 'as yet unclassified') ----- sortItems: aCollection | sorter | sorter := self items: aCollection. sorter externalRequirements do: [:req | sorter addProvision: req]. ^ sorter orderedItems.! Item was changed: ----- Method: MCDependencySorter>>addProvision: (in category 'private') ----- addProvision: anObject | newlySatisfied | provided add: anObject. newlySatisfied := required removeKey: anObject ifAbsent: [#()]. self addAll: newlySatisfied.! Item was changed: ----- Method: MCDependencySorter>>initialize (in category 'initialize-release') ----- initialize provided := Set new. required := Dictionary new. orderedItems := OrderedCollection new.! Item was changed: ----- Method: MCDependencySorter>>itemsWithMissingRequirements (in category 'accessing') ----- itemsWithMissingRequirements | items | items := Set new. required do: [:ea | items addAll: ea]. ^ items ! Item was changed: ----- Method: MCDictionaryRepository>>description: (in category 'as yet unclassified') ----- description: aString description := aString ! Item was changed: ----- Method: MCDictionaryRepository>>dictionary: (in category 'as yet unclassified') ----- dictionary: aDictionary dict := aDictionary! Item was changed: ----- Method: MCDictionaryRepository>>initialize (in category 'as yet unclassified') ----- initialize dict := Dictionary new. ! Item was changed: ----- Method: MCDictionaryRepository>>sortedVersionInfos (in category 'as yet unclassified') ----- sortedVersionInfos | sorter | sorter := MCVersionSorter new. self allVersionInfos do: [:ea | sorter addVersionInfo: ea]. ^ sorter sortedVersionInfos ! Item was changed: ----- Method: MCDiffyVersion>>initializeWithPackage:info:dependencies:baseInfo:patch: (in category 'as yet unclassified') ----- initializeWithPackage: aPackage info: aVersionInfo dependencies: aCollection baseInfo: baseVersionInfo patch: aPatch patch := aPatch. base := baseVersionInfo. super initializeWithPackage: aPackage info: aVersionInfo snapshot: nil dependencies: aCollection. ! Item was changed: ----- Method: MCDiffyVersion>>snapshot (in category 'as yet unclassified') ----- snapshot ^ snapshot ifNil: [snapshot := MCPatcher apply: patch to: self baseSnapshot]! Item was changed: ----- Method: MCDirectoryRepository>>directory: (in category 'accessing') ----- directory: aDirectory directory := aDirectory! Item was changed: ----- Method: MCDirectoryRepository>>initialize (in category 'accessing') ----- initialize directory := FileDirectory default! Item was changed: ----- Method: MCDirectoryRepository>>readStreamForFileNamed:do: (in category 'accessing') ----- readStreamForFileNamed: aString do: aBlock | file val | 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: (directory fullNameFor: aString). aBlock value: file. file close.! Item was changed: ----- Method: MCDoItParser>>source: (in category 'as yet unclassified') ----- source: aString source := aString! Item was changed: ----- Method: MCFileBasedRepository>>canReadFileNamed: (in category 'private-files') ----- canReadFileNamed: aString | reader | reader := MCVersionReader readerClassForFileNamed: aString. ^ reader notNil! Item was changed: ----- Method: MCFilteredVersionSorter>>target: (in category 'as yet unclassified') ----- target: aVersionInfo target := aVersionInfo! Item was changed: ----- Method: MCFtpRepository>>clientDo: (in category 'as yet unclassified') ----- clientDo: aBlock | client | client := FTPClient openOnHostNamed: host. client loginUser: user password: password. directory isEmpty ifFalse: [client changeDirectoryTo: directory]. ^ [aBlock value: client] ensure: [client close]! Item was changed: ----- Method: MCFtpRepository>>directory: (in category 'as yet unclassified') ----- directory: dirPath directory := dirPath! Item was changed: ----- Method: MCFtpRepository>>host: (in category 'as yet unclassified') ----- host: hostname host := hostname! Item was changed: ----- Method: MCFtpRepository>>password: (in category 'as yet unclassified') ----- password: passwordString password := passwordString! Item was changed: ----- Method: MCFtpRepository>>user: (in category 'as yet unclassified') ----- user: userString user := userString! Item was changed: ----- Method: MCFtpRepository>>writeStreamForFileNamed:replace:do: (in category 'required') ----- writeStreamForFileNamed: aString replace: ignoreBoolean do: aBlock | stream | stream := RWBinaryOrTextStream on: String new. aBlock value: stream. self clientDo: [:client | client binary. client putFileStreamContents: stream reset as: aString]! Item was changed: ----- Method: MCGOODSRepository>>host: (in category 'as yet unclassified') ----- host: aString hostname := aString! Item was changed: ----- Method: MCGOODSRepository>>port: (in category 'as yet unclassified') ----- port: aNumber port := aNumber! Item was changed: ----- Method: MCHttpRepository>>location: (in category 'accessing') ----- location: aUrlString location := aUrlString! Item was changed: ----- Method: MCHttpRepository>>password: (in category 'accessing') ----- password: passwordString password := passwordString! Item was changed: ----- Method: MCHttpRepository>>user: (in category 'accessing') ----- user: userString user := userString! Item was changed: ----- Method: MCMcdReader>>loadBaseInfo (in category 'as yet unclassified') ----- loadBaseInfo ^ baseInfo := self extractInfoFrom: (self parseMember: 'base')! Item was changed: ----- Method: MCMczReader>>infoCache (in category 'as yet unclassified') ----- infoCache ^ infoCache ifNil: [infoCache := Dictionary new]! Item was changed: ----- Method: MCMczReader>>loadDependencies (in category 'loading') ----- loadDependencies dependencies := (self zip membersMatching: 'dependencies/*') collect: [:m | self extractDependencyFrom: m]. dependencies := dependencies asArray. ! Item was changed: ----- Method: MCMczReader>>loadPackage (in category 'loading') ----- loadPackage | dict | dict := self parseMember: 'package'. package := MCPackage named: (dict at: #name)! Item was changed: ----- Method: MCMczReader>>loadVersionInfo (in category 'loading') ----- loadVersionInfo info := self extractInfoFrom: (self parseMember: 'version')! Item was changed: ----- Method: MCMczReader>>zip (in category 'as yet unclassified') ----- zip zip ifNil: [zip := ZipArchive new. zip readFrom: stream]. ^ zip! Item was changed: ----- Method: MCMczWriter class>>fileOut:on: (in category 'as yet unclassified') ----- fileOut: aVersion on: aStream | inst | inst := self on: aStream. inst writeVersion: aVersion. inst flush. ! Item was changed: ----- Method: MCMczWriter>>addString:at: (in category 'writing') ----- addString: string at: path | member | member := zip addString: string as: path. member desiredCompressionMethod: ZipArchive compressionDeflated ! Item was changed: ----- Method: MCMczWriter>>initialize (in category 'initializing') ----- initialize zip := ZipArchive new. ! Item was changed: ----- Method: MCMczWriter>>serializeInBinary: (in category 'serializing') ----- serializeInBinary: aSnapshot | writer s | s := RWBinaryOrTextStream on: String new. writer := DataStream on: s. writer nextPut: aSnapshot. ^ s contents! Item was changed: ----- Method: MCMczWriter>>serializeVersionInfo: (in category 'serializing') ----- serializeVersionInfo: aVersionInfo infoWriter ifNil: [infoWriter := MCVersionInfoWriter new]. ^ String streamContents: [:s | infoWriter stream: s. infoWriter writeVersionInfo: aVersionInfo]! Item was changed: ----- Method: MCMergeBrowser class>>resolveConflictsInMerger: (in category 'as yet unclassified') ----- resolveConflictsInMerger: aMerger | inst | inst := self new merger: aMerger. ^ inst showModally ifNil: [false]! Item was changed: ----- Method: MCMergeRecord>>ancestorInfo (in category 'as yet unclassified') ----- ancestorInfo ^ ancestorInfo ifNil: [ancestorInfo := version info commonAncestorWith: version workingCopy ancestry]! Item was changed: ----- Method: MCMergeRecord>>ancestorSnapshot (in category 'as yet unclassified') ----- ancestorSnapshot ^ ancestorSnapshot ifNil: [ancestorSnapshot := version workingCopy findSnapshotWithVersionInfo: self ancestorInfo]! Item was changed: ----- Method: MCMergeRecord>>imagePatch (in category 'as yet unclassified') ----- imagePatch ^ imagePatch ifNil: [imagePatch := self packageSnapshot patchRelativeToBase: self ancestorSnapshot]! Item was changed: ----- Method: MCMergeRecord>>initializeWithVersion: (in category 'as yet unclassified') ----- initializeWithVersion: aVersion version := aVersion! Item was changed: ----- Method: MCMergeRecord>>mergePatch (in category 'as yet unclassified') ----- mergePatch ^ mergePatch ifNil: [mergePatch := version snapshot patchRelativeToBase: self ancestorSnapshot]! Item was changed: ----- Method: MCMergeRecord>>packageSnapshot (in category 'as yet unclassified') ----- packageSnapshot ^ packageSnapshot ifNil: [packageSnapshot := version package snapshot]! Item was changed: ----- Method: MCMergeResolutionRequest>>merger: (in category 'accessing') ----- merger: aMerger merger := aMerger! Item was changed: ----- Method: MCMerger>>conflicts (in category 'as yet unclassified') ----- conflicts ^ conflicts ifNil: [conflicts := OrderedCollection new]! Item was changed: ----- Method: MCMerger>>load (in category 'as yet unclassified') ----- load | loader | loader := MCPackageLoader new. loader provisions addAll: self provisions. self applyTo: loader. loader load! Item was changed: ----- Method: MCModification>>initializeWithBase:target: (in category 'initializing') ----- initializeWithBase: base target: target obsoletion := base. modification := target.! Item was changed: ----- Method: MCOrganizationDefinition>>categories: (in category 'accessing') ----- categories: anArray categories := anArray! Item was changed: ----- Method: MCOrganizationDefinition>>commonPrefix (in category 'accessing') ----- commonPrefix | stream | categories isEmpty ifTrue: [^ '']. stream := String new writeStream. categories first withIndexDo: [:c :i| categories do: [:ea | (ea at: i ifAbsent: []) = c ifFalse: [^ stream contents]]. stream nextPut: c]. ^ stream contents! Item was changed: ----- Method: MCPackage>>name: (in category 'accessing') ----- name: aString name := aString! Item was changed: ----- Method: MCPackageCache>>initialize (in category 'as yet unclassified') ----- initialize sorter := MCVersionSorter new. fileNames := Dictionary new.! Item was changed: ----- Method: MCPackageLoader>>analyze (in category 'private') ----- analyze | sorter | sorter := self sorterForItems: additions. additions := sorter orderedItems. requirements := sorter externalRequirements. unloadableDefinitions := sorter itemsWithMissingRequirements asSortedCollection. sorter := self sorterForItems: removals. removals := sorter orderedItems reversed.! Item was changed: ----- Method: MCPackageLoader>>installSnapshot: (in category 'public') ----- installSnapshot: aSnapshot | patch | patch := aSnapshot patchRelativeToBase: MCSnapshot empty. patch applyTo: self. ! Item was changed: ----- Method: MCPackageLoader>>sorterForItems: (in category 'private') ----- sorterForItems: aCollection | sorter | sorter := MCDependencySorter items: aCollection. sorter addExternalProvisions: self provisions. ^ sorter! Item was changed: ----- Method: MCPackageLoader>>updatePackage:withSnapshot: (in category 'public') ----- updatePackage: aPackage withSnapshot: aSnapshot | patch packageSnap | packageSnap := aPackage snapshot. patch := aSnapshot patchRelativeToBase: packageSnap. patch applyTo: self. packageSnap definitions do: [:ea | self provisions addAll: ea provisions] ! Item was changed: ----- Method: MCPackageManager class>>forPackage: (in category 'as yet unclassified') ----- forPackage: aPackage ^ self registry at: aPackage ifAbsent: [|mgr| mgr := self new initializeWithPackage: aPackage. self registry at: aPackage put: mgr. self changed: #allManagers. mgr]! Item was changed: ----- Method: MCPackageManager class>>registry (in category 'as yet unclassified') ----- registry ^ registry ifNil: [registry := Dictionary new]! Item was changed: ----- Method: MCPackageManager>>initialize (in category 'initialize-release') ----- initialize modified := false. self registerForNotifications.! Item was changed: ----- Method: MCPackageManager>>initializeWithPackage: (in category 'initialize-release') ----- initializeWithPackage: aPackage package := aPackage. self initialize.! Item was changed: ----- Method: MCPatch>>initializeWithBase:target: (in category 'initialize-release') ----- initializeWithBase: baseSnapshot target: targetSnapshot | base target | operations := OrderedCollection new. base := MCDefinitionIndex definitions: baseSnapshot definitions. target := MCDefinitionIndex definitions: targetSnapshot definitions. target definitions do: [:t | base definitionLike: t ifPresent: [:b | (b isSameRevisionAs: t) ifFalse: [operations add: (MCModification of: b to: t)]] ifAbsent: [operations add: (MCAddition of: t)]] displayingProgress: 'Diffing...'. base definitions do: [:b | target definitionLike: b ifPresent: [:t] ifAbsent: [operations add: (MCRemoval of: b)]] ! Item was changed: ----- Method: MCPatchBrowser>>patch: (in category 'initialize-release') ----- patch: aPatch items := aPatch operations asSortedCollection! Item was changed: ----- Method: MCPatcher class>>apply:to: (in category 'as yet unclassified') ----- apply: aPatch to: aSnapshot | loader | loader := self snapshot: aSnapshot. aPatch applyTo: loader. ^ loader patchedSnapshot! Item was changed: ----- Method: MCPatcher>>initializeWithSnapshot: (in category 'as yet unclassified') ----- initializeWithSnapshot: aSnapshot definitions := MCDefinitionIndex definitions: aSnapshot definitions! Item was changed: ----- Method: MCReader class>>on:name: (in category 'instance creation') ----- on: aStream name: aFileName | class | class := self readerClassForFileNamed: aFileName. ^ class ifNil: [self error: 'Unsupported format: ', aFileName] ifNotNil: [class on: aStream]! Item was changed: ----- Method: MCReader>>stream: (in category 'accessing') ----- stream: aStream stream := aStream! Item was changed: ----- Method: MCRemoval>>intializeWithDefinition: (in category 'initializing') ----- intializeWithDefinition: aDefinition definition := aDefinition! Item was changed: ----- Method: MCRepository>>doAlwaysStoreDiffs (in category 'accessing') ----- doAlwaysStoreDiffs storeDiffs := true! Item was changed: ----- Method: MCRepository>>doNotAlwaysStoreDiffs (in category 'accessing') ----- doNotAlwaysStoreDiffs storeDiffs := false! Item was changed: ----- Method: MCRepository>>sendNotificationsForVersion: (in category 'accessing') ----- sendNotificationsForVersion: aVersion | notification notifyList | notifyList := self notifyList. notifyList isEmpty ifFalse: [notification := self notificationForVersion: aVersion. notifyList do: [:ea | notification notify: ea]]! Item was changed: ----- Method: MCRepositoryGroup class>>default (in category 'accessing') ----- default ^ default ifNil: [default := self new]! Item was changed: ----- Method: MCRepositoryInspector class>>repository:workingCopy: (in category 'instance creation') ----- repository: aFileBasedRepository workingCopy: aWorkingCopy ^self new setRepository: aFileBasedRepository workingCopy: aWorkingCopy; yourself! Item was changed: ----- Method: MCRepositoryInspector>>defaultExtent (in category 'morphic ui') ----- defaultExtent ^450@300! Item was changed: ----- Method: MCRepositoryInspector>>defaultLabel (in category 'morphic ui') ----- defaultLabel ^'Repository: ' , repository description! Item was changed: ----- Method: MCRepositoryInspector>>hasVersion (in category 'morphic ui') ----- hasVersion ^ selectedVersion notNil! Item was changed: ----- Method: MCRepositoryInspector>>packageListMenu: (in category 'morphic ui') ----- packageListMenu: aMenu ^aMenu! Item was changed: ----- Method: MCRepositoryInspector>>versionListMenu: (in category 'morphic ui') ----- versionListMenu: aMenu 1 to: self orderSpecs size do: [ :index | aMenu addUpdating: #orderString: target: self selector: #order: argumentList: { index } ]. + aMenu addLine. + aMenu add: 'Changes against ...' action: [| ri | + ri := aMenu defaultTarget. + (UIManager default + chooseFrom: ri allVersionNames + values: ri allVersionNames + title: 'Select version to show patch against ...') ifNotNilDo: [:name | + | versionName target base | + versionName := MCVersionName on: name. + target := ri repository versionNamed: ri versionInfo name. + base := aMenu defaultTarget repository versionNamed: versionName. + (MCPatchBrowser + forPatch: (target snapshot patchRelativeToBase: base snapshot)) + showLabelled: 'Changes from ', versionName, ' to ', ri versionInfo name]]. ^aMenu! Item was changed: ----- Method: MCRepositoryInspector>>widgetSpecs (in category 'morphic ui') ----- widgetSpecs ^#( ((buttonRow) (0 0 1 0) (0 0 0 30)) ((listMorph: package) (0 0 0.5 0.6) (0 30 0 0)) ((listMorph: version) (0.5 0 1 0.6) (0 30 0 0)) ((textMorph: summary) (0 0.6 1 1) (0 0 0 0)) )! Item was changed: ----- Method: MCSMCacheRepository>>allFullFileNames (in category 'accessing') ----- allFullFileNames | cachedPackages | cachedPackages := smCache map installedPackages select: [ :ea | ea isCached ]. ^Array streamContents: [ :s | cachedPackages do: [ :ea | | d | d := ea cacheDirectory. (d fileNamesMatching: '*.mcz') do: [ :fn | s nextPut: (d fullNameFor: fn) ]]]! Item was changed: ----- Method: MCSMCacheRepository>>readStreamForFileNamed:do: (in category 'file streaming') ----- readStreamForFileNamed: aString do: aBlock | file fileName | fileName := self fullNameFor: aString. fileName ifNil: [ "assume that this will come from the cache." ^MCCacheRepository default readStreamForFileNamed: aString do: aBlock ]. file := FileStream readOnlyFileNamed: fileName. ^[ aBlock value: file ] ensure: [ file close ]. ! Item was changed: ----- Method: MCSMReleaseRepository>>basicStoreVersion: (in category 'as yet unclassified') ----- basicStoreVersion: aVersion | url | url := self uploadVersion: aVersion. self releaseVersion: aVersion url: url! Item was changed: ----- Method: MCSMReleaseRepository>>initializeWithPackage:user:password: (in category 'as yet unclassified') ----- initializeWithPackage: packageString user: userString password: passString packageName := packageString. user := userString. password := passString. ! Item was changed: ----- Method: MCSMReleaseRepository>>stringForVersion: (in category 'as yet unclassified') ----- stringForVersion: aVersion | stream | stream := RWBinaryOrTextStream on: String new. aVersion fileOutOn: stream. ^ stream contents! Item was changed: ----- Method: MCSMReleaseRepository>>uploadVersion: (in category 'as yet unclassified') ----- uploadVersion: aVersion | result stream | result := HTTPSocket httpPut: (self stringForVersion: aVersion) to: self squeakMapUrl, '/upload/', aVersion fileName user: user passwd: password. self checkResult: result. stream := result readStream. stream upToAll: 'http://'. ^ 'http://', stream upToEnd! Item was changed: ----- Method: MCSaveVersionDialog>>logMessage: (in category 'accessing') ----- logMessage: aString message := aString. self changed: #logMessage! Item was changed: ----- Method: MCSaveVersionDialog>>versionName: (in category 'accessing') ----- versionName: aString name := aString. self changed: #versionName! Item was changed: ----- Method: MCScanner>>next (in category 'as yet unclassified') ----- next | c | stream skipSeparators. c := stream peek. c = $# ifTrue: [c := stream next; peek]. c = $' ifTrue: [^ self nextString]. c = $( ifTrue: [^ self nextArray]. c isAlphaNumeric ifTrue: [^ self nextSymbol]. self error: 'Unknown token type'. ! Item was changed: ----- Method: MCScanner>>stream: (in category 'as yet unclassified') ----- stream: aStream stream := aStream! Item was changed: ----- Method: MCSmtpRepository>>emailAddress: (in category 'as yet unclassified') ----- emailAddress: aString email := aString ! Item was changed: ----- Method: MCSnapshot>>initializeWithDefinitions: (in category 'initializing') ----- initializeWithDefinitions: aCollection definitions := aCollection.! Item was changed: ----- Method: MCSnapshotBrowser>>categorySelection: (in category 'selecting') ----- categorySelection: aNumber categorySelection := aNumber = 0 ifFalse: [self visibleCategories at: aNumber]. self classSelection: 0. self changed: #categorySelection; changed: #annotations; changed: #classList. ! Item was changed: ----- Method: MCSnapshotBrowser>>classDefinitionString (in category 'text') ----- classDefinitionString | defs | defs := items select: [:ea | (ea isClassDefinition or: [ea isClassDefinitionExtension]) and: [ea className = classSelection]]. defs isEmpty ifTrue: [^ 'This class is defined elsewhere.']. ^ String streamContents: [:stream | defs asArray sort do: [:ea | ea printDefinitionOn: stream] separatedBy: [stream nextPut: $.; cr] ].! Item was changed: ----- Method: MCSnapshotBrowser>>methodSelection: (in category 'selecting') ----- methodSelection: aNumber methodSelection := aNumber = 0 ifFalse: [self visibleMethods at: aNumber]. self changed: #methodSelection; changed: #text; changed: #annotations! Item was changed: ----- Method: MCSnapshotBrowser>>methodsForSelectedProtocol (in category 'accessing') ----- methodsForSelectedProtocol | methods | protocolSelection ifNil: [^ Array new]. methods := self methodsForSelectedClass asOrderedCollection. (protocolSelection = '-- all --') ifFalse: [methods removeAllSuchThat: [:ea | ea category ~= protocolSelection]]. ^ methods ! Item was changed: ----- Method: MCSnapshotBrowser>>protocolSelection: (in category 'selecting') ----- protocolSelection: anInteger protocolSelection := (anInteger = 0 ifFalse: [self visibleProtocols at: anInteger]). self methodSelection: 0. self changed: #protocolSelection; changed: #methodList; changed: #annotations! Item was changed: ----- Method: MCSnapshotBrowser>>selectedClassOrMetaClass (in category 'accessing') ----- selectedClassOrMetaClass | class | classSelection ifNil: [ ^nil ]. class := Smalltalk at: classSelection ifAbsent: [ ^nil ]. ^self switchIsClass ifTrue: [ class class ] ifFalse: [ class ].! Item was changed: ----- Method: MCSnapshotBrowser>>snapshot: (in category 'accessing') ----- snapshot: aSnapshot items := aSnapshot definitions asSortedCollection. self categorySelection: 0.! Item was changed: ----- Method: MCSnapshotBrowser>>switchBeClass (in category 'switch') ----- switchBeClass switch := #class. self signalSwitchChanged.! Item was changed: ----- Method: MCSnapshotBrowser>>switchBeComment (in category 'switch') ----- switchBeComment switch := #comment. self signalSwitchChanged.! Item was changed: ----- Method: MCSnapshotBrowser>>switchBeInstance (in category 'switch') ----- switchBeInstance switch := #instance. self signalSwitchChanged.! Item was changed: ----- Method: MCSnapshotBrowser>>switchIsInstance (in category 'switch') ----- switchIsInstance switch ifNil: [switch := #instance]. ^ switch = #instance.! Item was changed: ----- Method: MCSnapshotBrowser>>visibleProtocols (in category 'listing') ----- visibleProtocols | methods protocols | self switchIsComment ifTrue: [^ Array new]. methods := self methodsForSelectedClass. protocols := (methods collect: [:ea | ea category]) asSet asSortedCollection. (protocols size > 1) ifTrue: [protocols add: '-- all --']. ^ protocols ! Item was changed: ----- Method: MCStReader>>categoryFromDoIt: (in category 'as yet unclassified') ----- categoryFromDoIt: aString | tokens | tokens := Scanner new scanTokens: aString. tokens size = 3 ifFalse: [self error: 'Unrecognized category definition']. ^ tokens at: 3! Item was changed: ----- Method: MCStReader>>commentFor: (in category 'as yet unclassified') ----- commentFor: aPseudoClass | comment | comment := aPseudoClass organization classComment. ^ comment asString = '' ifTrue: [comment] ifFalse: [comment string]! Item was changed: ----- Method: MCStReader>>commentStampFor: (in category 'as yet unclassified') ----- commentStampFor: aPseudoClass | comment | comment := aPseudoClass organization classComment. ^ [comment stamp] on: MessageNotUnderstood do: [nil]! Item was changed: ----- Method: MCStReader>>loadDefinitions (in category 'evaluating') ----- loadDefinitions | filePackage | filePackage := FilePackage new fullName: 'ReadStream'; fileInFrom: self readStream. definitions := OrderedCollection new. filePackage classes do: [:pseudoClass | pseudoClass hasDefinition ifTrue: [definitions add: (self classDefinitionFrom: pseudoClass)]. definitions addAll: (self methodDefinitionsFor: pseudoClass). definitions addAll: (self methodDefinitionsFor: pseudoClass metaClass)]. filePackage doIts do: [:ea | self addDefinitionsFromDoit: ea string]. ! Item was changed: ----- Method: MCStReader>>systemOrganizationFromRecords: (in category 'as yet unclassified') ----- systemOrganizationFromRecords: changeRecords | categories | categories := changeRecords select: [:ea | 'SystemOrganization*' match: ea string] thenCollect: [:ea | (self categoryFromDoIt: ea string)]. ^ categories isEmpty ifFalse: [MCOrganizationDefinition categories: categories asArray]! Item was changed: ----- Method: MCSubDirectoryRepository>>findFullNameForReading: (in category 'as yet unclassified') ----- findFullNameForReading: aBaseName "Answer the latest version of aBaseName" | possible | possible := SortedCollection sortBlock: [ :a :b | b first modificationTime < a first modificationTime ]. self allDirectories do: [:dir | dir entries do: [:ent | ent isDirectory ifFalse: [ (ent name = aBaseName) ifTrue: [ possible add: {ent. dir fullNameFor: ent name}]]]]. ^(possible at: 1 ifAbsent: [ ^nil ]) second ! Item was changed: ----- Method: MCSubDirectoryRepository>>readStreamForFileNamed:do: (in category 'as yet unclassified') ----- readStreamForFileNamed: aString do: aBlock | file val | file := FileStream readOnlyFileNamed: (self findFullNameForReading: aString). val := aBlock value: file. file close. ^ val! Item was changed: ----- Method: MCSystemCategoryParser>>addDefinitionsTo: (in category 'as yet unclassified') ----- addDefinitionsTo: aCollection | definition | definition := aCollection detect: [:ea | ea isOrganizationDefinition ] ifNone: [aCollection add: (MCOrganizationDefinition categories: #())]. definition categories: (definition categories copyWith: self category).! Item was changed: ----- Method: MCSystemCategoryParser>>category (in category 'as yet unclassified') ----- category | tokens | tokens := Scanner new scanTokens: source. tokens size = 3 ifFalse: [self error: 'Unrecognized category definition']. ^ tokens at: 3! Item was changed: ----- Method: MCThreeWayMerger>>initialize (in category 'as yet unclassified') ----- initialize index := MCDefinitionIndex new. provisions := Set new! Item was changed: ----- Method: MCThreeWayMerger>>operations (in category 'as yet unclassified') ----- operations ^ operations ifNil: [operations := OrderedCollection new]! Item was changed: ----- Method: MCTool>>label: (in category 'morphic ui') ----- label: aString label := aString! Item was changed: ----- Method: MCTool>>window (in category 'morphic ui') ----- window ^ morph ifNil: [morph := self buildWindow]! Item was changed: ----- Method: MCVariableDefinition>>name: (in category 'accessing') ----- name: aString name := aString! Item was changed: ----- Method: MCVersion>>allDependenciesDo:ifUnresolved: (in category 'enumerating') ----- allDependenciesDo: aBlock ifUnresolved: failBlock | dict | dict := Dictionary new. self allDependenciesNotIn: dict do: aBlock ifUnresolved: failBlock! Item was changed: ----- Method: MCVersion>>setPackage:info:snapshot:dependencies: (in category 'initialize-release') ----- setPackage: aPackage info: aVersionInfo snapshot: aSnapshot dependencies: aCollection package := aPackage. info := aVersionInfo. snapshot := aSnapshot. dependencies := aCollection! Item was changed: ----- Method: MCVersion>>withAllDependenciesDo:ifUnresolved: (in category 'enumerating') ----- withAllDependenciesDo: aBlock ifUnresolved: failBlock | dict | dict := Dictionary new. self allDependenciesNotIn: dict do: aBlock ifUnresolved: failBlock. aBlock value: self! Item was changed: ----- Method: MCVersionDependency>>initializeWithPackage:info: (in category 'initialize-release') ----- initializeWithPackage: aPackage info: aVersionInfo package := aPackage. versionInfo := aVersionInfo! Item was changed: ----- Method: MCVersionHistoryBrowser>>ancestry: (in category 'accessing') ----- ancestry: anAncestry ancestry := anAncestry! Item was changed: ----- Method: MCVersionHistoryBrowser>>index: (in category 'accessing') ----- index: anObject "Set the value of index" index := anObject! Item was changed: ----- Method: MCVersionHistoryBrowser>>package: (in category 'accessing') ----- package: aMCPackage package := aMCPackage! Item was changed: ----- Method: MCVersionHistoryBrowser>>selection: (in category 'accessing') ----- selection: aNumber index := aNumber. self changed: #selection; changed: #summary! Item was changed: ----- Method: MCVersionHistoryBrowser>>summary (in category 'accessing') ----- summary | selInfo | selInfo := self selectedInfo. ^ selInfo ifNil: [''] ifNotNil: [selInfo summary]! Item was changed: ----- Method: MCVersionInfoWriter>>written (in category 'as yet unclassified') ----- written ^ written ifNil: [written := Set new]! Item was changed: ----- Method: MCVersionInspector>>version: (in category 'accessing') ----- version: aVersion version := aVersion! Item was changed: ----- Method: MCVersionLoader>>checkForModifications (in category 'checking') ----- checkForModifications | modifications | modifications := versions select: [:ea | ea package workingCopy modified]. modifications isEmpty ifFalse: [self warnAboutLosingChangesTo: modifications].! Item was changed: ----- Method: MCVersionLoader>>initialize (in category 'initialize-release') ----- initialize versions := OrderedCollection new! Item was changed: ----- Method: MCVersionMerger>>initialize (in category 'as yet unclassified') ----- initialize records := OrderedCollection new. merger := MCThreeWayMerger new.! Item was changed: ----- Method: MCVersionNameAndMessageRequest>>suggestedName: (in category 'accessing') ----- suggestedName: aString suggestion := aString! Item was changed: ----- Method: MCVersionNotification>>initializeWithVersion:repository: (in category 'as yet unclassified') ----- initializeWithVersion: aVersion repository: aRepository version := aVersion. repository := aRepository. ancestor := repository closestAncestorVersionFor: version info ifNone: []. changes := ancestor ifNil: [#()] ifNotNil: [(version snapshot patchRelativeToBase: ancestor snapshot) operations asSortedCollection]! Item was changed: ----- Method: MCVersionNotification>>messageTo: (in category 'as yet unclassified') ----- messageTo: aString | message | message := MailMessage empty. message setField: 'from' toString: self fromAddress. message setField: 'to' toString: aString. message setField: 'subject' toString: '[MC] ', version info name. message body: (MIMEDocument contentType: 'text/plain' content: self messageText). ^ message! Item was changed: ----- Method: MCVersionNotification>>notify: (in category 'as yet unclassified') ----- notify: aString | message | message := self messageTo: aString. SMTPClient deliverMailFrom: message from to: (Array with: message to) text: message text usingServer: MailSender smtpServer! Item was changed: ----- Method: MCVersionSorter>>addToCurrentLayer: (in category 'as yet unclassified') ----- addToCurrentLayer: aVersionInfo | layer | layer := layers at: depthIndex. (layer includes: aVersionInfo) ifFalse: [depths at: aVersionInfo ifPresent: [:i | i < depthIndex ifTrue: [(layers at: i) remove: aVersionInfo] ifFalse: [^ false]]. layer add: aVersionInfo. depths at: aVersionInfo put: depthIndex. ^ true]. ^ false ! Item was changed: ----- Method: MCVersionSorter>>allAncestorsOf: (in category 'as yet unclassified') ----- allAncestorsOf: aVersionInfo | all | all := Set new. self addAllAncestorsOf: aVersionInfo to: all. ^ all! Item was changed: ----- Method: MCVersionSorter>>initialize (in category 'as yet unclassified') ----- initialize stepparents := Dictionary new. roots := OrderedCollection new.! Item was changed: ----- Method: MCVersionSorter>>popLayer (in category 'as yet unclassified') ----- popLayer depthIndex := depthIndex - 1! Item was changed: ----- Method: MCVersionSorter>>pushLayer (in category 'as yet unclassified') ----- pushLayer depthIndex := depthIndex + 1. depthIndex > layers size ifTrue: [layers add: OrderedCollection new]. ! Item was changed: ----- Method: MCVersionSorter>>sortedVersionInfos (in category 'as yet unclassified') ----- sortedVersionInfos layers := OrderedCollection with: OrderedCollection new. depthIndex := 1. depths := Dictionary new. roots do: [:ea | self processVersionInfo: ea]. ^ layers gather: [:ea | ea]! Item was changed: ----- Method: MCWorkingAncestry>>addStepChild: (in category 'as yet unclassified') ----- addStepChild: aVersionInfo stepChildren := stepChildren copyWith: aVersionInfo! Item was changed: ----- Method: MCWorkingCopy>>changesRelativeToRepository: (in category 'operations') ----- changesRelativeToRepository: aRepository | ancestorVersion ancestorSnapshot | ancestorVersion := aRepository closestAncestorVersionFor: ancestry ifNone: []. ancestorSnapshot := ancestorVersion ifNil: [MCSnapshot empty] ifNotNil: [ancestorVersion snapshot]. ^ package snapshot patchRelativeToBase: ancestorSnapshot! Item was changed: ----- Method: MCWorkingCopy>>clearRequiredPackages (in category 'accessing') ----- clearRequiredPackages requiredPackages := nil! Item was changed: ----- Method: MCWorkingCopy>>initialize (in category 'private') ----- initialize super initialize. ancestry := MCWorkingAncestry new! Item was changed: ----- Method: MCWorkingCopy>>loaded: (in category 'operations') ----- loaded: aVersion ancestry := MCWorkingAncestry new addAncestor: aVersion info. requiredPackages := OrderedCollection withAll: (aVersion dependencies collect: [:ea | ea package]). self modified: false. self changed! Item was changed: ----- Method: MCWorkingCopy>>repositoryGroup (in category 'repositories') ----- repositoryGroup ^ repositoryGroup ifNil: [repositoryGroup := MCRepositoryGroup new]! Item was changed: ----- Method: MCWorkingCopy>>repositoryGroup: (in category 'repositories') ----- repositoryGroup: aRepositoryGroup repositoryGroup := aRepositoryGroup! Item was changed: ----- Method: MCWorkingCopy>>requiredPackages (in category 'accessing') ----- requiredPackages ^ requiredPackages ifNil: [requiredPackages := OrderedCollection new]! Item was changed: ----- Method: MCWorkingCopy>>uniqueVersionName (in category 'private') ----- uniqueVersionName |versionName| counter := nil. [versionName := self nextVersionName. self repositoryGroup includesVersionNamed: versionName] whileTrue. ^ versionName! Item was changed: ----- Method: MCWorkingCopy>>updateInstVars (in category 'migration') ----- updateInstVars ancestry ifNil: [ancestry := MCWorkingAncestry new. versionInfo ifNotNil: [versionInfo ancestors do: [:ea | ancestry addAncestor: ea]. versionInfo := nil]]! Item was changed: ----- Method: MCWorkingCopy>>versionInfo: (in category 'accessing') ----- versionInfo: aVersionInfo ancestry := MCWorkingAncestry new addAncestor: aVersionInfo! Item was changed: ----- Method: MCWorkingCopyBrowser>>defaults (in category 'morphic ui') ----- defaults ^ defaults ifNil: [defaults := Dictionary new]! Item was changed: ----- Method: MCWorkingCopyBrowser>>repository (in category 'actions') ----- repository workingCopy ifNotNil: [repository := self defaults at: workingCopy ifAbsent: []]. ^ repository! Item was changed: ----- Method: MCWorkingCopyBrowser>>repository: (in category 'actions') ----- repository: aRepository repository := aRepository. workingCopy ifNotNil: [self defaults at: workingCopy put: aRepository]! Item was changed: ----- Method: MCWorkingCopyBrowser>>viewChanges (in category 'actions') ----- viewChanges | patch | self canSave ifTrue: [patch := workingCopy changesRelativeToRepository: self repository. patch isNil ifTrue: [^ self]. patch isEmpty ifTrue: [ workingCopy modified: false. self inform: 'No changes' ] ifFalse: [ workingCopy modified: true. (MCPatchBrowser forPatch: patch) label: 'Patch Browser: ', workingCopy description; show]]! Item was changed: ----- Method: MCWriter>>stream: (in category 'accessing') ----- stream: aStream stream := aStream! Item was changed: ----- Method: TimeStamp class>>fromMethodTimeStamp: (in category '*monticello-instance creation') ----- fromMethodTimeStamp: aString | stream | stream := ReadStream on: aString. stream skipSeparators. stream skipTo: Character space. ^self readFrom: stream.! Item was changed: ----- Method: TimeStamp class>>fromString: (in category '*monticello-instance creation') ----- fromString: aString "Answer a new instance for the value given by aString. TimeStamp fromString: '1-10-2000 11:55:00 am'. " ^self readFrom: (ReadStream on: aString).! Item was changed: ----- Method: TimeStamp class>>readFrom: (in category '*monticello-instance creation') ----- readFrom: stream | date time | stream skipSeparators. date := Date readFrom: stream. stream skipSeparators. time := Time readFrom: stream. ^self date: date time: time! From commits at source.squeak.org Tue Mar 31 16:27:38 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 16:27:39 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.797.mcz Message-ID: Marcel Taeumel uploaded a new version of Morphic to project The Trunk: http://source.squeak.org/trunk/Morphic-mt.797.mcz ==================== Summary ==================== Name: Morphic-mt.797 Author: mt Time: 31 March 2015, 6:27:03.383 pm UUID: 62e69ad7-a533-4248-937f-5b101f24dfc9 Ancestors: Morphic-mt.796 Fixed problem with disappearing new-style balloon morph in certain cases. =============== Diff against Morphic-mt.796 =============== Item was changed: ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category 'initialization') ----- popUpAt: point forHand: aHand "Pop up the receiver as balloon help for the given hand" + #(bottomLeft topLeft bottomRight topRight) detect: [:nextOrientation | + | pointWithOffset | - #(bottomLeft bottomRight topLeft topRight) detect: [:nextOrientation | self orientation: nextOrientation. + pointWithOffset := point + self tailOffset. + self move: pointWithOffset. - self move: point. self bounds: (self bounds translatedToBeWithin: aHand world bounds). + (self bounds perform: self orientation) = pointWithOffset] ifNone: ["Keep last try."]. - (self bounds perform: self orientation) = point] ifNone: ["Keep last try."]. aHand world addMorphFront: self. aHand balloonHelp: self.! Item was added: + ----- Method: NewBalloonMorph>>tailOffset (in category 'geometry') ----- + tailOffset + + ^ (Dictionary newFrom: { + #topLeft -> (5@0). + #topRight -> (-3@0). + #bottomLeft -> (1@ -1). + #bottomRight -> (-3 @ -3)}) at: self orientation! From tim at rowledge.org Tue Mar 31 17:09:34 2015 From: tim at rowledge.org (tim Rowledge) Date: Tue Mar 31 17:09:46 2015 Subject: [squeak-dev] Squeak can make a difference in the real world Message-ID: <3D9D5C6C-6170-4B10-9F02-7640CE150B11@rowledge.org> See http://www.raspberrypi.org/magpi-issues/MagPi32.pdf pages 6-9. That?s Squeak running on a Pi, making Scratch available, helping kids learn despite {insert stupid religio-politcal-money-idiocy here}. That?s Squeak - us - making life a bit better. tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim The Static Typing Philosophy: Make it fast. Make it right. Make it run, if you have time left. From Das.Linux at gmx.de Tue Mar 31 18:32:07 2015 From: Das.Linux at gmx.de (Tobias Pape) Date: Tue Mar 31 18:32:12 2015 Subject: [squeak-dev] build.squeak.org slaves: which are there after all? Message-ID: <1FAA43DA-1EEB-4806-8747-F14066B6FCD0@gmx.de> Hi I am looking around on our Jenkins CI and was puzzled that there are several slave nodes (yay) but none of them seem to have been alive for some time (nay?) -------------- next part -------------- A non-text attachment was scrubbed... Name: Bildschirmfoto 2015-03-31 um 20.26.49.PNG Type: image/png Size: 69946 bytes Desc: not available Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/eb893403/Bildschirmfoto2015-03-31um20.26.49-0001.png -------------- next part -------------- what can we do? Best -Tobias From lewis at mail.msen.com Tue Mar 31 18:44:54 2015 From: lewis at mail.msen.com (David T. Lewis) Date: Tue Mar 31 18:44:56 2015 Subject: [squeak-dev] build.squeak.org slaves: which are there after all? In-Reply-To: <1FAA43DA-1EEB-4806-8747-F14066B6FCD0@gmx.de> References: <1FAA43DA-1EEB-4806-8747-F14066B6FCD0@gmx.de> Message-ID: <34983.136.2.1.102.1427827494.squirrel@webmail.msen.com> > Hi > > I am looking around on our Jenkins CI and was puzzled that > there are several slave nodes (yay) but none of them > seem to have been alive for some time (nay ) > > > > what can we do? > > Best > -Tobias > The first thing we should do: Every job on the Jenkins CI should have a clear comment that says what it is supposed to be doing, and who is responsible for it. Likewise for the slave servers - if you cannot figure out what they are and who they belong to, then they should not be there. Dave From eliot.miranda at gmail.com Tue Mar 31 19:15:03 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 31 19:15:07 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.794.mcz In-Reply-To: <551a6b4b.d75e8c0a.18b1.4b81SMTPIN_ADDED_MISSING@mx.google.com> References: <551a6b4b.d75e8c0a.18b1.4b81SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I'm getting a failed update: This package depends on the following classes: NewBalloonMorph You must resolve these dependencies before you will be able to load these definitions: NewBalloonMorph>>isBalloonHelp latest update: #14275 On Tue, Mar 31, 2015 at 2:38 AM, wrote: > Marcel Taeumel uploaded a new version of Morphic to project The Trunk: > http://source.squeak.org/trunk/Morphic-mt.794.mcz > > ==================== Summary ==================== > > Name: Morphic-mt.794 > Author: mt > Time: 31 March 2015, 11:38:42.253 am > UUID: 765a2201-af4c-0948-b90d-72414d335160 > Ancestors: Morphic-mt.793 > > New-style balloon morph added and used. Can be switched back to old-style > balloon morphs via preferences. > > New-style balloon morphs support: > - text (not only strings) > - layouting via text paragraph (not hard-cutted via: #noLineLongerThan:) > - positioning at current hand position (if not supplied with other > reference point) > > In general, new-style balloon morphs have an improved readability. > > =============== Diff against Morphic-mt.793 =============== > > Item was changed: > ----- Method: BalloonMorph class>>string:for:corner: (in category > 'instance creation') ----- > string: str for: morph corner: cornerName > "Make up and return a balloon for morph. Find the quadrant that > clips the text the least, using cornerName as a tie-breaker. tk > 9/12/97" > | tm vertices | > + tm := self > + getTextMorph: (str asString withNoLineLongerThan: > Preferences maxBalloonHelpLineLength) > + for: morph. > - tm := self getTextMorph: str for: morph. > vertices := self getVertices: tm bounds. > vertices := self > getBestLocation: vertices > for: morph > corner: cornerName. > ^ self new color: morph balloonColor; > setVertices: vertices; > addMorph: tm; > setTarget: morph! > > Item was changed: > ----- Method: MenuMorph>>showKeyboardHelp (in category 'keystroke > helpers') ----- > showKeyboardHelp > > | help | > + help := self balloonMorphClass > + string: 'Enter text to narrow selection\down to matching > items ' withCRs > - help := BalloonMorph > - string: 'Enter text to\narrow selection down\to matching > items ' withCRs > for: self > corner: #topLeft. > + help popUpAt: self topCenter forHand: self activeHand! > - help popUpForHand: self activeHand! > > Item was added: > + ----- Method: Morph>>balloonMorphClass (in category 'halos and balloon > help') ----- > + balloonMorphClass > + > + ^ NewBalloonMorph useNewBalloonMorph > + ifTrue: [NewBalloonMorph] > + ifFalse: [BalloonMorph]! > > Item was changed: > ----- Method: Morph>>showBalloon:hand: (in category 'halos and balloon > help') ----- > showBalloon: msgString hand: aHand > "Pop up a balloon containing the given string, > first removing any existing BalloonMorphs in the world." > > | w balloon h | > (w := self world) ifNil: [^ self]. > h := aHand. > h ifNil:[ > h := w activeHand]. > + balloon := self balloonMorphClass > + string: msgString > - balloon := BalloonMorph > - string: (msgString asString withNoLineLongerThan: > Preferences maxBalloonHelpLineLength) > for: self balloonHelpAligner. > balloon popUpFor: self hand: h.! > > Item was added: > + Morph subclass: #NewBalloonMorph > + instanceVariableNames: 'balloonOwner textMorph maximumWidth > orientation hasTail' > + classVariableNames: 'UseNewBalloonMorph' > + poolDictionaries: '' > + category: 'Morphic-Widgets'! > + > + !NewBalloonMorph commentStamp: 'mt 3/31/2015 10:15' prior: 0! > + A balloon is a bubble with an optional tail. It contains rich text, > which describes something about its balloon-owner.! > > Item was added: > + ----- Method: NewBalloonMorph class>>string:for: (in category 'instance > creation') ----- > + string: str for: morph > + > + ^ self string: str for: morph corner: #bottomLeft! > > Item was added: > + ----- Method: NewBalloonMorph class>>string:for:corner: (in category > 'instance creation') ----- > + string: message for: morph corner: symbol > + > + ^ self new > + balloonOwner: morph; > + setText: message; > + orientation: symbol; > + yourself! > > Item was added: > + ----- Method: NewBalloonMorph class>>useNewBalloonMorph (in category > 'preferences') ----- > + useNewBalloonMorph > + > + + category: #Morphic > + description: 'The new-style balloon morphs are improved > for better reading quality and support rich text.' > + type: #Boolean> > + ^ UseNewBalloonMorph ifNil: [true]! > > Item was added: > + ----- Method: NewBalloonMorph class>>useNewBalloonMorph: (in category > 'preferences') ----- > + useNewBalloonMorph: aBoolean > + > + UseNewBalloonMorph := aBoolean.! > > Item was added: > + ----- Method: NewBalloonMorph>>balloonOwner (in category 'accessing') > ----- > + balloonOwner > + > + ^ balloonOwner! > > Item was added: > + ----- Method: NewBalloonMorph>>balloonOwner: (in category 'accessing') > ----- > + balloonOwner: aMorph > + > + balloonOwner := aMorph.! > > Item was added: > + ----- Method: NewBalloonMorph>>bubbleBounds (in category 'geometry') > ----- > + bubbleBounds > + > + ^ self bounds insetBy: (0 @ self tailHeight corner: 0 @ self > tailHeight)! > > Item was added: > + ----- Method: NewBalloonMorph>>bubbleInset (in category 'geometry') ----- > + bubbleInset > + > + ^ 5@2! > > Item was added: > + ----- Method: NewBalloonMorph>>defaultBorderColor (in category > 'initialization') ----- > + defaultBorderColor > + > + ^ self defaultColor muchDarker"Color black"! > > Item was added: > + ----- Method: NewBalloonMorph>>defaultBorderWidth (in category > 'initialization') ----- > + defaultBorderWidth > + > + ^ 1! > > Item was added: > + ----- Method: NewBalloonMorph>>defaultColor (in category > 'initialization') ----- > + defaultColor > + > + ^ BalloonMorph balloonColor! > > Item was added: > + ----- Method: NewBalloonMorph>>drawDropShadowOn: (in category 'drawing') > ----- > + drawDropShadowOn: aCanvas > + > + aCanvas > + translateBy: self shadowOffset > + during: [ :shadowCanvas | > + (shadowCanvas isVisible: self bubbleBounds) > ifTrue: [ > + self wantsRoundedCorners > + ifTrue: [shadowCanvas > fillRoundRect: self bubbleBounds radius: self class preferredCornerRadius > fillStyle: self shadowColor] > + ifFalse: [shadowCanvas > fillRectangle: self bubbleBounds fillStyle: self shadowColor]]. > + > + self hasTail ifTrue: [ > + shadowCanvas > + drawPolygon: self > verticesForTail > + fillStyle: self > shadowColor]]. > + > + ! > > Item was added: > + ----- Method: NewBalloonMorph>>drawOn: (in category 'drawing') ----- > + drawOn: aCanvas > + > + "Bubble." > + self wantsRoundedCorners > + ifTrue: [aCanvas > + frameAndFillRoundRect: self bubbleBounds > + radius: self class preferredCornerRadius > fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: > self borderStyle color] > + ifFalse: [aCanvas > + fillRectangle: self bubbleBounds > + fillStyle: self fillStyle borderStyle: self > borderStyle]. > + > + "Tail." > + self hasTail ifTrue: [ > + self verticesForTail in: [:points | > + | pixelOffset | > + pixelOffset := points first y < points second y > + ifFalse: [points first x < points second x > + ifTrue: [self borderStyle width > negated @ self borderStyle width] "bottomLeft" > + ifFalse: [self borderStyle width @ > self borderStyle width]] "bottomRight" > + ifTrue: [points first x < points second x > + ifTrue: [self borderStyle width > negated @ self borderStyle width negated] "topLeft" > + ifFalse: [self borderStyle width @ > self borderStyle width negated]]. "topRight" > + > + aCanvas > + drawPolygon: points > + fillStyle: self fillStyle. > + aCanvas > + line: points first > + to: points second + pixelOffset > + width: self borderStyle width > + color: self borderStyle color. > + aCanvas > + line: points first > + to: points third + pixelOffset > + width: self borderStyle width > + color: self borderStyle color]]! > > Item was added: > + ----- Method: NewBalloonMorph>>hasTail (in category 'accessing') ----- > + hasTail > + > + ^ hasTail ifNil: [true]! > > Item was added: > + ----- Method: NewBalloonMorph>>hasTail: (in category 'accessing') ----- > + hasTail: aBoolean > + > + hasTail := aBoolean.! > > Item was added: > + ----- Method: NewBalloonMorph>>initialize (in category 'initialization') > ----- > + initialize > + > + super initialize. > + > + self > + borderWidth: self defaultBorderWidth; > + borderColor: self defaultBorderColor; > + color: (self defaultColor alpha: 1.0); "no alpha due to > drop shadow" > + hasDropShadow: true; > + shadowOffset: 1@1; > + shadowColor: (self color muchDarker muchDarker alpha: > 0.333); > + orientation: #bottomLeft. > + > + MenuMorph roundedMenuCorners > + ifTrue: [self cornerStyle: #rounded]. > + > + textMorph := TextMorph new > + wrapFlag: false; > + lock; > + yourself. > + > + self addMorph: textMorph.! > > Item was added: > + ----- Method: NewBalloonMorph>>maximumWidth (in category 'accessing') > ----- > + maximumWidth > + > + ^ maximumWidth ifNil: [ > + maximumWidth := (self balloonOwner balloonFont widthOf: > $m) * Preferences maxBalloonHelpLineLength]! > > Item was added: > + ----- Method: NewBalloonMorph>>maximumWidth: (in category 'accessing') > ----- > + maximumWidth: anInteger > + > + maximumWidth := anInteger.! > > Item was added: > + ----- Method: NewBalloonMorph>>morphicLayerNumber (in category 'WiW > support') ----- > + morphicLayerNumber > + > + "helpful for insuring some morphs always appear in front of or > behind others. > + smaller numbers are in front" > + > + ^5 "Balloons are very front-like things"! > > Item was added: > + ----- Method: NewBalloonMorph>>move: (in category 'geometry') ----- > + move: targetPoint > + > + self perform: (self orientation, #:) asSymbol with: targetPoint.! > > Item was added: > + ----- Method: NewBalloonMorph>>orientation (in category 'accessing') > ----- > + orientation > + "Encodes the position of the tail. #topLeft, #topRight, > #bottomLeft, #bottomRight" > + > + ^ orientation! > > Item was added: > + ----- Method: NewBalloonMorph>>orientation: (in category 'accessing') > ----- > + orientation: aSymbol > + > + orientation := aSymbol. > + self changed.! > > Item was added: > + ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category > 'initialization') ----- > + popUpAt: point forHand: aHand > + "Pop up the receiver as balloon help for the given hand" > + > + #(bottomLeft bottomRight topLeft topRight) detect: > [:nextOrientation | > + self orientation: nextOrientation. > + self move: point. > + self bounds: (self bounds translatedToBeWithin: aHand > world bounds). > + (self bounds perform: self orientation) = point] ifNone: > ["Keep last try."]. > + > + aHand world addMorphFront: self. > + aHand balloonHelp: self.! > > Item was added: > + ----- Method: NewBalloonMorph>>popUpFor:hand: (in category > 'initialization') ----- > + popUpFor: aMorph hand: aHand > + "Pop up the receiver as balloon help for the given hand" > + > + self balloonOwner: aMorph. > + self popUpForHand: aHand.! > > Item was added: > + ----- Method: NewBalloonMorph>>popUpForHand: (in category > 'initialization') ----- > + popUpForHand: aHand > + > + self popUpAt: aHand position forHand: aHand.! > > Item was added: > + ----- Method: NewBalloonMorph>>setText: (in category 'initialization') > ----- > + setText: stringOrText > + > + | text | > + text := stringOrText asText. > + text addAttribute: (TextFontReference toFont: (self balloonOwner > ifNil: [BalloonMorph]) balloonFont). > + > + self textMorph wrapFlag: false. > + self textMorph newContents: text. > + self textMorph fullBounds. > + > + (self maximumWidth > 0 and: [self textMorph width > self > maximumWidth]) > + ifTrue: [ > + self textMorph > + wrapFlag: true; > + width: self maximumWidth]. > + > + self updateLayout.! > > Item was added: > + ----- Method: NewBalloonMorph>>tailHeight (in category 'geometry') ----- > + tailHeight > + > + ^ 8! > > Item was added: > + ----- Method: NewBalloonMorph>>tailPosition (in category 'geometry') > ----- > + tailPosition > + > + ^ self innerBounds perform: self orientation! > > Item was added: > + ----- Method: NewBalloonMorph>>tailWidth (in category 'geometry') ----- > + tailWidth > + > + ^ 15! > > Item was added: > + ----- Method: NewBalloonMorph>>textMorph (in category 'accessing - ui') > ----- > + textMorph > + > + ^ textMorph! > > Item was added: > + ----- Method: NewBalloonMorph>>updateLayout (in category 'layout') ----- > + updateLayout > + > + self textMorph fullBounds. > + self extent: self textMorph extent + (2* self bubbleInset) + (0 @ > (2*self tailHeight)). > + self textMorph center: self center.! > > Item was added: > + ----- Method: NewBalloonMorph>>verticesForTail (in category 'drawing') > ----- > + verticesForTail > + > + | offset factorX factorY tpos bpos | > + offset := 5 + (self wantsRoundedCorners > + ifTrue: [self class preferredCornerRadius] > + ifFalse: [0]). > + tpos := self tailPosition. > + factorX := tpos x < self center x ifTrue: [1] ifFalse: [-1]. > + factorY := tpos y > self center y ifTrue: [1] ifFalse: [-1]. > + bpos := self bubbleBounds perform: self orientation. > + > + ^ { > + tpos. > + bpos + (((offset + self tailWidth) * factorX) @ (self > borderStyle width negated * factorY)). > + bpos + ((offset * factorX) @ (self borderStyle width > negated * factorY)).}! > > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/594079a3/attachment.htm From eliot.miranda at gmail.com Tue Mar 31 19:17:28 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 31 19:17:33 2015 Subject: [squeak-dev] The Trunk: Morphic-mt.794.mcz In-Reply-To: References: <551a6b4b.d75e8c0a.18b1.4b81SMTPIN_ADDED_MISSING@mx.google.com> Message-ID: I had to manually load an up-to-date Morphic version before the update could succeed cuz MorphicExtras has an extension method on NewBalloonMorph but there's no update map. On Tue, Mar 31, 2015 at 12:15 PM, Eliot Miranda wrote: > I'm getting a failed update: > > This package depends on the following classes: > NewBalloonMorph > You must resolve these dependencies before you will be able to load these > definitions: > NewBalloonMorph>>isBalloonHelp > > latest update: #14275 > > On Tue, Mar 31, 2015 at 2:38 AM, wrote: > >> Marcel Taeumel uploaded a new version of Morphic to project The Trunk: >> http://source.squeak.org/trunk/Morphic-mt.794.mcz >> >> ==================== Summary ==================== >> >> Name: Morphic-mt.794 >> Author: mt >> Time: 31 March 2015, 11:38:42.253 am >> UUID: 765a2201-af4c-0948-b90d-72414d335160 >> Ancestors: Morphic-mt.793 >> >> New-style balloon morph added and used. Can be switched back to old-style >> balloon morphs via preferences. >> >> New-style balloon morphs support: >> - text (not only strings) >> - layouting via text paragraph (not hard-cutted via: #noLineLongerThan:) >> - positioning at current hand position (if not supplied with other >> reference point) >> >> In general, new-style balloon morphs have an improved readability. >> >> =============== Diff against Morphic-mt.793 =============== >> >> Item was changed: >> ----- Method: BalloonMorph class>>string:for:corner: (in category >> 'instance creation') ----- >> string: str for: morph corner: cornerName >> "Make up and return a balloon for morph. Find the quadrant that >> clips the text the least, using cornerName as a tie-breaker. tk >> 9/12/97" >> | tm vertices | >> + tm := self >> + getTextMorph: (str asString withNoLineLongerThan: >> Preferences maxBalloonHelpLineLength) >> + for: morph. >> - tm := self getTextMorph: str for: morph. >> vertices := self getVertices: tm bounds. >> vertices := self >> getBestLocation: vertices >> for: morph >> corner: cornerName. >> ^ self new color: morph balloonColor; >> setVertices: vertices; >> addMorph: tm; >> setTarget: morph! >> >> Item was changed: >> ----- Method: MenuMorph>>showKeyboardHelp (in category 'keystroke >> helpers') ----- >> showKeyboardHelp >> >> | help | >> + help := self balloonMorphClass >> + string: 'Enter text to narrow selection\down to matching >> items ' withCRs >> - help := BalloonMorph >> - string: 'Enter text to\narrow selection down\to matching >> items ' withCRs >> for: self >> corner: #topLeft. >> + help popUpAt: self topCenter forHand: self activeHand! >> - help popUpForHand: self activeHand! >> >> Item was added: >> + ----- Method: Morph>>balloonMorphClass (in category 'halos and balloon >> help') ----- >> + balloonMorphClass >> + >> + ^ NewBalloonMorph useNewBalloonMorph >> + ifTrue: [NewBalloonMorph] >> + ifFalse: [BalloonMorph]! >> >> Item was changed: >> ----- Method: Morph>>showBalloon:hand: (in category 'halos and balloon >> help') ----- >> showBalloon: msgString hand: aHand >> "Pop up a balloon containing the given string, >> first removing any existing BalloonMorphs in the world." >> >> | w balloon h | >> (w := self world) ifNil: [^ self]. >> h := aHand. >> h ifNil:[ >> h := w activeHand]. >> + balloon := self balloonMorphClass >> + string: msgString >> - balloon := BalloonMorph >> - string: (msgString asString withNoLineLongerThan: >> Preferences maxBalloonHelpLineLength) >> for: self balloonHelpAligner. >> balloon popUpFor: self hand: h.! >> >> Item was added: >> + Morph subclass: #NewBalloonMorph >> + instanceVariableNames: 'balloonOwner textMorph maximumWidth >> orientation hasTail' >> + classVariableNames: 'UseNewBalloonMorph' >> + poolDictionaries: '' >> + category: 'Morphic-Widgets'! >> + >> + !NewBalloonMorph commentStamp: 'mt 3/31/2015 10:15' prior: 0! >> + A balloon is a bubble with an optional tail. It contains rich text, >> which describes something about its balloon-owner.! >> >> Item was added: >> + ----- Method: NewBalloonMorph class>>string:for: (in category 'instance >> creation') ----- >> + string: str for: morph >> + >> + ^ self string: str for: morph corner: #bottomLeft! >> >> Item was added: >> + ----- Method: NewBalloonMorph class>>string:for:corner: (in category >> 'instance creation') ----- >> + string: message for: morph corner: symbol >> + >> + ^ self new >> + balloonOwner: morph; >> + setText: message; >> + orientation: symbol; >> + yourself! >> >> Item was added: >> + ----- Method: NewBalloonMorph class>>useNewBalloonMorph (in category >> 'preferences') ----- >> + useNewBalloonMorph >> + >> + > + category: #Morphic >> + description: 'The new-style balloon morphs are improved >> for better reading quality and support rich text.' >> + type: #Boolean> >> + ^ UseNewBalloonMorph ifNil: [true]! >> >> Item was added: >> + ----- Method: NewBalloonMorph class>>useNewBalloonMorph: (in category >> 'preferences') ----- >> + useNewBalloonMorph: aBoolean >> + >> + UseNewBalloonMorph := aBoolean.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>balloonOwner (in category 'accessing') >> ----- >> + balloonOwner >> + >> + ^ balloonOwner! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>balloonOwner: (in category 'accessing') >> ----- >> + balloonOwner: aMorph >> + >> + balloonOwner := aMorph.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>bubbleBounds (in category 'geometry') >> ----- >> + bubbleBounds >> + >> + ^ self bounds insetBy: (0 @ self tailHeight corner: 0 @ self >> tailHeight)! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>bubbleInset (in category 'geometry') >> ----- >> + bubbleInset >> + >> + ^ 5@2! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>defaultBorderColor (in category >> 'initialization') ----- >> + defaultBorderColor >> + >> + ^ self defaultColor muchDarker"Color black"! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>defaultBorderWidth (in category >> 'initialization') ----- >> + defaultBorderWidth >> + >> + ^ 1! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>defaultColor (in category >> 'initialization') ----- >> + defaultColor >> + >> + ^ BalloonMorph balloonColor! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>drawDropShadowOn: (in category >> 'drawing') ----- >> + drawDropShadowOn: aCanvas >> + >> + aCanvas >> + translateBy: self shadowOffset >> + during: [ :shadowCanvas | >> + (shadowCanvas isVisible: self bubbleBounds) >> ifTrue: [ >> + self wantsRoundedCorners >> + ifTrue: [shadowCanvas >> fillRoundRect: self bubbleBounds radius: self class preferredCornerRadius >> fillStyle: self shadowColor] >> + ifFalse: [shadowCanvas >> fillRectangle: self bubbleBounds fillStyle: self shadowColor]]. >> + >> + self hasTail ifTrue: [ >> + shadowCanvas >> + drawPolygon: self >> verticesForTail >> + fillStyle: self >> shadowColor]]. >> + >> + ! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>drawOn: (in category 'drawing') ----- >> + drawOn: aCanvas >> + >> + "Bubble." >> + self wantsRoundedCorners >> + ifTrue: [aCanvas >> + frameAndFillRoundRect: self bubbleBounds >> + radius: self class preferredCornerRadius >> fillStyle: self fillStyle borderWidth: self borderStyle width borderColor: >> self borderStyle color] >> + ifFalse: [aCanvas >> + fillRectangle: self bubbleBounds >> + fillStyle: self fillStyle borderStyle: self >> borderStyle]. >> + >> + "Tail." >> + self hasTail ifTrue: [ >> + self verticesForTail in: [:points | >> + | pixelOffset | >> + pixelOffset := points first y < points second y >> + ifFalse: [points first x < points second x >> + ifTrue: [self borderStyle width >> negated @ self borderStyle width] "bottomLeft" >> + ifFalse: [self borderStyle width >> @ self borderStyle width]] "bottomRight" >> + ifTrue: [points first x < points second x >> + ifTrue: [self borderStyle width >> negated @ self borderStyle width negated] "topLeft" >> + ifFalse: [self borderStyle width >> @ self borderStyle width negated]]. "topRight" >> + >> + aCanvas >> + drawPolygon: points >> + fillStyle: self fillStyle. >> + aCanvas >> + line: points first >> + to: points second + pixelOffset >> + width: self borderStyle width >> + color: self borderStyle color. >> + aCanvas >> + line: points first >> + to: points third + pixelOffset >> + width: self borderStyle width >> + color: self borderStyle color]]! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>hasTail (in category 'accessing') ----- >> + hasTail >> + >> + ^ hasTail ifNil: [true]! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>hasTail: (in category 'accessing') ----- >> + hasTail: aBoolean >> + >> + hasTail := aBoolean.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>initialize (in category >> 'initialization') ----- >> + initialize >> + >> + super initialize. >> + >> + self >> + borderWidth: self defaultBorderWidth; >> + borderColor: self defaultBorderColor; >> + color: (self defaultColor alpha: 1.0); "no alpha due to >> drop shadow" >> + hasDropShadow: true; >> + shadowOffset: 1@1; >> + shadowColor: (self color muchDarker muchDarker alpha: >> 0.333); >> + orientation: #bottomLeft. >> + >> + MenuMorph roundedMenuCorners >> + ifTrue: [self cornerStyle: #rounded]. >> + >> + textMorph := TextMorph new >> + wrapFlag: false; >> + lock; >> + yourself. >> + >> + self addMorph: textMorph.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>maximumWidth (in category 'accessing') >> ----- >> + maximumWidth >> + >> + ^ maximumWidth ifNil: [ >> + maximumWidth := (self balloonOwner balloonFont widthOf: >> $m) * Preferences maxBalloonHelpLineLength]! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>maximumWidth: (in category 'accessing') >> ----- >> + maximumWidth: anInteger >> + >> + maximumWidth := anInteger.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>morphicLayerNumber (in category 'WiW >> support') ----- >> + morphicLayerNumber >> + >> + "helpful for insuring some morphs always appear in front of or >> behind others. >> + smaller numbers are in front" >> + >> + ^5 "Balloons are very front-like things"! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>move: (in category 'geometry') ----- >> + move: targetPoint >> + >> + self perform: (self orientation, #:) asSymbol with: targetPoint.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>orientation (in category 'accessing') >> ----- >> + orientation >> + "Encodes the position of the tail. #topLeft, #topRight, >> #bottomLeft, #bottomRight" >> + >> + ^ orientation! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>orientation: (in category 'accessing') >> ----- >> + orientation: aSymbol >> + >> + orientation := aSymbol. >> + self changed.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>popUpAt:forHand: (in category >> 'initialization') ----- >> + popUpAt: point forHand: aHand >> + "Pop up the receiver as balloon help for the given hand" >> + >> + #(bottomLeft bottomRight topLeft topRight) detect: >> [:nextOrientation | >> + self orientation: nextOrientation. >> + self move: point. >> + self bounds: (self bounds translatedToBeWithin: aHand >> world bounds). >> + (self bounds perform: self orientation) = point] ifNone: >> ["Keep last try."]. >> + >> + aHand world addMorphFront: self. >> + aHand balloonHelp: self.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>popUpFor:hand: (in category >> 'initialization') ----- >> + popUpFor: aMorph hand: aHand >> + "Pop up the receiver as balloon help for the given hand" >> + >> + self balloonOwner: aMorph. >> + self popUpForHand: aHand.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>popUpForHand: (in category >> 'initialization') ----- >> + popUpForHand: aHand >> + >> + self popUpAt: aHand position forHand: aHand.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>setText: (in category 'initialization') >> ----- >> + setText: stringOrText >> + >> + | text | >> + text := stringOrText asText. >> + text addAttribute: (TextFontReference toFont: (self balloonOwner >> ifNil: [BalloonMorph]) balloonFont). >> + >> + self textMorph wrapFlag: false. >> + self textMorph newContents: text. >> + self textMorph fullBounds. >> + >> + (self maximumWidth > 0 and: [self textMorph width > self >> maximumWidth]) >> + ifTrue: [ >> + self textMorph >> + wrapFlag: true; >> + width: self maximumWidth]. >> + >> + self updateLayout.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>tailHeight (in category 'geometry') ----- >> + tailHeight >> + >> + ^ 8! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>tailPosition (in category 'geometry') >> ----- >> + tailPosition >> + >> + ^ self innerBounds perform: self orientation! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>tailWidth (in category 'geometry') ----- >> + tailWidth >> + >> + ^ 15! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>textMorph (in category 'accessing - ui') >> ----- >> + textMorph >> + >> + ^ textMorph! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>updateLayout (in category 'layout') ----- >> + updateLayout >> + >> + self textMorph fullBounds. >> + self extent: self textMorph extent + (2* self bubbleInset) + (0 >> @ (2*self tailHeight)). >> + self textMorph center: self center.! >> >> Item was added: >> + ----- Method: NewBalloonMorph>>verticesForTail (in category 'drawing') >> ----- >> + verticesForTail >> + >> + | offset factorX factorY tpos bpos | >> + offset := 5 + (self wantsRoundedCorners >> + ifTrue: [self class preferredCornerRadius] >> + ifFalse: [0]). >> + tpos := self tailPosition. >> + factorX := tpos x < self center x ifTrue: [1] ifFalse: [-1]. >> + factorY := tpos y > self center y ifTrue: [1] ifFalse: [-1]. >> + bpos := self bubbleBounds perform: self orientation. >> + >> + ^ { >> + tpos. >> + bpos + (((offset + self tailWidth) * factorX) @ (self >> borderStyle width negated * factorY)). >> + bpos + ((offset * factorX) @ (self borderStyle width >> negated * factorY)).}! >> >> >> > > > -- > best, > Eliot > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/64d7a7c6/attachment.htm From commits at source.squeak.org Tue Mar 31 19:26:49 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:26:53 2015 Subject: [squeak-dev] The Trunk: Compiler.spur-cmm.297.mcz Message-ID: Eliot Miranda uploaded a new version of Compiler to project The Trunk: http://source.squeak.org/trunk/Compiler.spur-cmm.297.mcz ==================== Summary ==================== Name: Compiler.spur-cmm.297 Author: eem Time: 31 March 2015, 12:25:49.948 pm UUID: 58cc8d2f-f0e7-40f5-be84-6e52191beb3d Ancestors: Compiler-cmm.297, Compiler.spur-topa.296 Compiler-cmm.297 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 DoIt evaluation in the debugger needs to be from the selected Context's methodClass, not the receiver's class so that "super" will refer to the correct class. =============== Diff against Compiler-cmm.297 =============== Item was changed: ----- Method: BytecodeEncoder>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex + numArgs > 15 ifTrue: + [^self error: 'Cannot compile -- too many arguments']. + numTemps > 63 ifTrue: + [^self error: 'Cannot compile -- too many temporary variables']. + numLits > 65535 ifTrue: + [^self error: 'Cannot compile -- too many literals']. + ^(CompiledMethod headerFlagForEncoder: self) + + (numArgs bitShift: 24) + + (numTemps bitShift: 18) + "+ (largeBit bitShift: 17)" "largeBit gets filled in later" + + (primitiveIndex > 0 ifTrue: [1 bitShift: 16] ifFalse: [0]) + + numLits! - "Compute the compiled method header that encodes the arguments - in the receiver's header format (see CompiledMehtod's class comment)." - self subclassResponsibility! Item was removed: - ----- Method: EncoderForV3>>computeMethodHeaderForNumArgs:numTemps:numLits:primitive: (in category 'method generation') ----- - computeMethodHeaderForNumArgs: numArgs numTemps: numTemps numLits: numLits primitive: primitiveIndex - | primBits | - numTemps > 63 ifTrue: - [^self error: 'Cannot compile -- too many temporary variables']. - numLits > 255 ifTrue: - [^self error: 'Cannot compile -- too many literals']. - primBits := primitiveIndex <= 16r1FF - ifTrue: [primitiveIndex] - ifFalse: "For now the high bit of primitive no. is in the 29th bit of header" - [primitiveIndex > 16r3FF ifTrue: [self error: 'prim num too large']. - (primitiveIndex bitAnd: 16r1FF) + ((primitiveIndex bitAnd: 16r200) bitShift: 19)]. - ^(numArgs bitShift: 24) - + (numTemps bitShift: 18) - "+ (largeBit bitShift: 17)" "largeBit gets filled in later" - + (numLits bitShift: 9) - + primBits! Item was changed: ----- Method: EncoderForV3PlusClosures class>>bytecodeSize: (in category 'instruction stream support') ----- bytecodeSize: bytecode "Answer the number of bytes in the bytecode." bytecode <= 125 ifTrue: [^1]. bytecode >= 176 ifTrue: [^1]. bytecode >= 160 ifTrue: "long jumps" [^2]. bytecode >= 144 ifTrue: "short jumps" [^1]. "extensions" bytecode >= 128 ifTrue: + [^#(2 2 2 2 3 2 2 1 1 1 2 3 3 3 3 4) at: bytecode - 127]. - [^#(2 2 2 2 3 2 2 1 1 1 2 nil 3 3 3 4) at: bytecode - 127]. ^nil! Item was added: + ----- Method: EncoderForV3PlusClosures class>>callPrimitiveCode (in category 'bytecode decoding') ----- + callPrimitiveCode + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + ^139! Item was added: + ----- Method: EncoderForV3PlusClosures>>genCallPrimitive: (in category 'bytecode generation') ----- + genCallPrimitive: primitiveIndex + "139 11101111 iiiiiiii jjjjjjjj Call Primitive #iiiiiiii + (jjjjjjjj * 256)" + (primitiveIndex < 1 or: [primitiveIndex > 65535]) ifTrue: + [self outOfRangeError: 'primitive index' index: primitiveIndex range: 1 to: 65535]. + stream + nextPut: 139; + nextPut: (primitiveIndex bitAnd: 255); + nextPut: (primitiveIndex bitShift: -8)! Item was changed: ----- Method: MethodNode>>generate:using: (in category 'code generation') ----- generate: trailer using: aCompiledMethodClass "The receiver is the root of a parse tree. Answer an instance of aCompiledMethodClass. The argument, trailer, is arbitrary but is typically either the reference to the source code that is stored with every CompiledMethod, or an encoding of the method's temporary names." + | primErrNode blkSize nLits locals literals stack header method | - | primErrNode blkSize nLits literals stack method | self generate: trailer using: aCompiledMethodClass ifQuick: [:m | encoder noteBlockExtent: (0 to: 2) hasLocals: arguments. m literalAt: 2 put: encoder associationForClass; properties: properties. ^m]. primErrNode := self primitiveErrorVariableName ifNotNil: [encoder fixTemp: self primitiveErrorVariableName]. + self ensureClosureAnalysisDone. + encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:" - encoder supportsClosureOpcodes ifTrue: - [self ensureClosureAnalysisDone. - encoder rootNode: self. "this is for BlockNode>>sizeCodeForClosureValue:"]. blkSize := (block sizeCodeForEvaluatedValue: encoder) + + (primitive > 0 + ifTrue: [encoder sizeCallPrimitive: primitive] + ifFalse: [0]) + (primErrNode ifNil: [0] ifNotNil: [primErrNode index: arguments size + temporaries size; sizeCodeForStore: encoder "The VM relies on storeIntoTemp: (129)"]). + locals := arguments, temporaries, (primErrNode ifNil: [#()] ifNotNil: [{primErrNode}]). + encoder noteBlockExtent: block blockExtent hasLocals: locals. + header := encoder computeMethodHeaderForNumArgs: arguments size + numTemps: locals size + numLits: (nLits := (literals := encoder allLiterals) size) + primitive: primitive. + method := trailer + createMethod: blkSize + class: aCompiledMethodClass + header: header. - method := aCompiledMethodClass - newBytes: blkSize - trailerBytes: trailer - nArgs: arguments size - nTemps: (encoder supportsClosureOpcodes - ifTrue: [| locals | - locals := arguments, - temporaries, - (primErrNode - ifNil: [#()] - ifNotNil: [{primErrNode}]). - encoder - noteBlockExtent: block blockExtent - hasLocals: locals. - locals size] - ifFalse: [encoder maxTemp]) - nStack: 0 - nLits: (nLits := (literals := encoder allLiterals) size) - primitive: primitive. - nLits > 255 ifTrue: - [^self error: 'Too many literals referenced']. 1 to: nLits do: [:lit | method literalAt: lit put: (literals at: lit)]. encoder streamToMethod: method. stack := ParseStack new init. + primitive > 0 ifTrue: + [encoder genCallPrimitive: primitive. + primErrNode ifNotNil: + [primErrNode emitCodeForStore: stack encoder: encoder]]. - primErrNode ifNotNil: [primErrNode emitCodeForStore: stack encoder: encoder]. stack position: method numTemps. [block emitCodeForEvaluatedValue: stack encoder: encoder] on: Error "If an attempt is made to write too much code the method will be asked" do: [:ex| "to grow, and the grow attempt will fail in CompiledMethod class>>#new:" ex signalerContext sender method = (CompiledMethod class>>#new:) ifTrue: [^self error: 'Compiler code size discrepancy'] ifFalse: [ex pass]]. stack position ~= (method numTemps + 1) ifTrue: [^self error: 'Compiler stack discrepancy']. encoder methodStreamPosition ~= (method size - trailer size) ifTrue: [^self error: 'Compiler code size discrepancy']. method needsFrameSize: stack size - method numTemps. method properties: properties. ^method! From commits at source.squeak.org Tue Mar 31 19:26:51 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:26:58 2015 Subject: [squeak-dev] The Trunk: Collections.spur-mt.605.mcz Message-ID: Eliot Miranda uploaded a new version of Collections to project The Trunk: http://source.squeak.org/trunk/Collections.spur-mt.605.mcz ==================== Summary ==================== Name: Collections.spur-mt.605 Author: eem Time: 31 March 2015, 12:25:37.96 pm UUID: abbeed47-9ec6-475f-8446-bb1ab0135cbf Ancestors: Collections-mt.605, Collections.spur-ul.604 Collections-mt.605 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Support #withBlanksTrimmed in texts. =============== Diff against Collections-mt.605 =============== Item was changed: ----- Method: Array>>elementsExchangeIdentityWith: (in category 'converting') ----- elementsExchangeIdentityWith: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + At the same time, all pointers to the elements of otherArray are replaced by + pointers to the corresponding elements of this array. The identityHashes remain + with the pointers rather than with the objects so that objects in hashed structures + should still be properly indexed after the mutation." - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. At the same time, all pointers to the elements of otherArray are replaced by pointers to the corresponding elements of this array. The identityHashes remain with the pointers rather than with the objects so that objects in hashed structures should still be properly indexed after the mutation." + + ec == #'bad receiver' ifTrue: + [^self error: 'receiver must be of class Array']. + ec == #'bad argument' ifTrue: + [^self error: (otherArray class == Array + ifTrue: ['arg must be of class Array'] + ifFalse: ['receiver and argument must have the same size'])]. + ec == #'inappropriate operation' ifTrue: + [^self error: 'can''t become immediates such as SmallIntegers or Characters']. + ec == #'no modification' ifTrue: + [^self error: 'can''t become immutable objects']. + ec == #'object is pinned' ifTrue: + [^self error: 'can''t become pinned objects']. + ec == #'insufficient object memory' ifTrue: + [Smalltalk garbageCollect < 1048576 ifTrue: + [Smalltalk growMemoryByAtLeast: 1048576]. + ^self elementsExchangeIdentityWith: otherArray]. + self primitiveFailed! - - otherArray class == Array ifFalse: [^ self error: 'arg must be array']. - self size = otherArray size ifFalse: [^ self error: 'arrays must be same size']. - (self anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - (otherArray anySatisfy: [:obj | obj class == SmallInteger]) ifTrue: [^ self error: 'can''t become SmallIntegers']. - self with: otherArray do:[:a :b| a == b ifTrue:[^self error:'can''t become yourself']]. - - "Must have failed because not enough space in forwarding table (see ObjectMemory-prepareForwardingTableForBecoming:with:twoWay:). Do GC and try again only once" - (Smalltalk bytesLeft: true) = Smalltalk primitiveGarbageCollect - ifTrue: [^ self primitiveFailed]. - ^ self elementsExchangeIdentityWith: otherArray! Item was changed: ----- Method: Array>>elementsForwardIdentityTo: (in category 'converting') ----- elementsForwardIdentityTo: otherArray + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + The identityHashes remain with the pointers rather than with the objects so that + the objects in this array should still be properly indexed in any existing hashed + structures after the mutation." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ----- Method: Array>>elementsForwardIdentityTo:copyHash: (in category 'converting') ----- elementsForwardIdentityTo: otherArray copyHash: copyHash + "This primitive performs a bulk mutation, causing all pointers to the elements of the + receiver to be replaced by pointers to the corresponding elements of otherArray. + If copyHash is true, the identityHashes remain with the pointers rather than with the + objects so that the objects in the receiver should still be properly indexed in any + existing hashed structures after the mutation. If copyHash is false, then the hashes + of the objects in otherArray remain unchanged. If you know what you're doing this + may indeed be what you want." + - "This primitive performs a bulk mutation, causing all pointers to the elements of this array to be replaced by pointers to the corresponding elements of otherArray. The identityHashes remain with the pointers rather than with the objects so that the objects in this array should still be properly indexed in any existing hashed structures after the mutation." - self primitiveFailed! Item was changed: ==== ERROR === Error: Unrecognized class type 31 March 2015 7:26:49.296 pm VM: unix - a SmalltalkImage Image: Squeak3.11alpha [latest update: #8824] SecurityManager state: Restricted: false FileAccess: true SocketAccess: true Working Dir /home/squeaksource Trusted Dir /home/squeaksource/secure Untrusted Dir /home/squeaksource/My Squeak MCClassDefinition(Object)>>error: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: aString: 'Unrecognized class type' Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>kindOfSubclass Receiver: a MCClassDefinition(Character) Arguments and temporary variables: Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil MCClassDefinition>>printDefinitionOn: Receiver: a MCClassDefinition(Character) Arguments and temporary variables: stream: a WriteStream Receiver's instance variables: name: #Character superclassName: #Magnitude variables: an OrderedCollection(a MCClassVariableDefinition(CharacterTable) a M...etc... category: #'Collections-Strings' type: #immediate comment: 'I represent a character by storing its associated Unicode as an unsig...etc... commentStamp: 'eem 8/12/2014 14:53' traitComposition: nil classTraitComposition: nil [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: Receiver: a MCDiffyTextWriter Arguments and temporary variables: definition: a WriteStream s: a MCClassDefinition(Character) Receiver's instance variables: stream: a WriteStream initStream: nil --- The full stack --- MCClassDefinition(Object)>>error: MCClassDefinition>>kindOfSubclass MCClassDefinition>>printDefinitionOn: [] in MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>chunkContents: MCDiffyTextWriter(MCStWriter)>>writeClassDefinition: MCDiffyTextWriter(MCStWriter)>>visitClassDefinition: MCClassDefinition>>accept: [] in MCDiffyTextWriter(MCTextWriter)>>visitInFork: String class(SequenceableCollection class)>>new:streamContents: String class(SequenceableCollection class)>>streamContents: MCDiffyTextWriter(MCTextWriter)>>visitInFork: MCDiffyTextWriter>>writePatchFrom:to: MCDiffyTextWriter>>writeModification: [] in MCDiffyTextWriter>>writePatch: SortedCollection(OrderedCollection)>>do: MCDiffyTextWriter>>writePatch: SSDiffyTextWriter>>writePatch: [] in SSDiffyTextWriter>>writeVersion:for: BlockClosure>>on:do: SSDiffyTextWriter>>writeVersion:for: [] in SSEMailSubscription>>versionAdded:to: BlockClosure>>on:do: SSEMailSubscription>>versionAdded:to: [] in [] in SSProject>>versionAdded: [] in BlockClosure>>newProcess From commits at source.squeak.org Tue Mar 31 19:28:53 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:28:56 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.709.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.709.mcz ==================== Summary ==================== Name: System.spur-eem.709 Author: eem Time: 31 March 2015, 12:25:57.529 pm UUID: 4e41387e-7f09-4378-8a19-804d385d5263 Ancestors: System-eem.709, System.spur-eem.708 System-eem.709 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Fix breakpoint source when pragmas follow temporaries. =============== Diff against System-eem.709 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>primBytesLeft (in category 'memory space') ----- primBytesLeft + "Primitive. Answer the number of free bytes available in old space. + Not accurate unless preceded by - "Primitive. Answer the number of bytes available for new object data. - Not accurate unless preceded by Smalltalk garbageCollectMost (for reasonable accuracy), or Smalltalk garbageCollect (for real accuracy). + See Object documentation whatIsAPrimitive." - See Object documentation whatIsAPrimitive." + ^0! - ^ 0! Item was changed: ----- Method: SmalltalkImage>>primitiveGarbageCollect (in category 'memory space') ----- primitiveGarbageCollect + "Primitive. Reclaims all garbage and answers the size of the largest free chunk in old space.." - "Primitive. Reclaims all garbage and answers the number of bytes of available space." + ^self primitiveFailed! - ^ self primBytesLeft! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Mar 31 19:29:12 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:29:16 2015 Subject: [squeak-dev] The Trunk: System.spur-topa.710.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-topa.710.mcz ==================== Summary ==================== Name: System.spur-topa.710 Author: eem Time: 31 March 2015, 12:26:03.003 pm UUID: 78394cd0-4cdb-4fb3-8aa5-2bdb15264a16 Ancestors: System-topa.710, System.spur-eem.709 System-topa.710 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Port the wrapping breakpoint implementation from OB-SUnitintegration. (An addition to BreakPoint, no replacement) =============== Diff against System-topa.710 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>primBytesLeft (in category 'memory space') ----- primBytesLeft + "Primitive. Answer the number of free bytes available in old space. + Not accurate unless preceded by - "Primitive. Answer the number of bytes available for new object data. - Not accurate unless preceded by Smalltalk garbageCollectMost (for reasonable accuracy), or Smalltalk garbageCollect (for real accuracy). + See Object documentation whatIsAPrimitive." - See Object documentation whatIsAPrimitive." + ^0! - ^ 0! Item was changed: ----- Method: SmalltalkImage>>primitiveGarbageCollect (in category 'memory space') ----- primitiveGarbageCollect + "Primitive. Reclaims all garbage and answers the size of the largest free chunk in old space.." - "Primitive. Reclaims all garbage and answers the number of bytes of available space." + ^self primitiveFailed! - ^ self primBytesLeft! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Mar 31 19:29:32 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:29:34 2015 Subject: [squeak-dev] The Trunk: System.spur-cmm.711.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-cmm.711.mcz ==================== Summary ==================== Name: System.spur-cmm.711 Author: eem Time: 31 March 2015, 12:25:51.193 pm UUID: a180405a-b76c-4bae-9368-62b3ce2780df Ancestors: System-cmm.711 System-cmm.711 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 - Log filed-in code to the changes file. =============== Diff against System-cmm.711 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>primBytesLeft (in category 'memory space') ----- primBytesLeft + "Primitive. Answer the number of free bytes available in old space. + Not accurate unless preceded by - "Primitive. Answer the number of bytes available for new object data. - Not accurate unless preceded by Smalltalk garbageCollectMost (for reasonable accuracy), or Smalltalk garbageCollect (for real accuracy). + See Object documentation whatIsAPrimitive." - See Object documentation whatIsAPrimitive." + ^0! - ^ 0! Item was changed: ----- Method: SmalltalkImage>>primitiveGarbageCollect (in category 'memory space') ----- primitiveGarbageCollect + "Primitive. Reclaims all garbage and answers the size of the largest free chunk in old space.." - "Primitive. Reclaims all garbage and answers the number of bytes of available space." + ^self primitiveFailed! - ^ self primBytesLeft! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Mar 31 19:30:06 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 19:30:08 2015 Subject: [squeak-dev] The Trunk: System.spur-eem.712.mcz Message-ID: Eliot Miranda uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System.spur-eem.712.mcz ==================== Summary ==================== Name: System.spur-eem.712 Author: eem Time: 31 March 2015, 12:26:00.126 pm UUID: c8b167ff-cab3-4623-8f64-3e6b1e20ee62 Ancestors: System-eem.712, System.spur-cmm.711 System-eem.712 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Fix allStoresInto: for pool variables. Shared pools are inherited and don't have to be declared in each subclass. =============== Diff against System-eem.712 =============== Item was removed: - Object subclass: #ObjectHistory - instanceVariableNames: 'marks markProcess' - classVariableNames: 'Current' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistory commentStamp: 'bf 11/16/2012 12:19' prior: 0! - ObjectHistory holds ObjectHistoryMark objects which are placed in the object memory at regular intervals by its markProcess in the background. Adjacent marks (with no remaining objects inbetween) are coalesced so over time the collection does not grow unnecessarily large. - - Using these markers it is possible to determine the age of objects in memory from the time the ObjectHistory was initialized. Try e.g.: - self oopTimestamp. - self oopAge. - ObjectHistory current oopClassesByDate. - - Instance Variables - marks: SortedCollection of ObjectHistoryMark objects - markProcess: a Process running our markLoop - ! Item was removed: - ----- Method: ObjectHistory class>>current (in category 'accessing') ----- - current - ^ Current ifNil: [Current := self new]! Item was removed: - ----- Method: ObjectHistory class>>initialize (in category 'class initialization') ----- - initialize - self current. - ! Item was removed: - ----- Method: ObjectHistory class>>obsolete (in category 'class initialization') ----- - obsolete - "Kill the mark process before removing the class." - Current ifNotNil: - [:objectHistory| - objectHistory terminate]. - super obsolete! Item was removed: - ----- Method: ObjectHistory>>ageOf: (in category 'queries') ----- - ageOf: anObject - "Age of anObject in seconds" - | timestamp | - timestamp := self timestampOf: anObject. - timestamp ifNil: [^0]. - ^(DateAndTime now - timestamp) asSeconds roundTo: self markRate! Item was removed: - ----- Method: ObjectHistory>>initialize (in category 'initializing') ----- - initialize - self restartMarkProcess. - - ! Item was removed: - ----- Method: ObjectHistory>>markLoop (in category 'marking') ----- - markLoop - [true] whileTrue: [ - self markUpdate. - (Delay forSeconds: self markRate) wait]! Item was removed: - ----- Method: ObjectHistory>>markRate (in category 'marking') ----- - markRate - "rate of creating ObjectHistoryMarks" - ^60! Item was removed: - ----- Method: ObjectHistory>>markUpdate (in category 'marking') ----- - markUpdate - "Add a new mark and compact the marks collection" - | mark prev | - "lazy init so this happens in the background process" - marks ifNil: [self reinitMarks]. - "add new mark to object memory" - mark := self newMark. - mark timestamp <= marks last timestamp ifTrue: [^self "could happen if clock is wrong"]. - marks addLast: mark. - "compact the table by removing adjacent marks" - prev := marks first. - marks removeAllSuchThat: [:each | | doDelete | - doDelete := prev objectAfter == each. - prev := each. - doDelete]. - "The loop above is O(n) in number of marks, but that number should never become so large to be an issue. Even if the number was large, this is running at system background priority so should not interfere with any user process, not even user background processes. The symptom should only be that the system is less idle. - - If we ever get to a point where the number of marks is an issue then the compacting here could be made partial: since old marks rarely get coalesced it would make sense to only check the newer ones often, and the old ones perhaps only at the system startup."! Item was removed: - ----- Method: ObjectHistory>>newMark (in category 'private') ----- - newMark - ^ ObjectHistoryMark new! Item was removed: - ----- Method: ObjectHistory>>oopClassesByAge (in category 'stats') ----- - oopClassesByAge - "Answer collection of (oopAge in seconds -> sorted counts of object classes) sorted from lowest age" - "ObjectHistory current oopClassesByAge" - - | stats prev endOfMemory now bag age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - bag := Bag new. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> bag sortedCounts]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopClassesByDate (in category 'stats') ----- - oopClassesByDate - "Answer collection of (Date -> sorted counts of object classes) sorted from newest date" - "ObjectHistory current oopClassesByDate" - - | stats prev endOfMemory bag date obj thisDate | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - thisDate := nil. - bag := Bag new. - marks do: [:mark | - prev ifNotNil: [ - obj := prev objectAfter. - [obj == mark] whileFalse: [ - bag add: obj class. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - date := mark timestamp asDate. - thisDate = date ifFalse: [ - stats addFirst: date -> bag sortedCounts. - bag := Bag new. - thisDate := date]]. - prev := mark]. - thisDate = date ifFalse: [ - stats addLast: date -> bag sortedCounts]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>oopCountsByAge (in category 'stats') ----- - oopCountsByAge - "Answer collection of (oopAge in seconds -> number of objects) sorted from lowest age" - "ObjectHistory current oopCountsByAge" - - | stats prev endOfMemory now n age obj | - endOfMemory := Object new. - stats := OrderedCollection new: 1000. - prev := nil. - now := self newMark timestamp. - marks do: [:mark | - prev ifNotNil: [ - n := 0. - obj := prev objectAfter. - [obj == mark] whileFalse: [ - n := n + 1. - obj := obj nextObject. - obj == endOfMemory ifTrue: [self error: 'should not happen']]. - age := (now - mark timestamp) asSeconds roundTo: self markRate. - stats addFirst: age -> n]. - prev := mark]. - ^ stats - ! Item was removed: - ----- Method: ObjectHistory>>reinitMarks (in category 'private') ----- - reinitMarks - marks := ObjectHistoryMark allInstances asOrderedCollection. - marks - ifEmpty: [marks add: self newMark] - ifNotEmpty: [ | prev | - prev := nil. - marks removeAllSuchThat: [:obj | - prev notNil and: [prev timestamp >= obj timestamp]]]. - ! Item was removed: - ----- Method: ObjectHistory>>restartMarkProcess (in category 'marking') ----- - restartMarkProcess - markProcess ifNotNil: [markProcess terminate]. - markProcess := [self markLoop] - forkAt: Processor systemBackgroundPriority - named: 'ObjectHistory''s markProcess'. - ! Item was removed: - ----- Method: ObjectHistory>>terminate (in category 'private') ----- - terminate - markProcess ifNotNil: - [markProcess terminate]! Item was removed: - ----- Method: ObjectHistory>>timestampOf: (in category 'queries') ----- - timestampOf: anObject - "Timestamp of anObject, or nil if too new" - | endOfMemory mark | - anObject class == SmallInteger ifTrue: [^nil]. - mark := anObject. - endOfMemory := Object new. - [mark class == ObjectHistoryMark] whileFalse: [ - mark := mark nextObject. - mark == endOfMemory ifTrue: [^nil]]. - ^mark timestamp! Item was removed: - Object subclass: #ObjectHistoryMark - instanceVariableNames: 'timestamp' - classVariableNames: '' - poolDictionaries: '' - category: 'System-Support'! - - !ObjectHistoryMark commentStamp: 'bf 11/7/2012 00:12' prior: 0! - An ObjectHistoryMark is a permanent mark in the object memory. It holds a timestamp. - - While the timestamp could be used directly as mark by ObjectHistory, it's conceivable that its format might change in the future, and we do not want the mark's relative position in memory to change (which would be the case if it was migrated to a new format). So we use a distinct object instead (and we protect it against accidental become-ing by overriding those methods).! Item was removed: - ----- Method: ObjectHistoryMark>>become: (in category 'mutating') ----- - become: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>becomeForward: (in category 'mutating') ----- - becomeForward: otherObject - ^self error: 'marks need to stay fixed in the object memory'! Item was removed: - ----- Method: ObjectHistoryMark>>initialize (in category 'initialization') ----- - initialize - timestamp := DateAndTime now floor. - ! Item was removed: - ----- Method: ObjectHistoryMark>>objectAfter (in category 'accessing') ----- - objectAfter - "Answer the next object in memory after me and my timestamp" - | successor | - successor := self nextObject. - successor == timestamp - ifTrue: [successor := successor nextObject]. - ^ successor! Item was removed: - ----- Method: ObjectHistoryMark>>printOn: (in category 'printing') ----- - printOn: aStream - aStream - nextPutAll: self class name; - nextPut: $(; - print: timestamp; - nextPut: $)! Item was removed: - ----- Method: ObjectHistoryMark>>timestamp (in category 'accessing') ----- - timestamp - ^timestamp - ! Item was changed: ----- Method: SmalltalkImage>>compactClassesArray (in category 'special objects') ----- compactClassesArray "Smalltalk compactClassesArray" + "Backward-compatibility support. Spur does not have compact classes." + ^{}! - "Return the array of 31 classes whose instances may be - represented compactly" - ^ self specialObjectsArray at: 29! Item was added: + ----- Method: SmalltalkImage>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Essential. Fail if no memory is available." + + (numBytes isInteger and: [numBytes > 0]) ifTrue: + [OutOfMemory signal]. + ^self primitiveFailed! Item was added: + ----- Method: SmalltalkImage>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was changed: ----- Method: SmalltalkImage>>primBytesLeft (in category 'memory space') ----- primBytesLeft + "Primitive. Answer the number of free bytes available in old space. + Not accurate unless preceded by - "Primitive. Answer the number of bytes available for new object data. - Not accurate unless preceded by Smalltalk garbageCollectMost (for reasonable accuracy), or Smalltalk garbageCollect (for real accuracy). + See Object documentation whatIsAPrimitive." - See Object documentation whatIsAPrimitive." + ^0! - ^ 0! Item was changed: ----- Method: SmalltalkImage>>primitiveGarbageCollect (in category 'memory space') ----- primitiveGarbageCollect + "Primitive. Reclaims all garbage and answers the size of the largest free chunk in old space.." - "Primitive. Reclaims all garbage and answers the number of bytes of available space." + ^self primitiveFailed! - ^ self primBytesLeft! Item was changed: ----- Method: SmalltalkImage>>recreateSpecialObjectsArray (in category 'special objects') ----- recreateSpecialObjectsArray "Smalltalk recreateSpecialObjectsArray" "To external package developers: **** DO NOT OVERRIDE THIS METHOD. ***** If you are writing a plugin and need additional special object(s) for your own use, use addGCRoot() function and use own, separate special objects registry " "The Special Objects Array is an array of objects used by the Squeak virtual machine. Its contents are critical and accesses to it by the VM are unchecked, so don't even think of playing here unless you know what you are doing." | newArray | + newArray := Array new: 60. - newArray := Array new: 58. "Nil false and true get used throughout the interpreter" newArray at: 1 put: nil. newArray at: 2 put: false. newArray at: 3 put: true. "This association holds the active process (a ProcessScheduler)" newArray at: 4 put: (self specialObjectsArray at: 4) "(self bindingOf: #Processor) but it answers an Alias". "Numerous classes below used for type checking and instantiation" newArray at: 5 put: Bitmap. newArray at: 6 put: SmallInteger. newArray at: 7 put: ByteString. newArray at: 8 put: Array. newArray at: 9 put: Smalltalk. + newArray at: 10 put: BoxedFloat64. + newArray at: 11 put: (self globals at: #MethodContext ifAbsent: [self globals at: #Context]). + newArray at: 12 put: nil. "was BlockContext." - newArray at: 10 put: Float. - newArray at: 11 put: MethodContext. - newArray at: 12 put: BlockContext. newArray at: 13 put: Point. newArray at: 14 put: LargePositiveInteger. newArray at: 15 put: Display. newArray at: 16 put: Message. newArray at: 17 put: CompiledMethod. + newArray at: 18 put: ((self specialObjectsArray at: 18) ifNil: [Semaphore new]). "low space Semaphore" - newArray at: 18 put: (self specialObjectsArray at: 18). - "(low space Semaphore)" newArray at: 19 put: Semaphore. newArray at: 20 put: Character. newArray at: 21 put: #doesNotUnderstand:. newArray at: 22 put: #cannotReturn:. newArray at: 23 put: nil. "This is the process signalling low space." "An array of the 32 selectors that are compiled as special bytecodes, paired alternately with the number of arguments each takes." newArray at: 24 put: #( #+ 1 #- 1 #< 1 #> 1 #<= 1 #>= 1 #= 1 #~= 1 #* 1 #/ 1 #\\ 1 #@ 1 #bitShift: 1 #// 1 #bitAnd: 1 #bitOr: 1 #at: 1 #at:put: 2 #size 0 #next 0 #nextPut: 1 #atEnd 0 #== 1 #class 0 #blockCopy: 1 #value 0 #value: 1 #do: 1 #new 0 #new: 1 #x 0 #y 0 ). "An array of the 255 Characters in ascii order. + Cog inlines table into machine code at: prim so do not regenerate it. + This is nil in Spur, which has immediate Characters." - Cog inlines table into machine code at: prim so do not regenerate it." newArray at: 25 put: (self specialObjectsArray at: 25). newArray at: 26 put: #mustBeBoolean. newArray at: 27 put: ByteArray. newArray at: 28 put: Process. + "An array of up to 31 classes whose instances will have compact headers; an empty array in Spur" - "An array of up to 31 classes whose instances will have compact headers" newArray at: 29 put: self compactClassesArray. + newArray at: 30 put: ((self specialObjectsArray at: 30) ifNil: [Semaphore new]). "delay Semaphore" + newArray at: 31 put: ((self specialObjectsArray at: 31) ifNil: [Semaphore new]). "user interrupt Semaphore" - newArray at: 30 put: (self specialObjectsArray at: 30). "(delay Semaphore)" - newArray at: 31 put: (self specialObjectsArray at: 31). "(user interrupt Semaphore)" "Entries 32 - 34 unreferenced. Previously these contained prototype instances to be copied for fast initialization" + newArray at: 32 put: nil. "was the prototype Float" + newArray at: 33 put: nil. "was the prototype 4-byte LargePositiveInteger" + newArray at: 34 put: nil. "was the prototype Point" - newArray at: 32 put: nil. "was (Float new: 2)" - newArray at: 33 put: nil. "was (LargePositiveInteger new: 4)" - newArray at: 34 put: nil. "was Point new" newArray at: 35 put: #cannotInterpret:. + newArray at: 36 put: nil. "was the prototype MethodContext" - "Note: This must be fixed once we start using context prototypes (yeah, right)" - "(MethodContext new: CompiledMethod fullFrameSize)." - newArray at: 36 put: (self specialObjectsArray at: 36). "Is the prototype MethodContext (unused by the VM)" newArray at: 37 put: BlockClosure. + newArray at: 38 put: nil. "was the prototype BlockContext" - "(BlockContext new: CompiledMethod fullFrameSize)." - newArray at: 38 put: (self specialObjectsArray at: 38). "Is the prototype BlockContext (unused by the VM)" "array of objects referred to by external code" + newArray at: 39 put: (self specialObjectsArray at: 39). "external semaphores" - newArray at: 39 put: (self specialObjectsArray at: 39). "preserve external semaphores" newArray at: 40 put: nil. "Reserved for Mutex in Cog VMs" + newArray at: 41 put: ((self specialObjectsArray at: 41) ifNil: [LinkedList new]). "Reserved for a LinkedList instance for overlapped calls in CogMT" + newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). "finalization Semaphore" - newArray at: 41 put: nil. "Reserved for a LinkedList instance for overlapped calls in CogMT" - "finalization Semaphore" - newArray at: 42 put: ((self specialObjectsArray at: 42) ifNil: [Semaphore new]). newArray at: 43 put: LargeNegativeInteger. "External objects for callout. Note: Written so that one can actually completely remove the FFI." newArray at: 44 put: (self at: #ExternalAddress ifAbsent: []). newArray at: 45 put: (self at: #ExternalStructure ifAbsent: []). newArray at: 46 put: (self at: #ExternalData ifAbsent: []). newArray at: 47 put: (self at: #ExternalFunction ifAbsent: []). newArray at: 48 put: (self at: #ExternalLibrary ifAbsent: []). newArray at: 49 put: #aboutToReturn:through:. newArray at: 50 put: #run:with:in:. "51 reserved for immutability message" + newArray at: 51 put: #attemptToAssign:withIndex:. - "newArray at: 51 put: #attemptToAssign:withIndex:." - newArray at: 51 put: (self specialObjectsArray at: 51 ifAbsent: []). newArray at: 52 put: #(nil "nil => generic error" #'bad receiver' #'bad argument' #'bad index' #'bad number of arguments' #'inappropriate operation' #'unsupported operation' #'no modification' #'insufficient object memory' #'insufficient C memory' #'not found' #'bad method' #'internal error in named primitive machinery' #'object may move' #'resource limit exceeded' + #'object is pinned' #'primitive write beyond end of object'). - #'object is pinned'). "53 to 55 are for Alien" newArray at: 53 put: (self at: #Alien ifAbsent: []). + newArray at: 54 put: #invokeCallbackContext:. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." - newArray at: 54 put: #invokeCallbackContext::. "use invokeCallback:stack:registers:jmpbuf: for old Alien callbacks." newArray at: 55 put: (self at: #UnsafeAlien ifAbsent: []). + "Used to be WeakFinalizationList for WeakFinalizationList hasNewFinalization, obsoleted by ephemeron support." + newArray at: 56 put: nil. - "Weak reference finalization" - newArray at: 56 put: (self at: #WeakFinalizationList ifAbsent: []). "reserved for foreign callback process" newArray at: 57 put: (self specialObjectsArray at: 57 ifAbsent: []). newArray at: 58 put: #unusedBytecode. + "59 reserved for Sista counter tripped message" + newArray at: 59 put: #conditionalBranchCounterTrippedOn:. + "60 reserved for Sista class trap message" + newArray at: 60 put: #classTrapFor:. "Now replace the interpreter's reference in one atomic operation" + self specialObjectsArray becomeForward: newArray! - self specialObjectsArray becomeForward: newArray - ! Item was changed: ----- Method: SmalltalkImage>>setGCParameters (in category 'snapshot and quit') ----- setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" - "Adjust the VM's default GC parameters to avoid premature tenuring." + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! - self vmParameterAt: 5 put: 4000. "do an incremental GC after this many allocations" - self vmParameterAt: 6 put: 2000. "tenure when more than this many objects survive the GC" - ! Item was changed: ----- Method: SpaceTally>>spaceForInstancesOf: (in category 'instance size') ----- spaceForInstancesOf: aClass + "Answer a pair of the number of bytes consumed by all instances of the + given class, including their object headers, and the number of instances." - "Answer the number of bytes consumed by all instances of the given class, including their object headers and the number of instances." + | instances total | + instances := aClass allInstances. + instances isEmpty ifTrue: [^#(0 0)]. - | smallHeaderSize instVarBytes isVariable bytesPerElement total lastInstance instance instanceCount | - instance := aClass someInstance ifNil: [ ^#(0 0) ]. - smallHeaderSize := aClass isCompact ifTrue: [ 4 ] ifFalse: [ 8 ]. - instVarBytes := aClass instSize * 4. - isVariable := aClass isVariable. - bytesPerElement := isVariable - ifFalse: [ 0 ] - ifTrue: [ aClass isBytes ifTrue: [ 1 ] ifFalse: [ 4 ] ]. total := 0. + aClass isVariable + ifTrue: + [instances do: + [:i| total := total + (aClass byteSizeOfInstanceOfSize: i basicSize)]] + ifFalse: + [total := instances size * aClass byteSizeOfInstance]. + ^{ total. instances size }! - instanceCount := 0. - "A modified version of #allInstancesDo: is inlined here. It avoids an infinite loop when another process is creating new instances of aClass." - self flag: #allInstancesDo:. - lastInstance := - aClass == CompiledMethod "CompiledMethod has special format, see its class comment" - ifTrue: [aClass new] - ifFalse: [aClass basicNew]. - [ instance == lastInstance ] whileFalse: [ - | contentBytes headerBytes | - contentBytes := instVarBytes + (isVariable - ifFalse: [ 0 ] - ifTrue: [ instance basicSize * bytesPerElement ]). - headerBytes := contentBytes > 255 - ifTrue: [ 12 ] - ifFalse: [ smallHeaderSize ]. - total := total + headerBytes + (contentBytes roundUpTo: 4). - instanceCount := instanceCount + 1. - instance := instance nextInstance ]. - ^{ total. instanceCount }! Item was added: + ----- Method: SystemDictionary>>growMemoryByAtLeast: (in category 'memory space') ----- + growMemoryByAtLeast: numBytes + "Grow memory by at least the requested number of bytes. + Primitive. Fail if no memory is available. Essential." + + ^(numBytes isInteger and: [numBytes > 0]) + ifTrue: [OutOfMemory signal] + ifFalse: [self primitiveFailed]! Item was added: + ----- Method: SystemDictionary>>maxIdentityHash (in category 'system attributes') ----- + maxIdentityHash + "Answer the maximum identityHash value supported by the VM." + + ^self primitiveFailed! Item was added: + ----- Method: SystemDictionary>>setGCParameters (in category 'snapshot and quit') ----- + setGCParameters + "Adjust the VM's default GC parameters to avoid too much tenuring. + Maybe this should be left to the VM?" + + | proportion edenSize survivorSize averageObjectSize numObjects | + proportion := 0.9. "tenure when 90% of pastSpace is full" + edenSize := SmalltalkImage current vmParameterAt: 44. + survivorSize := edenSize / 5.0. "David's paper uses 140Kb eden + 2 x 28kb survivor spaces; Spur uses the same ratios :-)" + averageObjectSize := 8 * self wordSize. "a good approximation" + numObjects := (proportion * survivorSize / averageObjectSize) rounded. + SmalltalkImage current vmParameterAt: 6 put: numObjects "tenure when more than this many objects survive the GC"! Item was added: + ----- Method: SystemNavigation>>allObjects (in category 'query') ----- + allObjects + "Answer an Array of all objects in the system. Fail if + there isn't enough memory to instantiate the result." + + ^self primitiveFailed! Item was changed: ----- Method: SystemNavigation>>allObjectsDo: (in category 'query') ----- allObjectsDo: aBlock + "Evaluate the argument, aBlock, for each object in the system, excluding immediates + such as SmallInteger and Character." + self allObjectsOrNil + ifNotNil: [:allObjects| allObjects do: aBlock] + ifNil: + ["Fall back on the old single object primitive code. With closures, this needs + to use an end marker (lastObject) since activation of the block will create + new contexts and cause an infinite loop. The lastObject must be created + before calling someObject, so that the VM can settle the enumeration (e.g. + by flushing new space) as a side effect of someObject" + | object lastObject | + lastObject := Object new. + object := self someObject. + [lastObject == object or: [0 == object]] whileFalse: + [aBlock value: object. + object := object nextObject]]! - "Evaluate the argument, aBlock, for each object in the system - excluding SmallIntegers. With closures, this needs to use an end - marker (lastObject) since activation of the block will create new - contexts and cause an infinite loop." - | object lastObject | - object := self someObject. - lastObject := Object new. - [lastObject == object or: [0 == object]] - whileFalse: [aBlock value: object. - object := object nextObject]! Item was added: + ----- Method: SystemNavigation>>allObjectsOrNil (in category 'query') ----- + allObjectsOrNil + "Answer an Array of all objects in the system. Fail if there isn't + enough memory to instantiate the result and answer nil." + + ^nil! From commits at source.squeak.org Tue Mar 31 20:16:23 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 20:16:25 2015 Subject: [squeak-dev] The Trunk: Kernel-topa.915.mcz Message-ID: Tobias Pape uploaded a new version of Kernel to project The Trunk: http://source.squeak.org/trunk/Kernel-topa.915.mcz ==================== Summary ==================== Name: Kernel-topa.915 Author: topa Time: 31 March 2015, 10:15:55.476 pm UUID: 3318e7de-b5f6-4f3b-a105-7d404be3b78f Ancestors: Kernel-cmm.914 Fix arguments access in WeakMessageSend comparison. They may be nil; but the accessor guards that already. =============== Diff against Kernel-cmm.914 =============== Item was changed: ----- Method: WeakMessageSend>>= (in category 'comparing') ----- = anObject "Compare equal to equivalent MessageSend" ^ anObject isMessageSend and: [self receiver == anObject receiver and: [selector == anObject selector + and: [(Array withAll: self arguments) = (Array withAll: anObject arguments)]]] - and: [(Array withAll: arguments) = (Array withAll: anObject arguments)]]] ! From eliot.miranda at gmail.com Tue Mar 31 21:10:53 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 31 21:10:59 2015 Subject: [squeak-dev] Bug whith contextOn:do: In-Reply-To: <85F38DF9-1002-49A4-B11B-0DF96E0A7E76@gmx.de> References: <85F38DF9-1002-49A4-B11B-0DF96E0A7E76@gmx.de> Message-ID: Hi Tobias, first let me sympathize. This is such horrible code :-(. Ovr the years, getting this code to work with Cog's context-to-stack-mapping machinery has given me headaches :-). On Tue, Mar 31, 2015 at 9:01 AM, Tobias Pape wrote: > Hey fellow Squeakers > > [Attention: low level lengthy stuff] > > I today encountered a strange behavior. > When running the Startup code, somewhen ContextPart>>#complete is called, > which, in the process issues #contextOn:do:, which subsequently somewhere > interanlly > does a jump: > > contextOn: exceptionClass do: block > "Create an #on:do: context that is ready to return from executing > its receiver" > > | ctxt chain | > ctxt := thisContext. > [chain := thisContext sender cut: ctxt. ctxt jump] on: > exceptionClass do: block. > "jump above will resume here without unwinding chain" > ^ chain > > The idea is that we end up right before '^ chain' as the comment indicates. > so what happens is that ctxt is the context of #contextOn:do: itself and > it gets > send #jump in the closure. > > Jump now does the following: > > jump > "Abandon thisContext and resume self instead (using the same > current process). You may want to save thisContext's sender before calling > this so you can jump back to it. > Self MUST BE a top context (ie. a suspended context or a abandoned > context that was jumped out of). A top context already has its return > value on its stack (see Interpreter>>primitiveSuspend and other suspending > primitives). > thisContext's sender is converted to a top context (by pushing a > nil return value on its stack) so it can be jump back to." > > | top | > "Make abandoned context a top context (has return value (nil)) so > it can be jumped back to" > thisContext sender push: nil. > > "Pop self return value then return it to self (since we jump to > self by returning to it)" > stackp = 0 ifTrue: [self stepToSendOrReturn]. > stackp = 0 ifTrue: [self push: nil]. "must be quick return > self/constant" > top := self pop. > thisContext privSender: self. > ^ top > > So. bytecode for #contextOn:do: is: > > 29 <8A 01> push: (Array new: 1) > 31 <6B> popIntoTemp: 3 > 32 <89> pushThisContext: > 33 <6A> popIntoTemp: 2 > 34 <12> pushTemp: 2 > 35 <13> pushTemp: 3 > 36 <8F 20 00 0A> closureNumCopied: 2 numArgs: 0 bytes 40 to 49 > 40 <89> pushThisContext: > 41 send: sender > 42 <10> pushTemp: 0 > 43 send: cut: > 44 <8E 00 01> popIntoTemp: 0 inVectorAt: 1 > 47 <10> pushTemp: 0 > 48 send: jump > 49 <7D> blockReturn > 50 <10> pushTemp: 0 > 51 <11> pushTemp: 1 > 52 send: on:do: > 53 <87> pop > 54 <8C 00 03> pushTemp: 0 inVectorAt: 3 > 57 <7C> returnTop > > > The jump lands right at 53 and does a pop. > HOWEVER, at this point the stack of this context is empty and the pop > actually pops the 3rd temp > from the temps that 'just happens' to be right under the stack. This > should be fatal. > HOWEVER again, Squeak actually does not pop but only decrement the SP so > the temp access still > works(this _could_ be fine but some implementations (Eg, RSqueak) tried > to separate temps and > stack; which is not possible currently). > > What could be the problem here? > - are the 'stackp = 0'-checks in #jump wrong and they actually should > check for the actual stack depth _after_ temps? > It does look like it. I would have expected this to be more correct: jump "Abandon thisContext and resume self instead (using the same current process). You may want to save thisContext's sender before calling this so you can jump back to it. Self MUST BE a top context (ie. a suspended context or a abandoned context that was jumped out of). A top context already has its return value on its stack (see Interpreter>>primitiveSuspend and other suspending primitives). thisContext's sender is converted to a top context (by pushing a nil return value on its stack) so it can be jump back to." | top | "Make abandoned context a top context (has return value (nil)) so it can be jumped back to" thisContext sender push: nil. "Pop self return value then return it to self (since we jump to self by returning to it)" stackp <= self numTemps ifTrue: [self stepToSendOrReturn]. (stackp <= self numTemps and: [self willJustPop]) ifTrue: [self push: nil]. "must be quick return self/constant" top := self pop. thisContext privSender: self. ^top > - should we put in a "sacrificial anode" in #contextOn:do: so that the pop > does not pop the empty stack? (like this: > > contextOn: exceptionClass do: block > "Create an #on:do: context that is ready to return from executing > its receiver" > > | ctxt chain | > ctxt := thisContext. > [chain := thisContext sender cut: ctxt. > ctxt push: nil. "sacrifical anode" > ctxt jump > ] on: exceptionClass do: block. > "jump above will resume here without unwinding chain" > ^ chain > That looks right. Once the on:do: is sent the thisContext of contextOn:do:'s stack contains only exceptionClass, block, context and the indirection vector containing chain. So it is in the stack = self numTemps case. > > - Or is there an even better way? > I'm not sure the other ways are any better. The way to transfer to a context without disturbing its stack is to do a process switch. So you do something equivalent to jump "Abandon thisContext and resume self instead (using the same current process)." | process semaphore | process := Processor activeProcess. semaphore := Semaphore new. [process suspendedContext unwindTo: self. process suspendedContext: self. semaphore signal] fork. semaphore wait This way no bizarre stack manipulations are going on, and no return value is pushed, because there isn't a return. One may get away with: jump "Abandon thisContext and resume self instead (using the same current process)." [| process | process := Processor activeProcess. process suspendedContext unwindTo: self. process suspendedContext: self] fork. Processor yield I'd be interested in your experience using either of these. One of the advantages the process switch versions have is in not updating the receiving context sp there's a chance the context-to-stack mapping machinery won't flush the context to the heap. In the end it might actually be faster. -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/4b962c27/attachment.htm From eliot.miranda at gmail.com Tue Mar 31 21:15:00 2015 From: eliot.miranda at gmail.com (Eliot Miranda) Date: Tue Mar 31 21:15:02 2015 Subject: [squeak-dev] Re: slow display update on debugger proceed In-Reply-To: <1427723389073-4816097.post@n4.nabble.com> References: <1427561366671-4815777.post@n4.nabble.com> <1427721328157-4816091.post@n4.nabble.com> <1427723389073-4816097.post@n4.nabble.com> Message-ID: Hi Marcel, On Mon, Mar 30, 2015 at 6:49 AM, Marcel Taeumel < marcel.taeumel@student.hpi.uni-potsdam.de> wrote: > I fixed something: > http://forum.world.st/The-Trunk-Morphic-mt-793-mcz-td4816096.html > > There was the possibility, that two UI processes were running after > proceed, > which may have caused the slow display update. > > Now, it's more like the MVC-version (#mvcResumeProcess:) of resuming the > process, which first makes the redraw and them resumes the interrupted > process. > > Eliot, does this work for you? > YES!!! Yay! Thank you so much Marcel! > > Best, > Marcel > > > > -- > View this message in context: > http://forum.world.st/slow-display-update-on-debugger-proceed-tp4815619p4816097.html > Sent from the Squeak - Dev mailing list archive at Nabble.com. > > -- best, Eliot -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150331/09ebe3c4/attachment.htm From commits at source.squeak.org Tue Mar 31 21:55:05 2015 From: commits at source.squeak.org (commits@source.squeak.org) Date: Tue Mar 31 21:55:06 2015 Subject: [squeak-dev] Daily Commit Log Message-ID: <20150331215505.1315.qmail@box4.squeakfoundation.org> Changes to Trunk (http://source.squeak.org/trunk.html) in the last 24 hours: http://lists.squeakfoundation.org/pipermail/packages/2015-March/007724.html Name: Morphic-mt.794 Ancestors: Morphic-mt.793 New-style balloon morph added and used. Can be switched back to old-style balloon morphs via preferences. New-style balloon morphs support: - text (not only strings) - layouting via text paragraph (not hard-cutted via: #noLineLongerThan:) - positioning at current hand position (if not supplied with other reference point) In general, new-style balloon morphs have an improved readability. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007725.html Name: Morphic-mt.795 Ancestors: Morphic-mt.794 Backwards-compatibility in old-style balloon morphs for being opened at a specific position. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007726.html Name: MorphicExtras-mt.158 Ancestors: MorphicExtras-mt.157 Classify new-style balloon morphs as valid balloon help. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007727.html Name: Tools-mt.568 Ancestors: Tools-mt.567 Help message added to object explorer code pane. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007728.html Name: Morphic-mt.796 Ancestors: Morphic-mt.795 Indicate hovered item in lists. Can be turned off via preference. Redraw of the highlight is fast because we only invalidate the rectangles from the affected rows. Extended #handleMouseMove: and not #mouseMove: because there is a mouse-button guard in #handleMouseMove:, which is exploited in the multi-selection list morphs. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007729.html Name: ToolBuilder-Morphic-mt.108 Ancestors: ToolBuilder-Morphic-mt.107 Support added for list item-specific balloon help. (Similar to the one in tree morphs.) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007730.html Name: Morphic-mt.797 Ancestors: Morphic-mt.796 Fixed problem with disappearing new-style balloon morph in certain cases. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007731.html Name: Compiler.spur-cmm.297 Ancestors: Compiler-cmm.297, Compiler.spur-topa.296 Compiler-cmm.297 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 DoIt evaluation in the debugger needs to be from the selected Context's methodClass, not the receiver's class so that "super" will refer to the correct class. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007732.html Name: Collections.spur-mt.605 Ancestors: Collections-mt.605, Collections.spur-ul.604 Collections-mt.605 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Support #withBlanksTrimmed in texts. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007733.html Name: Kernel.spur-eem.913 Ancestors: Kernel-eem.913, Kernel.spur-topa.912 Kernel-eem.913 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Provide missing copyWithSourceCode: depended on by new breakpointing with source code. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007734.html Name: System.spur-eem.709 Ancestors: System-eem.709, System.spur-eem.708 System-eem.709 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Fix breakpoint source when pragmas follow temporaries. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007735.html Name: Kernel.spur-cmm.914 Ancestors: Kernel-cmm.914 Kernel-cmm.914 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Include filed-in methods in the RecentMessages list. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007736.html Name: System.spur-topa.710 Ancestors: System-topa.710, System.spur-eem.709 System-topa.710 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Port the wrapping breakpoint implementation from OB-SUnitintegration. (An addition to BreakPoint, no replacement) ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007737.html Name: System.spur-cmm.711 Ancestors: System-cmm.711 System-cmm.711 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 - Log filed-in code to the changes file. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007738.html Name: System.spur-eem.712 Ancestors: System-eem.712, System.spur-cmm.711 System-eem.712 patched for Spur by SpurBootstrapMonticelloPackagePatcher Cog-eem.255 Fix allStoresInto: for pool variables. Shared pools are inherited and don't have to be declared in each subclass. ============================================= http://lists.squeakfoundation.org/pipermail/packages/2015-March/007739.html Name: Kernel-topa.915 Ancestors: Kernel-cmm.914 Fix arguments access in WeakMessageSend comparison. They may be nil; but the accessor guards that already. =============================================