Too simple to think of but still:
Don't know how many of you develop crossplatform applications but windows positions it's ok and cancelbuttons opposite to the mac.
If you develop your own dialogs you have to keep that in mind or disregard this little issue. If you disregard it you don't need to anymore with the below solution.
Take the below code and make it a global method switchButtons. Call the method like 'global.switchButtons(formname, button1name, button2name) and the position of the two buttons will be switched. You now only have to identify the platform to call the function...
Good luck with it!
------------------
//switch button position for windows/mac
var x = forms[arguments[0]].elements[arguments[1]].getLocationX();
var y = forms[arguments[0]].elements[arguments[1]].getLocationY();
var xx = forms[arguments[0]].elements[arguments[2]].getLocationX();
var yy = forms[arguments[0]].elements[arguments[2]].getLocationY();
forms[arguments[0]].elements[arguments[2]].setLocation(x, y);
forms[arguments[0]].elements[arguments[1]].setLocation(xx, yy);
---
Title renamed for clarity - (mattman) 1/27/04