error "please insert disk" (windows vm)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

error "please insert disk" (windows vm)

Nicolai Hess-3-2
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?




Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Nicolai Hess-3-2
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.


2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?





Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Nicolai Hess-3-2
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?






Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Nicolai Hess-3-2


2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?







Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org

Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Peter Uhnak
Hi,

I think a regression occured in Pharo VM related to this, for example when I open the dialog

MorphicUIManager new fileSave: ''

In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy


but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available



My own FileDialog implementation doesn't suffer from this, so maybe the Morphic one is just accessing the data in a weird way?

Peter


On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:


2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?







Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org


Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Sven Van Caekenberghe-2

> On 14 Jan 2017, at 14:44, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> I think a regression occured in Pharo VM related to this, for example when I open the dialog
>
> MorphicUIManager new fileSave: ''
>
> In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy
> ​
> <oldvm.png>
>
> but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available
>
> <newvm.png>
> ​
> My own FileDialog implementation doesn't suffer from this,

Which we still should include in the base image since (1) it is better and (2) it is an excellent Spec example.

> so maybe the Morphic one is just accessing the data in a weird way?
>
> Peter
>
>
> On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:
>
>
> 2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
> attached a patch on
> http://bugs.squeak.org/view.php?id=7841
> I think this could be applied on pharo win32 source as well.
> maybe with some small changes
>
> 2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
> I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841
>
> I can create a patch with the proposed solution.
>
>
>
> 2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
> we have the following bug report
> 16928 "no disk in the drive" reply to World | Save As (and other places)
>
> "On a clean Pharo4.0 #40618 image, on Windows 7
> World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"
>
> On my system, it does this 4 times.  
>
> I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.
>
> This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.
>
> Could the alerts either be
>  - only raised when that specific drive is requested by a user action
> or, less preferably
>  - given by a non-modal window, and fading away after a period"
>
> I was able to reproduce this error on squeaks and pharos window vm.
> (insert a usb card reader, with card, wait some time , remove only the card,
> every access on this drive, for example open a FileList and scroll to the drive letter).
>
>
> The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)
>
> I would like to propose the following change to sqwin32directory.c
> wrap the call to FindFirstFileW/FindNextFileW with
>
> UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
> call   FindFirstFileW/FindNextFileW
> SetErrorMode(prevMode);
>
> ...
>
> and call this functions in at least dir_lookup()
> (the other file/directory methods are save).
>
> Alternative solution, we could call the SetErrorMode function once at program start
> but I don't know if there are other "useful" errors message that we don't want to disable.
>
> I tested both solution, both seems to work fine.
>
> What do you think?
>
>
>
>
>
>
>
> Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org
>
>


Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

EstebanLM
In reply to this post by Peter Uhnak

On 14 Jan 2017, at 14:44, Peter Uhnák <[hidden email]> wrote:

Hi,

I think a regression occured in Pharo VM related to this, for example when I open the dialog

MorphicUIManager new fileSave: ''

In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy

<oldvm.png>

but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available

<newvm.png>

My own FileDialog implementation doesn't suffer from this, so maybe the Morphic one is just accessing the data in a weird way?

Peter

I think is a regression in FilePlugin… no problem with morphic… but now I’m not sure anymore. You made me doubt :)

Esteban

ps: FilePlugin is having problems anyway… I was expecting to work on it next week.



On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:


2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?







Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org



Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

philippe.back@highoctane.be
In reply to this post by Sven Van Caekenberghe-2


Le 14 janv. 2017 14:47, "Sven Van Caekenberghe" <[hidden email]> a écrit :

> On 14 Jan 2017, at 14:44, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> I think a regression occured in Pharo VM related to this, for example when I open the dialog
>
> MorphicUIManager new fileSave: ''
>
> In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy
> ​
> <oldvm.png>
>
> but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available
>
> <newvm.png>
> ​
> My own FileDialog implementation doesn't suffer from this,

Which we still should include in the base image since (1) it is better and (2) it is an excellent Spec example.

