OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Vaidas on December 22, 2009, 12:14:52 AM

Title: Function to call on event
Post by: Vaidas on December 22, 2009, 12:14:52 AM
Hello,

Is it strongly required to define functions on events as commands? I mean to define function as (defun c:xxx () (princ))
Question is for my interest at the moment, not for a task.

Title: Re: Function to call on event
Post by: Kerry on December 22, 2009, 12:27:12 AM

Yes, event handlers MUST be commands,  ie C:blablaBla
Title: Re: Function to call on event
Post by: Fred Tomke on December 22, 2009, 12:29:13 AM
Hi, Vaidas, yes otherwise it won't work. I had a quick test with your sample. I have cutted the prefix c: from the events in lsp and odcl. No event worked anymore. But there are exceptions. Please have a look here (http://www.opendcl.com/forum/index.php?topic=1081.msg5677#msg5677).

Fred
Title: Re: Function to call on event
Post by: Vaidas on December 22, 2009, 12:44:19 AM
Thanks Fred, I did the same and asked when not worked. Not a problem, just testing.
As newcomer, I will let you know about me from time to time :)