Resending because I never saw this appear in the list.

On 10/08/2009, at 21:51 , Brian Bruinewoud wrote:

I found the motivating example for this thread.

Files are:
http://media.pragprog.com/titles/amiphd/code/FileIO/FilesystemExplorer/Classes/DirectoryViewController.m
http://media.pragprog.com/titles/amiphd/code/FileIO/FilesystemExplorer/Classes/FileOverviewViewController.m

For this book:
http://books.pragprog.com/titles/amiphd/iphone-sdk-development

The methods of significance are as follows:
In DirectoryViewController's tableView:didSelectRowAtIndexPath: the code creates a new FileOverviewViewController and sets its filePath property. In FileOverviewViewController's setFilePath: method, the code calls [self updateFileOverview] In FileOverviewViewController's updateFileOverview, the code updates GUI elements (UILabel.text)

Is this all ok? Going on the previous discussion, I don't think so (and I hope I'm right).

To fix, it would be sufficient to remove [self updateFileOverview] from setFilePath and put it in viewWillAppear. Right?

I already raised a bug against the book for other elements of setFilePath being incorrect/non-idiomatic, looks like there might be another...

Please confirm or clarify my understandings,
Thanks,
Brian.

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to