what is best for a simple 3D animation

2010-09-12 Thread Martin Beroiz
Hi everybody, I'll start a program that I will eventually port to the iPod touch platform, but I also want to have a mac counterpart. It will involve a simple animation, a sphere that the user can spin faster with his finger (in the iPod Touch of course), later I'll make it a little more compl

NSImage and NSBitmapImageRep

2010-03-16 Thread Martin Beroiz
Hello everybody, I have a question relating NSImage and NSBitmapImageRep. I have a stream of data that I want to display in a view and it's not in any standard image format. So I created an NSBitmapImageRep, then I filled the bitmapdata with the data and drew it in the view with drawInRect: met

Re: NSImageRep simple code

2010-03-03 Thread Martin Beroiz
Oh, thanks! I was missing that, now it works ok. I'll keep playing with this toy code. M. On Mar 3, 2010, at 11:02 PM, Graham Cox wrote: > > On 04/03/2010, at 3:54 PM, Martin Beroiz wrote: > >> bitsPerSample:8 > >> pixels[0] = 1;

NSImageRep simple code

2010-03-03 Thread Martin Beroiz
Hello everyone, I'm trying to understand how NSImageRep works, so I read the docs and came up with this simple code that seems to... do something. I'm confused about what's actually doing, I only see a big black block in my custom view. My intention is to make a 2x2 pixels image with differe

RE: warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Martin Beroiz
OMG, I'm sorry I just found that I should add next to the class definition. Disregard my last message. (I wonder why he doesn't mention that in the book). Begin forwarded message: > From: Martin Beroiz > Date: February 12, 2010 8:19:04 PM CST > To: Cocoa Dev >

warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Martin Beroiz
Hello everybody, I'm having a difficult time trying to figure out why cocoa gives me a warning when trying to implement a delegate method in my class. I'm writing the SpeakLine application from Aaron Hillegass' book in which the user enters a line of text and there's 2 buttons: "Stop" and "Speak

newbie question -views and MCV model

2010-01-14 Thread Martin Beroiz
Hello all, i have a very noob question about the MCV model to display a data file in a view. I'm trying to implement Model-Controller-View. So, so far I created a class called FilterBank that will contain all the data to be plotted plus a method to init from a file. Then I included one instanc

Re: 2D grayscale image from an array of floats

2009-12-19 Thread Martin Beroiz
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-Vie

Re: 2D grayscale image from an array of floats

2009-12-17 Thread Martin Beroiz
On Dec 17, 2009, at 6:17 AM, Graham Cox wrote: > > On 17/12/2009, at 5:32 AM, Martin Beroiz wrote: > >> Can anyone please give me any hint on what would be the best approach to >> this problem? or may be point me some relevant documentation I might read? I >> know

2D grayscale image from an array of floats

2009-12-17 Thread Martin Beroiz
Hello, I'm new in cocoa, and I want to accomplish something in a program i'm developing. I have an array of floats, that is basically a matrix, and I want to display it on a view as a 2D grayscale image, with each pixel in a gray tone proportional the value of that float. So far I have subc