Hello —, Am 2009-10-25 um 07:29 schrieb Mike Stramba:
I'm runninng squeak 3.10.2 on windows XP.
If I drag and drop a jpg onto Squeak, it creates a SketchMorph.
That ought to be right.
Specficially, I'm adding a playing card image, well 52 of them, and I'd like to be able to add a card from the world menu / new morph menu.
I'd also like to create a PlayingCard class, that uses the dropped jpg.
Do you really want to create the card from _dropped_ images? Or do you rather just want to create/reuse images (i.e., not necessarily dropped ones)?
At the moment I'm doing it the "hard way", after dropping the jpg, I'm digging through system dictionary, digging out the world objects, and "drilling down" to the dropped object.
I would use the Halo of that image to reach the actual image. But if I do want to use Images regularly, I actualy store their Forms. (see wiki.squeak.org/squeak/697 and your image) To not every time create new forms, I create them once and then store them. Actually, I convert an image to its base64 form, sotr this string inside the image and have its Form created on Demand and then cached.
Hope that helps.
Have a nice Sunday, -Tobias