comparison mac/dw.m @ 1907:54f9ec5bb793

XCode 7.0 reports that NSTabViewItem initWithIdentifier can't be NULL... Even though it is used like that in countless examples and sources... So setting the identifier to a NSString that shows the internal page ID.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 27 Jul 2015 10:27:05 +0000
parents fac81560eb09
children 7e23f3dccb6b
comparison
equal deleted inserted replaced
1906:fac81560eb09 1907:54f9ec5bb793
8369 */ 8369 */
8370 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front) 8370 unsigned long API dw_notebook_page_new(HWND handle, ULONG flags, int front)
8371 { 8371 {
8372 DWNotebook *notebook = handle; 8372 DWNotebook *notebook = handle;
8373 NSInteger page = [notebook pageid]; 8373 NSInteger page = [notebook pageid];
8374 DWNotebookPage *notepage = [[DWNotebookPage alloc] initWithIdentifier:nil]; 8374 DWNotebookPage *notepage = [[DWNotebookPage alloc] initWithIdentifier:[NSString stringWithFormat: @"pageid:%d", (int)page]];
8375 [notepage setPageid:(int)page]; 8375 [notepage setPageid:(int)page];
8376 if(front) 8376 if(front)
8377 { 8377 {
8378 [notebook insertTabViewItem:notepage atIndex:(NSInteger)0]; 8378 [notebook insertTabViewItem:notepage atIndex:(NSInteger)0];
8379 } 8379 }