TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: Kerry on June 29, 2006, 03:54:41 AM

Title: Parenthesis matching ... DUH!!!
Post by: Kerry on June 29, 2006, 03:54:41 AM
Code: [Select]
  ...........
(ACTION_TILE "nyloc" "(_calextra)")
(ACTION_TILE "mk_pick" "(progn(_getparams)(DONE_DIALOG 9))")
(ACTION_TILE "replaceblock" "(progn (SETQ bolt:replace T) (check_eval)")
(ACTION_TILE "eval_length" "(_evallen)")
(ACTION_TILE "accept" "(check_eval)")
(ACTION_TILE "cancel" "(DONE_DIALOG 0)")
.......

No prizes ...  but this had me chasing my tail for a while ...    :oops:
Title: Re: Parenthesis matching ... DUH!!!
Post by: Mark on June 29, 2006, 07:00:51 AM
Code: [Select]
(ACTION_TILE "replaceblock" "(progn (SETQ bolt:replace T) (check_eval)")
my guess ....
Title: Re: Parenthesis matching ... DUH!!!
Post by: Kerry on June 29, 2006, 08:00:29 AM
yep, and damn difficult to find.  ... locks up the routine, and ACAD, dead .. with no error message ..   
Title: Re: Parenthesis matching ... DUH!!!
Post by: ElpanovEvgeniy on June 29, 2006, 08:05:48 AM
yep, and damn difficult to find.  ... locks up the routine, and ACAD, dead .. with no error message ..   
:-)
Code: [Select]
(ACTION_TILE "nyloc" (VL-PRIN1-TO-STRING '(_calextra)))
(ACTION_TILE "mk_pick" (VL-PRIN1-TO-STRING '(progn(_getparams)(DONE_DIALOG 9))))
(ACTION_TILE "replaceblock" (VL-PRIN1-TO-STRING '(progn (SETQ bolt:replace T) (check_eval))))
(ACTION_TILE "eval_length" (VL-PRIN1-TO-STRING '(_evallen)))
(ACTION_TILE "accept" (VL-PRIN1-TO-STRING '(check_eval)))
(ACTION_TILE "cancel" (VL-PRIN1-TO-STRING '(DONE_DIALOG 0)))
Title: Re: Parenthesis matching ... DUH!!!
Post by: Mark on June 29, 2006, 08:17:36 AM
I cheated! :-)
Title: Re: Parenthesis matching ... DUH!!!
Post by: delium55 on June 29, 2006, 09:20:08 AM
Bonjour Mark,

Just a simple question; how do you check the extra paranthesis with VIM.
Title: Re: Parenthesis matching ... DUH!!!
Post by: MP on June 29, 2006, 09:33:47 AM
If the question comes up it's <Ctrl> <M> in Textpad.

(http://www.theswamp.org/screens/mp/textpad-parens-matching.png)
Title: Re: Parenthesis matching ... DUH!!!
Post by: Mark on June 29, 2006, 10:01:52 AM
Bonjour Mark,

Just a simple question; how do you check the extra paranthesis with VIM.

In that particular instance I simply placed the cursor on each beginning paren, Vim 7 highlights the opening, closing parens by default.
Title: Re: Parenthesis matching ... DUH!!!
Post by: Joe Burke on June 29, 2006, 11:47:21 AM
If the question comes up it's <Ctrl> <M> in Textpad.

(http://www.theswamp.org/screens/mp/textpad-parens-matching.png)

Michael,

I wish TextPad was smart enough to ignore commented out lines while checking parens with Ctrl M.
Title: Re: Parenthesis matching ... DUH!!!
Post by: CAB on June 29, 2006, 12:30:58 PM
Also in UltraEdit placing the cursor causes the matching paren to highlight.
Title: Re: Parenthesis matching ... DUH!!!
Post by: MP on June 29, 2006, 03:00:52 PM
Michael,

I wish TextPad was smart enough to ignore commented out lines while checking parens with Ctrl M.

That's a good idea (as an toggled option) Joe, I'll pass that on to the Helios folks when I get a chance. Thanks.
Title: Re: Parenthesis matching ... DUH!!!
Post by: qjchen on June 29, 2006, 10:03:00 PM
when use Pspad, type the left Parenthesis, the right Parenthesis automatic generate, when point to the left Parenthesis, it automatic found the Parenthesis.

Lisplink use ctrl+M to find the matching. and its ctrl+A is very useful for me.

Fig.1 Pspad, Fig.2 Lisplink
Title: Re: Parenthesis matching ... DUH!!!
Post by: Kerry on June 30, 2006, 06:24:27 PM
Thanks guys,

It wasn't so much the capability of checking matching paren's  line by line ..

.. more the fact that we have to know where to look.

Because AutoCAD freezes when it tries to evaluate the callback, any debugging and animation/tracing is suspended as well .. so I thought the problem was in the (check_eval) function ; but only under certain conditions 'cause it is called from other locations as well.
Resolved the location by using debug:print statements. .. just tedious !

Sort of an anticlimax to discover the cause, I tell you.
Title: Re: Parenthesis matching ... DUH!!!
Post by: MickD on June 30, 2006, 06:28:32 PM
It's allways something simple :D
I know just how you feel, I had a lot of these moments lately!
Title: Re: Parenthesis matching ... DUH!!!
Post by: Andrea on July 04, 2006, 12:00:55 AM
now if you talk about lisp editor...
 
I use this....

http://www.studioware.com/ (http://www.studioware.com/)
Title: Re: Parenthesis matching ... DUH!!!
Post by: Kerry on July 04, 2006, 12:37:32 AM
PERSONAL OPINION :

Anyone learning lisp, Vlisp may be better served using the VLIDE from Autocad, to take advantage of ;
Integrated Help,
Integrated formatting,
Integrated debugging  < this is a biggie >
Integrated Intellisense < for want of a better expression >

Appropos,
In line evaluation.
etc, etc, etc.

I believe that a lot of questions I see on forums could be resolved by use of the VLIDE.


Note : I have read arguments that using any integrated editor is evil .. and I don't want to get involved in that discussion here.
Title: Re: Parenthesis matching ... DUH!!!
Post by: ElpanovEvgeniy on July 04, 2006, 12:49:59 AM
Completely with you i agree!
I too use VLIDE from Autocad...
Title: Re: Parenthesis matching ... DUH!!!
Post by: CAB on July 04, 2006, 10:13:47 AM
I too use VLIDE as my primary editor & it's great for debugging & formatting. I use a secondary editor for it's "Column Mode" and other features ("projects" is a nice one). Also to hold files I use for "Cut & Paste" of code sections. This reduces the open files in VLIDE.
Title: Re: Parenthesis matching ... DUH!!!
Post by: Jeff_M on July 04, 2006, 02:38:21 PM
I believe that a lot of questions I see on forums could be resolved by use of the VLIDE.
AMEN brother Kerry! It is so easy to check/run just one line, or even one chunk, of code that may, or may not, be the source of your problem.

Personally, I don't care what editor that they use to code in. I just wish that if/when they have problems they'd at least place it into the VLIDE and check it for problems and/or set a break point and step through it themselves.