objective c - accessing an property inside an object for showtimes -


i have created object class called "movie" contains property called "showtimes" of type nsmutablearray.

now have class called "localshowtimes" contains property called moviesarray of type nsmutablearray filled objects of type "movie"

i know trying know first object of moviesarray , property "showtimes" in order it.

this trying: nsmutablearray *theshowtimes =[(movie *)[[moviesarray] objectatindex:[o]] showtimes];

but compiler complaining "expected identifier"

can tell me doing wrong?

thanks

you should either use objectatindex: or indexer:

// - old syntax nsmutablearray *theshowtimes =[[moviesarray objectatindex:o] showtimes];   // or - new syntax nsmutablearray *theshowtimes =[moviesarray[o] showtimes];  

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -