Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7720145
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:35:25+00:00 2026-06-01T03:35:25+00:00

i am having an application which can share Notes to evernote,it works fine i

  • 0

i am having an application which can share Notes to evernote,it works fine i can upload and download my Note to Evernote within the app,i have a Note title and Note subject,i uploaded the Notes to evernote viz UITableview controller.The Textlabel.text is the title for the note and detailtextlabel.text is the note subject.i only get the Notesubject correctly means ,if i have two notes in tableview with title,like this formate 1) title :firstitle ,notesubject :firstNotessubject 2)title :secondtitle ,notesubject :secondNotessubject,,then i press the upload button it uploads the notes to evernote,but the title remains firstitle only with notes,like this formate 1) title :firstitle ,notesubject :firstNotessubject 2)title :firsttitle ,notesubject :secondNotessubject.my code for uplode button is

-(IBAction)sendNoteEvernote:(id)sender{
 NSMutableString *strtitle = [[NSMutableString alloc] initWithString:@""]; 
    for (int t = 0; t<[appDelegate.indexArray count]; t++) { 
        NSString * aStringtitle = [[NSString alloc] initWithString:[appDelegate.indexArray objectAtIndex:t]] ;

    note.title =aStringtitle;
    }
        NSMutableString *str = [[NSMutableString alloc] initWithString:@"NOTES:"]; 
        for (int i = 0; i<[appDelegate.notesArray count]; i++) { 
            NSString * aString = [[NSString alloc] initWithString:[appDelegate.notesArray objectAtIndex:i]] ;
            NSString * ENML= [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note>%@",aString];
 ENML = [NSString stringWithFormat:@"%@%@", ENML, @"</en-note>"];
            NSLog(@"%@", ENML);

            // Adding the content & resources to the note
            [note setContent:ENML];
           // [note setTitle:aStringtitle];
            // [note setResources:resources];

            // Saving the note on the Evernote servers
            // Simple error management
            @try {
                [[eversingleton sharedInstance] createNote:note];
                _acteverbackup.hidden = YES;
                _actimageeverbackup.hidden =YES;
            }
            @catch (EDAMUserException * e) {
                _acteverbackup.hidden = YES;
                _actimageeverbackup.hidden =YES;
                NSString * errorMessage = [NSString stringWithFormat:@"Error saving note: error code %i", [e errorCode]];
                proAlertView *alert = [[proAlertView alloc]initWithTitle:@"Evernote" message:errorMessage delegate:self cancelButtonTitle:@"ok" otherButtonTitles:nil];
                [alert setBackgroundColor:[UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:1.0] withStrokeColor:[UIColor colorWithHue:0.0 saturation:0.0 brightness:0.0 alpha:1.0]];
                [alert show];
                [alert release];        return;
            }

in the above code appdelegate.indexarray is the title and appdelegate.notearray is the Subject..my UItableview code look like this.

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}


// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return[appDelegate.notesArray count];
}
/*-(UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypesForRowWithIndexPath:(NSIndexPath *)indexPath
 {

 return UITableViewCellAccessoryCheckmark;

 }*/

// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    NSUInteger row = [indexPath row];
    NSString *CellIdentifier;
    CellIdentifier=[NSString stringWithFormat:@"cell %d",indexPath.row];


    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];    
    if (cell == nil) {

        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];
        cell.detailTextLabel.lineBreakMode = UILineBreakModeWordWrap;
        cell.detailTextLabel.numberOfLines = 0;
        UIImageView* img = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bgCELL3@2X-1"]];
        [cell setBackgroundView:img];
        [img release];
        count++;
    }
    NSMutableString *strr=[[NSMutableString alloc]initWithString:[appDelegate.indexArray objectAtIndex:indexPath.section]];
    cell.textLabel.text =strr ;
    cell.textLabel.text = [appDelegate.indexArray objectAtIndex:row];
    cell.textLabel.font = [UIFont fontWithName:@"Georgia" size:14.0]; 
    cell.textLabel.textColor = [UIColor brownColor];


    //NSMutableString *notes=[[NSMutableString alloc]initWithString:[appDelegate.notesArray objectAtIndex:row]];
    //cell.detailTextLabel.text =notes;
    cell.detailTextLabel.font = [UIFont fontWithName:@"Georgia" size:14.0]; 
    cell.detailTextLabel.textColor = [UIColor darkGrayColor];
    cell.detailTextLabel.text = [appDelegate.notesArray objectAtIndex:row];
    //textView.text=notes;

    //[notes release];

    cell.backgroundColor=[UIColor clearColor];
    cell.accessoryType = UITableViewCellAccessoryNone;



    return cell;
}

whats the error in my code,please help me to do this.
thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T03:35:27+00:00Added an answer on June 1, 2026 at 3:35 am

    Try changing the line:

    NSMutableString *strr = [[NSMutableString alloc] initWithString:[appDelegate.indexArray objectAtIndex:indexPath.section]];
    

    to:

    NSMutableString *strr = [[NSMutableString alloc] initWithString:[appDelegate.indexArray objectAtIndex: row]];
    

    Also get rid of the:

    NSUInteger row = [indexPath row];
    NSString *CellIdentifier;
    CellIdentifier = [NSString stringWithFormat:@"cell %d",indexPath.row];
    

    simply use:

    CellIdentifier = @"noteCellIdentifier";
    

    This doesn’t have anything to do with your question but it’s what cell reusing is all about.

    EDIT:

    This part of code also looks suspitious:

    for (int t = 0; t<[appDelegate.indexArray count]; t++) { 
        NSString * aStringtitle = [[NSString alloc] initWithString:[appDelegate.indexArray objectAtIndex:t]] ;
        note.title =aStringtitle;
    }
    

    It’s not clear what you want to do but you’d probably want to move this to:

    for (int i = 0; i<[appDelegate.notesArray count]; i++) { 
        NSString * aStringtitle = [[NSString alloc] initWithString:[appDelegate.indexArray objectAtIndex:i]];  //note: t changed to i
        note.title =aStringtitle;
    
        NSString * aString = [[NSString alloc] initWithString:[appDelegate.notesArray objectAtIndex:i]];
        NSString * ENML= [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">\n<en-note>%@",aString];
        ENML = [NSString stringWithFormat:@"%@%@", ENML, @"</en-note>"];
        NSLog(@"%@", ENML);
        //....
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following application which replicates an issue I'm having in a larger
Scenarion: I am having a web application which is going to use SqlServerReport(SSRS) sitting
I'm having a problem compiling an application which uses Core-Plot in debug mode. It
I'm having trouble deploying .NET application which uses Microsoft Access automation. I've installed the
I ran dotTrace on my application (which is having some issues). IntPtr System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr, IntPtr,
I am having one Gtk+ and C application in which i want to set
I am creating an application for the iPhone which involves having more than one
I have a Swing application in which I have multiple windows with different goals
I have an iOS application which uses an UIStoryboard to control its flow. I
I have a driver which can be installed on Windows (XP/Vista/7). It's accessed via

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.