Sure but the old one can do image and text previews. Is the new one doing that?

> so maybe the Morphic one is just accessing the data in a weird way?
>
> Peter
>
>
> On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:
>
>
> 2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
> attached a patch on
> http://bugs.squeak.org/view.php?id=7841
> I think this could be applied on pharo win32 source as well.
> maybe with some small changes
>
> 2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
> I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841
>
> I can create a patch with the proposed solution.
>
>
>
> 2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
> we have the following bug report
> 16928 "no disk in the drive" reply to World | Save As (and other places)
>
> "On a clean Pharo4.0 #40618 image, on Windows 7
> World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"
>
> On my system, it does this 4 times.
>
> I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.
>
> This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.
>
> Could the alerts either be
>  - only raised when that specific drive is requested by a user action
> or, less preferably
>  - given by a non-modal window, and fading away after a period"
>
> I was able to reproduce this error on squeaks and pharos window vm.
> (insert a usb card reader, with card, wait some time , remove only the card,
> every access on this drive, for example open a FileList and scroll to the drive letter).
>
>
> The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)
>
> I would like to propose the following change to sqwin32directory.c
> wrap the call to FindFirstFileW/FindNextFileW with
>
> UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
> call   FindFirstFileW/FindNextFileW
> SetErrorMode(prevMode);
>
> ...
>
> and call this functions in at least dir_lookup()
> (the other file/directory methods are save).
>
> Alternative solution, we could call the SetErrorMode function once at program start
> but I don't know if there are other "useful" errors message that we don't want to disable.
>
> I tested both solution, both seems to work fine.
>
> What do you think?
>
>
>
>
>
>
>
> Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org
>
>



Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Nicolai Hess-3-2
In reply to this post by Peter Uhnak


2017-01-14 14:44 GMT+01:00 Peter Uhnák <[hidden email]>:
Hi,

I think a regression occured in Pharo VM related to this, for example when I open the dialog

The whole "posixpermission" code seems to be removed from the windows file plugin code (sqWin32Directory.c)
And as the "old" file dialog opens only readable directories it does not show anything because all entries have posix permisson 0 -> not readable.
But it is still possible to list the directoriy contents.
 

MorphicUIManager new fileSave: ''

In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy


but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available



My own FileDialog implementation doesn't suffer from this, so maybe the Morphic one is just accessing the data in a weird way?

Peter


On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:


2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?







Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org



Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

Peter Uhnak
In reply to this post by philippe.back@highoctane.be
I feel like we are moving away from the original thread. I mentioned my FileDialog because I found it odd that VM didn't break it.

As I am not interested in using STHub, I am also not interested in integrating it into Pharo itself (relase of P6.5/7 might change that at some point), but if you want to deal with that then feel free.

On Sat, Jan 14, 2017 at 06:41:52PM +0100, [hidden email] wrote:
> Sure but the old one can do image and text previews. Is the new one doing
> that?

That would be image XOR text, and neither being used anywhere in Pharo.
I don't support it yet, but the idea is to embed GTInspector, as it has many file previews and a way to drop in more. It should be easy (IMO, Johan did the work for integration between Spec and GT long time ago), but no timeline.

Peter

Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

EstebanLM
In reply to this post by Nicolai Hess-3-2

On 14 Jan 2017, at 19:39, Nicolai Hess <[hidden email]> wrote:



2017-01-14 14:44 GMT+01:00 Peter Uhnák <[hidden email]>:
Hi,

I think a regression occured in Pharo VM related to this, for example when I open the dialog

The whole "posixpermission" code seems to be removed from the windows file plugin code (sqWin32Directory.c)
And as the "old" file dialog opens only readable directories it does not show anything because all entries have posix permisson 0 -> not readable.
But it is still possible to list the directoriy contents.

as I said, I screw something in my merge with os-vm… I will work on this to recover the lost functionality next week :)

Esteban


 

MorphicUIManager new fileSave: ''

In old win32 vm (Oct 12 2016) I am placed in the image directory and I see the whole hierarchy

