[PHP-GTK] Strange ... GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed ....
[email protected] (AngeloP) Mon, 27 Oct 2008 12:19:49 -0700 (PDT)
| Newsgroups | php.gtk.general |
|---|---|
| Message-ID | <[email protected]> |
Have you an Idea where the code is wrong ??? The code is not a clean code at
this moment ..
I've posted the code here http://pastebin.com/m2943e1b0
http://pastebin.com/m2943e1b0 go to see it or download here
http://www.nabble.com/file/p20194474/class_controlli.phpw
class_controlli.phpw
What make this code
I want to make a simple way to build forms with controls on fields
the class One_label_One_entry help me to have a widget with one label and
one entry
I want to setup justification height and with in a simple way.
After
I want to check if a field is required ( on blur you get red color for
required fields )
I want to make some field read only ( grey fields )
I want to set a default value or entry mask etc..
I want to navigate the form with return key and so on
I use an array, in this array I put in the sequence of the nextfield to
navigate form by enter key,
and the entry objects and the clas objects
$objs[0][nextfield]=number of the nextfield to go ( in array)
$objs[0][obj]=entry object ( to setup speedy the color lenght etc.. )
$objs[0][this]=the istance of class One_label_One_entry
If you run the code code you can get some error like this (here at the
bottom) when you close the window
BUT if you complete the form when you close window you have no more errors
I think the problems rise where I setup the require fields
see the code in class
...
function OnRequired($entry)
{
$text=$entry->get_text();
$test=eregi_replace("0|\,|\.","",$text);
if(empty($test) )
{
$entry->grab_focus();
$entry->modify_base(Gtk::STATE_NORMAL,
GdkColor::parse('#FF0000'));
$err_msg="E' richiesto un valore !!! ";
gdk::beep();
}else{
$entry->modify_base(Gtk::STATE_NORMAL,
GdkColor::parse('#FFFFFF'));
$err_msg="";
}
return $err_msg;
} // Fine required
....
(php.exe:4244): GLib-GObject-CRITICAL **: g_object_ref: assertion
`G_IS_OBJECT (object)' failed
(php.exe:4244): GLib-GObject-WARNING **: invalid unclassed pointer in cast
to `GObject'
(php.exe:4244): GLib-GObject-CRITICAL **: g_object_freeze_notify: assertion
`G_IS_OBJECT (object)' failed
etc...
--
View this message in context: http://www.nabble.com/Strange-...-GLib-GObject-CRITICAL-**%3A-g_object_ref%3A-assertion-%60G_IS_OBJECT-%28object%29%27-failed-....-tp20194474p20194474.html
Sent from the Php - GTK - General mailing list archive at Nabble.com.