[fpc-pascal]sendkeys with gtk binding
Hi! I'm trying to put some key event in the general message queue of an application. Think of simulating key presses. Some keypresses should be sent to the window and appear in the focussed widget. On windows there is (or at least was years ago) the sendkeys() function. Does the fcl or gdk/gtk-binding offer similar possibilities? Until now i found the function gtk_signal_emit, but it only does trigger registered events ... I'm stuck. Maybe this is more a gdk-qestion, but since I'm using fpc to write it I dare to ask here. Bye, Marc ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]sendkeys with gtk binding
On Sun, 14 Mar 2004, Marc Santhoff wrote: Hi! I'm trying to put some key event in the general message queue of an application. Think of simulating key presses. Some keypresses should be sent to the window and appear in the focussed widget. On windows there is (or at least was years ago) the sendkeys() function. This is actually a Visual Basic function :-) Does the fcl or gdk/gtk-binding offer similar possibilities? No. SendKeys() works by grace of sending windows messages to a window handle. You would need to find the right window handle and send an X event to it. But to my knowledge, GDK doesn't offer this possibility. I'm not an expert, though. Until now i found the function gtk_signal_emit, but it only does trigger registered events ... I'm stuck. I don't think that you should look at the GTK level, but at the GDK level. Or even the X level. Michael. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]sendkeys with gtk binding (solved)
Am So, den 14.03.2004 schrieb Marc Santhoff um 15:03: [...] You're right. In the GDK docs i found gdk_event_put which should do. I did not have such nice access violation errors for a long time. =:-() But it seems to be a lack of documentation. In fact the right function is: gtk_propagate_event() This does work as expected. The only thing to mention is that the focus has to be at the receiving widget. Bye, Marc ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]TStringList index
Hi all, This code has been driving me nuts for the past week. IDs:=TStringList.Create; for i:=0 to Datab.List_Field.Count-1 do begin Tmp:=TStringList(Datab.List_Field.items[i]); IDs.Strings[i]:=Tmp.Strings[0]; Tmp.Free; end; It crashes with An unhandled exception occurred at 0x08062FE5 : ESTRINGLISTERROR : List index exceeds bounds (0) 0x08062FE5 Datab.List_Field.Count-1=18. It appears that IDs is not letting me write to item i. Any ideas? Thanks, Taj ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal]TStringList index
Hi Vincent, Instead do: IDs.Add(Tmp.Strings[0]); Aha! Thank you! --Taj -- panic: kernel trap (ignored) ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
RE: [fpc-pascal]TStringList index
- Original Message - From: Taj Morton [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, March 14, 2004 1:04 PM Subject: [fpc-pascal]TStringList index Hi all, This code has been driving me nuts for the past week. IDs:=TStringList.Create; for i:=0 to Datab.List_Field.Count-1 do begin Tmp:=TStringList(Datab.List_Field.items[i]); IDs.Strings[i]:=Tmp.Strings[0]; Tmp.Free; end; IDs.Strings[i] its not allocated, try IDs.Add(Tmp.Strings[0]) instead Regards Jesus Reyes A. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal]Developers needed (interested?)
Hi, We (currently two people, myself a uni student doing Software Engineering and Jeremy a great graphics designer) are planning on developing a multi-player strategy game. Based on some games we've all known to love and hate, but simple enough to have fun! We are at early stages of designing and will need further people to help out with various phases of the project. This is entirely voluntary, and any support we receive will be appreciated. This game will of course be released into the Open Source community. For further information please visit the temporary wiki namespace created at http://wiki.shortcircuit.net.au/SAF/ The current name is temporary only and may change... If you would like to help out and join the project team, please email either: James Mills (myself) - [EMAIL PROTECTED] or Jeremy Whyatt - [EMAIL PROTECTED] Thank you for taking an interest :) cheers James -- - -ShortCircuit Services -WIKI: http://wiki.shortcircuit.net.au -IRC: http://wiki.shortcircuit.net.au/IRC/ -IRC: (/server shortcircuit.net.au) - -Problems are Solved by Method ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal