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
Post a Comment