PDA

View Full Version : VDFQuery and StatusPanel



Peter van Mil
2-May-2008, 04:31 AM
With VDF 2008 I had some trouble with the statuspanel in VDFQuery. I
just saw a captionbar and no status information. I modified the Wait.utl
package to support the new statuspanel. Adding "of ghoStatusPanel" to
some procedures and functions is all I had to do (after wondering why it
didn't work before).

Regards,

Peter van Mil

// ************************************************** ********************
// Use Wait.utl // Something to put on screen while batching.
//
// By Sture Andersen & Jakob Kruse
//
// Create: Sat 10-05-1997 -
// Update: Fri 03-04-1998 - Top-most-thing added by Jakob Kruse
// Wed 03-03-1999 - Procedure batch_on now initalizes all text areas
// Fri 02-05-2008 - New statuspanel (ghoStatusPanel) by Peter van Mil
//
// ************************************************** *********************

Use ui
Use StatPnl.pkg // Creates the standard status_panel object
Use Strings.nui // String manipulation for VDF
Use Buttons.utl

#IF LNG_DEFAULT=LNG_DUTCH
#REPLACE t.Wait.Question "Vraag"
#REPLACE t.Wait.Cancel "Operatie afbreken?"
#ENDIF
#IF LNG_DEFAULT=LNG_SPANISH // 03/10/2002 25/01/2004 Pepe GuimarĆes Moose Software pg@moose-software.com
#REPLACE t.Wait.Question "Pregunta"
#REPLACE t.Wait.Cancel "¨Cancelar Operaci˘n?"
#ENDIF
#IF LNG_DEFAULT=LNG_ENGLISH
#REPLACE t.Wait.Question "Question"
#REPLACE t.Wait.Cancel "Cancel operation?"
#ENDIF
#IF LNG_DEFAULT=LNG_DANISH
#REPLACE t.Wait.Question "Sp›rgsm†l"
#REPLACE t.Wait.Cancel "ťnsker du at afbryde?"
#ENDIF
#IF LNG_DEFAULT=LNG_SWEDISH
#REPLACE t.Wait.Question "Question"
#REPLACE t.Wait.Cancel "Cancel operation?"
#ENDIF
#IF LNG_DEFAULT=LNG_NORWEGIAN // 22.04.1999 torkild.resheim@emmaedb.no
#REPLACE t.Wait.Question "Sp›rsm†l"
#REPLACE t.Wait.Cancel "Avbryt jobben?"
#ENDIF
#IF LNG_DEFAULT=LNG_GERMAN
#REPLACE t.Wait.Question "Frage"
#REPLACE t.Wait.Cancel "Verarbeitung abbrechen?"
#ENDIF
#IF LNG_DEFAULT=LNG_PORTUGUESE
#REPLACE t.Wait.Question "Confirme"
#REPLACE t.Wait.Cancel "Cancelar opera‡Ćo?"
#ENDIF
#If LNG_DEFAULT=LNG_FRENCH // by Arnaud Mallick (Fr) (Arnaud.mallick@wanadoo.fr)
#Replace t.Wait.Question "Question"
#Replace t.Wait.Cancel "Annuler op‚ration?"
#ENDIF
#IF LNG_DEFAULT=LNG_ITALIAN // 16/10/2002 Paolo Zanni CO.AS.CO.
#REPLACE t.Wait.Question "Conferma"
#REPLACE t.Wait.Cancel "Annulla operazione?"
#ENDIF

class cBatchCompanion is a cProcessStatusPanel
procedure construct_object
forward send construct_object
property string pCancelQuestionCaption public t.Wait.Question
property string pCancelQuestion public t.Wait.Cancel
set button_text to t.btn.cancel
end_procedure

procedure batch_on string caption#
set caption_text of ghoStatusPanel to caption#
set title_text to ""
set message_text to ""
set action_text to ""
send Start_StatusPanel of ghoStatusPanel
end_procedure

procedure batch_off
send Stop_StatusPanel of ghoStatusPanel
end_procedure

procedure batch_update string str#
Set Message_Text of ghoStatusPanel to str#
end_procedure

procedure batch_update2 string str#
set Action_Text of ghoStatusPanel to str#
end_procedure

procedure batch_update3 string str#
set title_text of ghoStatusPanel to str#
end_procedure

function batch_interrupt returns integer
integer cancel#
get Check_StatusPanel of ghoStatusPanel to cancel#
if cancel# begin
send stop_statuspanel of ghoStatusPanel
move (yesno_box(pCancelQuestion(self),pCancelQuestionCa ption(self),MB_DEFBUTTON2)) to cancel#
move (cancel#=mbr_yes) to cancel#
if cancel# function_return 1
send Start_StatusPanel of ghoStatusPanel
end
end_function
end_class // cBatchCompanion

procedure ScreenEndWait_On integer min# integer max#
end_procedure
procedure ScreenEndWait_Update integer pos#
end_procedure
procedure ScreenEndWait_SetText string str#
end_procedure
procedure ScreenEndWait_SetText2 string str#
end_procedure
procedure ScreenEndWait_Off
end_procedure

Sture Andersen
5-May-2008, 02:47 PM
Hi Peter,

I have fixed wait.utl in a (very) similar manner and I am preparing a
VDFQuery 2.4b that should work better with VDF 14 in other areas.

But your attached package works fine when applied to VDFQerty 2.4.

-Sture