Re: How can I empty a .dat file in Xcode.
Re: How can I empty a .dat file in Xcode.
- Subject: Re: How can I empty a .dat file in Xcode.
- From: Shane Stanley <email@hidden>
- Date: Mon, 28 Sep 2015 10:20:40 +1000
On 28 Sep 2015, at 9:48 AM, Brian Christmas <email@hidden> wrote:
I’m trying to create a blank .dat file, using the code below.
What do you mean by a .dat file? What format is it supposed to contain?
While the code writes a blank entry when run in Applescript, it writes ‘list’ when used in my Xcode project.
The code can't write a "blank entry". If the file is empty, nothing was written. It sounds like TheWriteItem might not be what you think it is. But if it writes {} as list, which is what your code says, it will look like 'list' of you then read it as a text file.
And why on earth are you wrapping the write commands in a Finder tell block? Tell the current application -- it's absolutely nothing to do with the Finder.
It say the first ‘say’ statement, but not the second.
When? Why does it run differently?
Add some logging to find out. And where is the ‘list’ text coming from?
At a guess, from your code. Applescript is supposed to write an empty entry when no write statement is issued.
You don't "write an empty entry"; you write something, or you don't write at all.
Can anyone tell me how to empty a .dat files in Xcode, please?
Try adding some logging to see what code runs.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden