Scroll wheel causing big problem. Major Help.

Postby Antonio Linares » Wed Aug 20, 2008 6:12 am

Harvey,

Could you provide a small and self contained example to reproduce it here ? thanks,
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby James Bott » Wed Aug 20, 2008 6:23 am

Harvey,

Try this. Change the mouse setting in Windows to use a different number of lines, 2 or 4. Then see if the new number is showing up in the GETs. If it is not, then the 3 value is just a coincidence and I would look at the privates. Are you initializing the GETs with a private?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby Antonio Linares » Wed Aug 20, 2008 8:01 am

Harvey,

Please understand that if you don't provide a small and self contained example (this time and many times when you ask for tech support) it is quite difficult for us to help you in a proper way, thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby hag » Wed Aug 20, 2008 2:10 pm

Please understand that if you don't provide a small and self contained example (this time and many times when you ask for tech support) it is quite difficult for us to help you in a proper way, thanks

Antonio
I appreciate your comment but its a very large and complex program and finding a snipet of code that is self contained is very difficult. The scrolling is in one part of the program and the get entering is in another. The problem happens in any get after the scroll is activated. Scrolling at one line per scroll takes the problem away.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 2:25 pm

Harvey,

>I appreciate your comment but its a very large and complex program and finding a snipet of code that is self contained is very difficult.

Yes, and debugging a program we don't have is very difficult. Antonio is not asking you to find a snipet of code in your existing program, but to create a small program that shows the problem. If you can do this, then the problem is probably a FWH/Harbour problem. If you cannot do this, then the problem is probably in your own code.

>The scrolling is in one part of the program and the get entering is in another. The problem happens in any get after the scroll is activated.

This is one reason that I am concerned about the privates.

>Scrolling at one line per scroll takes the problem away.

How did you change it to scroll only one line--using the windows setting? Please try my suggested test (in previous message) using either 2 or 4 lines. Then also using 1 line, and let us know the results.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Wed Aug 20, 2008 2:52 pm

James:
Set wheel in control panel. Set to 5,2 and the gets had the 5 and 2 appear.

>How did you change it to scroll only one line--using the windows setting? >Please try my suggested test (in previous message) using either 2 or 4 >lines. Then also using 1 line, and let us know the results.

The schroll was set to 1 with this function at top of program

function wheelScroll()
return nil

Get problem goes away.
Odd stuff.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 3:25 pm

Harvey,

Ok, thanks for those results.

You still haven't answered how the GETs are being initialized. Are you using a private?

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Wed Aug 20, 2008 3:45 pm

Most of the gets are static or local.

The interesting thing is that once the odd number is enter intio the get it cant be removed thats why it seems as though the keyboard is affected in someway. If the get is character and i hit the space bar the odd number shows up.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 3:47 pm

Harvey,

>In the data entry section I have a set key to command. Could this have anything to do with it? I'll take out set key to and see if it makes a difference.

Did you ever try this? If so, what was the result?

I see that in the Harbour source there is in the INKEY.CH file this:

#define INKEY_MWHEEL 64 /* Mask for mouse wheel events */

This leads me to believe that mouse events are going through the inkey() function, so SET KEY may be the source of the problem and/or the inkey() code might not be properly masking it. Most of FW does not use inkey() function.

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Wed Aug 20, 2008 3:55 pm

#define INKEY_MWHEEL 64 /* Mask for mouse wheel events

Where would I set it. In top prg. I do have a number of set key commands.

At work at this time I'll try later in the day.
Thanks for all of your help. Much appreciated.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby James Bott » Wed Aug 20, 2008 4:21 pm

Harvey,

>#define INKEY_MWHEEL 64 /* Mask for mouse wheel events

>Where would I set it. In top prg. I do have a number of set key commands.

No, I didn't mean that you need to use this define--it is already being used by Harbour in the Inkey() function which is just a function to make Harbour compatible with Clipper. Windows uses it's own event handler.

However, SET KEY is probably going though the Inkey() function and possibly the mouse wheel events are also. Since you are using SET KEY which is also an old Clipper technique, this may be causing the problem with the mouse wheel that you are seeing. So, just comment out all your SET KEY commands and test the program again. If the problem goes away then we know the source of the problem is in the Inkey() routine.

If it is an Inkey()/SET KEY issue then it will probably have to be solved by either the Harbour or xHarbour group (depending on which you are using).

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby hag » Wed Aug 20, 2008 4:23 pm

Thanks james I'll let you know sometime this evening.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Wed Aug 20, 2008 4:35 pm

In the old DOS Clipper programs we used to SET EVENTMASK TO INKEY_ALL to capture mouse events by way of Inkey() values. If Eventmask is set, some mouse operations are read by Inkey.

When we use FWH in windows, I think we should not use the SET EVENTMASK. ( or Set the mask to KEY_BOARD ).
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Postby hag » Wed Aug 20, 2008 4:48 pm

nageswaragunupudi

Where might it be set and how do you unset it? I'm not familiar with this.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California

Postby nageswaragunupudi » Wed Aug 20, 2008 4:52 pm

If it was not expressly set somewhere in your programs, you can safely ignore it. Default is okay. Please make sure it was not set in any of the programs. You may search for EVENTMASK in all your programs.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10248
Joined: Sun Nov 19, 2006 5:22 am
Location: India

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 81 guests