GetControls method

Started by Fred Tomke, February 18, 2008, 02:37:47 PM

Previous topic - Next topic

Fred Tomke

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]
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

thanks, that's good to know

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]