OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: vosey on October 08, 2014, 05:44:37 AM

Title: Arguments List for CONTROL-NAME Functions
Post by: vosey on October 08, 2014, 05:44:37 AM
I'm attempting to Trigger an event when I click into a cell within a Grid but without much success.
I thought the 'OnBeginLabelEdit' Event would be Perfect, so I copied into my Lisp File but I don't really understand
where to go from there.  My confusion lies around the function Argument List (Row Column), do these become variable
names that I can subsequently use?.  Also unsure of what to place into the body of the function? - I tried

(defun c:<CONTROL-NAME>#OnBeginLabelEdit (Row Column /)
   (alert "hello")
)

Just to see when it triggered, but nothing seems to happen whatever I do.  I'm sure I'm missing something obvious but I just can't spot it.  Any help/Suggestions would be great. Thanks
(The Grid is within a Modal Dialog)
Title: Re: Arguments List for CONTROL-NAME Functions
Post by: vosey on October 08, 2014, 06:33:43 AM
Not too sure what happened, but it's now working !  - I restarted the Acad Session and all's fine..
(defun c:rd/Form1/Grid1#OnSelChanged (Row Column /)
   (alert (strcat (itoa Row) " - " (itoa Column)))
)

Cheers
Pete
Title: Re: Arguments List for CONTROL-NAME Functions
Post by: vosey on October 08, 2014, 06:34:54 AM
Just realised - Now using OnSelChanged instead on OnBeginLabelEdit..
Title: Re: Arguments List for CONTROL-NAME Functions
Post by: owenwengerd on October 08, 2014, 10:33:20 AM
OnBeginLabelEdit only fires for cell styles that support editing, so that may explain your initial observation.