Alaska Software Inc. - setkey()
Username: Password:
AuthorTopic: setkey()
Jorge Borlandosetkey()
on Thu, 10 Jan 2008 20:18:29 -0300
Hello everyone
I'm begining programmed with objects and I want to use the SetKey () as it 
did in clipper

I understand that what I do is this, but obviously not working, we also 
follow the examples of help and not come to anything, nor Setkey() functions 
do not work

Procedure Main
< declaraciones del programa....>
  SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
   nEvent := xbe_None
   WHILE nEvent != xbeP_Quit
       nEvent := AppEvent( @mp1, @mp2, @oDlg )
      if ( nevent = xbeK_F4 )
         ConsF4()
      endif
      oDlg:handleEvent( nEvent, mp1, mp2 )
   ENDDO
   Return


I might suggest as I make my setkey () function

Greetings
Osvaldo Ramirez Re: setkey()
on Thu, 10 Jan 2008 16:29:06 -0700
Please

Vee la respuesta en el foro en espanol

Saludos

Jorge Borlando wrote:
> Hello everyone
> I'm begining programmed with objects and I want to use the SetKey () as it 
> did in clipper
> 
> I understand that what I do is this, but obviously not working, we also 
> follow the examples of help and not come to anything, nor Setkey() functions 
> do not work
> 
> Procedure Main
> < declaraciones del programa....>
>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>    nEvent := xbe_None
>    WHILE nEvent != xbeP_Quit
>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>       if ( nevent = xbeK_F4 )
>          ConsF4()
>       endif
>       oDlg:handleEvent( nEvent, mp1, mp2 )
>    ENDDO
>    Return
> 
> 
> I might suggest as I make my setkey () function
> 
> Greetings
> 
>
G. HenzlerRe: setkey()
on Fri, 11 Jan 2008 21:12:15 +0100
I find it not OK that you answer in spanish. He speaks english good enough.

Damned nationalism!

Gerhard

"Osvaldo Ramirez" <ramirezosvaldo@prodigy.net.mx> schrieb im Newsbeitrag 
news:49b263fe$3a82ae12$523f@news.alaska-software.com...
> Please
>
> Vee la respuesta en el foro en espanol
>
> Saludos
>
> Jorge Borlando wrote:
>> Hello everyone
>> I'm begining programmed with objects and I want to use the SetKey () as 
>> it did in clipper
>>
>> I understand that what I do is this, but obviously not working, we also 
>> follow the examples of help and not come to anything, nor Setkey() 
>> functions do not work
>>
>> Procedure Main
>> < declaraciones del programa....>
>>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>>    nEvent := xbe_None
>>    WHILE nEvent != xbeP_Quit
>>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>>       if ( nevent = xbeK_F4 )
>>          ConsF4()
>>       endif
>>       oDlg:handleEvent( nEvent, mp1, mp2 )
>>    ENDDO
>>    Return
>>
>>
>> I might suggest as I make my setkey () function
>>
>> Greetings
>>
Martin AltmannRe: setkey()
on Fri, 11 Jan 2008 22:00:59 +0100
Gerhard,
calm down and relax 
He just told him to have a look at the answer he wrote in the Spanish 
newsgroup as Jorge wrote the very same question in Spanish in the according 
group as well!

Regards,
Martin

______________________________

Deutschsprachiges Xbase-Forum:
http://www.xbaseforum.de/
______________________________
Osvaldo Ramirez Re: setkey()
on Fri, 11 Jan 2008 18:13:11 -0700
Dear G. Henzler

I see that is a good topic for you and
i would like to translate my response.

_________

Ok, as you see some person like G. Henzler is angered, but please dont 
put double messages.....

Ok, as I said, that solution is enough, but, you need to consider:

1.- If you put an "if" into the main loop, for each event like mouse 
event, the main loop will process you condition, so maybe it is not the 
best solution.

2.- That solution ( I mean, check the keyboard event into the main loop 
), work in the main thread.

3.- Each thread could have more than one xbpdialogs.

HTH
Osvaldo Ramirez

_________


