Remove this ad

#21 [url]

Dec 24 13 6:42 AM

Re: MacOS, wx 3.0/COCOA, crash in DoNetworkRearrange

Sorry Stu, I forgot to give tome details...

Rev10827:
1) on MacOS, with wx2.8/Carbon works as it is
2) on MacOS, with wx3.0/OsxCocoa does not work: toolbar is correctly drawn at beginning then it disappears (I guess when we have to adjust buttons name), the upper part of dialog is not correctly drawn but probably the code is just partially executed or "still pending", in fact sometimes I'm able to display e.g. the Preferences dialog just clicking on empty space where the buttons should be.

So, to have a working aMule on 3.0/OsxCocoa, my first attempt was just to use again
[code]
#if !defined(__WXOSX_COCOA__)
// in Mac OS with wxWidgets >= 3.0 and COCOA the following seems to cause problems
// (window is not refreshed after changes in network settings)
wxWindowUpdateLocker freezer(this);
#endif
[/code]

and in this way it worked! In this way it worked with wx3.0/OsxCocoa and wx2.8/Carbon.

But I don't know exactly the purpose of the wxWindowUpdateLocker (I guess is like a sort of mutex used "to protect" and to grant the access to some object), and due to the fact that you restored it also for Mac, I thought that it is important/needed in someway, so I tried to reorganize the code to keep it, maintaining the idea to understand before if something must be changed/rearranged and then, if needed, operates the changes in toolbar and windows layout and limiting the scope of the locker.

The patch attached to my previous post is just the resulting attempt.
That patch works in MacOS with 3.0/wxOsxCocoa and also in Linux, but I did not tried yet in MacOS with wx2.8/Carbon.

Bye and Merry XMas,
Mr Hyde

Quote    Reply   
Remove this ad

#22 [url]

Dec 24 13 5:25 PM

Re: MacOS, wx 3.0/COCOA, crash in DoNetworkRearrange

I reintroduced the ifdef with the locker again.
The only purpose of it is to avoid visible clutter while the window is being drawn piece-by-piece. It is save to remove. No idea why it fails on Cocoa though.
The whole thing is a bit besides the normally trodden paths, and fails miserably with its different results on each platform.

Quote    Reply   
Add Reply

Quick Reply

bbcode help