checking for a blank box?



hello,

What value do I compare the output of gtk_editable_get_text() with in
order to know if the entry box I'm getting text from is empty or not?
I'm using an if statement and have tried to do If
(gtk_editable_get_text(entry,0,-1) == NULL) and it won't make the match
even when I don't input anything into the entry box. I've also tried
comparing to '\0' and 32 (ascii value for a space) and nothing ever
matches.  how do i check if a user has inputted anything? 

 The reason i need to do this is that when I convert the "empty" char
value to an int a 0 is always returned and since a 0 is a valid value in
my program I dont want someone to be able to do nothing and still get
valid results because of the 0 being returned without user input. I'm
doing my comparison w/o doing the conversion to int and I thought a
simple If statement comparing the function I'm using to NULL would work
but it's not.

thanks for any help
brandon



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