on 10-09-2008 1:37 PM
hi all,
If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS then
dim i,z as integer
-------------
-----------
For iCnt = 1 To oMatrix.RowCount - 1
objTab = oMatrix.Columns.Item("tspent").Cells.Item(iCnt).Specific()
oMatrix.Columns.Item("tspent").Cells.Item(iCnt).Specific.value = objTab.Value.ToString
in last line it's not executing next statement it's again going to the top line as lost_focus event occurs...i want to execute the next line.can ant body give me solution
iam using lost focus because of pressing tab key in matrix..
regards,
shangai.
Hi,
you can try using this
If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS
And pVal.InnerEvent = False And pVal.BeforeAction = False then
EDIT 2 times
btw i guess you should try using
For iCnt = 1 To oMatrix.RowCount
without minus 1
lg David
Edited too often by: David Nussböck on Oct 9, 2008 2:44 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi david,
when i use this line....it's not at all firing when i press tab key
If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS
And pVal.InnerEvent = False And pVal.BeforeAction = False then
when i keep innerEvent=true...it's executing.....but the problem exists as ded lock occurs..........
regards,
shangai.
Edited by: shangai Nights on Oct 9, 2008 3:22 PM
ok Shanghai,
sorry - i forgot there's no innerevent for lostfocus - forgive me
looks like you have to create your own variable for this to stop the "dead loop"
i give the variable the name "looprunning" of type bool.
be sure looprunning is false when you start the addon
If pVal.ColUID = "tspent" And pVal.EventType = SAPbouiCOM.BoEventTypes.et_LOST_FOCUS
And looprunning = False And pVal.BeforeAction = False then
looprunning = true
' do your matrix loop
looprunning = false
end if
this should prevent the deadlock.
you might give this a try
lg David
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.