OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Fred Tomke on February 18, 2008, 02:37:47 PM

Title: GetControls method
Post by: Fred Tomke on February 18, 2008, 02:37:47 PM
Hello,

I don't want to add this as a bug report until I know whether it's a bug or not:

In the attachment you'll find a project file and a lisp. When the form will be initialized all controls shall be enabled (there are cases when all control will be disabled). To make sure that I won't forget a control I use the GetControls method.

(mapcar '(lambda (x) (dcl_Control_SetEnabled x T)) (cdr (dcl_Form_GetControls constr_sc_hedge)))

But with OpenDCL 5.0.0.5 the SetEnabled will be refused (invalid argument type, argument 0). I could swear that it worked in 5.0.0.3.
Are the controls invalid which are given by dcl_Form_GetControls?

Fred

[attachment deleted by admin]
Title: Re: GetControls method
Post by: owenwengerd on February 18, 2008, 06:05:30 PM
This is a bug. I added some code to identify the type of pointer, and I forgot to update the GetControls function.  I will fix this for Alpha 6.
Title: Re: GetControls method
Post by: owenwengerd on February 18, 2008, 06:19:06 PM
Fred, I am making one additional change for Alpha 6 that will affect your code. I am removing the form control from the list returned by GetControls. This will eliminate the need to worry about whether the form is always the first in the list. In any case, GetForms will return those controls in Alpha 6.
Title: Re: GetControls method
Post by: Fred Tomke on February 18, 2008, 11:08:55 PM
thanks, that's good to know

Fred