New topic: BinaryStream.Create - how to specify file name?
<http://forums.realsoftware.com/viewtopic.php?t=46586> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message edcnow Post subject: BinaryStream.Create - how to specify file name?Posted: Thu Jan 17, 2013 1:36 am Joined: Sun Aug 28, 2011 12:15 pm Posts: 7 Now that CreateBinaryFile is deprecated... If I change stream=f.CreateBinaryFile("pn.knw") to stream=BinaryStream.Create(f,True) How do I set the binary file name to pn.knw? I am wanting to create a preferences file with a specific name. Thanks! Deb Old code below **************** Dim f As FolderItem Dim stream as BinaryStream Dim Path as string f = SpecialFolder.Preferences.Child("kpref") Path=f.absolutePath if f<>nil then stream=f.CreateBinaryFile("pn.knw") stream.WritePString str(Wtop) stream.WritePString str(WLeft) stream.WritePString Path stream.WritePString Name stream.WritePString Key Stream.Close else MsgBox "Error Writing Registration File" Quit end if Top timhare Post subject: Re: BinaryStream.Create - how to specify file name?Posted: Thu Jan 17, 2013 1:47 am Joined: Fri Jan 06, 2006 3:21 pm Posts: 11991 Location: Portland, OR USA Change stream=f.createBinaryFile("pn.knw") to f=f.Child("pn.knw") stream=BinaryStream.Create(f, True) Tim Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 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]
