Tip #292 – Disabling the Windows “x”


Tip #292
Disabling the Windows “x”

windoesx_01

Clicking on the Windows “x” as a way of exiting flowerSoft should never be used.

In many occasions during the order entry process, flowerSoft must lock certain records prior to writing to them.  This is done to avoid someone else from accessing the same record and overwriting what you intended to save on that record.
For example, when flowerSoft needs to get the invoice number to be used on an order, it accesses  a control file record which holds the next invoice number to be used.
After the next invoice number is retrieved, flowerSoft adds 1 to the invoice number field so that the next station looking for an invoice number will have the latest available one and then closes the record and thus releasing the record lock.
That whole process takes a fraction of a second.
The control file record is locked so that no one else can access it until it is released by the current user.  This is done to try to prevent two stations from accessing the record at the same time and getting the same invoice number for 2 different orders.
I say “try” to prevent because even when using this record locking mechanism, occasionally invoice number will get duplicated.  It is something that should never happen but it does.  I have never been able to duplicate this problem and I’ve spent over 25 years trying to.  If it does happen to you, flowerSoft provides a way to locate these duplicate invoice numbers and assign a new number to one of them.  But I digress.

Although the invoice number generating procedure is one fairly easy to understand, it is one that I am almost certain never results in other stations being locked out of the control file record for more than a second.  However, there are many other instances where flowerSoft must write to a record and it must lock it before it does so and if a message must be displayed while the record is locked and the user does not respond to the message on the screen on a timely manner, other stations may get locked waiting for the record to be released.  That is when many users will resort to clicking on the Windows “x” to exit flowerSoft from their station or from the station that is locking the record.

The correct thing to do on those occasions is to find the station that has the record locked (usually because a warning message has be left unattended on the screen) and releasing the record locked by just simply answering the question asked or just hitting the Enter key.

The problem is that no matter how many times I tell users not to do this, they keep doing it because it is an easy way to get locked station released.  Unfortunately, most users don’t realize that when this action is taken flowerSoft has no say in what happens next.
The operating system takes over and closes the flowerSoft window.

This prevents flowerSoft from exiting the program gracefully, as it does when you hit the Esc key instead.
First of all, clicking on the Windows “x” prevents flowerSoft from saving the record to disk.  So if it was a new record, you won’t be able to find it if you go looking for it.
You may be able to rescue it if you got past the recipient’s field but otherwise it will be lost for ever.

Also, some records may not get updated because of the way you exited flowerSoft.  This may result in out of balance accounts and several other problems.

So in order to avoid these problems, I have added an option to the log in process that asks you if you want to disable the Windows “x”.

windoesx_02
windowsx_03

I am still giving you the option not to disable the Windows “x” but I think you should give this option a try as it might prevent some unforeseen problems.

If you do opt to use this option, be aware that you will not be able to click on the “x” to close flowerSoft.  The only way to exit from a new order is to hit the Esc key or in some cases the Ctrl-C combination keystroke.

Should a station become totally locked where the Esc and Ctrl-C key strokes cannot be executed, the other way to exit is via the Windows task manager.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s