I am porting my OS 9 code to OS X using xcode 1.5 on Panther. I'm confused about how to handle dialogs and items within dialogs.
I have some sample code that creates a dialog by handling a window created from a nib (CreateWindowFromNib). I need code to get and set numbers (floating point and integer) from edit text boxes. The only reference I can find for this in the dialog reference is to GetDialogItemText(). Even then, I don't know what function to call for the handle to the item (the refernce library links to a list of constants). I also don't know how to convert the text to a number.
Should I just use my old OS 9 dialogs? Then I can get numbers using GetLongItem(), etc. Or are there equivalents for these functions in Carbon? Also, can the function GetNewDialog() pull off my dialog from my .nib file?
Thanks, Meg
I have some sample code that creates a dialog by handling a window created from a nib (CreateWindowFromNib). I need code to get and set numbers (floating point and integer) from edit text boxes. The only reference I can find for this in the dialog reference is to GetDialogItemText(). Even then, I don't know what function to call for the handle to the item (the refernce library links to a list of constants). I also don't know how to convert the text to a number.
Should I just use my old OS 9 dialogs? Then I can get numbers using GetLongItem(), etc. Or are there equivalents for these functions in Carbon? Also, can the function GetNewDialog() pull off my dialog from my .nib file?
Thanks, Meg