Re: gtkhtml: yes - working!
| From: | Alan Knowles | Date: | Tue, 25 Sep 2001 00:16:27 +0000 |
| Subject: | Re: gtkhtml: yes - working! | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-74@lists.php.net to get a copy of this message | ||
Thanks to Mark, the simple answer to why it was segfaulting was..
Code A will cause a segfault, code B wont - This is probably due to the definition of the Object
(object HTML
(in-module Gtk)
(parent Frame (Gtk))
(c-name GtkHTML)
)
where it's parent must be a frame
- There is now a HTML editor + viewer in PHP-GTK :)
regards
alan
------------CODE a
$win = &new GtkWindow();
$win->set_usize(400,400);
$html = &new GtkHTML();
$win->add($html);
$text = join("",file("http://slashdot.org"));
$html->load_from_string($text,strlen($text));
$html->set_editable(1);
$win->show_all();
Gtk::main();
------------CODE B
$win = &new GtkWindow();
$win->set_usize(400,400);
$scroll = &new GtkScrolledWindow();
$html = &new GtkHTML();
$scroll->add($html);
$win->add($scroll);
$text = join("",file("http://slashdot.org"));
$html->load_from_string($text,strlen($text));
$html->set_editable(1);
$win->show_all();
Gtk::main();
>----- Original Message -----
> From: Alan Knowles <alan_k@hklc.com>
> To: Mark Leavy <MarkL@linux2001.org>, <php-gtk-dev@lists.php.net>
> Sent: Mon, 24 Sep 2001 10:47:49 -0000
> Subject: Re: [PHP-GTK-DEV] gtkhtml: pls = it's painfully close..
>
> Thanks for your help..
>
> can you send me a copy of
> 1. the php file to display the editor
> 2. the modification to the defs file.
>
> also
> what version of the gtkhtml + gtk are you using?
> eg.
> gtk-config --version gtk
> gnome-config --modversion gtkhtml
>
> It would be nice to get it working here :)
>
> regards
>
> alan
>
>
>
> >----- Original Message -----
> > From: Mark Leavy <MarkL@linux2001.org>
> > To: php-gtk-dev@lists.php.net
> > Sent: 23 Sep 2001 21:46:36 +0100
> > Subject: Re: [PHP-GTK-DEV] gtkhtml: pls = it's painfully close..
> >
> > Hi,
> > I've been wanting to play with gtkhtml in php-gtk for a while now..nice
> > work :)
> > I've been able to use your code to successfully load a web page
> > (google.com) after i implemented gtk_html_load_from_string in html.defs.
> > Just thought you'de like to know :) I look forward to further
> > development on this, so i can write a php-gtk browser.
> >
> > Thanks
> >
> > MarkL
> > MarkL@linux2001.org
> >
> >
> > On Sun, 2001-09-23 at 18:30, Alan Knowles wrote:
> > > I have an updated file uploaded for the gtkhtml module . (now in an a dir called html
> > > - reduces alot of the naming conflict probs I was having.)
> > >
> > > http://midgard.hklc.com/gtkhtml.1.1.tgz
> > >
> > > I'm still getting the segfaults on the gtk_layout_get_type in libgtk-1.2.so,
> > > (see earlier mail) my assumption is that this is recieving somehow the pointer to the gtkhtml
> > > widget.. and does not correctly understand that it is a gtkhtml widget...
> > >
> > > Anyway other than this - I think the code is very close - if somebody could play with
> > > it for a few mins... :)
> > >
> > > regards
> > > alan
> > >
> > >
> > >
> >
> >
> >
> >
> > --
> > PHP-GTK Development Mailing List (http://gtk.php.net/)
> > To unsubscribe, e-mail: php-gtk-dev-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-gtk-dev-help@lists.php.net
> > To contact the list administrators, e-mail: php-list-admin@lists.php.net
> >
> >
> >
>
>
>
> --
> PHP-GTK Development Mailing List (http://gtk.php.net/)
> To unsubscribe, e-mail: php-gtk-dev-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-dev-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>