Tuesday, December 14, 2010

Trying to find wxFile with both hands

So far, I've had to just give up and use fopen and fprintf to write to my text logfile, but I know that a real man would have used wxFile. The problem is, I just can't figure out how to make my wxFile a global object in my application (maybe after I've had more sleep; I guess I'm once again forgetting to consider objects as objects) so that I can open a file, leave it open, and add to it in different subroutines. So, in the meantime, here are my favorite links for wxFile:

Class References:

http://docs.wxwidgets.org/trunk/classwx_file.html

http://biolpc22.york.ac.uk/wx/docs/html/wx/wx_wxfile.html

Forum threads of people with stupid questions like my own:

http://www.programmingforums.org/post132821.html

The inevitable zetcode tutorial (the wxFile stuff is towards the end):

http://zetcode.com/tutorials/wxwidgetstutorial/helperclasses/

A google books result (this book looks pretty nice, actually):

http://books.google.com/books?id=CyMsvtgnq0QC&pg=PA397&lpg=PA397&dq=using+wxFile&source=bl&ots=SSdvj7Lnva&sig=FltKY36kTFWrPluhkgCbJgsLsQk&hl=en&ei=4q8HTZ7kO4-enwfAuqTmDQ&sa=X&oi=book_result&ct=result&resnum=6&ved=0CCgQ6AEwBQ#v=onepage&q=using%20wxFile&f=false

And finally, the example-laden page from Cprogramming.com on how to use fopen and fprintf:

http://www.cprogramming.com/tutorial/cfileio.html