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
1) Started on code obfuscation, but also dug into what you can and cannot do with DataWindow objects. Link https://community.appeon.com/index.php/qna/q-a/code-obfuscation-for-powerbuilder-apps
2) Started on data source within DataWindow but veered into more general DataWindow discussion; and therefore fed into (1). Link https://community.appeon.com/index.php/qna/q-a/data-source-on-datawindow-using-pbd
Enjoy.