• Rob (unregistered)

    Of course, like any ternary expression that returns a boolean, both an be rewritten using just boolean logic. Simplified:

    ColHectarias.Visible = Dist_Por == TIPO_DIST_COSTO.Hectáreas || Dist_Por == TIPO_DIST_COSTO.CCosIndirecto;
    ColPorcentaje.Visible = Dist_Por == TIPO_DIST_COSTO.Plantilla;
    

    I could leave out the starting ternaries of the first one because there are only two true outcomes.

    Similarly, I could leave out most of the ternaries for the second one because there is only one true outcome. Everything after that true results in false. I'm guessing that there should be a true in there somewhere.

  • (nodebb)

    Wtf.Visible = false == Me.IsFrist ? false : true

    Addendum 2026-01-28 08:33: Although in today's case the WTF is all too visible.

  • Supernova (unregistered)

    TRWTF is not handling FileNotFound

  • Argle (unregistered)
    Comment held for moderation.

Leave a comment on “A Field Terned Visible”

Log In or post as a guest

Replying to comment #:

« Return to Article