> I find it not OK that you answer in spanish. He speaks english good enough.
> 
> Damned nationalism!
> 
> Gerhard
> 
> "Osvaldo Ramirez" <ramirezosvaldo@prodigy.net.mx> schrieb im Newsbeitrag 
> news:49b263fe$3a82ae12$523f@news.alaska-software.com...
>> Please
>>
>> Vee la respuesta en el foro en espanol
>>
>> Saludos
>>
>> Jorge Borlando wrote:
>>> Hello everyone
>>> I'm begining programmed with objects and I want to use the SetKey () as 
>>> it did in clipper
>>>
>>> I understand that what I do is this, but obviously not working, we also 
>>> follow the examples of help and not come to anything, nor Setkey() 
>>> functions do not work
>>>
>>> Procedure Main
>>> < declaraciones del programa....>
>>>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>>>    nEvent := xbe_None
>>>    WHILE nEvent != xbeP_Quit
>>>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>>>       if ( nevent = xbeK_F4 )
>>>          ConsF4()
>>>       endif
>>>       oDlg:handleEvent( nEvent, mp1, mp2 )
>>>    ENDDO
>>>    Return
>>>
>>>
>>> I might suggest as I make my setkey () function
>>>
>>> Greetings
>>>
>
James Loughner Re: setkey()
on Thu, 10 Jan 2008 19:14:49 -0500
In GUI we do not use set key. See the keyboard method/callback. You
attach the keyboard rules to each object most often the dialog.

You can do something like what you out lined below but it is not good to
load a lot into the event loop.
This is how you would do it

This is not needed!
>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>    nEvent := xbe_None
>    WHILE nEvent != xbeP_Quit
>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>       if ( nevent = xbeK_F4 )
should be
        if nevent = xbeK_Keyboard .AND. mp1 = xbeK_F4
>          ConsF4()
  probably should loop here
           LOOP
>       endif
>       oDlg:handleEvent( nEvent, mp1, mp2 )
>    ENDDO


The event is not xbeK_F4 the event is a key press (ie keyboard event)
the key that was pressed is F4


Jim

Jorge Borlando wrote:
> Hello everyone
> I'm begining programmed with objects and I want to use the SetKey () as it 
> did in clipper
> 
> I understand that what I do is this, but obviously not working, we also 
> follow the examples of help and not come to anything, nor Setkey() functions 
> do not work
> 
> Procedure Main
> < declaraciones del programa....>
>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>    nEvent := xbe_None
>    WHILE nEvent != xbeP_Quit
>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>       if ( nevent = xbeK_F4 )
>          ConsF4()
>       endif
>       oDlg:handleEvent( nEvent, mp1, mp2 )
>    ENDDO
>    Return
> 
> 
> I might suggest as I make my setkey () function
> 
> Greetings
> 
>
Jorge BorlandoRe: setkey()
on Thu, 10 Jan 2008 21:36:10 -0300
thanks jim


"James Loughner" <jwrl@suddenlink.net> escribi en el mensaje 
news:5f82eb48$560359e7$52b8@news.alaska-software.com...
> In GUI we do not use set key. See the keyboard method/callback. You
> attach the keyboard rules to each object most often the dialog.
>
> You can do something like what you out lined below but it is not good to
> load a lot into the event loop.
> This is how you would do it
>
> This is not needed!
>>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>>    nEvent := xbe_None
>>    WHILE nEvent != xbeP_Quit
>>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>>       if ( nevent = xbeK_F4 )
> should be
>        if nevent = xbeK_Keyboard .AND. mp1 = xbeK_F4
>>          ConsF4()
>  probably should loop here
>           LOOP
>>       endif
>>       oDlg:handleEvent( nEvent, mp1, mp2 )
>>    ENDDO
>
>
> The event is not xbeK_F4 the event is a key press (ie keyboard event)
> the key that was pressed is F4
>
>
> Jim
>
> Jorge Borlando wrote:
>> Hello everyone
>> I'm begining programmed with objects and I want to use the SetKey () as 
>> it
>> did in clipper
>>
>> I understand that what I do is this, but obviously not working, we also
>> follow the examples of help and not come to anything, nor Setkey() 
>> functions
>> do not work
>>
>> Procedure Main
>> < declaraciones del programa....>
>>   SetAppEvent( xbeK_F4, { | mp1, mp2, oxb | ConsF4( mp1, mp2, oxb ) } )
>>    nEvent := xbe_None
>>    WHILE nEvent != xbeP_Quit
>>        nEvent := AppEvent( @mp1, @mp2, @oDlg )
>>       if ( nevent = xbeK_F4 )
>>          ConsF4()
>>       endif
>>       oDlg:handleEvent( nEvent, mp1, mp2 )
>>    ENDDO
>>    Return
>>
>>
>> I might suggest as I make my setkey () function
>>
>> Greetings
>>
>>