OK, looks like I've managed to figure it out. For anybody else having this issue:
You need to use the code as below:
current application's NSApp's beginSheet_modalForWindow_modalDelegate_didEndSelector_contextInfo_(loadingWindow, mainWindow, me, missing value, missing value)
…where the Panel you want to use as a sheet is loadingWindow
, and the main window (which the sheet will appear over) is mainWindow
.
Similarly, you can close the sheet by using this code:
current application's NSApp's endSheet_(loadingWindow)
loadingWindow's orderOut_(loadingWindow)
I hope this helps somebody out there! :)