Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding a object from one array to another
    primarykey
    data
    text
    <p>I have 3 tables. The first is displaying seven weekdays, the second is displaying what ever is in the array connected to the day, and the last is a list with different strings, which i want to be able to click on, and then add to the previous selected day array.</p> <pre><code>mondayArray = [[NSMutableArray alloc] init]; tuesdayArray = [[NSMutableArray alloc] init]; wedensdayArray = [[NSMutableArray alloc] init]; thursdayArray = [[NSMutableArray alloc] init]; fridayArray = [[NSMutableArray alloc] init]; saturdayArray = [[NSMutableArray alloc] init]; sundayArray = [[NSMutableArray alloc] init]; // Sætter ugedage op Weekdays *mandag = [[Weekdays alloc] initWithName:@"Mandag" daylist:mondayArray]; Weekdays *tirsdag = [[Weekdays alloc] initWithName:@"Tirsdag" daylist:tuesdayArray]; Weekdays *onsdag = [[Weekdays alloc] initWithName:@"Onsdag" daylist:wedensdayArray]; Weekdays *torsdag = [[Weekdays alloc] initWithName:@"Torsdag" daylist:thursdayArray]; Weekdays *fredag = [[Weekdays alloc] initWithName:@"Fredag" daylist:fridayArray]; Weekdays *lordag = [[Weekdays alloc] initWithName:@"Lørdag" daylist:saturdayArray]; Weekdays *sondag = [[Weekdays alloc] initWithName:@"Søndag" daylist:sundayArray]; </code></pre> <p>In another implementation file (InfoTable) i use the arrays to create the tables:</p> <pre><code> cell.textLabel.text = [dayList objectAtIndex:indexPath.row]; </code></pre> <p>Then in the last implementation file, i tries to add to that array at didSelectRowAtIndexPath:</p> <pre><code> InfoTable *appDelegate = (InfoTable *)[[UIApplication sharedApplication] delegate]; NSString *temp; // Gives me the item from the list i clicked temp = [dagListe objectAtIndex:indexPath.row]; // Tries to add the above 'temp' to the array. [appDelegate.dayList addObject:temp]; </code></pre> <p>I can't seem to find the error, and when i run it i get:</p> <pre><code>-[VisueltSkemaAppDelegate dayList]: unrecognized selector sent to instance 0x58241d0 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload