On Wed, Apr 28, 2010 at 4:16 PM, Guillermo Polito
<guillermopolito@gmail.com> wrote:
We were using Pharo1.0-10440-BETAdev09.09, the beta one :P, because the course began before the 1.0 was released.
Two weeks ago we told students to download the VM and image separatedly, and I think that solved the loading image issue.
There is a way to reproduce it, on windows, and that version of the OneClic:
- Save the image you are loading with save as.�
- Close Pharo and try to load the image you'v recently saved dragging the .image on Pharo.exe.
Ok...I have been doing some tests and this is what I came up to:
1) I could reproduce the problem and happen even with the same image. No need to do the "save us" and use another image
2) If you double click the Pharo.exe in the one click image, it automatically loads the Pharo 1.0 image. How this is done? It is configure in Pharo.ini conf file which is in the same directory as Pharo.exe. As you can see in that file (is a text file so you can open it easily) this line:
ImageFile=Contents\Resources\Pharo-1.0.image
So....in summary: if you ALREADY have defined a image in such file, then you cannot drag another image. If you want to be able to drag the image, you have to remove that line from the conf file. With that, when you double click Pharo.exe it will prompt the file dialog of the OS to ask you the image file. In addition, you can drag and run it without problem.
More in details, the problem is that when you pass an image, it is interpreted as "SmalltalkImage current getSystemAttribute: 1"
When you drag a second file (in your case a second image) it is interpreted as source file, not image, and thus the error with the encoding.
Put a breakpoint in the method startUpAfterLogin if you want to experiment a bit.
At least with this, you know why it was the problem and how to avoid it. Maybe we should raise a better error or even better, if I have already defined an image in the ini file, but I drag another one, override the first one and take the dragged one. I will ask in Pharodev mailing list.
Cheers
Mariano
�
When you do that, the error is showed and looking at the title bar you
can see the image loaded is not the one you dragged.
In the 1.0 version it happens too, in the same way.
Also, I've been told that in linux environments this doesn't happen (when dragging to the .sh).
I'm attaching the log file. (It's very odd, there aren't line separations xP)
Thanks,
Guille
_______________________________________________
Pharo-users mailing list
Pharo-users@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users