initializing a Window Controller
initializing a Window Controller
- Subject: initializing a Window Controller
- From: Robb Bean <email@hidden>
- Date: Tue, 17 Feb 2004 19:28:19 +0100
Hello!
I'm new to Mac OS and I'm also new to programming under Mac OS and
Cocoa, so please tell me if the following is a "RTFM" question.
I'm writing an application that contains a main window which needs to be
initialized at program start up, concrete, I read values from a database
and store them into a NSComboBox. Using the Cocoa example application
from the documentation, the currency converter, I gave my program a
controller called MainWindowController; its task is to react on button
clicks and reading/writing compoment values, such as text fields. This
all works very well, but the initialization. I added a -init: message to
the MainWindowController in expectation that it is executed on window
creation. A puts() shows me that -init is called, but I don't see the
values assigned to the control. To test a bit around this I assigned the
-init message with an additional button click: If I click the button,
the window is initialized correctly, that means inserting the values
from the database into the combo box works.
My questions are now:
* Is it possible that the component values are setted _after_ the
execution of -init, that means that my values are overwritten?
* How do I initialize a window without using a special button click?
Thanks in advance!
--
Robert Bienert <robertbienert[AT]gmx[dot]net>
http://www.rbprogs.de.vu/ - some free and open source stuff
http://www.robertbienert.de/ - my personal homepage
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.