Fwd: Re: How to "strcmp" data from gtk_entry?

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

 






From: Vadim Berezniker <vadim@xxxxxxxxxxxxxx>
To: george carter <cglobal25@xxxxxxxxxxx>
CC: gtk-list@xxxxxxxxx
Subject: Re: How to "strcmp" data from gtk_entry?
Date: Mon, 18 Aug 2003 06:27:30 -0400

george carter wrote:
I'm having a small problem with using the data from a gtk_entry. I would like a user to enter a username and password into a gtk_entry. I don't have a problem with connect the button signals or anything. I'm calling a function which should compare the gtk_entry data with "username" for example, but I'm not sure how to approach it. I figure I would use "strcmp" and if it returns false than "set_text_entry" to "user not in database." How would I put "data" into the strcmp function?

if(!strcmp(gtk_entry_get_text(username_entry), "unsecure_user")) printf("The username is correct.\n");


I've tried this code but it doesn't seem to compile without errors. I was actually expecting something with a comparision resulting in a true or false being returned. Maybe something similar to this:
if (strcmp(s1,s2)==0)
printf("equal\n");
else if (strcmp(s1,s2)<0)
I'm just not sure how to plug in the values. Any ideas?


_________________________________________________________________
MSN 8: Get 6 months for $9.95/month. http://join.msn.com/?page=dept/dialup

_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux