DBU

This forum is for general support of Xbase++
Message
Author
User avatar
Auge_Ohr
Posts: 1422
Joined: Wed Feb 24, 2010 3:44 pm

Re: DBU

#31 Post by Auge_Ohr »

BruceN wrote:
search for INKEY() and replace it with AppEvent()
What am I doing wrong?

Code: Select all

      DO WHILE ! oTB:stabilize()        
         IF lUseEvent
            IF (nEvent := NextAppEvent( @mp1, @mp2, @oXbp )) > xbe_None .AND. ;
               (nEvent <> xbeM_Motion )
               nEvent := AppEvent( @mp1, @mp2, @oXbp )
               EXIT
            ENDIF
         ELSE
             /* wird durch Tastendruck unterbrochen */
            IF (nKey := InKey()) <> 0   
               EXIT                 
            ENDIF
         ENDIF
      ENDDO

...

         IF lUseEvent                   
            nEvent := AppEvent( @mp1, @mp2, @oXbp, 0 )
         ELSE
            /* Warten auf Tastendruck */
            nKey   := InKey(0)          
         ENDIF
...

      IF ! lUseEvent
         nEvent := LastAppEvent( @mp1, @mp2, @oXbp )
      ENDIF
...
     DO CASE
      /* Normale Tastaturverarbeitung */
      CASE nEvent == xbe***
...
      OTHERWISE
         IF lUseEvent
            nDir := TBHandleEvent( oTB, nEvent, mp1, mp2, oXbp )
         ELSE
            nDir := TBApplyKey( oTB, nKey )
         ENDIF
      ENDCASE
greetings by OHR
Jimmy

Herbert
Posts: 3
Joined: Wed Dec 29, 2010 6:37 am

Re: DBU

#32 Post by Herbert »

Hi
I once copied the instruction for the changes in the old dbu. I attach them as .pdf in .zip

I added two items at the end
1) Another parameter added for path. So you can call dbu from one directory (e.g. including the runtime files there) and from one place for several subdirs.
2) increased the size of the field array from 64 to 256.

Enjoy
Attachments
DBU.zip
Changes in dbu
(128.75 KiB) Downloaded 859 times

Post Reply