fixing uninit vars warning and memory errors
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -521,7 +521,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
event.SetItem(wxDataViewItemFromItem(item));
|
event.SetItem(wxDataViewItemFromItem(item));
|
||||||
event.SetModel(dvc->GetModel());
|
event.SetModel(dvc->GetModel());
|
||||||
|
|
||||||
BOOL dragSuccessful;
|
BOOL dragSuccessful = false;
|
||||||
if ( [bestType compare:DataViewPboardType] == NSOrderedSame )
|
if ( [bestType compare:DataViewPboardType] == NSOrderedSame )
|
||||||
{
|
{
|
||||||
NSArray* dataArray((NSArray*)
|
NSArray* dataArray((NSArray*)
|
||||||
@@ -757,7 +757,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
if (bestType == nil)
|
if (bestType == nil)
|
||||||
return NSDragOperationNone;
|
return NSDragOperationNone;
|
||||||
|
|
||||||
NSDragOperation dragOperation;
|
NSDragOperation dragOperation = NSDragOperationNone;
|
||||||
wxDataViewCtrl* const dvc(implementation->GetDataViewCtrl());
|
wxDataViewCtrl* const dvc(implementation->GetDataViewCtrl());
|
||||||
|
|
||||||
wxCHECK_MSG(dvc, false, "Pointer to data view control not set correctly.");
|
wxCHECK_MSG(dvc, false, "Pointer to data view control not set correctly.");
|
||||||
@@ -863,7 +863,7 @@ outlineView:(NSOutlineView*)outlineView
|
|||||||
if ([writeItems count] > 0)
|
if ([writeItems count] > 0)
|
||||||
{
|
{
|
||||||
bool dataStringAvailable(true); // a flag indicating if for all items a data string is available
|
bool dataStringAvailable(true); // a flag indicating if for all items a data string is available
|
||||||
NSMutableArray* dataArray = [[NSMutableArray arrayWithCapacity:[writeItems count]] retain]; // data of all items
|
NSMutableArray* dataArray = [NSMutableArray arrayWithCapacity:[writeItems count]]; // data of all items
|
||||||
wxString dataString; // contains the string data of all items
|
wxString dataString; // contains the string data of all items
|
||||||
|
|
||||||
// send a begin drag event for all selected items and proceed with
|
// send a begin drag event for all selected items and proceed with
|
||||||
@@ -2804,9 +2804,9 @@ wxDataViewChoiceRenderer::wxDataViewChoiceRenderer(const wxArrayString& choices,
|
|||||||
|
|
||||||
cell = [[NSPopUpButtonCell alloc] init];
|
cell = [[NSPopUpButtonCell alloc] init];
|
||||||
[cell setControlSize:NSMiniControlSize];
|
[cell setControlSize:NSMiniControlSize];
|
||||||
[cell setFont:[[NSFont fontWithName:[[cell font] fontName] size:[NSFont systemFontSizeForControlSize:NSMiniControlSize]] autorelease]];
|
[cell setFont:[NSFont fontWithName:[[cell font] fontName] size:[NSFont systemFontSizeForControlSize:NSMiniControlSize]]];
|
||||||
for (size_t i=0; i<choices.GetCount(); ++i)
|
for (size_t i=0; i<choices.GetCount(); ++i)
|
||||||
[cell addItemWithTitle:[[wxCFStringRef(choices[i]).AsNSString() retain] autorelease]];
|
[cell addItemWithTitle:wxCFStringRef(choices[i]).AsNSString()];
|
||||||
SetNativeData(new wxDataViewRendererNativeData(cell));
|
SetNativeData(new wxDataViewRendererNativeData(cell));
|
||||||
[cell release];
|
[cell release];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user