|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-08-27 17:16 UTC] Keisial at gmail dot com
[2008-08-27 17:18 UTC] saul_porras at live dot com dot mx
[2008-08-27 17:20 UTC] saul_porras at live dot com dot mx
[2008-08-27 17:49 UTC] Keisial at gmail dot com
[2008-08-27 18:14 UTC] saul_porras at live dot com dot mx
[2008-08-27 18:22 UTC] sfox@php.net
[2008-08-27 18:34 UTC] saul_porras at live dot com dot mx
[2008-08-27 18:35 UTC] auroraeosrose@php.net
[2008-08-27 18:52 UTC] saul_porras at live dot com dot mx
[2008-08-27 18:54 UTC] auroraeosrose@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 00:00:02 2025 UTC |
Description: ------------ that is a small function however when i type ? ? ? ? ? it gives me the character ok i can even save it on to a mysql table fine. but when i type ? it gives me a n i have tested it on many ways but i think that the get_text() function is giving me that error. i use the php 5.2 and gtk 2.0.1 and older versions tested too Reproduce code: --------------- <?php $window = new GtkWindow(); $window->set_size_request(400, 240); $window->connect_simple('destroy', array('Gtk','main_quit')); $window->add($vbox = new GtkVBox()); // display title $title = new GtkLabel("setup entry"); $title->modify_font(new PangoFontDescription("Times New Roman Italic 10")); $title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff")); $title->set_size_request(-1, 40); $vbox->pack_start($title, 0, 0); $item_number = new GtkEntry(); $item_number->connect('insert-text', 'on_insert'); // note 1 $hbox = new GtkHBox(); $hbox->pack_start(new GtkLabel('Item Number: '), 0, 0); $hbox->pack_start($item_number, 0, 0); $vbox->pack_start($hbox); $vbox->pack_start(new GtkLabel("Note: item numbers should contain only numbers 0 to 9"), 0, 0); $window->show_all(); Gtk::main(); function on_insert($entry, $text, $len, $position) { $text = substr($text, 0, $len); // this is the new text inserted echo $text; return false; // yes, let the default handler display the number } ?> Expected result: ---------------- get_text show me the ? Actual result: -------------- shows a n