[Glade-users] dateedit widget -retrieving time_t ?



Hi

This should be right no? It seems like it crashes upon getting this line:

/* Setup the date */
        dateedit1=gnome_date_edit_get_time((GnomeDateEdit *)glade_xml_get_widget(xml,"dateedit1"));
        tstruct=localtime(&dateedit1);

While gnome_data_edit_get_time wants a widget, it seems it wants it in the format of GnomeDateEdit,
which is a structure. You can see the prototype on:

http://developer.gnome.org/doc/API/2.0/libgnomeui/gnomedateedit.html

So i have casted it to GnomeDateEdit *. Dateedit1 btw is a time_t ofcourse.

Any help most appreciated.

Kind regards,
~Alef~




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]