Preference Window

rhale1

KU Mac Geek
Could anyone be so kind as to point me in the direction I need to be/go in order to make an OmniWeb/System Prefs-like Preference Window?

I have the OmniFrameworks, but am not sure how to implement the AppKit Preference Controller.
 
This is a good question. Unfortunately i havn't figured it out yet. I think the best way to figure it out would be to go to OmniWeb and -->show package contents--> and there should be a Nib file for the preferences window. I'll check it out later for myself. Sorry i couldn't help.

-whitesaint
 
no big deal. all it is, is a window with a configurable toolbar that changes its size and animates the resizing. associate a "preference view" with every toolbar item and then do something similar to

[myMainWindow setFrame:frameOfNewView display:YES animate:YES];

make sure to calculate the top left point of frameOfNewView in such a way that the window doesn't move around (0,0 is the bottom left corner). that's all there is.

configure the toolbar in such a way that the first item is "show all" and can't be removed. voilà.
 
Thanks, but the setFrame part keeps messing up. Is it a point or an NSView? Anyone know of any source code that demonstrates this?

whitesaint: OmniWeb (4.1b) doesn't show its Preference nib file. Or at least I have not found it.
 
no, setframe requires a frame. you can use NSMakeRect(float x, float y, float w, float h) as argument. then, you set the window's view with something like this:

[myWindow setContentView:someNewView];

don't start with the window staying where it is at the beginning, that's something you can always fix later. basically, this is what happens: x and the width stay the same (if you want something similar to omniweb's preferences window), the height is given by the new view, the only thing you have to take care of is the new y.

does that help?
 
Back
Top