Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
How to use projects to do a slide show
Last updated at 1:31 pm UTC on 20 November 2018
From: Bob Arning
Subject: Re: [Q][presentation] Slide-show of projects
Date: Thu, 21 Feb 2002

>On Thu, 21 Feb 2002 Hannes Hirzel (hirzel@spw.unizh.ch) wrote:
>I tried a simple code snippet to get a slide show of the projects I have in an image. Actually I put the code below into a class method I call from the world's personal menu.

[Project allNames do: [ :n |
(Project named: n) enter. (Delay forMilliseconds: 5000) wait]]
fork

But it did not work. Just one project was opened and then it stopped. Does anybody have a suggestion for a solution?

Hannes,

Try this:

First filein this

 'From Squeak3.3alpha of 28 January 2002 [latest update: #4736] on 21 February 2002 at 8:57:54 pm'!

 !Collection methodsFor: 'testing' stamp: 'RAA 2/21/2002 20:57'!enterNextProject

	| tempProject m p |

	self isEmpty ifTrue: [^self].
	tempProject _ Project named: self first.
	(m _ DoCommandOnceMorph new)
		color: Color transparent;
		borderColor: Color transparent;
		extent: 1@1;
		borderWidth: 0;
		actionBlock: [
			p _ Project current projectParameters.
			p at: #armsLengthCmd ifPresent: [ :morph | morph delete].
			p removeKey: #armsLengthCmd ifAbsent: [].
			(Delay forMilliseconds: 1000) wait.
			self allButFirst enterNextProject.
		].
	tempProject projectParameters=20
		at: #armsLengthCmd=20
		put: m.
	tempProject enter.
 ! !


Then do this:

 (Project allNames copyWithout: Project current name) enterNextProject


See also How to create a list of projects to jump to