<oldvm.png>

but with new VM (Jan 14 2017) I see just an empty tree with only hard drives available

<newvm.png>

My own FileDialog implementation doesn't suffer from this, so maybe the Morphic one is just accessing the data in a weird way?

Peter


On Sat, Jan 14, 2017 at 11:21 AM, Nicolai Hess <[hidden email]> wrote:


2016-01-15 0:07 GMT+01:00 Nicolai Hess <[hidden email]>:
I think this could be applied on pharo win32 source as well.
maybe with some small changes

2015-11-16 10:00 GMT+01:00 Nicolai Hess <[hidden email]>:
I opened another bug report at mantis - > http://bugs.squeak.org/view.php?id=7841

I can create a patch with the proposed solution.



2015-11-06 8:42 GMT+01:00 Nicolai Hess <[hidden email]>:
we have the following bug report
16928 "no disk in the drive" reply to World | Save As (and other places)

"On a clean Pharo4.0 #40618 image, on Windows 7
World Menu | Save As brings up a modal alert window, "There is no disk in the drive. Please insert a disk into drive <etc>"

On my system, it does this 4 times. 

I'm assuming that each instance refers to one of the card-reader drives which are attached, but without a card inserted.

This is a pain to deal with every single time a File Browser or World | Save As dialog is opened.

Could the alerts either be
 - only raised when that specific drive is requested by a user action
or, less preferably
 - given by a non-modal window, and fading away after a period"

I was able to reproduce this error on squeaks and pharos window vm.
(insert a usb card reader, with card, wait some time , remove only the card,
every access on this drive, for example open a FileList and scroll to the drive letter).


The solution I found is to call SetErrorMode(SEM_FAILCRITICALERRORS)

I would like to propose the following change to sqwin32directory.c
wrap the call to FindFirstFileW/FindNextFileW with

UINT prevMode = SetErrorMode(SEM_FAILCRITICALERRORS);
call   FindFirstFileW/FindNextFileW
SetErrorMode(prevMode);

...

and call this functions in at least dir_lookup()
(the other file/directory methods are save).

Alternative solution, we could call the SetErrorMode function once at program start
but I don't know if there are other "useful" errors message that we don't want to disable.

I tested both solution, both seems to work fine.

What do you think?







Any chance to include this  ? Or is it already done, if so I can close the issue at pharo.fogbugz   and bugs.squeak.org




Reply | Threaded
Open this post in threaded view
|

Re: error "please insert disk" (windows vm)

philippeback
In reply to this post by Peter Uhnak


On Sat, Jan 14, 2017 at 7:58 PM, Peter Uhnak <[hidden email]> wrote:
I feel like we are moving away from the original thread. I mentioned my FileDialog because I found it odd that VM didn't break it.

As I am not interested in using STHub, I am also not interested in integrating it into Pharo itself (relase of P6.5/7 might change that at some point), but if you want to deal with that then feel free.

On Sat, Jan 14, 2017 at 06:41:52PM +0100, [hidden email] wrote:
> Sure but the old one can do image and text previews. Is the new one doing
> that?

That would be image XOR text, and neither being used anywhere in Pharo.

These are services that are useful for users, maybe not in the base image. Or I think that there is a missing example in the WidgetExamples class.

Something like:

exampleFilePreviewDialogs

self exampleBuilder
chooseFileName: 'Pick a file name' extensions: nil path: nil preview: #image;
                chooseFileName: 'Pick a file name' extensions: nil path: nil preview: #text

Current examples just pass nil to the preview parameter, where nil|#image|#text are accepted.

It is pretty handy to preview pictures for web content in image or looking at some files.

gtPresentations would be of course better to use. My current use case is to have a quick preview of a picture before saving on top of it, so that I know what I am trashing.

Phil



 
I don't support it yet, but the idea is to embed GTInspector, as it has many file previews and a way to drop in more. It should be easy (IMO, Johan did the work for integration between Spec and GT long time ago), but no timeline.

Peter