I installed the v11 trial on a system with a properly running v8. So far everything but one script works, but that one script no longer works in v8 either. I suspect it has to do with one of those Microsoft items (.net 4 and something else) that v11 installed. Any guesses?
Code:
'Inline-Xbasic. Converted from: Set filename for an Image File Reference field: 'Scan' in current window. 'Set filename for an Image File Reference field: 'Scan' in current window. Dim ImageFilename as c ImageFilename = a5_eval_expression("=a5.get_path() + chr(92) + \"Photos\" + chr(92) + trim(Imgname)+\".jpg\"",local_variables()) IF .not. file.exists(a5.get_path() + chr(92) + "Photos" + chr(92) + trim(photos->IMGNAME)+ ".jpg") ImageFilename=a5.get_path() + chr(92) + "Photos" + chr(92) + "unavail.jpg" end if Dim TempObj as p dim readonly_flag as l 'Get a pointer to the Object on the Form/Browse that has the image file ref field. TempObj = obj(parentform.name(16)+":"+"Scan") 'Check if the image field is readonly readonly_flag = TempObj.field.readonly if readonly_flag = .t. then ui_msg_box("Error","Cannot change image in Image field '"+"Scan"+"' because it is read-only",UI_STOP_SYMBOL) end else dim Tbl as p 'Get a pointer to the table for the image field Tbl = tempobj.Field_Get().table_get() dim Fld as p 'Get a pointer to the image field Fld = tempobj.field_get() 'If the table is in View mode, put it in change mode If tbl.mode_get() = 0 then tbl.change_begin() fld.value_put(image_filename_encode(ImageFileName)) tbl.dchanged=date() tbl.change_end(.t.) else fld.value_put(image_filename_encode(ImageFileName)) tbl.dchanged=date() end if 'now refresh the object tempObj.refresh() end if 'Refresh 'Scan' in current form. topparent:Scan.refresh()
Comment