Page 4 of 4
Re: Doing Master detail in the best way..
Posted: Wed Jul 28, 2010 1:55 am
by cdsaenz
Yes I understand - however frmJournal and frmJournals is valid for me in that sense (one for a single record and the other for the whole file..). Anyway I'll try to make a change for the better. Thanks Esgici.
Re: Doing Master detail in the best way..
Posted: Wed Jul 28, 2010 11:34 am
by esgici
Hola Charly
Let me correct my own fault first :
esgici wrote:
IMHO
frmJournal.GridMaster.Refresh
is correct than
frmJournal.GridMaster.Refresh(.t.)
but second syntax doesn't produce any error and again I'm not sure functionality is the same for this two syntax; please check it.
And :
HMG Doc wrote:
Syntax of refresh in GRID :
Refresh([lValue])
Refresh Method: Refresh Content For a Data-Bound Control
Syntax:
<WindowName>.<ControlName>.Refresh
Data-bound Grid supports an optional logical parameter. When set to .t., the selected logical records is preserved.
Regarding syntax error on line 125 of Journal.prg :
This is because frmJournals not defined in Journal.prg.
Again,
HMG Doc wrote:DECLARE WINDOW
Declares a Window Name
DECLARE WINDOW <WindowName>
A window must be declared using this command, if you need to refer to it prior
its definition in code, or when you refer to it in a different .prg file from
the one it was defined using semi-oop syntax.
So we need add this line:
to top of Journal.prg.
A little caution : Journal.prg has two STATIC variable definition statement at top. New (DECLARE) statement must be come after these two lines.
Saludos
--
Esgici
Re: Doing Master detail in the best way..
Posted: Wed Jul 28, 2010 11:50 pm
by cdsaenz
EXCELLENT Esgici!! I tried
PRIVATE frmJournals
but DECLARE WINDOW is what I needed.
For some reason in the final product it works allright but you have taught me another HMG trick. Thanks a lot!
Re: Doing Master detail in the best way..
Posted: Thu Jul 29, 2010 12:03 am
by esgici
Good news, thanks
Saludos
--
Esgici