Thread: [Plib-users] segfault while paste
Brought to you by:
sjbaker
From: <Rol...@t-...> - 2002-06-20 16:46:15
|
Hello, How am I supposed to copy text from a puInput widget to the clipboard ? Should there be a way to mark text with either the keyboard or the mouse ? ^C seems to do nothing and ^V breaks with : Program terminated with signal 11, Segmentation fault. Cannot access memory at address 0x4013cdf0 #0 0x809969f in puInput::checkKey (this=0x8145900, key=22) at puInput.cxx:321 321 if ( ( strlen ( getStringValue () ) + strlen ( puGetPasteBuffer () ) ) < PUSTRING_MAX - 1 ) (gdb) bt #0 0x809969f in puInput::checkKey (this=0x8145900, key=22) at puInput.cxx:321 #1 0x8098591 in puGroup::checkKey (this=0x8144a78, key=22, updown=0) at puGroup.cxx:156 #2 0x8097af3 in puKeyboard (key=22, updown=0) at pu.cxx:365 #3 0x804cad1 in keyboard (c=22) at wd.cpp:647 #4 0x4002fa59 in ?? () #5 0x40030320 in ?? () #6 0x40030a3b in ?? () #7 0x804dfe0 in main (argc=1, argv=0xbffff974) at wd.cpp:1069 #8 0x402ecb4d in ?? () (gdb) Seems like puGetPasteBuffer() returns an invalid pointer. Rolf -- Rolf Jakob at home (rj...@du...) WWW : http://www.franken.de/users/duffy1/rjakob (KDE-Utils and CCS) |
From: Steve B. <sjb...@ai...> - 2002-06-21 03:45:00
|
Rolf Jakob wrote: > How am I supposed to copy text from a puInput widget to the clipboard ? > Should there be a way to mark text with either the keyboard or the mouse ? > ^C seems to do nothing and ^V breaks with : PLIB doesn't participate in Cut/paste operations. It would be interesting to investigate how to do this portably though. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |
From: Sebastian U. <ud...@ha...> - 2002-06-21 10:49:54
|
On Fri, 21 Jun 2002, sjb...@ai... (Steve Baker) wrote: > Date: Fri, 21 Jun 2002 03:30:45 -0500 > To: Rolf Jakob <Rol...@t-...> > From: sjb...@ai... (Steve Baker) > CC: "pli...@li..." <pli...@li...> > Reply-To: sjb...@ai... > Subject: Re: [Plib-users] segfault while paste > > Rolf Jakob wrote: > > > > How am I supposed to copy text from a puInput widget to the clipboard ? > > Should there be a way to mark text with either the keyboard or the > > mouse ? ^C seems to do nothing and ^V breaks with : > > PLIB doesn't participate in Cut/paste operations. It would be > interesting to investigate how to do this portably though. Errr ... Steve, it does, but only internally ! That means, you should be able to copy-and-paste from a puInput to another, but not from a PUI widget to a text field of some X application or vice-versa. - Sebastian |
From: Steve B. <sjb...@ai...> - 2002-06-21 13:24:57
|
Sebastian Ude wrote: >>PLIB doesn't participate in Cut/paste operations. It would be >>interesting to investigate how to do this portably though. > > Errr ... Steve, it does, but only internally ! That means, you should be > able to copy-and-paste from a puInput to another, but not from a PUI widget > to a text field of some X application or vice-versa. Yes - that's what I meant...but the mechanisms for cut/paste are quite different between X, Windoze and others. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |
From: Sebastian U. <ud...@ha...> - 2002-06-21 13:35:34
|
On Fri, 21 Jun 2002, sjb...@ai... (Steve Baker) wrote: > Date: Fri, 21 Jun 2002 13:10:39 -0500 > To: ud...@ha... > From: sjb...@ai... (Steve Baker) > CC: pli...@li... > Reply-To: sjb...@ai... > Subject: Re: [Plib-users] segfault while paste [...] > > Errr ... Steve, it does, but only internally ! That means, you should > > be able to copy-and-paste from a puInput to another, but not from a PUI > > widget to a text field of some X application or vice-versa. > > Yes - that's what I meant...but the mechanisms for cut/paste are quite > different between X, Windoze and others. Yes. However, PLIB builds a portable layer around a lot of things that are different between UNIX, Windows and other operating systems, so it would indeed be quite intresting to figure out how to implement copy & paste for Windows, X, MacOS (non-OSX), BeOS ... - Sebastian PS: Germany vs. USA: 1:0 ! |
From: Steve B. <sjb...@ai...> - 2002-06-21 15:29:21
|
Sebastian Ude wrote: >>Yes - that's what I meant...but the mechanisms for cut/paste are quite >>different between X, Windoze and others. > > Yes. However, PLIB builds a portable layer around a lot of things that are > different between UNIX, Windows and other operating systems, so it would > indeed be quite intresting to figure out how to implement copy & paste for > Windows, X, MacOS (non-OSX), BeOS ... Yes - exactly. The only problem is that I don't understand *any* of those mechanisms! Heck - I don't even know how to do it within X. But I think it would be a valuable addition if someone knows what is needed. Ob. Cut & Paste anecdote: My son has a 'typing' class once a week at school, it's really boring rote work and once the children finish the typing exercise for that day, they get to surf the web or whatever. Since most of the 'exercises' entail typing the same combinations of letters over and over until you hit a certain speed rating with some limited number of errors. Oliver rapidly discovered that the people who wrote the typing tutor software didn't consider that you could type the exercise once (S-L-O-W-L-Y) and then use cut and paste to enter the entire thing a second time perfectly and in about a millisecond! So, Oliver basically spent the entire term playing on the computer. At the end-of-year awards ceremony, the school handed out awards for highest Math score, highest Art score, etc, etc...and lo and behold, Oliver was awarded the Typing award, as he was called up to collect it, the teacher said something like "Oliver Baker is awarded the typing certificate for typing...er...this must be a misprint...it says 10,000 words per minute." :-) > Germany vs. USA: 1:0 ! ...but...Brazil vs. England: 2:1 :-( ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://www.sjbaker.org http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |