New topic: Create ini file edit it and check for existing file
<http://forums.realsoftware.com/viewtopic.php?t=31396> Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message nl2ttl Post subject: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 4:28 am Joined: Thu Aug 23, 2007 4:39 am Posts: 26 I'm looking for a good example to check at program start up for existig ini file. If there is no such file let the user fill in the information and create this file. In the program there must be a option to change the configuration. Is there a goog howto manual? RB skills are pretty low and like to learn more Top classone Post subject: Re: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 11:06 am Joined: Mon Aug 14, 2006 9:33 pm Posts: 777 .ini files are not much used anymore. Most RB programmers prefer to save preferences in either a text file or an .xml file (or on the Mac a pList). You will probably want to create such a file upon the first launch of your program. You can then allow the user to change preferences at any time. Thus, the problem is pretty much that of creating and writing to a file. The best source of information is, I believe, the Examples which come with the RB downlaod. There are several books out there, but as they go thru the writing process and publishing process, they are pretty much out-of-date when they hit the shelves. There are project examples on Files and another on Folderitems which should get you up to speed on I/O operations. _________________ Roger Clary Class One Software Educational Software for Lifelong Learning http://www.classonesoftware.com Top nl2ttl Post subject: Re: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 11:28 am Joined: Thu Aug 23, 2007 4:39 am Posts: 26 Thank you for the reply, to only problem with reading txt files for me is that how do i select that: row1 = firstname row2 = lastname row3 = computername end more.... Top rbasic20091005153 Post subject: Re: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 11:51 am Joined: Sat Apr 04, 2009 5:10 pm Posts: 439 Read it into a listbox. _________________ Mac OS X 10.5.6/REALBasic 2008 R5.1 I say 'no' to MBS plug-ins. I boycott them. Top classone Post subject: Re: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 4:45 pm Joined: Mon Aug 14, 2006 9:33 pm Posts: 777 Use the binaryStream and create your file as a binary file. dim b As binaryStream row1 = b.readPString row2 = b.readPString there are other details to be worked out, but you can get those details by working through the Examples in the Files folder. _________________ Roger Clary Class One Software Educational Software for Lifelong Learning http://www.classonesoftware.com Top DaveS Post subject: Re: Create ini file edit it and check for existing filePosted: Thu Dec 03, 2009 5:51 pm Joined: Sun Aug 05, 2007 10:46 am Posts: 1804 Location: San Diego, CA I have an "ini" file class that works quite well with RB if you are interested... several other forum members have already incorporated it into their projects with great success.... http://www.rdsisemore.com/classini_file.rbo _________________ Dave Sisemore MacPro, OSX 10.5.8 RB2009r2 Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 6 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
