Hello,
We have a datawindow control in our application which includes code in the itemfocuschanged event to perform some additional processing when column data is changed in the datawindow. We have added some error checking at the beginning of the event as follows which is sometimes generating an error itself:
From pbm_dwnitemchangefocus --> itemfocuschanged (long row, dwobject dwo);
LONG lg_y, lg_pos, lg_x, lg_position
STRING st_ret
IF NOT IsValid(dwo) THEN RETURN
IF IsNull(dwo) THEN RETURN
IF dwo.Type <> 'column' THEN RETURN
{...}
Error accessing external object property type at line 5 in itemfocuschanged event
My understanding of that error being on line 5 is that it cannot access property "Type" of object dwo but we are checking the validity/null state of the dwobject in the lines immediately above that. According to the PB Help "DWObject arguments for DataWindow events in PowerBuilder" we should be checking dwo.Type to ensure other properties are available for use later in the script, but how can the Type property not be available?
Is there another method that would be more applicable here to achieve the same level of error checking or are we missing something else?
We are using Powerbuilder 2017 R3 build 1915.
Thank you in advance.