Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-27-2009, 07:28 PM   #21 (permalink)
eddietr
Registered Member
 
Join Date: Apr 2009
Posts: 536
Default

Quote:
Originally Posted by dicklacara View Post
So, on the iPhone (or the server, for that matter), a View or VC that wants to access the "array" does so by referencing the appDelegate. In effect, isn't the appDelegate acting as the "model" even though it has subordinated the creation, maintenance and manipulation of the "array" to other classes?
No, view controllers get a *reference* to an array controller from the app delegate. Once the reference is obtained, they use the array controller directly. The array controller is a proxy to the actual array.

Quote:
What happens if a VC wants to search or sort the array for presentation does it do that itself, or request it from the "model" controller through the appDelegate?
Well, sorting is tricky when not all of the objects have yet been downloaded or if they've been removed from RAM temporarily due to memory constraints. So I leave that up to the controller. (not the vc)

Quote:
I would gladly help in any way I can. I am relatively new to Cocoa, but I understand the concept and see the need to define "where to put the data and the methods to manipulate it".
That's cool. I wrote down some ideas on how to generalize this. It might start as a tutorial and then grow into something that could be reused.
eddietr is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 288
22 members and 266 guests
Affan, Batman, beginer2007, calvin464, computermatt, dave1619, dre, Eagle11, FlukeDude, iGeorG, itzdark, Kalimba, LemonMeringue, masc2279, paul84, phaseIV, pstool, rdfrahm, ThirtyOne, Varras, williamlegate, wuf810
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,214
Threads: 38,997
Posts: 171,053
Top Poster: smasher (2,569)
Welcome to our newest member, Varras
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:15 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.