[etoys-dev] Etoys: MorphicExtras-kfr.41.mcz

Derek O'Connell doc at doconnel.f9.co.uk
Tue Oct 18 07:29:15 EDT 2011


On 18/10/11 09:47, Bert Freudenberg wrote:
>  On 18.10.2011, at 00:57, Derek O'Connell wrote:
>
> > On 17/10/11 23:34, karl ramberg wrote:
> >> I committed the code changes you sent and a little fix I had to
> >> the squeaksource repository.
> >> http://www.squeaksource.com/WebCamMorph
> >>
> >> I had turned the waiting for camera start up down to 1 sec. That
> >> caused trouble. Now I use 2 sec and thing seems to work fine.
> >>
> >>
> >> I have added intoWorld: and outOfWorld: methods to the version
> >> for Etoys, so the web cam shuts down when you leave the project.
> >> But these methods get called when adding TransformationMorph to
> >> the web cam.
> >
> > I'm not familiar with into/outOfWorld: but are they being used to
> > cover the case when the webcam morph is deleted? Wouldn't they also
> > cause problems in other situations, eg, dragging? I'm guessing the
> > camera should be turned off when the morph enters the bin, when the
> > project is exited and on exiting etoys. Latter case at least should
> > already be catered for. Trying to re-instate a camera on start-up
> > might fail on a different machine with a different camera (or more
> > than one video device).
>
>  Why would it fail with a different camera?
>
>  It might fail if there is no camera, but the code should take that
>  into account. When I save a project with a "running" camera and load
>  it on another machine that has a camera too, it should run again. If
>  there is no camera then it can't, of course. If there are multiple
>  cameras, it would hopefully pick a default.

Probably ok if anything using it takes into account that the extents may 
change. In my version the extents are chosen from pre-sets which should 
be common to most webcams and scaled for the morph itself (from which 
snapshots are taken). I'm attaching some quick edits to restart any 
cam/s that were on prior to shut-down. Not much time atm so only tested 
on one machine.

PS: needs do-it: WebCamMorph initialize

-D

>
>  - Bert -
>
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: webcam-restart.2.cs
Type: text/x-csharp
Size: 3404 bytes
Desc: not available
URL: <http://lists.squeakland.org/pipermail/etoys-dev/attachments/20111018/fbd91913/attachment.bin>


More information about the etoys-dev mailing list