erasing anchors

"Jacques Le Normand" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.lib.gtk
Message-ID <[email protected]>
dear lablgtk,

I've written a small program that inserts a text_entry into a text_view,
erases it, then inserts it again
unfortunately, it doesn't show the text_entry; could someone tell me what
I'm doing wrong?
here's the code:


open Gobject



let clearTextBuffer (tb:GText.buffer) =
  let a = tb#start_iter in
  let b  = tb#end_iter in
    tb#delete a b


let _ =
let source_window = GWindow.window () in
let buffer = GText.buffer () in
let view = GText.view ~buffer:buffer ~packing:source_window#add  () in
let entry = GEdit.entry () in
  view#add_child_at_anchor (entry :> GObj.widget)
(buffer#create_child_anchor (buffer#get_iter (`OFFSET 0)));
  source_window#show ();
  clearTextBuffer buffer;
  view#add_child_at_anchor (entry :> GObj.widget)
(buffer#create_child_anchor (buffer#get_iter (`OFFSET 0)));
  GMain.main ()

_______________________________________________
Lablgtk mailing list
[email protected]
http://yquem.inria.fr/cgi-bin/mailman/listinfo/lablgtk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.