Page 4 of 4

Re: DBU

Posted: Fri Dec 03, 2010 9:45 am
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

Re: DBU

Posted: Wed Dec 29, 2010 9:04 am
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