Newbie question: How to create a book?

Lic. Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Thu Jul 17 10:23:19 UTC 2003


On 17/07/03 06:35, "Chobin" <mikkino at libero.it> wrote:

> Hi!
> I'm a newbie of squeak.
> I've read some tutorials but I didn't find an answer for my problem.
> I need to write one simple relation for my teacher using book with some
> pages, but I don’t know how to do this.
> Can someone tell me how to insert new pages and write on it?
> And how to navigate across those pages?
> Sorry for my bad English, but I'm an Italian student.
> 
> Thank you very much!
> 
> Chobin

I attach one modified BookMorph , with size to fit well on 800 at 600 screen
(Seems fresh Squeak default)

1 Copy both files to Squeak working directory (where you .image file is).
2. Open a File list from Tools flap.
3. Select .st fist and fileIn.
4. Select on .morph.
5. You are ready to work now.
You get a book, first page with a TextField populated with "recipes" in
Spanish , when click on + sign, you get a new page and are asked for title ,
I plan to have a "index" of book, not finished yet.
For having the same TextField, you must navigate to page where it is, click
on halo until you can grab the TextField (not page of book) and then click
on green duplicate icon.
You have another TextField , select with command A and erase, then put on
you new page.

By the way we also have a Spanish tutorial site and newbie / begginers
group.

http://ar.geocities.com/edgardec2001/Welcome.html
http://ar.groups.yahoo.com/group/squeakRos/

Here in Argentina some people can understand a little Italian too

-------------- next part --------------
'From Squeak3.6beta of ''4 July 2003'' [latest update: #5352] on 17 July 2003 at 7:08:25 am'!
BookMorph subclass: #EdBookMorph
	instanceVariableNames: 'indexOfPages '
	classVariableNames: ''
	poolDictionaries: ''
	category: 'SqueakRos'!

!EdBookMorph methodsFor: 'page controls' stamp: 'edc 5/27/2003 06:57'!
getPageNamefromUser
| font pn s |
font _ StrikeFont familyName: #ComicBold size: 18.
pn _ FillInTheBlank request: 'Ingresar nombre pagina '.
s _ StringMorph contents: pn font: font.
s center: (self  center x) @ (self top + 50).
s color: Color blue.
self currentPage addMorph: s.
s beSticky
 
! !

!EdBookMorph methodsFor: 'page controls' stamp: 'edc 7/15/2003 12:17'!
initialize
	| font s |
	super initialize.
	self borderWidth: 2.
	self
		color: (Color
				r: 0.939
				g: 0.939
				b: 0.258).
	self resizePagesTo: 350 @ 500.
	self insertPageColored: self color.
	self openInWorld.
	font _ StrikeFont familyName: #ComicBold size: 18.
	s _ StringMorph contents: 'Index' font: font.
	s center: self center x @ (self top + 50).
	s color: Color blue.
	self currentPage addMorph: s.
	s beSticky.
	indexOfPages _ SimpleSelectionListMorph new.
	indexOfPages position: self topLeft + (20 @ 70) asPoint.
	self currentPage addMorph: indexOfPages.
	indexOfPages listModel insert: 'Index'! !

!EdBookMorph methodsFor: 'page controls' stamp: 'edc 7/15/2003 11:57'!
insertPage
	pages isEmpty
		ifTrue: [^ self insertPageColored: self color.].
	self insertPageColored: self color.
	self getPageNamefromUser! !

!EdBookMorph methodsFor: 'page controls' stamp: 'edc 5/19/2003 15:14'!
showPageName
| font pn s |
font _ StrikeFont familyName: #ComicBold size: 18.
pn _ FillInTheBlank request: 'Ingresar nombre pagina '.
s _ StringMorph contents: pn font: font.
s center: (self  center x) @ (self top + 50).
s color: Color blue.
self currentPage addMorph: s.
s beSticky
 
! !

!EdBookMorph methodsFor: 'page controls' stamp: 'edc 5/19/2003 15:15'!
showPageNumber
| font pn s |
font _ StrikeFont familyName: #ComicBold size: 18.
pn _ self pageNumber asString.
s _ StringMorph contents: pn font: font.
s center: (self  center x) @ (self bottom - s height).
self currentPage addMorph: s.
s beSticky
 
! !

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/octet-stream
Size: 24493 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20030717/5675a62e/attachment.obj


More information about the Squeak-dev mailing list