The Daily WTF WTF



  • What is with the forum autorefreshing back to the first page? I use
    FF1.0.3 and do the middle click on a thread to read it thing, I get to
    page two.. read a thread and when I close the tab to go back to the
    page two.. its on page one again... heh.



    Anyway, I thought I would share a personal WTF.. Here is one that I was
    doing for the longest time. I actually had a coworker ask me why I was
    doing it and I had no idea.


    if(this.lvItems.SelectedItem.IsSelected)
    {
    //process the selected item...
    }


    Loosely translated: "If the selected item is selected do something with it."

    I had it every where in my code.. I can't for the life of me figure out why the hell i was doing it..
    		<br>


  • Perhaps to get an error when the was no selectedItem? I believe comboboxed can have 0 selected items, right?

    Drak



  • @Str8Dog said:




    if(this.lvItems.SelectedItem.IsSelected)
    {
    //process the selected item...
    }


    A holdover from the horrific Java 1.0 AWT event-handling, possibly? (You implemented something or other and then put a function called "onAction" or something in your class; it would then be called every time there was any event of any sort, and you were left to figure out where that came from).

    Yep, the forum software is broken on many, many levels. Surely there's ONE decent forum for ASP?
    Rob


  • The might be one for ASP, but this is ASP.Net.

    There is a difference!

    Drak



  • It's not backwards-compatible?



  • Nope (at least not 100%)


Log in to reply