As we've mentioned we're working on a large AREV->OI conversion and we really missed this facility so in true Sprezz style we decided that we'd better implement it.
This proved to be easier than even we had anticipated due to the similarity between OI Window Common and AREV Window Common. The workaround we implemented is only good for windows which only update one file, though it wouldn't take much to make it suitable for multi-file windows. The following code shows how to implement it in a create event although of course if you have a promoted event framework you might choose to do it there.
winId = @Window
$Insert OIWin_Comm_Init
$Insert OIWin_Equates
create:
changeRequired = index( param1, "DATAFILE=", 1 )
if changeRequired then
newFile = param1[ changeRequired + 9, @Fm][1, " "]
JoinMap@><1,JMAP_TABLENAME$> = newFile
end
return
$Insert OIWin_Comm_Init
$Insert OIWin_Equates
create:
changeRequired = index( param1, "DATAFILE=", 1 )
if changeRequired then
newFile = param1[ changeRequired + 9, @Fm][1, " "]
JoinMap@><1,JMAP_TABLENAME$> = newFile
end
return
No comments:
Post a Comment