Note that there are some explanatory texts on larger screens.

plurals
  1. PONSlogging and NSString Conundrum
    primarykey
    data
    text
    <p>I am still rather new at this, seeing as this is my first project and all. But I have complete faith in the stack overflow community as you all have helped me before.</p> <p>I have a rather interesting conundrum for you all. I call the standard: </p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { </code></pre> <p>in my tableview to have it push a view controller, and update the value of string (method below)(The change in string is NSLogged by a different method):</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { appDelegate.baseURL = nil; musicInteractionController = [[xSheetMusicViewController alloc]init]; if (indexPath.row == 0 &amp;&amp; indexPath.section == 0) { appDelegate.baseURL = @"mussette.pdf"; [self.navigationController pushViewController:musicInteractionController animated:YES]; } else if (indexPath.row == 1 &amp;&amp; indexPath.section == 0) { appDelegate.baseURL = @"Importing PDF's.pdf"; [self.navigationController pushViewController:musicInteractionController animated:YES]; } else if (indexPath.row == 2 &amp;&amp; indexPath.section == 0) { appDelegate.baseURL = @"Example.pdf"; [self.navigationController pushViewController:musicInteractionController animated:YES]; } else if (indexPath.section == 1) { appDelegate.baseURL = [[ivContentsList objectAtIndex:indexPath.row]lastPathComponent]; [self.navigationController pushViewController:musicInteractionController animated:YES]; } [musicInteractionController release]; musicInteractionController = nil; appDelegate.baseURL = nil; </code></pre> <p>}</p> <p>My code has no errors, warnings, or memory leaks in it. And the change in string it read by a new view controller that updates the view to display the current PDF. It works correctly, but keeps displaying the same PDF over and over again, despite a change in the NSLog value. If it helps, I am using the iOS simulator, and not a real device.</p> <p>Here is a sample NSLog after pushing the first cell, then the second (ignore the nil view controller log, I think it's a bug. Also, the down Log is from a private method in the second view, so it can also be ignored. And a bonus to those who can resolve the CGContextClipToRect: invalid context 0x0 warning):</p> <pre><code> 2011-09-15 16:24:23.731 SheetMuse[43068:b603] value - (null) Sep 15 16:24:27-MacBook SheetMuse[43068] &lt;Error&gt;: CGContextClipToRect: invalid context 0x0 Sep 15 16:24:27-MacBook SheetMuse[43068] &lt;Error&gt;: CGContextGetClipBoundingBox: invalid context 0x0 Sep 15 16:24:27-MacBook SheetMuse[43068] &lt;Error&gt;: CGContextConcatCTM: invalid context 0x0 Sep 15 16:24:27-MacBook SheetMuse[43068] &lt;Error&gt;: CGBitmapContextCreateImage: invalid context 0x0 2011-09-15 16:24:27.050 SheetMuse[43068:b603] Application tried to push a nil view controller on target &lt;UINavigationController: 0x4c5e220&gt;. 2011-09-15 16:24:27.069 SheetMuse[43068:b603] value - mussette.pdf 2011-09-15 16:24:27.072 SheetMuse[43068:b603] Application tried to push a nil view controller on target &lt;UINavigationController: 0x4e74620&gt;. 2011-09-15 16:24:27.097 SheetMuse[43068:b603] value - mussette.pdf 2011-09-15 16:24:33.944 SheetMuse[43068:b603] Down Sep 15 16:24:36 MacBook-SheetMuse[43068] &lt;Error&gt;: CGContextClipToRect: invalid context 0x0 Sep 15 16:24:36 MacBook-SheetMuse[43068] &lt;Error&gt;: CGContextGetClipBoundingBox: invalid context 0x0 Sep 15 16:24:36 MacBook-SheetMuse[43068] &lt;Error&gt;: CGContextConcatCTM: invalid context 0x0 Sep 15 16:24:36 MacBook-SheetMuse[43068] &lt;Error&gt;: CGBitmapContextCreateImage: invalid context 0x0 2011-09-15 16:24:36.587 SheetMuse[43068:b603] Application tried to push a nil view controller on target &lt;UINavigationController: 0x4c54bf0&gt;. 2011-09-15 16:24:36.588 SheetMuse[43068:b603] value - Importing PDF's.pdf 2011-09-15 16:24:36.590 SheetMuse[43068:b603] Application tried to push a nil view controller on target &lt;UINavigationController: 0x4c50790&gt;. 2011-09-15 16:24:36.591 SheetMuse[43068:b603] value - Importing PDF's.pdf </code></pre> <p>Thanks in advance.</p>
    singulars
    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.
 

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