Dear Gus

> 
> > $$$$ I have a column for password and obviously as name suggests..it
> > cannot be displayed..I have solved this problem by having a duplicate
> > entry private_password that does not have a column in the GtkList and
> > i compare with this private_pwd entry...
> 
> If I understand you correctly, you have two tasks to accomplish: 1.
> displaying a GtkList with user information, like name and possibly other
> attributes (columns), 2. check whether the password input from a
> GtkEntry matches any of the passwords of any users. Correct, so far?
> 
> You probably should segregate list display and password storage, indeed.
> Use the GtkList only to display columns with sensible, visible data.
> Passwords are probably better kept and managed in a separate construct
> of tools like memory chunks, linked lists, arrays or hashes, as provided
> by GLib. By using GHashtables you wouldn't even need to carry out the
> comparisons yourself. Care would be required, however, if the password
> (and not the user name) were to be used as key. See section GLib data
> types in its reference manual for further descriptions.
> 

######### Exactly..What i want to do. I do not display password
characters and mask them to all asterisks in the view. Done..
Then i keep a duplicate entry in list that is not visible -> private_pwd
Now i could compare A GtkEntry Input with this private_pwd and give
access to application...

######### Thank you for your very clear and elaborate explanation...I
am afraid i am too naive not to be as specific as you....

> > Anyways, thank you for the suggestions. I have obtained the correct
> > output .. using goto statement.. just needed to avoid using goto .....
> 
> The "goto" statement is not as evil as some C/C++ purists (and
> tutorials) suggest. If used correctly, in certain situations it can
> improve both readability of the source and performance of the
> executable. Just don't use "goto" instead of "while" or "for" loops  :-)
> 
> However, basically there is always a way to emulate a "goto" statement
> by one or more "break" statements. So if your loop works using "goto"
> but not using "break" it may contain at least one other logical bug.
> Possibly you were trying to break out of an outer loop from within an
> inner loop? This can't be achieved by a single break. You either need a
> probably more complex construct of at least two "break" statements or
> one "goto" indeed. The question is just whether you're certain to know
> what loop levels you are in?


########## You are perfectly on the dot.....multiple inner loops ( say
3 ) and getting out of all from the innermost ...out of the for loop
is the problem..where i used GOTO....



########## I admire your programming skills..

Have a good day !


- Vinod
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to