(vlr-remove/add) bugginess?

Discussion in 'AutoCAD' started by -BMC-, Aug 4, 2004.

  1. -BMC-

    -BMC- Guest

    Am I seeing things? An infinite loop being caused by (vlr-remove/add) in Acad2004?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ;a bogus function
    (defun test ()(princ "\nIs this loopie?"))

    ;a test callback
    (defun callback_test (reactor cmd)
    (if (= (car cmd) "REDRAW")
    (progn
    (vlr-remove reactor)
    (test)
    (vlr-add reactor)
    )))

    ;reactor stuff
    (if (/= (type test_reactor) 'VLR-Command-Reactor)(setq test_reactor (vlr-command-reactor nil '(:)vlr-commandEnded . callback_test)))))
    (if (not (vlr-added-p test_reactor))(vlr-add test_reactor))
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    REDRAW and see if this baby loops. ESC from the mess, comment out both the calls to (vlr-remove) and (vlr-add) and reload the works. REDRAW once more and the looping ceases. Is (vlr-remove/add) the culprit, or am I overlooking something else?
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Thanks,
    B. Connoy
     
    -BMC-, Aug 4, 2004
    #1
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.