gettingstarted
[Top] [All Lists]

Re: Saving data to an external file

To: Getting Started <gettingstarted at lists dot realsoftware dot com>
Subject: Re: Saving data to an external file
From: Lennox Jacob <lenpartico at yahoo dot com>
Date: Sun, 30 Jul 2006 20:05:37 -0700 (PDT)
Delivered-to: listarchive at realsoftware dot com
Delivered-to: gettingstarted at lists dot realsoftware dot com
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=hs8K5MOfx11KhvcowU3zHp6vJ8l/vO5eDieTcAvvMyeMX4to2OUXLimRHkRYVCvRJsZ6wZzTUMGIuhGvG8VT6rQQG8pNnvpFdgucIahRl3pyAMgn0uSjSQ12pkrJVY4DQv7Ph9GCLyxlhXpfSmv9yN/y6+1/33Ei6iM2iYfAHmE= ;
Hi Charles,
Thanks, 
"Probably.  After creating the file, change the MacCreator property of  
the FolderItem to "bbBB"."
I can open it in myApp2 by dropping it on myApp2's icon, then save the new file 
and it will be saved as a myApp2 file now. But how is that done programatically?
Lennox.

Charles Yeomans <charles at declareSub dot com> wrote: Probably.  After 
creating the file, change the MacCreator property of  
the FolderItem to "bbBB".

On Jul 30, 2006, at 10:53 PM, Lennox Jacob wrote:

> Great Charles.
> Thanks, I tried it and has replaced what I had.
> Thanks again.
>
> I have a new problem. That file was created by MyApp (Creator code  
> aaAA) and has MyApp's icon. When double-clicked it opens myApp as  
> expected but I want it to open another app, myApp2 which has bbBB  
> as its creator code.
> Is that possible?
> Thanks again
>
> Lennox
>
> Charles Yeomans  wrote:
> On Jul 30, 2006, at 10:16 PM, Lennox Jacob wrote:
>
>> OK,
>> This works
>
> Only if you're lucky.  Here is some code that doesn't depend on luck.
>
> dim f as FolderItem = DesktopFolder.Child("foo")
> If f is nil then //something went wrong
>    Return
> End if
>
> dim t as TextOutputStream = f.AppendToTextFile
> If t is nil then
>    //check f.LastErrorCode
>    Return
> End if
> t.WriteLine "foo"
> t.WriteLine "foo"
> t = nil //the file is closed when the object is destroyed
>
> FolderItem.AppendToTextFile creates the file if one does not already
> exist; presumably CreateTextFile fails if the file already exists.
>
> Charles Yeomans
>
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
>
>
> Search the archives of this list here:
>
>
>
>    
> ---------------------------------
> Do you Yahoo!?
>  Get on board. You're invited to try the new Yahoo! Mail Beta.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> 
>
> Search the archives of this list here:
> 

_______________________________________________
Unsubscribe or switch delivery mode:


Search the archives of this list here:



                
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ 
countries) for 2¢/min or less.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>