Questions tagged [writetofile]

for questions concerning the writeToFile method, part of the NSData class in OS X and iOS

This tag should be used for questions that relate to the use of one or more of the various writeToFile methods, which are provided by the NSData class in both the Mac OS X and iOS APIs.

The Apple developer documentation for the NSData class is available online here.

351 questions
-1
votes
2 answers

-[__NSDictionaryI isNSString__]: message sent to deallocated instance

I am stuck on this for over a week now, and apparently nobody has reported this issue before on stackoverflow. Please read my description carefully before referring me to other postings, because I have read them all and none of them has my answer. I…
Kaveh Vejdani
  • 234
  • 1
  • 6
-1
votes
2 answers

Proper way to giving name to file when [NSData writeToFile:] used

I'm using that code to save downloaded videos from internet to application document folder: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths…
woheras
  • 109
  • 1
  • 5
  • 16
-1
votes
3 answers

iphone-Array Won't Add NSNumber

I am using xcode 4 to compile this application. I am building a space game. To store my highscore values (which in this case is represented by an int, _totalSeconds), I made an array which I write to a file. Whenever the character "dies", his…
-1
votes
2 answers

Unable to create Plist of NSStrings

hi am trying to create a plist of my calculations but it turns out the list is empty....pls help here is my code.is there any othe way to write strings to a file other than this... -(float)calculate { if(!self.operatorLabel.text.length) …
Raon
  • 1,186
  • 3
  • 10
  • 25
-1
votes
2 answers

cannot write in the file

good day guys, im creating a program that will write the data to a text file. the data is coming from an array list, it is a data that is solved from the array list e.g : public double getGincome(){ gincome=rpd*dwork; return…
NewInJava
  • 37
  • 1
  • 3
  • 11
-2
votes
1 answer

App crashing when attempting to Write to .json

EDITED So I am trying to write a code that writes to a .Json but my app keeps crashing on me. I follow serval tutorials on what to do but non of them help. My code is as Follows: AndroidManifest:
-2
votes
1 answer

How to write a list to a text file. Write 50 items per line

I am working on a program where I read data from a file, store that data in a list and write that data to a new file in a special format. I have created the method to read the original file and store it in a list. The file I read from is a list of…
-2
votes
1 answer

Issues printing to a CSV in Python

For work I've made a very very basic UI that when a btn is clicked, it generates users using a web service. I want to be able to write these user details into a csv, but I'm struggling. Could someone please help? I've commented in my code where…
-2
votes
2 answers

Function name must be a string in /var/www/html/fazrin/application/controllers/file.php on line 18

class File extends CI_Controller { function __construct() { parent::__construct(); $this->load->helper('file'); } function writetest() { $data = "Hello World!"; $file=…
-2
votes
1 answer

How to write some amounts to a File?

I'm doing this program for a class; I have a listbox with 4 choices that are counted each time they're selected,and i'm supposed to write out the results to an out.File so that they can then be retrieved and displayed when asked to. Here's an…
-2
votes
1 answer

Array Object at Index Error

So, I have an array which I retrieve from a file named "choice". My problem is that every time I go to the highscore page, it only displays the highest high score. Also, it only keeps two of the elements from array when I load it next time. Here is…
-2
votes
1 answer

objective c : Cannot overwrite file with array

I'm new to objective c and the problem I'm having is that my "scores.xml" is not overwritten once I try to save it. I have imported the "scores.xml" to my project, but it does not get overwritten once I try to do so. What am I doing wrong? Does…
Rokas
  • 57
  • 1
  • 5
-3
votes
1 answer

Send all file output to a text file

I have the below, along with several f.write commands in my python, but I can't figure out how to get it to print/catch errors to the same file. f=open("C:/path/to/file/log.text","a+") Also, how would I do this for powershell? I tried the below,…
physlexic
  • 730
  • 1
  • 6
  • 18
-3
votes
1 answer

Check if file is open, and close if it is

I have a c# windows form application that writes results to a text file. This is done by clicks on different buttons at their respective times, that all run functions to add specific text to the file. The text file can be opened for viewing via…
marcuthh
  • 509
  • 9
  • 35
-3
votes
2 answers

How to pass strings as parameters in C and write to file?

I'm working on a project in C using layered architecture: App, UI, Domain, Repository and Controller modules. I'm beginner in C. I don't know how to pass strings as parameters from a function to another and finally write to a file. Simplified…
ABC
  • 187
  • 10
1 2 3
23
24