Re: GIO basic docs



I think this could be added as a Bug to track it.

Cheers.

---------- Forwarded message ----------
From: Mike Gran <spk121 yahoo com>
Date: 2012/8/27
Subject: GIO basic docs
To: "gtk-list gnome org" <gtk-list gnome org>


Hi-

So I'm taking my first stab as using GLIB for an application, and I
thought I'd give you a hopefully useful first observation on the GIO
docs.  'cause if this is what I did, somebody else did this, too.


It is not at all clear how to do the following in GIO style

FILE *fp = fopen("file", "r");
fread (buf, size, nitems, fp);

Here's what I did. I opened up the GIO Refernce manual page, saw a
section called "GFile— File and Directory Handling", looked for functions
onreading files, saw g_file_load_contents and g_file_read.

I rejected g_file_load_contents because my file's pretty big, so I
clicked on g_file_read.  It returns a GFileInputStream, so I clicked
on that to see what I can do with that.  It takes me to a "GFileInputStream"
section.  None of the functions in there (g_file_input_stream_query_info, etc)
actually read data.

So I went back to the top GIO Reference Manual page, noticed

"Migrating to GIO" section, looked in the examples "Migrating from GnomeVFS"
"Migrating from GConf", which aren't helpful, and gave up.
(Yeah, I know I could google or whatever for the info.  I'm
not asking for help here; I'm just offering my first impression.)

So two suggestions for helping newbies.
- in the GFileInputStream section, cross-reference other functions that can
 operate on GFileInputStreams
- in the "Migrating to GIO" section, consider writing a section called
  "Migrating from ISO C Streams" or whatever.

Thanks, and keep up the good work,

Mike

_______________________________________________
gtk-list mailing list
gtk-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-list



--
Trabajar, la mejor arma para tu superación
"de grano en grano, se hace la arena" (R) (en trámite, pero para los cuates: LIBRE)


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