IsEmpty(blubb) in CASE SELECT

  • Tach auch allerseits!


    Folgendes Problem: mit v=ws.Prompt(PROMPT_OKCANCELLIST, ...) lass ich den User eine Wahl treffen. Nun gibt es die Möglichkeit, er wählt etwas aus (Default-Value gegeben), oder er drückt auf 'Cancel'.


    Nun frage ich zuerst ab
    if IsEmpty(v) then
    exit sub
    end if


    und danach
    select case v
    case irgendwas : tue_was
    case wasanderes : tu_was_anders
    case else : tu_nix
    end select


    Jetzt hab ich in der Designer-Hilfe gesehen, dass CASE SELECT einen exakten Match der selectList und der Expression abprüft. Ein case isempty(v) tut also nicht. Ich hätte aber gerne das erste IF weg.


    Habt ihr vielleicht ne Idee dazu?


    thx in advance
    RW

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl

  • Case "" hat irgendwie nicht funktioniert. Hatte ich mir auch schon überlegt, aber das will nicht.
    Egal, musste halt etwas den Code umbiegen (hatte schon eine andere ELSE-Exception). Aber das tut nun. Nicht schön, aber es tut :D


    Dank dir!

    Life is not a journey to the grave with the intention of arriving safely in a pretty and well-preserved body, but rather to skid in broadside, thoroughly used up, totally worn out, and loudly proclaiming "Wow, what a ride!!! :evil:
    Beschleunigung ist, wenn die Tränen der Ergriffenheit waagrecht zum Ohr hin abfliessen - Walter Röhrl