Ok button only respond the second click

Discussion in 'AutoCAD' started by Marcel Janmaat, Dec 15, 2004.

  1. Sometimes the OK button only responds the second time I click on it.

    I'm not sure any more why this happens. I think it happens after editing an
    edit_box.

    Any idea? Someone?

    M
     
    Marcel Janmaat, Dec 15, 2004
    #1
  2. Marcel Janmaat

    BillZ Guest

    Sometimes the OK button only responds the second time I click on it.<<<

    What are you doing with the action tile that's associated with the "accept"?

    Bill
     
    BillZ, Dec 15, 2004
    #2
  3. After Done dialog 1 writing contents to a file.

    (defun sin_par ( / dbl dbc)
    (if (setq dbl (load_dialog "a_sin")) (setq dbn (new_dialog "sin_par" dbl))
    (exit))
    (set_tile "kop" "Symbool insert parameters") ; SymBoolNaam
    (set_tile "sbn" H_cadsnm) ; SymBoolNaam
    (set_tile "sbo" (nth 2 (assoc H_cadsnm sgl))) ; SymBool Offset afstand
    (set_tile "sbb" (nth 3 (assoc H_cadsnm sgl))) ; SymBool Breek afstand
    (set_tile "sbr" (nth 4 (assoc H_cadsnm sgl))) ; SymBool Rotatie
    (set_tile "sbk" (nth 5 (assoc H_cadsnm sgl))) ; SymBool LaagKleur
    (action_tile "sbo" "(setq sgl (subst (subst $value (nth 2 (assoc H_cadsnm
    sgl)) (assoc H_cadsnm sgl)) (assoc H_cadsnm sgl) sgl))")
    (action_tile "sbb" "(setq sgl (subst (subst $value (nth 3 (assoc H_cadsnm
    sgl)) (assoc H_cadsnm sgl)) (assoc H_cadsnm sgl) sgl))")
    (action_tile "sbr" "(setq sgl (subst (subst $value (nth 4 (assoc H_cadsnm
    sgl)) (assoc H_cadsnm sgl)) (assoc H_cadsnm sgl) sgl))")
    (action_tile "sbk" "(setq sgl (subst (subst $value (nth 5 (assoc H_cadsnm
    sgl)) (assoc H_cadsnm sgl)) (assoc H_cadsnm sgl) sgl))")
    (action_tile "cancel" "(done_dialog 0)")
    (action_tile "accept" "(done_dialog 1)")
    (setq dbc (start_dialog)) (unload_dialog dbl)
    (if (= dbc 1)
    (if (not (equal (cdr cml) sgl))
    (progn
    (setq bst (open (strcat H_cadprg "hlp\\A_sin.par") "w"))
    (foreach itm (car cml) (princ itm bst) (if (= itm (last (car cml)))
    (princ "\n" bst) (princ " ;" bst)))
    (foreach itm sgl (foreach val itm (princ val bst) (if (/= val (last
    itm)) (princ " ;" bst))) (princ "\n" bst))
    (close bst)
    ) )
    )
    )
     
    Marcel Janmaat, Dec 15, 2004
    #3
  4. Marcel Janmaat

    BillZ Guest

    Looks normal.

    Can you show me the DCL file?

    Bill
     
    BillZ, Dec 15, 2004
    #4
  5. Here the DCL code;

    sin_par : dialog { key = "kop";

    : row {
    : column { fixed_width = 60;
    : text { label = "Symboolnaam : "; }
    : text { label = "Lijn offset : "; }
    : text { label = "Lijn breek : "; }
    : text { label = "Rotatie : "; }
    : text { label = "Laagkleur : "; }
    }
    : column {
    : text { key = "sbn"; edit_width = 20; fixed_width_font = true; }
    : edit_box { key = "sbo"; edit_width = 20; }
    : edit_box { key = "sbb"; edit_width = 20; }
    : edit_box { key = "sbr"; edit_width = 20; }
    : edit_box { key = "sbk"; edit_width = 20; }
    }
    }

    ok_cancel;

    }
     
    Marcel Janmaat, Dec 15, 2004
    #5
  6. Marcel Janmaat

    BillZ Guest

    Marcel,

    The okay and cancel buttons work fine here.

    You check your variables for validity.

    HTH

    Bill
     
    BillZ, Dec 15, 2004
    #6
  7. Marcel Janmaat

    BillZ Guest

    Marcel,
    I did notice that:

    (if (setq dbl (load_dialog "sin_par")) ;I had to change this to "sin_par".
    (setq dbn (new_dialog "sin_par" dbl))
    (exit))

    Bill
     
    BillZ, Dec 15, 2004
    #7
  8. Thats correct. Here it is part of a DCL file.

    By the way. What do you mean with HTH.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #8
  9. Bill, since your such a good help to me, mabe you have an answer to this
    one.

    How can (atof "0.25") result in 0.0?

    _2$ (atof "0.25")
    0.0

    Earlier I posted this under "Strange result" But don't think the replies I
    got are sufficient.

    M
     
    Marcel Janmaat, Dec 15, 2004
    #9
  10. Marcel Janmaat

    BillZ Guest

    By the way. What do you mean with HTH.<<<

    Hope that helps.

    Bill
     
    BillZ, Dec 16, 2004
    #10
  11. Marcel Janmaat

    BillZ Guest

    This is unfamiliar to me.

    What is the _2$ ?

    Is that a menu macro?

    Bill
     
    BillZ, Dec 16, 2004
    #11
  12. Bill,

    Thats te commandline in the vlisp console;

    _$ (atof 0.25)
    ; error: bad argument type: stringp 0.0
    _1$ (atof "0.25") <- Here _1$ afer the error
    0.0 <- again the wrong result
    _1$

    HTH too ; )

    M
     
    Marcel Janmaat, Dec 16, 2004
    #12
  13. I see!

    But not with me. It does work when vlide is shutdown.
    I cannot find any settings in the environment options of vlide.

    I guess you don't know the answer?

    M
     
    Marcel Janmaat, Dec 16, 2004
    #13
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.