Xojo declares for Sam's z-order routine

@samRowlands posted on TOF a few years ago a method for changing z-order on macOS (Z-Order (again) - General - Xojo Programming Forum).

Sam (or anyone else), what are the declares for the APIs you used there? I’m not very good at translating Apple’s API documentation to a Xojo declare. The APIs are NSViewRemoveFromSuperViewWithoutNeedingDisplay, NSViewSuperview and NSViewAddSubview
or NSViewAddSubviewPositionedRelativeTo.


Dunno the declares but I know MBS has such functions exposed if that helps at all

I’m sure @Sam or maybe @Stretch327 will chime in with a suitable declare

Do you have an old version of Sams Appkit or OAK ?
Those might have it as well

I can confirm that the methods in Sam’s post are part of OAK, not the raw declares. I would suggest, if you found Sam’s post helpful, that you support his livelihood by buying OAK: App Kit 2021 - Building Better Mac Applications

1 Like

Yeah I’ve had exposure to OAK in another of my clients apps and its invaluable for a lot of things

FYI: I pulled the public version of OAK due to the incompatibilities with DesktopControls. I’ve had a very brief chat with the CEO and I was left with the feeling that he doesn’t believe OAK to be valuable to the Xojo community, and not willing to implement functionality that would help.

Sorry to those who’re discovering it now.

Everyone tries to help and ends up with the same result. :thinking:

1 Like