try this

Using XoJo2013R41 for the Mac:

open a new project, in the default window, put a couple of controls on it; listbox, a couple of buttons… whatever.

create a second window- a smaller one then the default. Make sure it’s a SHEET window. put a couple of controls on it; text box, a button or two

Under the open event of the main window- “show” the secondary window- simulating let’s say a password dialogue to access the main application. See what happens.

Under Cocoa- nothing happens except you “might” see the sheet window flash in the upper left of the main screen- no where near the main window assuming your main window is set to open in the Middle of the main screen. Sometimes the sheet window shows up but the main window isn’t displayed at all and of course, the sheet window isn’t connected to it.

Under carbon: it works as expected; the sheet window drops down, displays the dialogue and closes provided you have the action event code of the button set with sheetWindow.hide; nice… for carbon.

Under RealBasic2012R.anything- it works; carbon/cocoa- nice IDE too.

BTW- How’s that cut & paste thing going??

Have a good week everybody.

Definitely file a bug report as that seems like a regression
It looks like opening a sheet window from the open even of another is whats causing it (looks like a stack overflow in app kit)
What you can do is put a VERY short timer on the fist window that fires once with a period of 1
In its action event you can show the second window so you get the right effect without a crash

use window2.ShowWithin(self) in the open event of window1 instead.

A much better answer :stuck_out_tongue:
Time for some sleep I think

the showWithin(self) worked perfectly.

Thank you Tomas and Norman- thank you as well.

What’s this “sleep” thing you mentioned ??

Be well gentlemen.

I believe ‘sleep’ is a quaint custom of the mortals :slight_smile:

FWIW - By reading the NUG and now this Forum over the years, I have picked up several helpful tips. One of those is not to open or close another window, nor close the primary window, from the open event. The benefits of this practice have been explained in various ways, the most compelling for me is that a window is never fully instantiated until its open event has finished. Adhering to that simple practice has stood me in good stead. Using a short period timer, as suggested by Norman, I have found to be the better alternative.