Hello,
The title question might be a little vague. I will try to explain as good as i can (also note im new to cocoa programming so excuse any mistakes :) ).
I have a VIEW that extends NSView where i would like to draw some images. I want the images to be loaded from some files on the disk, when i click a button.
I managed to do all the loading into an NSMutableArray. My problem is, how to setup things: - i need the NSMutableArray with the images (paths) to be available for the loading function (so i put it in a controller and assigned an action to the button in the UI). but in this case, how can i acces it in the drawRect function of my custom view class?
- if i put it as a member of my custom view class, i dont know how to link it to the button , so that on the button click , the array will be filled with images paths.
I guess im a bit confused since im new to osx programming , on how these things get connected.
Hope someone could clear the air a little for me . Thanks.