RE: outstream question [i think]
-Original Message- The intent is to have the results go to the gui (as opposed to the console). mysql show columns from customers; ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | vend_id| int(11) | NO | PRI | NULL| auto_increment | | cust_lname | char(50) | YES | | NULL|| | cust_fname | char(50) | YES | | NULL|| | cust_phone | char(50) | YES | | NULL|| ++--+--+-+-++ Is this your first experience developing in a GUI environment? I thought the same thing, way back when I first started. However, it just doesn't work that way. In every graphical environment I've worked in (several), all of the text - all of the output - is managed by placement of strings onto or into some type of display widget. Instead, what you'll need to do is grab the data one cell at a time, convert it into a formatted string, and assign the string to a displayable widget: a label, entry box, drop-down list, spin button, etc. Various development tools exist to automate this task to various degrees, but the end result is always the same. There is no widget I've ever seen that can accept a stream of text for display. And I believe the closest you'll get to something like that, is to direct that stream into a memory or string stream, and display the text in text-box type display element. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: outstream question [i think]
On Fri, 28 Aug 2009 08:16:25 -0400 Boggess Rod rbogg...@corefurnace.com wrote: -Original Message- The intent is to have the results go to the gui (as opposed to the console). mysql show columns from customers; ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | vend_id| int(11) | NO | PRI | NULL| auto_increment | | cust_lname | char(50) | YES | | NULL|| | cust_fname | char(50) | YES | | NULL|| | cust_phone | char(50) | YES | | NULL|| ++--+--+-+-++ Is this your first experience developing in a GUI environment? I thought the same thing, way back when I first started. However, it just doesn't work that way. In every graphical environment I've worked in (several), all of the text - all of the output - is managed by placement of strings onto or into some type of display widget. Instead, what you'll need to do is grab the data one cell at a time, convert it into a formatted string, and assign the string to a displayable widget: a label, entry box, drop-down list, spin button, etc. Various development tools exist to automate this task to various degrees, but the end result is always the same. There is no widget I've ever seen that can accept a stream of text for display. And I believe the closest you'll get to something like that, is to direct that stream into a memory or string stream, and display the text in text-box type display element. It may be that at GtkListStore object with a GtkTreeView is what would suit the OP best. Chris ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: outstream question [i think]
Siddu, what do u mean equivalent cout statement for GTK . do u mean on the click of the button the results should be logged somewhere or need to printed on the stdout . be more clearer on this The intent is to have the results go to the gui (as opposed to the console). mysql show columns from customers; ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | vend_id| int(11) | NO | PRI | NULL| auto_increment | | cust_lname | char(50) | YES | | NULL|| | cust_fname | char(50) | YES | | NULL|| | cust_phone | char(50) | YES | | NULL|| ++--+--+-+-++ -- Christopher Devlin dev...@iamaquatics.org O|ASS American Red Cross - LGI, WSI PADI - Divemaster Illinois Department of Public Health - Certified Pool Operator NSPF - CPO ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: outstream question [i think]
The best I can think of is to capture the output into a TextBuffer, and display using a TextView. But as far as I know there really isn't anything like a fictional gtk_display_text() function. - Original Message From: dev...@iamaquatics.org dev...@iamaquatics.org To: gtk-app-devel-list@gnome.org Sent: Thursday, August 27, 2009 6:31:58 PM Subject: Re: outstream question [i think] Siddu, what do u mean equivalent cout statement for GTK . do u mean on the click of the button the results should be logged somewhere or need to printed on the stdout . be more clearer on this The intent is to have the results go to the gui (as opposed to the console). mysql show columns from customers; ++--+--+-+-++ | Field | Type | Null | Key | Default | Extra | ++--+--+-+-++ | vend_id| int(11) | NO | PRI | NULL| auto_increment | | cust_lname | char(50) | YES | | NULL|| | cust_fname | char(50) | YES | | NULL|| | cust_phone | char(50) | YES | | NULL|| ++--+--+-+-++ -- Christopher Devlin dev...@iamaquatics.org O|ASS American Red Cross - LGI, WSI PADI - Divemaster Illinois Department of Public Health - Certified Pool Operator NSPF - CPO ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: outstream question [i think]
From: dev...@iamaquatics.org, Date: 25/08/2009 16:50, Wrote: The eventual goal is to create a program to log incidents at an aquatic facility. As of right now, I am just trying to write some small simple things to stretch out my [programming] legs. The goal is to connect to the database and retrieve some information on the click of the button. I can't seem to find the equivalent of a cout statement for gtk. I have googled it to no avail. GIO has I/O streams, though I can't imagine that being what you actually want. cout, if I remember my C++ correctly, is often used as a shorthand for printf() and the likes that are intrinsic to C/C++. If you're just wanting to write messages to the terminal temporally during development, that's probably the easiest way to go. GLib also has some message logging functions that'll write messages to the terminal, can be told to be considered an error, and other log message type support. If you're wanting to log messages, as in to a rotated log file, I believe there's libraries and/or glib functionality for that, some of which may include syslog support in Unix's. Then there's also GTKmm if you're working in C++, instead of trying to bang around in GTK directly. Or if you're trying to move to straight C without the ++, there's also Vala which is rather nice. I also believe I have read all the relevant documentation (including having to use the g_free() function. Again, GTKmm or Vala will make that mostly unnecessary. Fredderic Criminal Lawyers - Click here. Criminal Lawyer http://tagline.excite.com/fc/FgElN1g4hg7yQz5bFoAfhrQQndZbxK2MiyEtp8tru8FqIwNNTigE9IXmQmM/ ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
outstream question [i think]
Hello, Let me start out by saying that I am new to linux, c/c++, gtk+, and mysql. The eventual goal is to create a program to log incidents at an aquatic facility. As of right now, I am just trying to write some small simple things to stretch out my [programming] legs. At this point, I have gtk, mysql, and mysql++ cooperating with each other. I am working on this whole gtk thing and I can't seem to find an easier solution that the one I am using. The goal is to connect to the database and retrieve some information on the click of the button. I can't seem to find the equivalent of a cout statement for gtk. I have googled it to no avail. I also believe I have read all the relevant documentation (including having to use the g_free() function. Is there a better way to do what I am asking? If you need the database design, I can provide it. Thanks, -devlin -- Christopher Devlin dev...@iamaquatics.org O|ASS American Red Cross - LGI, WSI PADI - Divemaster Illinois Department of Public Health - Certified Pool Operator NSPF - CPO ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: outstream question [i think]
2009/8/25 dev...@iamaquatics.org Hello, Let me start out by saying that I am new to linux, c/c++, gtk+, and mysql. The eventual goal is to create a program to log incidents at an aquatic facility. As of right now, I am just trying to write some small simple things to stretch out my [programming] legs. At this point, I have gtk, mysql, and mysql++ cooperating with each other. I am working on this whole gtk thing and I can't seem to find an easier solution that the one I am using. The goal is to connect to the database and retrieve some information on the click of the button. I can't seem to find the equivalent of a cout statement for gtk. I have googled it to no avail. what do u mean equivalent cout statement for GTK . do u mean on the click of the button the results should be logged somewhere or need to printed on the stdout . be more clearer on this . I also believe I have read all the relevant documentation (including having to use the g_free() function. Is there a better way to do what I am asking? If you need the database design, I can provide it. It will be more handy if you provide a bird view of the design .. Thanks, -devlin -- Christopher Devlin dev...@iamaquatics.org O|ASS American Red Cross - LGI, WSI PADI - Divemaster Illinois Department of Public Health - Certified Pool Operator NSPF - CPO ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list -- Regards, ~Sid~ I have never met a man so ignorant that i couldn't learn something from him ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list