my doubt



hi members!
i am a student of engineering from india & i am using glade for developing the gui of my project.i have encountered a problem. My problem exactly is :Suppose i have created an application using glade2.In the source files(say, main.c) i create a character array (i.e. a storage space) & then i run the aplication. Now, when i click on a file icon while my application is running, i must get the full path of that file in my pre-allocated storage space.(for eg. if the file is q.c in directory /home/chaits/ , then when my application is running, if i click on the q.c's icon, i must get "/home/chiats/q.c" in the character array i created)
i asked this question on the glade mailing list & there i got this reply :
"I guess this is more of a GTK+ question than Glade; beware that most GTK functions allocate memory for char arrays themselves and you should never try to modify or free them. If you insist on having your own copy, use strdup or similar function. Finally, if you want to pre-allocate a  determined amount of space (which doesn't seem right to me, but hey, people are different), you could either think of global variables or attach them to a specific GTK object with _object_set_data & co. functions."

but not everything is clear from this. will anyone guide me in more detail??

Regards,
Chaitanya.




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