I have gCreateWindow (a “sheet”) and gWindow (main window) declared as properties and loaded from nib.
I call:
gWindow’s makeKeyAndOrderFront_(me)
tell gCreateWindow to showOver_(gWindow)
and then my main window appears, with the sheet over it, during a tenth of a second, and then everything disappears, and when I open a new doc and make my main window reappear, the toolbar buttons stay disabled.
What’s wrong with them? normally the sheet stays on screen until one of its buttons is clicked, trigging a method who says:
tell current application’s NSApp to endSheet_(gCreateWindow)
but when the sheet flashes in the screen, this method is NOT called…
Any idea? – everything is resisting today. It’s like a loooong monday…
Yes, I think I should try collecting stamps instead of programming… My problem is, I wanted to buy a candle and I’ve entered a nuclear plant… or maybe I’m just getting too old
I’ve moved into an old trap, focusing on cosmetics instead of attacking the real problems. For the moment I returned to a more standard way to choose folder, for three reasons:
a) The main window appearing empty under the “choose folder” dialog may be confusing for my users;
b) I’m not 100% clear about the New/Open/Close purpose for a single-window application;
c) The sheet works well but does not contain the “New folder” button present on the standard dialog.
The Alert sheets, on the other way, are more “intuitively connected” to the window’s content. In these cases, they are perfect and add a great amount of professionalism to my application – and I avoid Obj-C coding I shall use and abuse of them!