Bonjour,
Je souhaite modifier le contenu d'un TreeView en modifiant le Model par un appel extérieur à ma fenêtre à ma procédure Add_Line suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 function Add_Line (Model : access Gtk_Tree_Store_Record'Class; Text : String; Parent : Gtk_Tree_Iter := Null_Iter) return Gtk_Tree_Iter is Iter : Gtk_Tree_Iter; begin -- The implementation here is not the most efficient: it is often easier -- to import yourself the function gtk_tree_store_set with the correct -- set of arguments, as shown in the example in gtk-tree_store.ads Append (Model, Iter, Parent); Set (Model, Iter, 0, Text); return Iter; end Add_Line;
Cependant j'essuie parfois l'erreur suivante :
Que puis-je faire pour y remédier ?(xborg.exe:484): Gtk-CRITICAL **: gtktreeview.c:6082 (validate_visible_area): assertion `has_next' failed.
There is a disparity between the internal view of the GtkTreeView,
and the GtkTreeModel. This generally means that the model has changed
without letting the view know. Any display from now on is likely to
be incorrect.
S'il vous plaît ?
Merci.
Partager