some really minor changes (the most important one: small memory hole in

wxList plugged)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1384 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-01-12 23:44:03 +00:00
parent a0abb8a882
commit 09914df7b8
5 changed files with 54 additions and 31 deletions

View File

@@ -1,11 +1,10 @@
\section{Log classes overview}\label{wxlogoverview} \section{Log classes overview}\label{wxlogoverview}
Classes: \helpref{wxLog}{wxlog} Classes: \helpref{wxLog}{wxlog}\\
\helpref{wxLogStderr}{wxlogstderr},\\
%\helpref{wxLogStderr}{wxlogstderr},% \helpref{wxLogOstream}{wxlogostream}, \helpref{wxLogTextCtrl}{wxlogtextctrl},\\
%\helpref{wxLogOstream}{wxlogostream}, \helpref{wxLogTextCtrl}{wxlogtextctrl},% \helpref{wxLogWindow}{wxlogwindow}, \helpref{wxLogGui}{wxloggui},\\
%\helpref{wxLogWindow}{wxlogwindow}, \helpref{wxLogGui}{wxloggui},% \helpref{wxLogNull}{wxlognull}
%\helpref{wxLogNull}{wxlognull}%
This is a general overview of logging classes provided by wxWindows. The word This is a general overview of logging classes provided by wxWindows. The word
logging here has a broad sense, including all of the program output, not only logging here has a broad sense, including all of the program output, not only
@@ -126,8 +125,8 @@ clear the log, close it completely or save all messages to file.
\item{\bf wxLogNull} The last log class is quite particular: it doesn't do \item{\bf wxLogNull} The last log class is quite particular: it doesn't do
anything. The objects of this class may be instantiated to (temporarily) anything. The objects of this class may be instantiated to (temporarily)
suppress output of {\it wxLogXXX()} functions. As an example, trying to open a suppress output of {\it wxLogXXX()} functions. As an example, trying to open a
non-existing file will usually provoke an error message, but if you for some non-existing file will usually provoke an error message, but if for some
reason it's unwanted, just use this construction: reasons it's unwanted, just use this construction:
{\small {\small
\begin{verbatim} \begin{verbatim}

View File

@@ -301,12 +301,15 @@ size_t wxFile::Write(const void *pBuf, size_t nCount)
bool wxFile::Flush() bool wxFile::Flush()
{ {
if ( IsOpened() ) { if ( IsOpened() ) {
// @@@ fsync() is not ANSI (BSDish) #if defined(_MSC_VER) || wxHAVE_FSYNC
// if ( fsync(m_fd) == -1 ) { // TODO if ( fsync(m_fd) == -1 )
if (wxTrue) { {
wxLogSysError(_("can't flush file descriptor %d"), m_fd); wxLogSysError(_("can't flush file descriptor %d"), m_fd);
return FALSE; return FALSE;
} }
#else // no fsync
// just do nothing
#endif // fsync
} }
return TRUE; return TRUE;

View File

@@ -120,6 +120,11 @@ wxNodeBase::~wxNodeBase()
// compatibility with old code // compatibility with old code
if ( m_list != NULL ) if ( m_list != NULL )
{ {
if ( m_list->m_keyType == wxKEY_STRING )
{
free(m_key.string);
}
m_list->DetachNode(this); m_list->DetachNode(this);
} }
} }
@@ -348,6 +353,8 @@ void wxListBase::DoDeleteNode(wxNodeBase *node)
node->DeleteData(); node->DeleteData();
} }
// so that the node knows that it's being deleted by the list
node->m_list = NULL;
delete node; delete node;
} }

View File

@@ -559,17 +559,33 @@ bool wxResourceInterpretResources(wxResourceTable& table, wxExprDatabase& db)
return TRUE; return TRUE;
} }
static char *g_ValidControlClasses[] = { "wxButton", "wxBitmapButton", "wxMessage", static const char *g_ValidControlClasses[] =
"wxStaticText", "wxStaticBitmap", "wxText", "wxTextCtrl", "wxMultiText", {
"wxListBox", "wxRadioBox", "wxRadioButton", "wxCheckBox", "wxBitmapCheckBox", "wxButton",
"wxGroupBox", "wxStaticBox", "wxSlider", "wxGauge", "wxScrollBar", "wxBitmapButton",
"wxChoice", "wxComboBox" } ; "wxMessage",
static int g_ValidControlClassesCount = sizeof(g_ValidControlClasses) / sizeof(char *) ; "wxStaticText",
"wxStaticBitmap",
"wxText",
"wxTextCtrl",
"wxMultiText",
"wxListBox",
"wxRadioBox",
"wxRadioButton",
"wxCheckBox",
"wxBitmapCheckBox",
"wxGroupBox",
"wxStaticBox",
"wxSlider",
"wxGauge",
"wxScrollBar",
"wxChoice",
"wxComboBox"
};
static bool wxIsValidControlClass(const wxString& c) static bool wxIsValidControlClass(const wxString& c)
{ {
int i; for ( size_t i = 0; i < WXSIZEOF(g_ValidControlClasses); i++ )
for ( i = 0; i < g_ValidControlClassesCount; i++)
{ {
if ( c == g_ValidControlClasses[i] ) if ( c == g_ValidControlClasses[i] )
return TRUE; return TRUE;

View File

@@ -841,7 +841,6 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
wxWndHook = NULL; wxWndHook = NULL;
wnd->m_hWnd = (WXHWND) hWnd; wnd->m_hWnd = (WXHWND) hWnd;
} }
// wxDebugMsg("hWnd = %d, m_hWnd = %d, msg = %d\n", hWnd, m_hWnd, message);
// Stop right here if we don't have a valid handle // Stop right here if we don't have a valid handle
// in our wxWnd object. // in our wxWnd object.
@@ -875,8 +874,7 @@ LRESULT APIENTRY _EXPORT wxWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARA
long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam) long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
{ {
wxASSERT( m_lastMsg == message && wxASSERT( m_lastMsg == message &&
m_lastWParam == wParam && m_lastWParam == wParam && m_lastLParam == lParam );
m_lastLParam == lParam );
#ifdef __WXDEBUG__ #ifdef __WXDEBUG__
wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)", wxLogTrace(wxTraceMessages, "Processing %s(%lx, %lx)",