[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Problems Getting Keyboard Event From text-area

Problems Getting Keyboard Event From text-area

Guiserver, GTK-server, OpenGL, PostScript,
HTML 5, MIDI, IDE

Problems Getting Keyboard Event From text-area

Postby oofoe » Mon Dec 07, 2015 11:41 pm

Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm

Re: Problems Getting Keyboard Event From text-area

Postby Lutz » Tue Dec 08, 2015 3:50 pm

The documentation is wrong, gs:key-event will not work for gs:text-area. Use the the normal action handler forgs:text-area, but it will not work for non-displayable characters.

The same problem occured when I was writing the source editor for newLISP-GS. You can find the code in newlisp-x.x.x/guiserver/newlisp-edit.lsp.

This editor, created with make-editor-tab (around line 310) uses a gs:text-pane and a user defined editarea-handler (around line 1295) to react to keystrokes. Basically you create your own editable text area and then handle everything in newLISP.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Problems Getting Keyboard Event From text-area

Postby oofoe » Wed Dec 09, 2015 5:05 am

Hi! Thanks for the hint! I am working on repurposing the newlisp-edit.lsp code now.

Periodically, you call a function (set-buffer-dirty). I can't seem to find this defined in either newlisp-edit.lsp or guiserver.lsp. Is it something that I need to have?

EDIT: Actually it seems that the function was missing from v10.6.0, upgraded to v10.6.2 and I found it.
Testing can show the presence of bugs, but not their absence.
oofoe
 
Posts: 60
Joined: Wed Sep 28, 2005 7:13 pm


Return to newLISP Graphics & Sound

Who is online

Users browsing this forum: No registered users and 0 guests

cron