Updating View without changing focus
Michael Gersten
michael at stb.info.com
Thu Oct 5 12:40:00 PDT 1995
Although I've never done it, I would assume that they are doing something like
this:
1. When the user is typing, the textfield is running a modal loop. When the user
pauses, the modal loop releases, and the appkit main loop can run.
2. When the appkit main loop runs, the socket, which was registered to the DPS
system (DPSAddFD), can trigger, calling the routine that reads from the file and
stores it into a buffer.
3. After that, a timer can fire, and the buffer parsed for display. Anything that was
not displayed before is added. This is done by setting the insertion point to the end
of the displayed text, and then modifying it (select an empty space at the end, and
then replace the selection). It's not a NeXT Text object (at least, I've never seen a
text object that can have a popup list inside it), so I have no idea of the details.
The secret? The user pausing in the typing ends the modal loop, which lets
everything else run. Just like while you type, the cursor doesn't flash, but when you
stop, it does.
Michael
(Modal operations: Usually more trouble to the user than they're worth)
--
Michael Gersten michael at stb.info.com http://www.stb.info.com/~michael
NeXT Registered Developer (NeRD) # 3860 -- Hire me! (Great at design/coding)
Without Prejudice, UCC 1-207 (I can't stand fixing other's bugs)
Want $$$? Check http://www.stb.info.com/~michael/TrulySpecial.html. Serious.
More information about the OmniWeb-l
mailing list