Frank Shearar uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-fbs.529.mcz ==================== Summary ==================== Name: System-fbs.529 Author: fbs Time: 13 May 2013, 10:09:14.405 pm UUID: 2ba98257-9342-4eee-a927-a0c3d6deaf41 Ancestors: System-fbs.528 Another tiny step in breaking the System -> MorphicExtras dependency. Locale class>>migrateSystem moves to MorphicExtras because, while it refers to other packages as well, MorphicExtras form the largest minority of package references. =============== Diff against System-fbs.528 =============== Item was removed: - ----- Method: HTTPClient class>>tellAFriend:url:name: (in category 'utilities') ----- - tellAFriend: emailAddressOrNil url: urlForLoading name: projectName - | recipient subject body linkToInclude | - recipient := emailAddressOrNil ifNil: ['RECIPIENT.GOESHERE']. - subject := 'New/Updated Squeak project'. - body := 'This is a link to the Squeak project ' , projectName , ': ' , String crlf. - linkToInclude := urlForLoading. - HTTPClient shouldUsePluginAPI - ifTrue: [ - self composeMailTo: recipient subject: subject body: body , (linkToInclude copyReplaceAll: '%' with: '%25')] - ifFalse: [FancyMailComposition new - celeste: nil - to: recipient - subject: subject - initialText: body - theLinkToInclude: linkToInclude; - open].! Item was removed: - ----- Method: Locale class>>migrateSystem (in category 'private') ----- - migrateSystem - "Locale migrateSystem" - "Do all the necessary operations to switch to the new Locale environment." - - LocaleChangeListeners := nil. - self - addLocalChangedListener: HandMorph; - addLocalChangedListener: Clipboard; - addLocalChangedListener: Vocabulary; - addLocalChangedListener: PartsBin; - addLocalChangedListener: Project; - addLocalChangedListener: PaintBoxMorph; - yourself! Item was removed: - ----- Method: Utilities class>>scrapsBook (in category 'scraps') ----- - scrapsBook - | header aButton label | - ScrapsBook ifNil: - [ScrapsBook := BookMorph new pageSize: 200@300; setNameTo: 'scraps' translated. - ScrapsBook color: Color yellow muchLighter. - ScrapsBook borderColor: Color darkGray; borderWidth: 2. - ScrapsBook removeEverything; showPageControls; insertPage. - header := AlignmentMorph newRow wrapCentering: #center; cellPositioning: #leftCenter. - header setProperty: #header toValue: true. - header addMorph: (aButton := SimpleButtonMorph new label: 'O' font: Preferences standardButtonFont). - aButton target: ScrapsBook; color: Color tan; actionSelector: #delete; - setBalloonText: 'Close the trashcan. - (to view again later, click on any trashcan).' translated. - - header addMorphBack: AlignmentMorph newVariableTransparentSpacer beSticky. - header addMorphBack: (label := UpdatingStringMorph new target: self) beSticky. - label getSelector: #trashTitle; useStringFormat; step. - header addMorphBack: AlignmentMorph newVariableTransparentSpacer beSticky. - header addMorphBack: (aButton := SimpleButtonMorph new label: 'E' translated font: Preferences standardButtonFont). - aButton target: Utilities; color: Color veryLightGray; actionSelector: #maybeEmptyTrash; - setBalloonText: 'Click here to empty the trash.' translated. - ScrapsBook currentPage addMorph: (TextMorph new contents: 'Objects you drag into the trash will automatically be saved here, one object per page, in case you need them later. To disable this feature set the "preserveTrash" Preference to false. - - You can individually expunge objects by hitting the - control, and you can empty out all the objects in the trash can by hitting the "E" button at top right.' translated - wrappedTo: 190). - - ScrapsBook addMorphFront: header. - ScrapsBook setProperty: #scraps toValue: true]. - ^ ScrapsBook - - "Utilities emptyScrapsBook" - ! |
On 13 May 2013 22:09, <[hidden email]> wrote:
> Frank Shearar uploaded a new version of System to project The Trunk: > http://source.squeak.org/trunk/System-fbs.529.mcz > > ==================== Summary ==================== > > Name: System-fbs.529 > Author: fbs > Time: 13 May 2013, 10:09:14.405 pm > UUID: 2ba98257-9342-4eee-a927-a0c3d6deaf41 > Ancestors: System-fbs.528 > > Another tiny step in breaking the System -> MorphicExtras dependency. Locale class>>migrateSystem moves to MorphicExtras because, while it refers to other packages as well, MorphicExtras form the largest minority of package references. > > =============== Diff against System-fbs.528 =============== > > Item was removed: > - ----- Method: Utilities class>>scrapsBook (in category 'scraps') ----- I realised this morning that this particular change is insufficient. There are a cluster of methods - the entire 'scraps' category - that ought to move to MorphicExtras [1]. That, too, is insufficient, because these methods all use the ScrapsBook class var. I propose to create a new class, ScrapsBook, in MorphicExtras, that implement versions of these methods. "Versions" because ScrapsBook will be a normal class holding an instvar named 'book'. ScrapsBook default will return a lazily instantiated canonical ScrapsBook, and the existing Utilities class methods in 'scraps' will simply delegate to this. That at least centralises the access to the ScrapsBook. I don't know how the ScrapsBook relates to the rest of the image, so I don't know how to fix the broader issue. In other words, System will still depend on MorphicExtras, but through an instance of a class, rather than through a class var. Thoughts? Particularly, how do I test that I haven't smashed anything before even bothering to submit something to the Inbox? frank [1] Because it uses a BookMorph. This, sadly, makes Morphic depend that little bit more on MorphicExtras. The solution to that would be moving BookMorph and friends to Morph, which seems undesirable. |
On 2013-05-14, at 12:13, Frank Shearar <[hidden email]> wrote: > On 13 May 2013 22:09, <[hidden email]> wrote: >> Frank Shearar uploaded a new version of System to project The Trunk: >> http://source.squeak.org/trunk/System-fbs.529.mcz >> >> ==================== Summary ==================== >> >> Name: System-fbs.529 >> Author: fbs >> Time: 13 May 2013, 10:09:14.405 pm >> UUID: 2ba98257-9342-4eee-a927-a0c3d6deaf41 >> Ancestors: System-fbs.528 >> >> Another tiny step in breaking the System -> MorphicExtras dependency. Locale class>>migrateSystem moves to MorphicExtras because, while it refers to other packages as well, MorphicExtras form the largest minority of package references. >> >> =============== Diff against System-fbs.528 =============== >> > <snip> >> Item was removed: >> - ----- Method: Utilities class>>scrapsBook (in category 'scraps') ----- > > I realised this morning that this particular change is insufficient. > There are a cluster of methods - the entire 'scraps' category - that > ought to move to MorphicExtras [1]. That, too, is insufficient, > because these methods all use the ScrapsBook class var. I propose to > create a new class, ScrapsBook, in MorphicExtras, that implement > versions of these methods. "Versions" because ScrapsBook will be a > normal class holding an instvar named 'book'. ScrapsBook default will > return a lazily instantiated canonical ScrapsBook, and the existing > Utilities class methods in 'scraps' will simply delegate to this. > > That at least centralises the access to the ScrapsBook. I don't know > how the ScrapsBook relates to the rest of the image, so I don't know > how to fix the broader issue. In other words, System will still depend > on MorphicExtras, but through an instance of a class, rather than > through a class var. > > Thoughts? Particularly, how do I test that I haven't smashed anything > before even bothering to submit something to the Inbox? > > frank > > [1] Because it uses a BookMorph. This, sadly, makes Morphic depend > that little bit more on MorphicExtras. The solution to that would be > moving BookMorph and friends to Morph, which seems undesirable. This is the Morphic trash can. Get it from the Object Catalog's "useful" category. Enable the preserveTrash preference, and the slideDismissalsToTrash pref too, for visual feedback. Now morphs that you delete via the pink halo handle get moved to the trash. Double-click the trash can to open the scraps book. - Bert - |
Free forum by Nabble | Edit this page |