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
0
votes
0 answers

plist should load and update table, but only works on first load

I have a simple tableview, which displays a list of historical input values. This list is saved in a plist, and loaded within the "ViewdidLoad" section. When any operation is used on the table, i.e. commitEditingStyle, i resave the values into my…
0
votes
2 answers

How can i write to a txt file several variables from servlet?

I have a web form page (jsp) ,where user gives some variables. I have a java class which has the same names.So with jsp bean i pass the user's input into 2 variables. So i have var_1=greek,var_2=turkey. I want now to pass these variables to a…
oikonomopo
  • 3,707
  • 7
  • 43
  • 65
0
votes
1 answer

writing NSDictionary into plist

Hi i am trying to write an NSDictionary to a plist in the documents folder, but unable to write , i am using the writeToFile:atomically: method , which returns False. The complete code is -(void)writeData:(NSDictionary *)dicResponseData { //…
Singh
  • 1,882
  • 2
  • 14
  • 30
0
votes
2 answers

Using writeToFile:atomically: consecutively doesn't work...why?

I'm trying to write a csv file. I have two arrays at hand - one with the titles (Name, Number etc), another with the actual values (Jon, 123 ...). Now, after the following two operations: [[titles componentsJoinedByString:@", "] writeToFile:file…
Sorin Cioban
  • 2,169
  • 6
  • 28
  • 35
0
votes
2 answers

ios problems with downloading an mp4 file

I have set up a connection to download this mp4 clip to my device and I'm using the following delegate function to store the data in a "streaming" type fashion. - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { …
Jacksonkr
  • 29,242
  • 36
  • 164
  • 265
0
votes
2 answers

Write to a Text File Resource in Android

Does anyone know how to write to a text file in Android using a resource like: R.raw.my_text_file I'm just looking for something clean and simple. I've Googled around but the examples I found didn't work. I tried to code using the Android docs but…
ThreaT
  • 3,644
  • 13
  • 58
  • 97
0
votes
1 answer

save NSMutable Data object in plist file

I, I'm currently trying to save NSMutable data in a plist file with the following method: [receivedData writeToFile:pathText atomically:YES] Note that received data comes from an URLrequest object. Here is my code: NSURLConnection *connection01 =…
Vico la patate
  • 209
  • 2
  • 4
  • 12
0
votes
1 answer

Using theos, how can I download an HTML file and overwrite an existing one (objective-c)?

I am trying to make a simple application (using theos on my device so no xcode/mac, just ifile) that displays an HTML file and has a button in the navigation bar that updates the local HTML file by downloading the new version from a server and…
mobabur94
  • 360
  • 2
  • 10
0
votes
1 answer

ImageIO error when writing to file

I am trying to save a UIImage but it gives me an error. The UIImage is picked from the UIImagePickerController and is then saved by making an NSData out of it and call writeToFile: on this NSData object. When doing so, I will get an error. The same…
simonbs
  • 7,543
  • 12
  • 64
  • 112
0
votes
2 answers

MAC OS X NSMutableDictionary writeToFile fail

my code is this. And the value of ret is always NO, I think the write path is not allowed. But where I can store my information on MAC OS X for my app? Can you help me to find the right path to store my app's setting? Thank you very much~…
RetVal
  • 87
  • 3
  • 9
-1
votes
1 answer

Logging user login attempts into text file in ASP .NET MVC

In order to log user attempts to login to my web application, I need to save each attempt to a text file . I create a logger model as following: public class Logger { public string name { get; set; } public string date { get; set; } …
-1
votes
2 answers

Creating A Password Manger In Python But It Is Not Writing To File

I am trying to create a password manager in python with tkinter. But when I try to write the account name, username and password it doesn't work. I am using a text box with StringVar to get the info from the textboxes. I don't know if the bug is in…
user10244651
-1
votes
1 answer

How can I call this Method In my ButtonActionPerformed

Background: I have about 4 buttons and I would like to write to file every time the button is clicked. So far when I writeToFile(); like in the deleteStudentActionPerformed method it deletes all of the students from all of the…
D_DOT
  • 1
  • 3
-1
votes
1 answer

Not writing (or even opening file) in php

I read many of the other questions on this site revolving around this error, none of which were able to help me, The below php code takes the data input from the html file and sends it to the php file, after printing "Hello Name" on the page, it…
J. Doe
  • 53
  • 1
  • 7
-1
votes
1 answer

addPerson (adds to an array) method isnt working, what's wrong?

I'm a student working on a project, and I have a method takes a Person, adds it to the array (Admits[]) and writes the array to file. The method currently does not do this, as the numSoFar value does not increase and the person is not saved to the…