Bug #53813 [Com]: GdkEvent keyval field not writable

[email protected] ("[email protected]") Tue, 25 Jan 2011 17:08:34 +0100 (CET)
Newsgroups php.gtk.dev
Message-ID <[email protected]>
Edit report at http://bugs.php.net/bug.php?id=53813&edit=1

 ID:                 53813
 Comment by:         [email protected]
 Reported by:        ptlis at ptlis dot net
 Summary:            GdkEvent keyval field not writable
 Status:             Open
 Type:               Bug
 Package:            PHP-GTK related
 Operating System:   Linux 32bit
 PHP Version:        5.3.5
 Block user comment: N
 Private report:     N

 New Comment:

There's no write_property handler for the GdkEvent stuff. It also seems
to be 
missing for other objects. I'll work on a patch today for GdkEvent.


Previous Comments:
------------------------------------------------------------------------
[2011-01-22 14:10:11] ptlis at ptlis dot net

Description:
------------
If you create a GdkEvent with the GdkEventType Gdk::KEY_PRESS and try to
assign a value to the keyval field the keyval field does not change.

Test script:
---------------
$event = new GdkEvent(Gdk::KEY_PRESS);
$event->keyval	= Gdk::KEY_Return;
var_dump($event);

Expected result:
----------------
object(GdkEvent)#4466 (9) {
  ["keyval"]=>
  int(65293)
  ["time"]=>
  int(0)
  ["state"]=>
  int(0)
  ["string"]=>
  string(0) ""
  ["hardware_keycode"]=>
  int(0)
  ["group"]=>
  int(0)
  ["type"]=>
  int(8)
  ["window"]=>
  NULL
  ["send_event"]=>
  bool(false)
}


Actual result:
--------------
object(GdkEvent)#4466 (9) {
  ["keyval"]=>
  int(0)
  ["time"]=>
  int(0)
  ["state"]=>
  int(0)
  ["string"]=>
  string(0) ""
  ["hardware_keycode"]=>
  int(0)
  ["group"]=>
  int(0)
  ["type"]=>
  int(8)
  ["window"]=>
  NULL
  ["send_event"]=>
  bool(false)
}



------------------------------------------------------------------------



-- 
Edit this bug report at http://bugs.php.net/bug.php?id=53813&edit=1