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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -