Followup: Weakref - details

ATS asteinarson at gmail.com
Sat Feb 9 09:23:43 PST 2008


> 
> I've applied wxUSE_WEAKREF part (with some style corrections, a change to
> wx/chkconf.h and addition to configure). But I don't really the logic of
> wxObjectEventFunction checks: if we can't use wxObject methods when
> wxUSE_WEAKREF==1 we should check for this here, shouldn't we? And why test
> for WXWIN_COMPAT_2_6 and not 2_8?

Maybe no test for wxWidgets version is needed here? The only issue is 
really eVC and the other compilers handles this well. 

People would use WXWIN_COMPATIBILITY_2_8 for many reasons. 


> Personally I'd rather:
> 
> 1. Replace wxObjectEventFunction with wxEventFunction everywhere (to avoid
> confusion due to its name)

That makes sense. Did't want to do that on my own.


> 2. Define wxEventFunction using wxObject for eVC only

OK.

> 3. Set wxUSE_WEAKREF to 0 for eVC

I think the best is to have wxWeakRef available by default, it enables 
safer apps and components. 

Probably, when someone wants to use eVC and wxWeakRef they will figure
out the precise way to do it. And that's useful to know.

So, as long as the eVC user gets the message that there's an issue to 
resolve around wxWeakRef and wxObjectEventFunction this is OK. 

Turning it off, and leaving a clear note in the header file would do
for now.


Regards
// ATS.






More information about the wx-dev mailing list