Wxgrid event comment



  • [code]

    else if ( type == wxEVT_GRID_RANGE_SELECT )
    {
    // Right now, it should never end up here!
    [/code]

    I was looking into overriding the wxGrid control (from wxWidgets framework), looked at grid.cpp. Best event ever.

    Explains why my event handler wasn't working.....



  • Reminds me of SDL1's keyboard/mouse events - there was a field that indicated from which device the event came from, so you can differentiate between multiple mice and keyboards. However, because no one ever bothered to implement it correctly, it was always 0, and was removed entirely in 2.0.



  • I recently got bitten by glibc’s implementation of strptime (which parses a C string into a date/time structure).

    When using its counterpart, strftime, to convert a date/time to a string, it’s possible to get the timezone in the resulting string with the %Z format qualifier. Surely it should be possible to do the same operation in reverse with strptime? Well, here’s the implementation in glibc:

    So, when a %Z is encountered, it’s just ignored. No error, nothing. The DST information will not be properly retrieved, so your program will be off by one hour in summer but will work correctly for the rest of the year.


  • Discourse touched me in a no-no place

    @VinDuv said:

    So, when a %Z is encountered, it’s just ignored. No error, nothing. The DST information will not be properly retrieved, so your program will be off by one hour in summer but will work correctly for the rest of the year.

    The Tcl implementation of time parsing doesn't use strptime (or strftime for time formatting) for this sort of reason, despite it being a lot of work to get right. The reasoning was that at least like that they'd have the same bugs on all platforms (in the hope that this might lead to them getting fixed). Of course, most human-readable timestamps are a bug (timezones even more so) but there's no point in making things worse.

    IIRC, it was HPUX that had particularly strange time formatting/parsing code. I might be misremembering that.



  • [code]
    else if ( width == wxLIST_AUTOSIZE )
    {
    if ( IsVirtual() )
    {
    // TODO: determine the max width somehow...
    width = WIDTH_COL_DEFAULT;
    }
    [/code]

    Sigh, wxwidgets like their TODOs.



  • I really wished that wxwidgets would throw exceptions rather than do nothing in cases where they don't handle logic. Sure it's open source and nobody got around to implementing something, but it's C++ so throw a damn exception!



  • [code]

    if (m_dbImpl)
    {
        if ( width == wxLIST_AUTOSIZE_USEHEADER )
        {
            width = 150; // FIXME
        }
    

    [/code]

    OSX variant of the same logic. So depending on the platform the logic is also different. YAY FOR CROSS PLATFORM!!!

    I'm now literally writing cross platform code to fix the cross platform code.


  • sockdevs

    I didn't think people used wxWidgets much any more?



  • Well it's better than QT. Have you ever tried suing the backwards garbage known as qtcreator? People end up liking it due to the effects of stockholm syndrome.


  • sockdevs

    I use PHP. What the hell do I know about such things? :stuck_out_tongue:



  • One of the major benefits of wx is that they use native controls wherever possible. Most other frameworks say fuck the native controls. It's also incredibly light weight compared to others. I don't need a dedicated build machine to compile it from source.


  • sockdevs

    @delfinom said:

    One of the major benefits of wx is that they use native controls wherever possible. Most other frameworks say fuck the native controls.

    Yes, I noticed that using Audacity between Windows and OS X and that despite using some of their own UI over the top (and what smells a lot like wxGTK as well), there are some native hints showing through.



  • @delfinom said:

    Well it's better than QT. Have you ever tried suing the backwards garbage known as qtcreator? People end up liking it due to the effects of stockholm syndrome.

    Paging @Onyx.

    Seriously, what happened to that guy?


  • Discourse touched me in a no-no place

    @delfinom said:

    Well it's better than QT. Have you ever tried suing the backwards garbage known as qtcreator?

    Is there a lawyer in the house?


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.