Tuesday, April 29, 2008

Progress

I've just been seeing what I can do on my own now.  Obviously there isn't a lot, but I've managed to change colors of objects and change text in text fields.  I can also set attributes of objects such as fonts and colors and whether the text within is editable.  Of course those methods only apply to certain objects.  What I am trying to do now, with difficulty, is simply be able to create a new NSTextField object and display it.  Previously I have always created the basic objects in the Interface Builder, which is very easy.  Now, I want to actually initialize and make the object with code and specify its location and size, etc.  This is much harder than it sounds however and I have yet to figure it out.  I can initialize the object, but am having trouble actually displaying it.  To figure this stuff out, I'm basically just going through the documentation, which Apple provides, on all of the different classes such as NSTextField and seeing what methods there are that I can use.  This takes time because to get the method I want I have to look at NSTextField, and then all of the classes it inherits from as well to find the right methods. (NSControl, NSView, NSResponder, NSObject, etc.)  I am learning the basics, however, and can now atleast do basics on my own.

No comments: