- Aug 9, 2022
- 23
- 3
- 3
- Customer Identifier
- E114627
In a Clipper application, the command SET TYPEAHEAD controls the size of the keyboard buffer. This affects the number of characters that can be held in the buffer used by READ or the Inkey() function.
In a purely event-driven system like Xbase++, there are many more event sources than just the keyboard, and the "keyboard buffer" is, in fact, an event queue associated with the current thread. This queue stores all kinds of events, including keyboard, mouse and notification events generated by user actions.
The default limit is 20 events in Xbase++ builds up to 2248. Newer builds increase this limit to 800 events. In situations where the default limit may be exceeded, SET TYPEAHEAD must be increased to ensure proper operation.
Such situations include:
In a purely event-driven system like Xbase++, there are many more event sources than just the keyboard, and the "keyboard buffer" is, in fact, an event queue associated with the current thread. This queue stores all kinds of events, including keyboard, mouse and notification events generated by user actions.
In Xbase++, SET TYPEAHEAD hence directly affects a thread's ability of caching events until they can be retrieved using AppEvent() or another event function.
The default limit is 20 events in Xbase++ builds up to 2248. Newer builds increase this limit to 800 events. In situations where the default limit may be exceeded, SET TYPEAHEAD must be increased to ensure proper operation.
Such situations include:
- inserting large sections of text into the event queue using KEYBOARD, for example, when pasting text from the clipboard
- using the PostAppEvent() function repeatedly in a manner that causes the event queue to fill up before the thread has a chance to retrieve events using AppEvent()
- Complex UI scenarios which generate a large number of events which are retrieved at a later time
Last edited by a moderator: