Changed string members in BugsGridData struct to wxChar * for Borland

only and added code to BugsGridTable::SetValue() for Borland to set
string values.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
2000-02-29 01:27:42 +00:00
parent 29a99be398
commit cab472ecf9

View File

@@ -805,22 +805,28 @@ static const wxChar* severities[] =
static struct BugsGridData static struct BugsGridData
{ {
int id; int id;
// Borland can't deal with global wxStrings and will generate a
// compile time error with the initializing the gs_dataGridBugs
// array (below)
//
#ifndef __BORLANDC__ #ifndef __BORLANDC__
wxString wxString summary;
#else #else
const wxChar * wxChar *summary;
#endif #endif
summary;
Severity severity; Severity severity;
int prio; int prio;
#ifndef __BORLANDC__ #ifndef __BORLANDC__
wxString wxString platform;
#else #else
const wxChar * wxChar *platform;
#endif #endif
platform;
bool opened; bool opened;
} gs_dataBugsGrid [] = } gs_dataBugsGrid [] =
{ {
{ 18, _T("foo doesn't work"), Sev_Major, 1, _T("wxMSW"), TRUE }, { 18, _T("foo doesn't work"), Sev_Major, 1, _T("wxMSW"), TRUE },
{ 27, _T("bar crashes"), Sev_Critical, 1, _T("all"), FALSE }, { 27, _T("bar crashes"), Sev_Critical, 1, _T("all"), FALSE },
@@ -940,11 +946,27 @@ void BugsGridTable::SetValue( int row, int col, const wxString& value )
break; break;
case Col_Summary: case Col_Summary:
#ifndef __BORLANDC__
gd.summary = value; gd.summary = value;
#else
// this generates a warning message if you are using the
// memory tracing code but it should be ok :MB
//
delete gd.summary;
gd.summary = copystring( value.c_str() );
#endif
break; break;
case Col_Platform: case Col_Platform:
#ifndef __BORLANDC__
gd.platform = value; gd.platform = value;
#else
// this generates a warning message if you are using the
// memory tracing code but it should be ok :MB
//
delete gd.platform;
gd.platform = copystring( value.c_str() );
#endif
break; break;
} }
} }