Steve,
This is a great tool! Thanks very much. The shared flap version works well and I have images of a six page book with one click . . . very useful. My computer is a Toshiba running Windows 7 Home Version. In one of my tries I got an abandon message which I attached. Regards, Kathleen ---- Original message ---- >Date: Sun, 3 Apr 2011 17:32:27 -0400 >From: Steve Thomas <[hidden email]> >Subject: [squeakland] Tools to Export Images from Etoys (eventually directly to a Blog Post) >To: squeakland Squeakland <[hidden email]> > > So, with some squeak help from Bert, I created a > tool (in QuickGuide version and Flap version) you > can use to export image(s) from your project. Here > is the Blog Post and the video. > For a really cool way to view the blog (and I hope > eventually to view Etoys Projects) check out this > view. Click on the Date, Label, and Author boxes > at the top and I think you will get the idea. So > my idea is that when kids "post" their Etoys > projects they can post a blog entry (we have a > "Squeakland" Blog) and it not only posts the project > (.pr file) to the squeakland Web Server, but also > gives them a draft Blog post they can edit which has > image(s) from the Blog and selected Text they can > enter in Etoys. First step is to be able to post to > Blogger from Etoys (then facebook, ....). > So the CHALLENGES TO THE COMMUNITY - help me make > this happen, here is what I think we need: > 1. squeak code to support using the Google Data API > for Blogger and Picasa > 2. Help incorporating that squeak code into Etoys > Projects so we can publish directly to Blogger > and Picasa > 3. Brain storming on how to design this properly > Some things I believe we should support: > 1. Ability to post to my Blog or my Blog and the > Squeakland site > 2. We need a way to aggregate all the Blog posts > 1. one idea is to modify launcher to include > some google analytics so we can find and > incorporate people's public posts in one > spot and select certain public posts to > "feature". > 2. we may also want to put the embedded Etoy in > an iframe (this would also make > incorporating into OERGlue and similar > tools to come (a good idea breads copiers). > 3. We need a way classes and Schools can have their > own "private spaces" and also share select > projects publicly. > Note: The name on Books may not work, I found a bug, > then fixed it, but the fix version is not yet > showing up on the squeakland site. It will still > save all the pages of the book, but it will use the > name "Book" all the time (or whatever is the > ExternalName for your Book object). > Stephen > On Fri, Apr 1, 2011 at 5:29 AM, Bert Freudenberg > <[hidden email]> wrote: > > On 01.04.2011, at 08:52, Steve Thomas wrote: > > > How can I (easily, a script would be fine ;) > export an image of each page in a book in Etoys? > (ideally with the image names being the > projectName<Number of page>) > > Put this in a textual script for the book: > > self costume pages withIndexDo: [:page :i | > PNGReadWriter putForm: page imageForm onFileNamed: > Project current name , i asString , '.png'] > > Some requests are easy to satisfy ;) > > I want to try using this to create flikr stream > of lessons and to post in blog posts. > > Even this could be automated. But it's not going > to be a one-liner. > > - Bert - > > _______________________________________________ > squeakland mailing list > [hidden email] > http://lists.squeakland.org/mailman/listinfo/squeakland >________________ >_______________________________________________ >squeakland mailing list >[hidden email] >http://lists.squeakland.org/mailman/listinfo/squeakland _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland SqueakDebug.log (5K) Download Attachment |
How can I detect if a player variable is a book object? (sometimes it is hard to click on the book and if you get another object and try to run the script an exception is thrown).
I was also going to ask how I can handle exceptions in my script and where to get a list of exceptions that could be thrown, but that is a much bigger question ;)
Stephen
On Mon, Apr 4, 2011 at 8:49 AM, <[hidden email]> wrote: Steve, _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On 04.04.2011, at 15:20, Steve Thomas wrote: How can I detect if a player variable is a book object? (sometimes it is hard to click on the book and if you get another object and try to run the script an exception is thrown). (var costume class isKindOf: BookMorph) ifTrue: [...] If you wanted to make it more "user friendly" you could also click on something inside the book and then look up the book itself in the owner chain: var costume ownerThatIsA: BookMorph
Indeed ;) - Bert - _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
In reply to this post by Harness, Kathleen
On 04.04.2011, at 14:49, <[hidden email]> wrote: > Steve, > This is a great tool! Thanks very much. > The shared flap version works well and I have images of a six page book with one click . . . very useful. > My computer is a Toshiba running Windows 7 Home Version. In one of my tries I got an abandon message which I attached. This happened after you got a warning that a file with the same name already exists. The error dialog title is "Please close this to abort file opening", which you simply should do ;) - Bert - _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
In reply to this post by Bert Freudenberg
On Mon, Apr 4, 2011 at 10:09 AM, Bert Freudenberg <[hidden email]> wrote:
So I got this code to work (simple test where I "croak" if book and "chomp" if Not):
script1 (self getMyPlayer costume isKindOf: BookMorph) ifTrue: [self beep: 'croak']
ifFalse: [self beep: 'chomp'] But when I add the word class it does NOT croak even if I have the player set to a bookMorph
script1 (self getMyPlayer costume class isKindOf: BookMorph) ifTrue: [self beep: 'croak']
ifFalse: [self beep: 'chomp'] So I assume the above is okay. Stephen _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
In reply to this post by Bert Freudenberg
On Apr 4, 2011, at 7:09 AM, Bert Freudenberg wrote:
> On 04.04.2011, at 15:20, Steve Thomas wrote: > >> How can I detect if a player variable is a book object? (sometimes it is hard to click on the book and if you get another object and try to run the script an exception is thrown). > > (var costume class isKindOf: BookMorph) ifTrue: [...] This should be simply (var costume isKindOf: BookMorph) ifTrue: [...] i.e. the "class" shouldn't be there. Also, for completeness, perhaps the "best" version would be: (var costume renderedMorph isKindOf: BookMorph) ifTrue: [...] ... because this will work even if the BookMorph has been rotated ;-) Cheers, -- Scott _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On 04.04.2011, at 19:09, Scott Wallace wrote: > On Apr 4, 2011, at 7:09 AM, Bert Freudenberg wrote: > >> On 04.04.2011, at 15:20, Steve Thomas wrote: >> >>> How can I detect if a player variable is a book object? (sometimes it is hard to click on the book and if you get another object and try to run the script an exception is thrown). >> >> (var costume class isKindOf: BookMorph) ifTrue: [...] > > This should be simply > > (var costume isKindOf: BookMorph) ifTrue: [...] > > i.e. the "class" shouldn't be there. Oops. > Also, for completeness, perhaps the "best" version would be: > > (var costume renderedMorph isKindOf: BookMorph) ifTrue: [...] > > ... because this will work even if the BookMorph has been rotated ;-) You're right, of course :) - Bert - _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
In reply to this post by Scott Wallace
So, I have the following script:
Now how go I set my myPlayer variable to the BookMorph in its "owner chain" (if that's the common terminology)?
Stephen On Mon, Apr 4, 2011 at 1:09 PM, Scott Wallace <[hidden email]> wrote:
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On Apr 4, 2011, at 10:36 AM, Steve Thomas wrote:
> > Now how go I set my myPlayer variable to the BookMorph in its "owner chain" (if that's the common terminology)? myPlayer := (myPlayer costume ownerThatIsA: BookMorph) topRendererOrSelf player. Cheers, -- Scott PS: That "topRendererOrSelf" call is just bulletproofing against the possibility that the containing book is rotated. PPS: "owner chain" *is* the common terminology ;-) _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
On 04.04.2011, at 20:12, Scott Wallace wrote: > On Apr 4, 2011, at 10:36 AM, Steve Thomas wrote: >> >> Now how go I set my myPlayer variable to the BookMorph in its "owner chain" (if that's the common terminology)? > > myPlayer := (myPlayer costume ownerThatIsA: BookMorph) topRendererOrSelf player. ... and with a bit of bullet-proofing: script5 (myPlayer costume renderedMorph isKindOf: BookMorph) ifFalse: [(myPlayer costume ownerThatIsA: BookMorph) ifNotNilDo: [:book | myPlayer := book topRendererOrSelf assuredPlayer]] - Bert - _______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
Many thanks to Scott and Bert, we now have a "Kid Friendly" "bullet-proof' (except for bugs I introduced) tool to export images.
Stephen
On Mon, Apr 4, 2011 at 3:24 PM, Bert Freudenberg <[hidden email]> wrote:
_______________________________________________ squeakland mailing list [hidden email] http://lists.squeakland.org/mailman/listinfo/squeakland |
Free forum by Nabble | Edit this page |