Refresh an array

Refresh an array

Postby Silvio.Falconi » Tue Apr 02, 2013 1:15 pm

I need to refresh an array allready opened into a xbrowse

for load the arrays from another archive dbf I use at init

DO WHILE ! MA->(EoF())
AAdd( aMatBmp,( TRIM(MA->Image)))
AAdd( aMatItems,( TRIM(MA->Descri)))
MA->(DbSkip())
ENDDO




Looking the picture....I use this to show on xbrowse big the bitmaps

If I open the dialog to change a record / on Materia.dbf) I wish refresh the arrays aMatBmp and aMatItems


Now I must close and open the xbrowse big to recreate the arrays because then xbrowse not found if there is a new record on arrays or a record on arrays is modified
Last edited by Silvio.Falconi on Fri Apr 05, 2013 8:10 pm, edited 1 time in total.
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Refresh an array

Postby Silvio.Falconi » Wed Apr 03, 2013 7:28 pm

Any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Refresh an array

Postby anserkk » Thu Apr 04, 2013 4:30 am

Code: Select all  Expand view
oBrw:aArrayData:=aModifiedData
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Refresh an array

Postby James Bott » Thu Apr 04, 2013 2:28 pm

Try:

oBrw:setArray( aNewArray )
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Refresh an array

Postby reinaldocrespo » Thu Apr 04, 2013 4:19 pm

all of the above, aslo; you could just change the array element and then refresh() the current xbrowse row.

oBrw:Columnx:Value( nNewvalue )
oBrw:refreshcurrent()


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 979
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Refresh an array

Postby Silvio.Falconi » Thu Apr 04, 2013 6:44 pm

Perhaps I not explain good

At init I save on two array the text and the bitmaps from another dbf ( materia.dbf)

SELECT MA
MA->(DbSetOrder(1))
MA->(DbGoTop())
DO WHILE ! MA->(EoF())
AAdd( aMatBmp,( TRIM(MA->Image)))
AAdd( aMatItems,( TRIM(MA->Descri)))
MA->(DbSkip())
ENDDO

ON the main xbrowse open and on this on a column (4) I use this command :

:AddBitmap( aMatBmp )
:bBmpData := { || AScan( aMatItems, Trim(CL->CLMATERIA ))+2 }


At left on explorerBar I can open the materia.dbf ( small xbrowse)

I use a blur effect to open the small xbrowse with materia.dbf


Function BlurEffect( oBrw )
local hBmp
local hBlur

oBrw:GetDC()

hBmp := MakeBkBmp( oBrw:hWnd, oBrw:hDC )
hBlur := Blur( hBmp, 3 )

PalBmpDraw( oBrw:hDC, 0, 0, hBlur )

Materia() <------ small xbrowse

DeleteObject( hBmp )
DeleteObject( hBlur )

oBrw:ReleaseDC()
oBrw:refresh()

return nil




If I change a bitmap or a Item then it not refresh the column (4) on the big xbrowse

How I can resolve it ?

now I resolved to close the big xbrowse and reopen the big xbrowse but this is wrong

if you have time you can download the app at
http://www.eoeo.it/wp-content/plugins/d ... d.php?id=1
and see the error
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 51 guests