BUG with itemmarked in DCBROWSE?
Posted: Sat Mar 05, 2011 2:34 am
Hi Roger,
I think there is a bug in dcbrowse concerning the ITEMMARKED codeblock, it is NOT always fired!
I have a database browse with documents. There are three buttons with 'Show orders', 'Show delivery notes' and 'Show invoices'.
At startup the invoices are shown. There is a setscope, the invoices appears, I do a gobottom so the last line is selected AND the itemmarked is fired.
Now I click the button to show the orders. This is what happens in my code:
- dc_setscope
- oBrowse:gobottom()
- oBrowse:forceStable()
The orders are shown, and the last record is selected. However the ITEMMARKED is NOT fired. When I select this line with a single click OR a double click, the ITEMMARKED is not fired.
This way the ITEMSELECTED codeblock is started, without the ITEMMARKED. This can have unpredictable results according to the use of the codeblock.
I would prefer there is a parameter for the DCBROWSE that the ITEMMARKED is fired each time there happens something with the browse.
I also have the following situation.
- PC1: Line with invoice is selected in a browse, and the itemmarked is fired. The browse stays on the screen.
- PC2: Someone changes something in this invoice.
- PC1: Select the same line with a single click. The ITEMMARKED isn't fired. In some cases I would prefer to have the possibility to force this.
I can't find in the sources where there is a check if the eval(itemmarked) has to be executed or not. I hoped I could find something as oBrowse:lFireItemmarked := .T. to force this.
I think there is a bug in dcbrowse concerning the ITEMMARKED codeblock, it is NOT always fired!
I have a database browse with documents. There are three buttons with 'Show orders', 'Show delivery notes' and 'Show invoices'.
At startup the invoices are shown. There is a setscope, the invoices appears, I do a gobottom so the last line is selected AND the itemmarked is fired.
Now I click the button to show the orders. This is what happens in my code:
- dc_setscope
- oBrowse:gobottom()
- oBrowse:forceStable()
The orders are shown, and the last record is selected. However the ITEMMARKED is NOT fired. When I select this line with a single click OR a double click, the ITEMMARKED is not fired.
This way the ITEMSELECTED codeblock is started, without the ITEMMARKED. This can have unpredictable results according to the use of the codeblock.
I would prefer there is a parameter for the DCBROWSE that the ITEMMARKED is fired each time there happens something with the browse.
I also have the following situation.
- PC1: Line with invoice is selected in a browse, and the itemmarked is fired. The browse stays on the screen.
- PC2: Someone changes something in this invoice.
- PC1: Select the same line with a single click. The ITEMMARKED isn't fired. In some cases I would prefer to have the possibility to force this.
I can't find in the sources where there is a check if the eval(itemmarked) has to be executed or not. I hoped I could find something as oBrowse:lFireItemmarked := .T. to force this.