Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Array & CustomView Communication Q

Array & CustomView Communication Q
Thread Tools
Senior User
Join Date: Sep 2002
Location: Canastota, New York
Status: Offline
Reply With Quote
Sep 26, 2002, 11:41 PM
 
Hey Cocoa guru's. Got a newbie question for you. I apologize in advance if it's painfully obvious, but I can't seem to figure it out:

I have a custom view that draws itself quite nicely. It has its own controller and thus source files (e.g. myViewController.h, myViewController.m)

I have another controller, which simply makes an array.

My problem is getting the Custom View controller to get the array data and use it in its own code. Can somebody give me a quickie like-you're-talking-to-an-idiot explanantion of how I might go about this?

I appreciate any advice...

Spasibo,
Jason

(edited for spelling)
     
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 27, 2002, 01:25 PM
 
1. Put a method in your array-creating class that returns the array.
2. Import the array-creating class' header file into the custom view's controller.
3. Have the custom view's controller call the method you created in step 1 and assign the array to a variable. This will give you access to the array's data. Now you can interact with the array just as if the custom view's controller had created the array itself.

Though I have to admit I'm curious why you'd make a class that does nothing but create an array....
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:50 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2