Tr: Re: Save gtkliststore




 I don't see exactly what you mean..
 
 Iterate with which pointer ? Which struct is
 concerned
 ?? How have I to start and when to stop ? Why will
 it
 be diffrent to write than to read ? 
 
 You speak about fileformat ? I only know 2 : binary
 and text.. I thought about gnomedb too because my
 app
 should work on multiple station on the same files..
 
 It would be really great if you could give some
 examples and explain the problem of fileformats too.
 
 
Thank you a lot
 
   
--- Ignacio Martín <newwen gmail com> a écrit :

You should iterate through the list and get all
the
values you want to
store and write them. In order to read them out,
you
should parse them
(fscanf comes handy here). Think on the best file
format for you. Try
it, it is easy. If you don't get results, ask
again
;)

2006/3/6, Bellicano Pascal
<pascal_bellicano yahoo fr>:
Hello,

I am a beginner in c programming and in gtk..
However, using glade an
anjuta and with a lot
of effort, I have now a little usable app with
gtkliststore (viewed with
model and tree, of course).

Here is my problem :

Is there a way to save a complete list or tree
***without parsing it*** ?

It's perhaps trivial for an exprienced
developper...

I tried it without success ..

void sauver_liste_courtier(const gchar
*filename)

{
        FILE *fp;
        fp = fopen(filename,"w");
        fwrite(courtiers_list,
sizeof(courtiers_list), 1, fp);
        fclose(fp);
}



void charger_liste_courtier (const gchar
*filename)
{
        FILE *fp;
        fp = fopen(filename,"r");
        fread(courtiers_list,
sizeof(courtiers_list), 1, fp);
        fclose(fp);
}


courtiers_list is *gtkliststore var

Remember, I am a bad programmer for now.. Please
explain me how to do
exactly.

Thank you
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org



http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





      
      
              

___________________________________________________________________________

Nouveau : téléphonez moins cher avec Yahoo!
Messenger. Appelez le monde entier à partir de 0,012
?/minute ! 
Téléchargez sur http://fr.messenger.yahoo.com




        

        
                
___________________________________________________________________________ 
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la 
France et l'international.
Téléchargez sur http://fr.messenger.yahoo.com



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