[Pkg] The Trunk: System-dtl.176.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 27 18:26:02 UTC 2009


David T. Lewis uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-dtl.176.mcz

==================== Summary ====================

Name: System-dtl.176
Author: dtl
Time: 27 November 2009, 2:21:25 am
UUID: e95ee3fd-391e-449c-90f5-1eb95e2ace2a
Ancestors: System-nice.175

Remove remaining direct Morphic dependencies from class side of Project


=============== Diff against System-nice.175 ===============

Item was changed:
  ----- Method: Project class>>canWeLoadAProjectNow (in category 'utilities') -----
  canWeLoadAProjectNow
  
+ 	^ Smalltalk verifyMorphicAvailability
- 	Smalltalk verifyMorphicAvailability ifFalse: [^ false].
- 
- 	"starting to see about eliminating the below"
- 	"Smalltalk isMorphic ifFalse: [
- 		self inform: 'Later, allow jumping from MVC to Morphic Projects.'.
- 		^false
- 	]."
- 
- 	^true
  !

Item was changed:
  ----- Method: Project>>decideAboutCreatingBlank: (in category 'file in/out') -----
  decideAboutCreatingBlank: otherProjectName
  
  	| resp |
  
  	"20 Oct - just do it"
  	true "version isNil" ifFalse: [	"if saved, then maybe don't create"
  		resp := (UIManager default chooseFrom: #('Yes, make it up' 'No, skip it') 
  			title: ('I cannot locate the project\',
  				otherProjectName,
  				'\Would you like me to create a new project\with that name?'
  			) withCRs).
  		resp = 1 ifFalse: [^ nil]
  	].
+ 	^Project current openBlankProjectNamed: otherProjectName!
- 	^Project openBlankProjectNamed: otherProjectName!

Item was changed:
  ----- Method: Project class>>enterIfThereOrFind: (in category 'squeaklet on server') -----
  enterIfThereOrFind: aProjectName
  
+ 	^ self current enterIfThereOrFind: aProjectName
+ !
- 	| newProject |
- 	newProject := Project named: aProjectName.
- 	newProject ifNotNil: [^newProject enter].
- 
- 	ComplexProgressIndicator new 
- 		targetMorph: nil;
- 		historyCategory: 'project loading';
- 		withProgressDo: [
- 			[
- 				newProject := CurrentProject fromMyServerLoad: aProjectName
- 			] 
- 				on: ProjectViewOpenNotification
- 				do: [ :ex | ex resume: false]		
- 					"we probably don't want a project view morph in this case"
- 		].
- 
- 	newProject ifNotNil: [^newProject enter].
- 	Beeper beep.!

Item was added:
+ ----- Method: Project>>openBlankProjectNamed: (in category 'squeaklet on server') -----
+ openBlankProjectNamed: projName
+ 
+ 	"Project current openBlankProjectNamed: 'My new project'"
+ 
+ 	self subclassResponsibility
+ !

Item was changed:
  ----- Method: Project class>>fromUrl: (in category 'squeaklet on server') -----
  fromUrl: urlString
  	"Load the project, and make a thumbnail to it in the current project.  Replace the old one if necessary.
  To test it, make sure you don't have AAEmptyTest.001.pr in your Squeaklets directory. Then do:
  Project fromUrl: 'http://209.143.91.36/super/SuperSwikiProj/AAEmptyTest.001.pr'.
  The project should open and you should enter it. Return to the previous project and delete the project. Then do:
  Project fromUrl: 'AAEmptyTest.001.pr'.
  The project should open again - this time faster - and you should enter it. 
  "
  	| absoluteUrl projectFilename projName proj serverDir pair |
  	Project canWeLoadAProjectNow ifFalse: [^ self].
  	absoluteUrl := Url absoluteFromFileNameOrUrlString: urlString.
  	projectFilename := absoluteUrl fileName.
  	projName := (Project parseProjectFileName: projectFilename unescapePercents) first.
  	(proj := Project named: projName) ifNotNil: [
  		"it appeared"
  		^ProjectEntryNotification signal: proj].
  
  	serverDir := ServerDirectory serverForURL: absoluteUrl directoryUrl asString.
  	serverDir ifNotNil: [
  		pair := self mostRecent: projectFilename onServer: serverDir.
  		"Pair first is name exactly as it is on the server"
+ 		pair first ifNil: [^self current openBlankProjectNamed: projName].
- 		pair first ifNil: [^self openBlankProjectNamed: projName].
  		projectFilename := pair first].
  
  	ProjectLoading
  		installRemoteNamed: projectFilename
  		from: absoluteUrl asString unescapePercents
  		named: projName
  		in: CurrentProject!

Item was added:
+ ----- Method: Project>>enterIfThereOrFind: (in category 'squeaklet on server') -----
+ enterIfThereOrFind: aProjectName
+ 
+ 	self subclassResponsibility
+ !

Item was removed:
- ----- Method: Project class>>openBlankProjectNamed: (in category 'squeaklet on server') -----
- openBlankProjectNamed: projName
- 
- 	| proj projViewer |
- 
- 	proj := MorphicProject openViewOn: nil.
- 	proj changeSet name: projName.
- 	proj world addMorph: (
- 		TextMorph new 
- 			beAllFont: ((TextStyle default fontOfSize: 26) emphasized: 1);
- 			color: Color red;
- 			contents: 'Welcome to a new project - ',projName
- 	).
- 	proj setParent: self current.
- 	projViewer := (CurrentProject findProjectView: projName) ifNil: [^proj].
- 	(projViewer owner isSystemWindow) ifTrue: [
- 			projViewer owner model: proj].
- 	^ projViewer project: proj!



More information about the Packages mailing list