Author Topic: Dialog wont let go  (Read 4425 times)

0 Members and 1 Guest are viewing this topic.

Binky

  • Newt
  • Posts: 170
Dialog wont let go
« on: February 17, 2010, 01:44:04 PM »
Have a couple commands that bring up dialog boxes here is what is happening...

Start command 'A'...brings up dialog box 'A'
Start command 'B'...brings up dialog box 'B'

Here is where it gets wonky.

Start command 'A' a second time....brings up dialog box 'B'
and everytime there after

both routines follow the same scheme...

Code: [Select]

(defun run_dialog ( / dcl_id return)
  (setq dcl_id (load_dialog "H:\\Master\\LISP\\Blocking"))
  (new_dialog "Blocking_dlg" dcl_id)

(action_tile "2x2" "(setq return 1.5)(done_dialog)")
(action_tile "2x4" "(setq return 3.5)(done_dialog)")
(action_tile "2x6" "(setq return 5.5)(done_dialog)")
(action_tile "2x8" "(setq return 7.5)(done_dialog)")
(action_tile "2x10" "(setq return 9.25)(done_dialog)")
(action_tile "2x12" "(setq return 11.25)(done_dialog)")

  (start_dialog)
  (unload_dialog dcl_id)
return
);end_defun



The other just has different values but the same general format.

Ideas anybody??????

Thanks ( <---- yes se7en I said it )
Not so much deep in thought, rather standing on the precipice, staring longingly into the abyss.

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9282
Re: Dialog wont let go
« Reply #1 on: February 17, 2010, 01:51:14 PM »
and knowing is half the battle!

been awhile since any dialog box stuff (even been awhile since any AutoCAD stuff) but i'll try and take a look too.
“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Dialog wont let go
« Reply #2 on: February 17, 2010, 02:08:59 PM »

I'd need to see the complete dialogs and lsp code.

Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

--> Donate to theSwamp<--

John Kaul (Se7en)

  • Administrator
  • Needs a day job
  • Posts: 9282
Re: Dialog wont let go
« Reply #3 on: February 17, 2010, 02:10:21 PM »
Thought: what about going with a temporary dialog instead of a static one. The benefit being that you can delete the temp file (dialog) after each run.



“Common sense is not so common.” ~Voltaire

--> Donate to TheSwamp.org <--

Binky

  • Newt
  • Posts: 170
Re: Dialog wont let go
« Reply #4 on: February 17, 2010, 02:16:09 PM »
It was me, I was the problem it would seem.  I tend to write my code with lots of small functions wrapped in a large one.  Both routines (and others) had functions called "Run_Dialog".  Since there was a function by that name in memory already it didn't bother looking again.

What makes me doubt that though is that it waited until the third call.  If this is really what is happening then why didn't the second call bring up the dialog from the first?

Anyway, I renamed the functions so that there was no conflict and it seems to be working ok.
Not so much deep in thought, rather standing on the precipice, staring longingly into the abyss.