CFRunLoopAddSource() and CFRunLoopRemoveSource() respectively. They
no longer call CFSocketEnableCallbacks or CFSocketDisableCallbacks.
* In _GSocket_Get_Mac_Socket() no longer disable callbacks and also do not
add the runloop source which combined with the above change has the
same effect as before.
* In _GSocket_GUI_Destroy_Socket() do not remove the runloop source because
_GSocket_Disable_Events() should have and even if it didn't Mac OS X
will clean it up in CFSocketInvalidate()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
(M.J.Wetherell)
Added wxConvertFormat function in debug mode to allow for
unit testing
Added tests/formatconverter
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25116 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxComboBox::GetValue within a wxEVT_COMMAND_TEXT_UPDATED event
should now pass the correct value even if the handler for
wxEVT_COMMAND_COMBOBOX_SELECTED changed the selection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
kCFSocketConnectCallBack: Called in response to a successful connect() and
of course applies to client sockets only. Fails assertion if received
from a server socket. Calls GSocket's Detected_Write otherwise.
kCFSocketReadCallBack: Called whenever data is available to read or in
the event that a new connection is waiting to be accepted. Call's
GSocket's Detected_Read.
kCFSocketWriteCallBack: Called whenever data can be written to kernel buffer.
Call's GSocket's Detected_Write
* Added ALL_CALLBACK_TYPES macro which specifies all of the above three.
* Added (by virtue of ALL_CALLBACK_TYPES) the kCFSocketConnectCallBack to
the calls to CFSocketCreateWithNative and CFSocketDisableCallBacks during
GUI socket data creation.
* Use the default flags for CFSocket which automatically reenable the
callbacks, but continue to disable close of fd on CFSocket invalidation.
Eventually, GSocket should allow the GUI implementation to override close
so that we can avoid calling the > 10.2 CFSocketSetSocketFlags function.
* CFRelease the socket after invalidating it (fixes memory leak)
* When adding/removing callbacks use kCFSocketReadCallBack for server
GSOCK_CONNECTION and kCFSocketConnectCallback for client.
* When adding/removing callbacks GSOCK_LOST should do the same thing as
GSOCK_INPUT (Thanks Kevin Hock)
* When enabling events, do not enable kCFSocketConnectCallBack for servers.
It should never be called anyway since connect() should never be used
on a server socket.
* When disabling events, disable ALL_CALLBACK_TYPES.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is necessary to comply with the Apple documentation for CFSocket which
states quite explcitly that the CFSocket must be invalidated prior to close.
Likewise in GSocket_Read don't enable input events until we have finished
reading the data. This is necessary because an input event will be
immediately generated but all the data will have been read by the current
callback which leads to the GSocket code thinking the connection has been
lost and when wxYield recursion is involved will lead to crashes or an assert.
Because we are doing a compile time test only for Darwin this will also
affect wxGTK running on Darwin. It appears possible for the new order to work
on all platforms but more testing would be required.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775