'From etoys4.0 of 9 October 2008 [latest update: #2247] on 20 August 2009 at 6:59:22 pm'! "Change Set: backToClouds-sw Date: 13 July 2009 Author: Scott Wallace Wire up the prev-project button to the 'clouds' project if there is no previous project. (Edited slightly by bf)"! !Project class methodsFor: 'utilities' stamp: 'bf 8/20/2009 18:58'! returnToPreviousProject "Return to the project that sent me here, if any. If none, go to the 'clouds' project, if available." | possible | possible := CurrentProject previousProject. possible ifNotNil: [possible isTopProject ifTrue: [possible := self named: 'Etoys Activity']] ifNil: "Happens if from browser you click prev-project twice..." [possible := CurrentProject nextProject]. (possible notNil and: [possible ~~ CurrentProject]) ifTrue: [possible enter: true revert: false saveForRevert: false]! ! !SugarNavigatorBar methodsFor: 'the actions' stamp: 'bf 8/20/2009 18:55'! previousProject Project returnToPreviousProject. "If we get here, the project was not changed. Do nothing (unlike our superclass)."! !