[sugar] Sharing data between activities.

Carlos Neves cn
Fri Aug 24 10:12:59 EDT 2007

Eben Eliason wrote:
>     Heh, you always make things sound so logical and obvious :)
>     Ok, so the suggested workflow has a somewhat deeper change than I had
>     envisioned yesterday. You say that a half completed puzzle should not
>     need to have it's picture changed.
>     Granted, that makes sense, but while searching for the correct image I
>     may try multiple ones, so what I do with a timer is detecting a game
>     action (moving a piece) to start it automatically, which is perfect to
>     remove the button for opening a new image...
> Well, you could even leave the "choose an image" button all the time. 
>  Technically speaking it's something one could do.  Someone might even 
> want to if they have worked on a drawing more since yesterday and just 
> want to update the image a bit.  I was mostly arguing that, while 
> possible, this task is likely rare, and so it shouldn't require extra 
> screen real estate which would better suit the puzzle-doing.  If you 
> just have a button which let's them select an image at any time, 
> that's fine. 
>     Open a puzzle, get a popup asking for the image (through the Journal),
>     show the image in the puzzle. A button to 'Select another' is
>     presented.
>     Start working on the puzzle, the 'Select another' disappears.
>     Drop an image on a new puzzle loads that image.
>     But what if you drop an image on a running puzzle? Do I:
>     - save the current state and open the new image
>     - request that a new instance is spawned (will I be allowed to?)
>     - ignore the drop.
>     - Open the new image as if the puzzle activity had been started anew. 
>     What do you think would best fit the intended UI workflow?
> I'd change one thing up front, which is the requirement that they pick 
> an image in order to play at all.  I would choose one really solid 
> default, perhaps something representing MaMaMedia itself, and make 
> that the image on the puzzle to begin with so that they can engage 
> with it as soon as the activity starts.  Leave a button in the toolbar 
> for selecting a new image at any time, with the expectation that they 
> will likely do this rarely, and usually near the beginning stages of 
> the puzzle.
> If they do drag'n'drop or select a new image, I would just update the 
> image but keep the puzzle in its current state.  Like I mentioned, 
> updating a photo or something could be a use case for this, so your 
> first option sounds like the best one.  In any case, also offer a 
> "solve" and a "scramble" button in the toolbar so they can restart it 
> if they want to. (I imagine you have something like this already.)
> How does that sound?

Not that good, actually :) For the most part I fully agree with you, and 
for the Slider Puzzle that could be a solution, but the Jigsaw, opposed 
to what the Slider does, keeps the original image aspect ratio and 
calculates the best fit size for pieces from that. So a different image 
will have a different cut and potentially a different number of pieces 
horizontally of vertically.

But, for the most part, the idea is pretty good. Having a single image 
that is always started with a fresh puzzle activity (one not from a 
previous game) is also pretty good, if a bit "different" from what we 
are aiming at. I will talk to those who decide on Monday and will see 
what their feedback is on this.

> - Eben

More information about the Sugar-devel mailing list