On Wed, Apr 28, 2010 at 4:16 PM, Guillermo Polito <guillermopol...@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
>
>
> On Wed, Apr 28, 2010 at 5:19 AM, Mariano Martinez Peck <
> marianop...@gmail.com> wrote:
>
>> Que haces Guille!! como va? ;)
>>
>> The error "invalid utf8 input detected" was a known problem for a while,
>> but it is supposed to be fixed in the latest versions. Look for example this
>> issue (although there are even more for the same topic):
>>
>> http://code.google.com/p/pharo/issues/detail?id=370
>>
>>
>> http://code.google.com/p/pharo/issues/list?can=1&q=invalid+utf8+input+detected&colspec=ID+Type+Status+Summary+Milestone+Difficulty&cells=tiles
>>
>> Which PharoOneClick are you using?  Can you try the last one?
>>
>> https://gforge.inria.fr/frs/download.php/26828/Pharo-1.0-OneClick.zip
>>
>> If it happens there, do you know an exactly way to reproduce it ?
>>
>> Cheers
>>
>> Mariano
>>
>> On Wed, Apr 28, 2010 at 3:04 AM, Guillermo Polito <
>> guillermopol...@gmail.com> wrote:
>>
>>> Hi there!
>>>
>>>   We are using Pharo to teach OOP in UTN university, Argentina.  Some
>>> times students have the error Invalid utf8 input detected when loading an
>>> image or doing a file out of a category.
>>>   I think it happens mostly (or always, i'm not sure) in the
>>> OneClicImage, when running on windows.
>>>
>>> Is it a known issue?
>>>
>>> Thanks!
>>>
>>> _______________________________________________
>>> Pharo-users mailing list
>>> Pharo-users@lists.gforge.inria.fr
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>>>
>>>
>>
>> _______________________________________________
>> Pharo-users mailing list
>> Pharo-users@lists.gforge.inria.fr
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>>
>>
>
> _______________________________________________
> Pharo-users mailing list
> Pharo-users@lists.gforge.inria.fr
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
>
_______________________________________________
Pharo-users mailing list
Pharo-users@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

Reply via email to