Précédent   Forum des professionnels en informatique > Général Développement > Programmation système > Linux > GTK
GTK Vos questions sur GTK sous Linux
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 09/09/2011, 08h02   #1
Membre confirmé
 
Inscription : juin 2006
Messages : 649
Détails du profil
Informations personnelles :
Âge : 42

Informations forums :
Inscription : juin 2006
Messages : 649
Points : 276
Points : 276
Par défaut Erreur dans un TreeView

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 :
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 :

Citation:
(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.
Que puis-je faire pour y remédier ?
S'il vous plaît ?
Merci.
jovalise est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/10/2011, 13h20   #2
Membre éclairé
 
Inscription : janvier 2007
Messages : 329
Détails du profil
Informations forums :
Inscription : janvier 2007
Messages : 329
Points : 328
Points : 328
Bonjour,

L'erreur signifie sûrement que ton TreeModel a changé entre le moment où tu crées l'Iter et celui où tu appelles la fonction Add_Line avec l'Iter en question comme paramètre.
monnomamoi est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 20h12.


 
 
 
 
Partenaires

Hébergement Web