I am trying to convert a VISUAL USER OBJECT that was once embedded on a window, into a DYNAMICALLY CREATED VISUAL USER OBJECT in a different window (same package).
The problem I'm getting is I can't seem to be able to create an array of these objects without getting null references or reusing the same object over and over.
At the moment, when a user needs a new array element:
long ll_count
ll_count = UpperBound(iuo_backorders[])
iuo_backorders[ll_count+1] = uo_backorder
lb_ok = iuo_backorders[ll_count+1].init('w_backorder_popup', '', '', '', 'd_backorder_popup', sqlca, useTransObj())
This reuses the same uo_backorder again and again.
Using: iuo_backorders[ll_count+1] = create uo_backorder
returns null object references.
The user object is contained within another window (I think), so I'm not sure if I need to move the uo_ commands out into it's own file in the PBL, or somehow change the references (new window is a child of the original, but unsure how that pertains to uo_)
All the functionality is already in the uo_, I just need to be able to work out
A) how to dynamically create a visual user object
B) how to then create an array of these objects.