I want to display the steps during processing. The status bar is not helpful, because some of the high level processes takes it over.
I designed a form with two fields, the module processing and the step within the module.
CODE:
FUNCTION ProcessingMsgOpen AS C (ProcessingCode AS C, ProcessingStep as c )
' '
var->process_module = ProcessingCode
var->process_step = ProcessingStep
DIM Shared varP_Processing_Menu as P
DIM layout_name as c
layout_name = "Processing-Menu"
DIM tempP as p
'Get pointer to existing window. In case layout_name is qualified with a dictionary name, extract up to first @. In case formname has spaces, normalize it
tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@")))
'Test if pointer is valid
if is_object(tempP) then
'Test if pointer refers to a form or browse
if tempP.class() = "form" .or. tempP.class() = "browse" then
'If so, then activate the already open window
tempP.activate()
tempP.new_record()
else
'Window is not already open, so open it
varP_Processing_Menu = :Form.view(layout_name)
varP_Processing_Menu.new_record()
end if
else
varP_Processing_Menu = :Form.view(layout_name)
varP_Processing_Menu.new_record()
end if
ui_yield()
'Refresh data in Form 'Processing-Menu' .
DIM object_name as C
object_name = ":"+"Processing-Menu"
DIM varP_Object as p
'Get a pointer to the specified object
varP_Object = obj(object_name)
'Check if the specified object exists
if .not. is_object(varP_Object) then
ui_msg_box("Error","The object '"+object_name+"' does not exist.",ui_stop_symbol)
else
'Can only resynch data in View mode, so save record first to be sure that layout is in View mode.
varP_Object.Commit()
varP_Object.Resynch()
varP_Object.Refresh_Layout()
end if
ui_yield()
END FUNCTION
This works fine when called from interactive, but within a script only the first occurrence appears. I've tried the ui_yield() and either I'm not putting it in the right place, or something else. It won't display while the script is running. Does someone have a solution or a routine that does work?
I designed a form with two fields, the module processing and the step within the module.
CODE:
FUNCTION ProcessingMsgOpen AS C (ProcessingCode AS C, ProcessingStep as c )
' '
var->process_module = ProcessingCode
var->process_step = ProcessingStep
DIM Shared varP_Processing_Menu as P
DIM layout_name as c
layout_name = "Processing-Menu"
DIM tempP as p
'Get pointer to existing window. In case layout_name is qualified with a dictionary name, extract up to first @. In case formname has spaces, normalize it
tempP=obj(":"+object_Name_normalize(word(layout_name,1,"@")))
'Test if pointer is valid
if is_object(tempP) then
'Test if pointer refers to a form or browse
if tempP.class() = "form" .or. tempP.class() = "browse" then
'If so, then activate the already open window
tempP.activate()
tempP.new_record()
else
'Window is not already open, so open it
varP_Processing_Menu = :Form.view(layout_name)
varP_Processing_Menu.new_record()
end if
else
varP_Processing_Menu = :Form.view(layout_name)
varP_Processing_Menu.new_record()
end if
ui_yield()
'Refresh data in Form 'Processing-Menu' .
DIM object_name as C
object_name = ":"+"Processing-Menu"
DIM varP_Object as p
'Get a pointer to the specified object
varP_Object = obj(object_name)
'Check if the specified object exists
if .not. is_object(varP_Object) then
ui_msg_box("Error","The object '"+object_name+"' does not exist.",ui_stop_symbol)
else
'Can only resynch data in View mode, so save record first to be sure that layout is in View mode.
varP_Object.Commit()
varP_Object.Resynch()
varP_Object.Refresh_Layout()
end if
ui_yield()
END FUNCTION
This works fine when called from interactive, but within a script only the first occurrence appears. I've tried the ui_yield() and either I'm not putting it in the right place, or something else. It won't display while the script is running. Does someone have a solution or a routine that does work?
Comment