// check that the page index is valid
#define IS_VALID_PAGE(nPage) (((nPage) >= 0) && ((nPage) < GetPageCount()))
-#ifdef __WXMAC_X__
+#ifdef __DARWIN__
// I got these values for Mac OS X from the Appearance mgr docs. (Mark Newsam)
const short kwxMacTabLeftMargin = 20 ;
const short kwxMacTabTopMargin = 38 ;
// common part of all ctors
void wxNotebook::Init()
{
-#ifdef __WXMAC_X__
+#ifdef __DARWIN__
m_macHorizontalBorder = 7;
m_macVerticalBorder = 8;
#endif
int wxNotebook::SetSelection(int nPage)
{
- wxASSERT( IS_VALID_PAGE(nPage) );
+ if( !IS_VALID_PAGE(nPage) )
+ return m_nSelection ;
ChangePage(m_nSelection, nPage);
SetControlValue( m_macControl , m_nSelection + 1 ) ;