Author Topic: About IDE some questions?  (Read 4068 times)

0 Members and 1 Guest are viewing this topic.

2e4lite

  • Guest
About IDE some questions?
« on: October 26, 2013, 09:38:12 PM »
      1.Why local variables defined in the Visual LISP detection in IDE will put local variable as global variables?
       2.In other application processing, why IDE window often automatically jump out, become the current window?
      3.When the IDE is opened, the computer can not stand?

irneb

  • Water Moccasin
  • Posts: 1794
  • ACad R9-2016, Revit Arch 6-2016
Re: About IDE some questions?
« Reply #1 on: November 09, 2013, 10:01:48 AM »
  • I'm assuming you mean during debugging or when calling a function from within another? If so you might want to look up on "scoping". In particular, AutoLisp (and thus also Visual Lisp) uses dynamic scope. Thus while the defun which defined the local variable(s) is still running, its local variables are seen in the same light as if they're global. Only when the defun completes are those local variables removed from the namespace, and if there was a previous global or local variable with the same name in effect - it gets restored. Most other languages (including other Lisps) use lexical scoping (at least by default), which is more like you'd expect a local var to behave. Note: dyn.scope is not a "bad" thing, just dangerous if you don't think about what you're doing ... actually it opens some nifty tricks which are impossible to do using lex.scope - that's why most other Lisps (and quite a lot of other languages) allow special dynamic local vars, so you can get the best of both worlds.
  • This is a bug in VLIDE. Either live with it (since chances are that ADesk isn't going to fix this) or turn off Tools/Environment Options/General Options/Autoactivate ACAD. Just remember that while debugging this means you'll need to manually swap to acad when an input is required.
  • Do you mean it's crashing on you? That shouldn't happen. There must be something wrong with your setup. Could you give a bit more info regarding this?
Common sense - the curse in disguise. Because if you have it, you have to live with those that don't.

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: About IDE some questions?
« Reply #2 on: November 10, 2013, 05:40:27 AM »
3. old bug not fixed for ages

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: About IDE some questions?
« Reply #3 on: November 10, 2013, 08:24:41 AM »
3. old bug not fixed for ages

What exactly is the behaviour of the bug that you are referring to?

I didn't understand the statement:
Quote
"When the IDE is opened, the computer can not stand?"

VovKa

  • Water Moccasin
  • Posts: 1629
  • Ukraine
Re: About IDE some questions?
« Reply #4 on: November 10, 2013, 02:03:08 PM »
3. old bug not fixed for ages

What exactly is the behaviour of the bug that you are referring to?

I didn't understand the statement:
Quote
"When the IDE is opened, the computer can not stand?"
ha ha :)
of course 'by' is missing
when vlide is running the computer will not go into standby

Lee Mac

  • Seagull
  • Posts: 12912
  • London, England
Re: About IDE some questions?
« Reply #5 on: November 10, 2013, 02:36:37 PM »
...when vlide is running the computer will not go into standby

Ahh - I see!  :lol:

Thanks VovKa  :-)

rkmcswain

  • Swamp Rat
  • Posts: 978
Re: About IDE some questions?
« Reply #6 on: November 11, 2013, 09:02:34 AM »
Quote from: VovKa
when vlide is running the computer will not go into standby

I have found that only applies if VLIDE is visible. If you close the window, it's still running, but the computer will go into standby, or hibernate, or sleep, or whatever.
In other words you don't have to shut down AutoCAD and restart it and not launch VLIDE.