Hi -
Is it possible to get the Last Modified Date property from objects in powerscript from compiled code (PBDs). Currently we are able to use LibraryDirectoryEx (below) to get it from PBL's but we would like to create something similiar for compiled code. Something where we are able to pass in the object name and it retrieves the last modification date. The purpose of this is to provide in-app version control of reports (datawindows) without having source code available.
Powerbuilder version 2017
Thanks
/* Get the objects per library */
lib_cnt = upperbound(s_library)
FOR i = 1 to lib_cnt
s_objectlist = LibraryDirectoryEx( s_library[i], DirAll!)
ds_objectlist.Reset()
obj_cnt = ds_objectlist.ImportString(s_objectlist)
s_libraryname = s_library[i]
if LastPos(s_library[i], '\\') > 0 then s_libraryname = mid(s_library[i], LastPos(s_library[i], '\\') + 2)
f_pp_msgs(' Extracting ' + string(obj_cnt) + ' objects from ' + s_libraryname )
FOR j = 1 TO obj_cnt
row = dw_objects.InsertRow(0)
dw_objects.SetItem(row, 'app_name', a_appname)
dw_objects.SetItem(row, 'library_name', s_libraryname)
dw_objects.SetItem(row, 'object_name', ds_objectlist.GetItemString(j, 'object_name'))
dw_objects.SetItem(row, 'last_modified', ds_objectlist.GetItemDateTime(j, 'last_modified'))
dw_objects.SetItem(row, 'comments', ds_objectlist.GetItemString(j, 'comments'))
dw_objects.SetItem(row, 'object_type', ds_objectlist.GetItemString(j, 'object_type'))
NEXT
NEXT
FYI: The restriction of only importing DWO source was a PowerSoft imposed restriction so that it would force customers to buy the ORCA support. Sybase just kept on doing that when they acquired PB from PS. In the latter days of Sybase though and into the ownership days of SAP - the ORCA API no longer had a purchase requirement. That open use continues today. So in theory, there would seem to be (unless I am missing something), no requirement to restrict the LibraryImport() command to only DWO's. Personally, I think that opening up this LibraryImport command could stimulate 3rd party tool creation for PB and even improve what "home grown" utilities PB developers could build for their organizations. Of course, that's only IMHO and my $0.02 worth.
Regards ... Chris