Thanks for the info on the widget.
I ended up creating a timer to handle it.
First thing I do is define a field to hold whether or not the widget is initialized and capture it in the Initialized event
Code: Select all
define field(#ChartInitialized) type(*BOOLEAN) default(False)
evtroutine handling(#MOBBarChart.Initialize)
#ChartInitialized := True
endroutine
When the ServerModule completes, I check that field, if the chart is not yet initialized, I kick off a timer.
Code: Select all
evtroutine handling(#FindYearlyGrossMargin.Completed)
#SYS_APPLN.TraceMessageText( "FindYearlyGrossMargin Completed" )
if (#ChartInitialized = False)
#WidgetTimer.Start
else
#COM_OWNER.PopulateChart
#COM_OWNER.ToggleChart( True )
endif
endroutine
Then each tick of the timer, I am checking if the chart is initialized.
Code: Select all
evtroutine handling(#WidgetTimer.Tick)
if (#ChartInitialized)
#COM_OWNER.PopulateChart
#COM_OWNER.ToggleChart( True )
#WidgetTimer.Stop
endif
endroutine
I should probably put in a tick count or something to show an error message instead of just waiting.