Alaska Software Inc. - AppEvent() Problem
Username: Password:
AuthorTopic: AppEvent() Problem
Al WimberlyAppEvent() Problem
on Fri, 09 Apr 2010 00:01:24 -0400
When I replaced inkey(0.01) with AppEvent(@mp1, @mp2, @oXbp, 01) I lost the 
navigation (arrows, Up, Dn, etc.) and some other keys. AppEvent.ch is 
included.  SetMouse(.T.) is in the main file. What am I missing?

Thanks
Andreas Gehrs-Pahl
Re: AppEvent() Problem
on Fri, 09 Apr 2010 08:34:43 -0400
Al,

>When I replaced inkey(0.01) with AppEvent(@mp1, @mp2, @oXbp, 01) I lost 
>the navigation (arrows, Up, Dn, etc.) and some other keys. AppEvent.ch 
>is included. SetMouse(.T.) is in the main file. What am I missing?

In GUI mode, you will find the Key Code in the "mp1" variable, while 
"nEvent" will contain the Event Code "xbeP_Keyboard", and in Hybrid 
mode you will get two events for each key that is pressed. 

For example, if you type "A", you will get an event with nEvent being 65 
or asc("A") as well as an "xbeP_Keyboard" event with "mp1" containing 65 
or asc("A"). For navigation keys, you will first get the key code, like 
"xbeK_UP" or "xbeK_DOWN" as Event, followed by an "xbeP_Keyboard" event 
with "mp1" containing the same key code ("xbeK_UP" or "xbeK_DOWN").

But all keys will be xbeK_* codes from "AppEvent.ch", not K_* codes from
"InKey.ch"!

-- Andreas

---                                                                      ---
  Andreas Gehrs-Pahl              E-Mail: GPahl@CharterMI.net
  415 Gute Street                     or: Andreas@DDPSoftware.com
  Owosso, MI 48867-4410               or: Andreas_Gehrs-Pahl@CrimeCog.com
  Tel: (989) 723-9927           Web Site: http://www.Aerospace-History.net
---                                                                      ---
Al WimberlyRe: AppEvent() Problem
on Sun, 11 Apr 2010 11:36:20 -0400
I got the AppEvent() working. Thanks.

FWIW, I added the following to AppEvent.ch: Saved me some coding changes.

 ***********************************
 Number keys
 ***********************************
#define xbeK_ZERO         48      Zero
#define xbeK_ONE           49      One
#define xbeK_TWO          50      Two
#define xbeK_THREE        51      Three
#define xbeK_FOUR         52      Four
#define xbeK_FIVE           53      Five
#define xbeK_SIX             54      Six
#define xbeK_SEVEN       55      Seven
#define xbeK_EIGHT        56      Eight
#define xbeK_NINE         57      Nine

Now, on to mouseability!
Jack Duijf Re: AppEvent() Problem
on Sun, 11 Apr 2010 20:48:53 +0200
Hello Al,

Maybe it is not such a good idea to modify the Alaska ch files.
It may be overwritten by a update.

IMHO It is better to create you own ch file that contains all 
modifications.

Regards,
Jack Duijf


Op 11-4-2010 17:36, Al Wimberly schreef:
> I got the AppEvent() working. Thanks.
>
> FWIW, I added the following to AppEvent.ch: Saved me some coding changes.
>
>  ***********************************
>  Number keys
>  ***********************************
> #define xbeK_ZERO         48      Zero
> #define xbeK_ONE           49      One
> #define xbeK_TWO          50      Two
> #define xbeK_THREE        51      Three
> #define xbeK_FOUR         52      Four
> #define xbeK_FIVE           53      Five
> #define xbeK_SIX             54      Six
> #define xbeK_SEVEN       55      Seven
> #define xbeK_EIGHT        56      Eight
> #define xbeK_NINE         57      Nine
>
> Now, on to mouseability!
>
>
>
Al WimberlyRe: AppEvent() Problem
on Sun, 11 Apr 2010 17:28:27 -0400
You are absolutly correct Jack, and I do use a generic.ch file which 
contains my own requirements. Plus, I keep daily backups in several safe 
(relatively) locations. I'll be putting the Xbase++ changes into a new 
generic.ch in a few days. Good of you to remind me of the overwrite monster.

Thanks
Carlos a Beling Re: AppEvent() Problem
on Tue, 18 May 2010 12:48:27 -0300
Good afternoon.
I use the attached event loop used in a XbpCrt() whose parent is 
:drawingArea.
Sometimes the application enters in a wait state until the mouse moves 
or something is typed.
Can one tell me why?

Beling
TIA


appevent.prg
Jorge LRe: AppEvent() Problem
on Tue, 18 May 2010 14:57:38 -0300
Hi Carlos

The default value of nTimeOut is zero which causes AppEvent() to wait until 
an event is found in the queue.



"Carlos a Beling" <beling@bipbip.com.br> escribió en el mensaje de 
noticias:112fe8ba$2dbae49f$99191@news.alaska-software.com...
> Good afternoon.
> I use the attached event loop used in a XbpCrt() whose parent is
> :drawingArea.
> Sometimes the application enters in a wait state until the mouse moves
> or something is typed.
> Can one tell me why?
>
> Beling
> TIA
>
>
Carlos a Beling Re: AppEvent() Problem
on Tue, 18 May 2010 16:59:33 -0300
Hello Jorge:
good afternoon.
Many thanks. It worked fine.

Beling
Best regards

Em 18/5/2010 14:57, Jorge L escreveu:
> Hi Carlos
>
> The default value of nTimeOut is zero which causes AppEvent() to wait
> until an event is found in the queue.
>
>
>
> "Carlos a Beling" <beling@bipbip.com.br> escribió en el mensaje de
> noticias:112fe8ba$2dbae49f$99191@news.alaska-software.com...
>> Good afternoon.
>> I use the attached event loop used in a XbpCrt() whose parent is
>> :drawingArea.
>> Sometimes the application enters in a wait state until the mouse moves
>> or something is typed.
>> Can one tell me why?
>>
>> Beling
>> TIA
>>
>>
>