Thanks for the reply, I'm a newbie and I'm still trying to figure out how are things done in Cocoa.
I have another related question I'd like to ask you guys, cause I've searched through documentation and tutorials but I cannot find the exact answer. I'm trying to implement Model-Controller-View in my code. So, so far I created a class called FilterBank with all the data to be plotted plus a method to init from a file. Then I included one instance of the class FilterBank in the myDocument class. When I open a file, myDocument will read and load all the data to the class calling the initFromFile: method of FilterBank, that works ok. Then I can subclass NSView to hold and plot the image using NSImageRep, etc. My problem is with the controller. I subclassed NSViewController (FilterBankViewController) and tried to bind the class with the owner of the file. But I noticed that in IB I cannot do that, actually the bind tab says it's "Not Applicable". I don't understand why though, b/c I learned in a tutorial that loads data from a file and puts that into a table, that you need an NSArrayController to mediate between the table and the file owner. What kind of controller should I use here? Thanks. On Dec 18, 2009, at 7:04 PM, Scott Ribe wrote: > A couple more things I've thought of: > > - There is such a thing as a grayscale image that uses floats instead of > bytes for values. You may not even need to do a conversion. > > - You may even be able to wrap your buffer up in an image rep without > copying it. Thanks for the info, this is so very interesting for me, but as you said I'm still trying to accomplish much more basic stuff here. > > I don't use NSImage; my custom image views do some drawing at lower levels; > so I don't know for sure what all formats are supported. You'd have to study > the docs more. As a newbie, the first thing you should probably do is take > the shortest path to getting something on the screen, in other words finish > what you were already doing--then experiment with ways to avoid conversion > and/or copying. > > -- > Scott Ribe > scott_r...@killerbytes.com > http://www.killerbytes.com/ > (303) 722-0567 voice > > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com