Sheets

External developers... This forum's for you!

Sheets

Postby sctell » Wed Mar 13, 2013 11:56 pm

Will this work in SC


ShowSheetWindow (tSheetWindowRef,tParentWindowRef);



Thanks

Terry
sctell
 
Posts: 1150
Joined: Sun Jul 06, 2008 10:41 am

Re: Sheets

Postby codegreen » Thu Mar 14, 2013 9:58 pm

Hi Terry,

That depends. What are you trying to do?

-Mark
codegreen
 
Posts: 1556
Joined: Mon Jul 14, 2008 11:03 pm

Re: Sheets

Postby sctell » Fri Mar 15, 2013 1:54 am

I have been thinking about an external to allow a SC window to show another SC window as a sheet.

I thought it was not possible because I believe Carbon sheets rely on groups and that has been a real pain for me in the past with SC, so I did not want a lot of trial and error if SC's underlying code will not allow it.

Also unless I am mistaken the open and save dialogues are not available as sheets.

The real solution would be to have "as sheet" built into SC.

open window "my window" as sheet

This would attach itself to the front window.

All the best

Terry
sctell
 
Posts: 1150
Joined: Sun Jul 06, 2008 10:41 am

Re: Sheets

Postby codegreen » Fri Mar 15, 2013 6:56 am

sctell wrote:I have been thinking about an external to allow a SC window to show another SC window as a sheet.

No, I'm afraid you're not going to be able to get that to work via an external. With your own window maybe, but not one of SC's...

I thought it was not possible because I believe Carbon sheets rely on groups and that has been a real pain for me in the past with SC, so I did not want a lot of trial and error if SC's underlying code will not allow it.

Unfortunately there are serous problems with the window groups API that Apple promised me for years were going to be fixed 'real soon' (right up until the day they killed off Carbon altogether). I might have been able to come up with workarounds using the bastardized version of the classic window layering scheme originally implemented in Carbon except that there are bugs that result in variable hidden dependencies in there too (i.e., setting one flag mysteriously unsets others when done in certain orders, which varies from OS version to OS version as they fixed one thing I'd report but in the process broke another) and so it seemed more sensible to wait for the groups API to be fixed instead of heading off down that trail of tears.

Also unless I am mistaken the open and save dialogues are not available as sheets.

The real solution would be to have "as sheet" built into SC.

Part of the problem with that is the sheet versions of open/save are only supposed to be used in windows that represent separate documents (with proxies in the title bar) and there isn't really an analog to that in SC.

Unfortunately Carbon wasn't designed to allow much flexibility in such matters (the people who designed and implemented it seemed to have a VERY narrow and literal view of what Mac apps actually do) so faking things like this was often either impossible or caused all sorts of other nasty problems. Time and time again I'd chase these issues up the line until I collared the person who actually wrote the code (or their idiot boss who made them do it that way) and they'd imperiously announce "You don't want/need to do that!". Then after I patiently explained (usually several times) why yes I really DID need/want to do that, all they could say was 'Oh...'.

In their defense I suppose they were often just trying to un-complicate the operations in question for the majority of clients of these API who kept complaining about how many of them were like erector sets that required ridiculous amounts of delicate and confusing space voodoo to get seemingly simple things to work (using scrollbars with TextEdit being a prime example). Unfortunately Apple's reaction to this in Carbon was typically to try to make all such subsystems neat and self-contained as an egg (see MLTE). For for apps like SuperCard however, the cure was far worse than the disease...

-Mark
codegreen
 
Posts: 1556
Joined: Mon Jul 14, 2008 11:03 pm


Return to Xcode and the Internals Toolbox

Who is online

Users browsing this forum: No registered users and 1 guest

cron