Residual process [ SOLVED ]

Residual process [ SOLVED ]

Postby sambomb » Thu Sep 11, 2014 6:12 pm

After many months looking for an error in my system I found this in a log file that traces the actions made by the user:
In some few moments the user used an action triggered by a button in a dialog before the function defined in the "On Init" end

I don't know how to simulate but I think that a MsgRun() in the On Init Clause should help because of the change of focus to a modal dialog that will prevent the user to activate the button.

Code: Select all  Expand view

//-- The dialog
oDlgVenda = TDialog():New(,,,,, cResource,, .F.,,,,, oWnd, .F.,,,,,, .F. )

//-- The button pressed
oBtnPre := TButtonBmp():ReDefine( 206, {||TransVenda("P")}, oDlgVenda,,, .F., {|| HabPreOrc("P")},, "Pre-venda->Venda"+Chr(13)+Chr(10)+"F&7", .F., "Prevenda"+cTam, Upper("TEXTRIGHT"), )

//-- Dialog Activate
//-- PPO
//oDlgVenda:Activate( oDlgVenda:bLClicked, oDlgVenda:bMoved, oDlgVenda:bPainted, .T., {|Self|( cSairVda .AND. !lTravaSaida )},, {|Self|NovaVenda(.T.)}, oDlgVenda:bRClicked,, )

//-- PRG
  Activate Dialog oDlgVenda CENTERED On Init NovaVenda(.t.) valid ( cSairVda .And. !lTravaSaida )

//-- Workaround
  Activate Dialog oDlgVenda CENTERED On Init MsgRun("Inicializando a tela de vendas","Aguarde",{||NovaVenda(.t.)}) valid ( cSairVda .And. !lTravaSaida )

 
Last edited by sambomb on Fri Sep 12, 2014 8:19 pm, edited 1 time in total.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Residual process

Postby Antonio Linares » Fri Sep 12, 2014 5:18 am

Samir,

I don't understand what you need. Could you post some screenshots ? thanks
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41323
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Residual process

Postby hmpaquito » Fri Sep 12, 2014 9:52 am

Sambomb

You should disabled previous controls to run proccess.

In general cases
-------------------
Solution 1)
// 1st. To disable dialog or all dialogs

Process

// 3rd. To enable dialog

Solution 2)
To capture mouse pointer


In you particular case
--------------------------
Set bWhen data of button to {|| !lRunningProccess }

Regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: Residual process

Postby sambomb » Fri Sep 12, 2014 11:37 am

Antonio Linares wrote:Samir,

I don't understand what you need. Could you post some screenshots ? thanks


Antonio, I don't have any screenshots and neither can repeat what happened in my client.

I wanna know if this is possible and how can I force this type of error.

[hmpaquito]
I know how to build a workaround to this problem, but first I need to force this to check the before and after.
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil

Re: Residual process

Postby sambomb » Fri Sep 12, 2014 8:05 pm

I found!
The problem is in the bKeyDown.
I can press a button ( F7 ) before the dialog appear for the user ( while the On init is running )

Solved setting the bKeyDown after the On Init function

Code: Select all  Expand view

   //oDlgVenda:bKeyDown  :={| nKey | KeyDownVenda(nKey) }
   bKeyDownTelaVenda :=  {| nKey | KeyDownVenda(nKey) }

   //Activate Dialog oDlgVenda CENTERED On Init NovaVenda(.t.) valid ( cSairVda .And. !lTravaSaida )
   Activate Dialog oDlgVenda CENTERED On Init MsgRun("Inicializando a tela de vendas","Aguarde",{||NovaVenda(.t.),(oDlgVenda:bKeyDown := bKeyDownTelaVenda) }) valid ( cSairVda .And. !lTravaSaida )
 
Email: SamirSSabreu@gmail.com
MSN: SamirAbreu@hotmail.com
Skype: SamirAbreu
xHarbour 1.1.0 + FwXh 8.02
xHarbour 1.2.1 + Fwhh 10.6
User avatar
sambomb
 
Posts: 385
Joined: Mon Oct 13, 2008 11:26 am
Location: Itaocara - RJ - Brasil


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 17 guests