Ayuda con LOCK en BROWSE usando INPUTITEMS
Moderator: Rathinagiri
Ayuda con LOCK en BROWSE usando INPUTITEMS
---------------------------------
LOCK en BROWSE con INPUTITEMS
---------------------------------
Estimados, necesito que me ayuden con el siguiente problema:
Estoy usando HMG 2.5.8, XP-SP2, la instalación de HMG es nueva, siempre borro la vieja, uso el harbour y MinGw que biene con HMG 2.5.8, es decir a ese nivel no modifiqué nada, es más jamás instalé otras distribuciones de MiniGui que no sea la oficial ( la de Roberto ). Ahh y no soy chupamedias Ja Ja!!!
A partird de la versión HMG 2.5.3 tiene una nueva propiedad en el objeto BROWSE que se llama INPUTITEMS.
Empezé a usarla, pero cuando quiero usarla sobre una DBF que está abierta en modo SHARED tira este mensaje:
Date:08/26/2008 Time: 20:26:23
Error DBFNTX/1022 Lock required
Called from _INPLACEEDITOK(1893)
Called from (b)_BROWSEINPLACEEDIT(1579)
Called from _DOCONTROLEVENTPROCEDURE(4381)
Called from EVENTS(467)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4046)
Called from _BROWSEINPLACEEDIT(1752)
Called from _BROWSEEDIT(1354)
Called from EVENTS(1969)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4070)
Called from MAIN(79)
(IMPORTANTE!!! el error solo se produce abriendo el COMBO y moviéndose varias veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
yo como ven en el ejemplo tengo la propiedad LOCK en .t. entonces voy a ver la linea que marca el error (1893) en
\hmg\sources\h_browse.prg y veo que:
1891--> If lock == .t.
1893--> Replace &FieldName With r
Unlock
efectivamente está el LOCK en .t.
Por eso hago dos preguntas:
1) Ustedes pueden reproducir el error? ( recordar que el error se produce abriendo el COMBO y moviéndose varias
veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y
con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
2) Se les ocurre algo ?
Muchas gracias y espero me puedan ayudar.
Saludos, Fernando Chirico.
LOCK en BROWSE con INPUTITEMS
---------------------------------
Estimados, necesito que me ayuden con el siguiente problema:
Estoy usando HMG 2.5.8, XP-SP2, la instalación de HMG es nueva, siempre borro la vieja, uso el harbour y MinGw que biene con HMG 2.5.8, es decir a ese nivel no modifiqué nada, es más jamás instalé otras distribuciones de MiniGui que no sea la oficial ( la de Roberto ). Ahh y no soy chupamedias Ja Ja!!!
A partird de la versión HMG 2.5.3 tiene una nueva propiedad en el objeto BROWSE que se llama INPUTITEMS.
Empezé a usarla, pero cuando quiero usarla sobre una DBF que está abierta en modo SHARED tira este mensaje:
Date:08/26/2008 Time: 20:26:23
Error DBFNTX/1022 Lock required
Called from _INPLACEEDITOK(1893)
Called from (b)_BROWSEINPLACEEDIT(1579)
Called from _DOCONTROLEVENTPROCEDURE(4381)
Called from EVENTS(467)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4046)
Called from _BROWSEINPLACEEDIT(1752)
Called from _BROWSEEDIT(1354)
Called from EVENTS(1969)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4070)
Called from MAIN(79)
(IMPORTANTE!!! el error solo se produce abriendo el COMBO y moviéndose varias veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
yo como ven en el ejemplo tengo la propiedad LOCK en .t. entonces voy a ver la linea que marca el error (1893) en
\hmg\sources\h_browse.prg y veo que:
1891--> If lock == .t.
1893--> Replace &FieldName With r
Unlock
efectivamente está el LOCK en .t.
Por eso hago dos preguntas:
1) Ustedes pueden reproducir el error? ( recordar que el error se produce abriendo el COMBO y moviéndose varias
veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y
con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
2) Se les ocurre algo ?
Muchas gracias y espero me puedan ayudar.
Saludos, Fernando Chirico.
Saludos, Fernando Chirico.
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Perdòn, me olvidè de adjuntar los ejemplos ( faaaa!!! )Por eso hago dos preguntas:
1) Ustedes pueden reproducir el error? ( recordar que el error se produce abriendo el COMBO y moviéndose varias
veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y
con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
2) Se les ocurre algo ?
Muchas gracias y espero me puedan ayudar.
Saludos, Fernando Chirico.
- Attachments
-
- bug3.zip
- (2.13 KiB) Downloaded 402 times
Saludos, Fernando Chirico.
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Hello Fernando,fchirico wrote:Por eso hago dos preguntas:
1) Ustedes pueden reproducir el error? ( recordar que el error se produce abriendo el COMBO y moviéndose varias
veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y
con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
2) Se les ocurre algo ?
Muchas gracias y espero me puedan ayudar.
I confirm this problem with HMG 2.6.0 also.
Code: Select all
Harbour MiniGui Errorlog File
------------------------------------
Date:08/27/2008 Time: 10:17:43
Error DBFNTX/1022 Lock required
Called from _INPLACEEDITOK(1893)
Called from (b)_BROWSEINPLACEEDIT(1579)
Called from _DOCONTROLEVENTPROCEDURE(4394)
Called from EVENTS(467)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4059)
Called from _BROWSEINPLACEEDIT(1752)
Called from _BROWSEEDIT(1354)
Called from EVENTS(1982)
Called from _DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(4083)
Called from MAIN(79)
Take a look for h_browse.prg at your folder hmg\source.
Seek for the following function:
*------------------------------------------------------------------------------*
Function _BrowseInPlaceEdit ( GridHandle , aValid , aValidMessages , aReadOnly , lock , append , aInputItems )
*------------------------------------------------------------------------------*
...
and place here memvar
Local abKeyBlocks := {}
Now look at code of this function further and replace
Code: Select all
...
If lInputItems == .T.
* Fill Items Array
For p := 1 To Len ( aInputItems [ CellColIndex ] )
aadd ( aItems , aInputItems [ CellColIndex ] [p] [1] )
Next p
* Fill Values Array
For p := 1 To Len ( aInputItems [ CellColIndex ] )
aadd ( aValues , aInputItems [ CellColIndex ] [p] [2] )
Next p
ii := aScan ( aValues , CellData )
if ii == 0
ii := 1
endif
DEFINE COMBOBOX Control_1
FONTNAME BFN
FONTSIZE BFS
ROW 0
COL 0
ITEMS aItems
WIDTH This.CellWidth
VALUE ii
END COMBOBOX
...
Code: Select all
...
If lInputItems == .T.
* Fill Items Array
For p := 1 To Len ( aInputItems [ CellColIndex ] )
aadd ( aItems , aInputItems [ CellColIndex ] [p] [1] )
Next p
* Fill Values Array
For p := 1 To Len ( aInputItems [ CellColIndex ] )
aadd ( aValues , aInputItems [ CellColIndex ] [p] [2] )
Next p
ii := aScan ( aValues , CellData )
if ii == 0
ii := 1
endif
DEFINE COMBOBOX Control_1
FONTNAME BFN
FONTSIZE BFS
ROW 0
COL 0
ITEMS aItems
WIDTH This.CellWidth
VALUE ii
ON DROPDOWN ( AADD(abKeyBlocks, _GetHotKey ( '_InPlaceEdit', 0, 27 )), ;
_ReleaseHotKey ( '_InPlaceEdit', 0, 27 ), ;
AADD(abKeyBlocks, _GetHotKey ('_InPlaceEdit', 0, 13 )), ;
_ReleaseHotKey ( '_InPlaceEdit', 0, 13 ) )
ON CLOSEUP ( _DefineHotKey('_InPlaceEdit', 0, 27, abKeyBlocks[1]), ;
_DefineHotKey('_InPlaceEdit', 0, 13, abKeyBlocks[2]), ;
abKeyBlocks := {} )
END COMBOBOX
...
The solution is borrowed from HMG Extended Edition.
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Genial Gregory !!! lo probaré.Gfilatov wrote:
I confirm this problem with HMG 2.6.0 also.
That's all!
The solution is borrowed from HMG Extended Edition.
Gracias y saludos, Fernando Chirico.
Saludos, Fernando Chirico.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Grigory:gfilatov wrote: The solution is borrowed from HMG Extended Edition.
Fernando had previously reported this problem to HMG bug tracker, but I was not able to reproduce it, so, I've said to him that post the issue here.
Since I was not able to reproduce the problem, could you give some guidence about how can I do for that the error arises?
I've tested on XP SP2 and Vista SP1.
TIA.
Reagrds,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Roberto,Roberto Lopez wrote: Grigory:
Fernando had previously reported this problem to HMG bug tracker, but I was not able to reproduce it, so, I've said to him that post the issue here.
Since I was not able to reproduce the problem, could you give some guidence about how can I do for that the error arises?
I've tested on XP SP2 and Vista SP1.
Yes, of course.
After compiling Fernando's sample I've edit a second column in grid with InputItems by mouse doubleclick.
Then I press F4 in the arised Combobox and press [ Enter ] key a twice at the dropdown list.
The aboved error arised...
I suggest to add a handling ON DROPDOWN and ON CLOSEUP events in the management of the ComboBox for Logical value too.
Code: Select all
...
ElseIf ControlType == 'L'
DEFINE COMBOBOX Control_1
FONTNAME BFN
FONTSIZE BFS
ROW 0
COL 0
ITEMS { '.T.','.F.' }
WIDTH This.CellWidth
VALUE If ( CellData , 1 , 2 )
ON DROPDOWN ( AADD(abKeyBlocks, _GetHotKey ( '_InPlaceEdit', 0, 27 )), ;
_ReleaseHotKey ( '_InPlaceEdit', 0, 27 ), ;
AADD(abKeyBlocks, _GetHotKey ('_InPlaceEdit', 0, 13 )), ;
_ReleaseHotKey ( '_InPlaceEdit', 0, 13 ) )
ON CLOSEUP ( _DefineHotKey('_InPlaceEdit', 0, 27, abKeyBlocks[1]), ;
_DefineHotKey('_InPlaceEdit', 0, 13, abKeyBlocks[2]), ;
abKeyBlocks := {} )
END COMBOBOX
...
Kind Regards,
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
Grigory Filatov
"Everything should be made as simple as possible, but no simpler." Albert Einstein
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Thanks!!!gfilatov wrote:
Yes, of course.
After compiling Fernando's sample I've edit a second column in grid with InputItems by mouse doubleclick.
Then I press F4 in the arised Combobox and press [ Enter ] key a twice at the dropdown list.
The aboved error arised...
I suggest to add a handling ON DROPDOWN and ON CLOSEUP events in the management of the ComboBox for Logical value too.
I've was able to reproduce the problem now (Fernando does not mentioned F4 nor double <Enter> )
Thanks again!
Regards,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Roberto, yo dije ...I've was able to reproduce the problem now (Fernando does not mentioned F4 nor double <Enter> )
"(IMPORTANTE!!! el error solo se produce abriendo el COMBO y moviéndose varias veces por los distintos valores, y finalmente eligiendo un valor distinto al original, si no abro el COMBO y con la flecha del teclado voy pasando por todos los valores NO se produce el error.)
"
y hay dos formas de abrir el combo: con F4 o haciendo click sobre la flechita del combo ( que es lo que yo hacía ) y si te movés por los distintos valores varias veces, es decir recorré el combo de principio a fin con las flechas arriba y abajo del teclado y si seleccionás un valor distinto del original se produce el error.
Gracias otra vez por preocuparte y cualquier prueba o ayuda que necesites avisame.
Saludos, Fernando Chirico.
Saludos, Fernando Chirico.
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Si no puedes reproducir el error si querés por la noche podés tomar sesión de mi pc ( con VNC ) y lo vemos.
Saludos, Fernando Chirico.
Saludos, Fernando Chirico.
Saludos, Fernando Chirico.
- Roberto Lopez
- HMG Founder
- Posts: 4004
- Joined: Wed Jul 30, 2008 6:43 pm
Re: Ayuda con LOCK en BROWSE usando INPUTITEMS
Gracias Fernando.fchirico wrote:Si no puedes reproducir el error si querés por la noche podés tomar sesión de mi pc ( con VNC ) y lo vemos.
Saludos, Fernando Chirico.
Abriendo con F4 y cerrando con doble Enter he logrado reprodicir el problema.
Gracias por reportarlo.
Saludos,
Roberto.
Regards/Saludos,
Roberto
(Veritas Filia Temporis)
Roberto
(Veritas Filia Temporis)