Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
You can't launch a nib. They are not executable.

I assume you mean something along the lines of: can I load an NSWindow that is serialised in another Nib and close the current key window? If so not is a single line of code. Assuming you are doing things correctly and each Nib has a single Window in it and a NSWindowController subclass as it's owner then you can simply create an instance of that NSWindowController subclass with the correct nib name and ask it to display it's window.

Note doing this in an action (something like -(IBAction) doSomething:(id) sender) could be a bad idea unless you have some safe, sensible way to clean up that instance once you are done with it.

If you gave us some more concrete code to work from we might be able to give you some advice.
 

Virtualball

macrumors 6502
Original poster
Jun 5, 2006
402
21
Well, to be honest, I am working on an iPhone app (Don't sue me Apple, pleaseeee :p) And I want it so when you click one of the invisable buttons on the screen, it opens up another window in it's same place and closes the main window. I have it so it opens up another window but it doesn't close the other one. Plus, its kinda a crappy "hack" (term to describe "thrown together poorly", right?). If you open the window, you can no longer quit anymore :rolleyes:


Here are screen shots:

E-mail:
http://img510.imageshack.us/my.php?image=picture24zv3.jpg
Alpha Internet support:
http://img476.imageshack.us/my.php?image=picture23eb3.jpg
Normal Window (before I made it have the buttons)
http://img405.imageshack.us/my.php?image=picture1fk0.jpg
When you spin it:
http://img405.imageshack.us/my.php?image=picture2jb7.jpg

It, at the moment, goes online, sends emails, has notes, uses the isight, and spins 90º. But that isn't any good if I can't get my problem resolved :p
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
1) Apple are going to send you a cease and desist letter as soon as they see this. All of the images they used on the iPhone are copyright as is the overall design.

2) You are doing this completely the wrong way if each of those screenshots is a separate Window in a new nib. Create 1 nib that has a custom NSWindow subclass as it's window. Override the draw methods to draw you custom iPhone border as the Window border and use a series of custom views for the centre part of the iPhone (the screen). You can just swap the views in and out as you change modes.
 

Virtualball

macrumors 6502
Original poster
Jun 5, 2006
402
21
1) Apple are going to send you a cease and desist letter as soon as they see this. All of the images they used on the iPhone are copyright as is the overall design.

2) You are doing this completely the wrong way if each of those screenshots is a separate Window in a new nib. Create 1 nib that has a custom NSWindow subclass as it's window. Override the draw methods to draw you custom iPhone border as the Window border and use a series of custom views for the centre part of the iPhone (the screen). You can just swap the views in and out as you change modes.

1) Yeah.... but it's just for fun, I hope they'd understand that, look at iSoftPhone and iPhone countdown widget, they use the design!

3) Thanks!
 

Virtualball

macrumors 6502
Original poster
Jun 5, 2006
402
21
Ok, last thing, I promise :)

I searched all over for a way to switch tabs without the buttons, but I haven't found a way. Can you provide a hint or some sample code? I'm stuck and I can't move further with my app :(

The tabview is named tabs and the identifiers are 1 2 3 and 4. Please help :)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.