Issue 3838 in pharo: Cleaning MCPackageLoader

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

Issue 3838 in pharo: Cleaning MCPackageLoader

pharo
Status: FixProposed
Owner: [hidden email]
Labels: Milestone-1.3

New issue 3838 by [hidden email]: Cleaning MCPackageLoader
http://code.google.com/p/pharo/issues/detail?id=3838

useChangeSetNamed: baseName during: aBlock
        "Use the named change set, or create one with the given name."
        | changeHolder oldChanges newChanges |
        changeHolder := (ChangeSet respondsTo: #newChanges:)
                                                ifTrue: [ChangeSet]
                                                ifFalse: [Smalltalk].
        oldChanges := (ChangeSet respondsTo: #current)
                                                ifTrue: [ChangeSet current]
                                                ifFalse: [Smalltalk changes].

        newChanges := (ChangeSet named: baseName) ifNil: [ ChangeSet new name:  
baseName ].
        changeHolder newChanges: newChanges.
        [aBlock value] ensure: [changeHolder newChanges: oldChanges].


the respondsTo: are not needed since this is just to make sure that MC code  
would work in Squeak 3.6 or before.


useChangeSetNamed: baseName during: aBlock
        "Use the named change set, or create one with the given name."
        | oldChanges newChanges |
        oldChanges :=ChangeSet current.
        newChanges := (ChangeSet named: baseName) ifNil: [ ChangeSet new name:  
baseName ].
        ChangeSet newChanges: newChanges.
        [aBlock value] ensure: [ChangeSet newChanges: oldChanges].



Reply | Threaded
Open this post in threaded view
|

Re: Issue 3838 in pharo: Cleaning MCPackageLoader

pharo
Updates:
        Status: Closed

Comment #1 on issue 3838 by [hidden email]: Cleaning MCPackageLoader
http://code.google.com/p/pharo/issues/detail?id=3838

in 13114