Page 3 of 4

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 9:43 pm
by esgici
cdsaenz wrote:Fixed. I guess. Replace Journals.prg with attached source.

attached :?:

Saludos

--

Esgici

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 10:26 pm
by cdsaenz
Take a look again plz. It seems that PRG files are not allowed attachments.

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 10:33 pm
by esgici
cdsaenz wrote:Take a look again plz. It seems that PRG files are not allowed attachments.
All right, thanks.

Saludos

--

Esgici

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 10:54 pm
by esgici
Well, yes; "new" is working with no problem, now by button and from menu.

You are forgotten adding your icon to your main form ;)

After know surely you can develop and expand your project to fitting your real time needs.

Saludos

--

Esgici

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 10:57 pm
by cdsaenz
Oh well, yes I put an icon but in the final product, this is just a sample :)
Did you look at line 125? Do you have any idea why frmJournals can't be referenced at that line?

Thanks Esgici!

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 11:16 pm
by esgici
cdsaenz wrote: Did you look at line 125? Do you have any idea why frmJournals can't be referenced at that line?
Oh, yes; sorry, I'm missed this point.

First we have a naming confusion :(

We have two form with names very close each other : journal and journals !

Second, this two form has its own control with identical name : GridMaster.

If you change

frmJournals.GridMaster.Refresh(.t.)

to

frmJournal.GridMaster.Refresh(.t.)

problem go away; but I'm not sure that this is your intend.

Moreover 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.

I hope that this long sentences will be useful / helpful to you.

Saludos

--

Esgici

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 11:51 pm
by cdsaenz
Oh no, really I have two forms:
- frmJournals is where I show the whole lot of journals.
- frmJournal is where I just edit one of them.

So after editing and closing frmJournal, what I want is to refresh frmJournals, the one with the whole journals file.

But naming is confusing I know.. I'll play a little around it.

Thanks my friend!

Re: Doing Master detail in the best way..

Posted: Tue Jul 27, 2010 11:56 pm
by cdsaenz
Thinking back it must be something with the eight characters limit for varable names right? I guess so. In my real project, name of the forms are different and they are working allright. Names of the forms are:

AsientoEdit
Asientos

If you observe the first eight (AsientoE and Asientos) are different. So that was it I assume.

Re: Doing Master detail in the best way..

Posted: Wed Jul 28, 2010 12:36 am
by esgici
cdsaenz wrote:Oh no, really I have two forms:
- frmJournals is where I show the whole lot of journals.
- frmJournal is where I just edit one of them.

So after editing and closing frmJournal, what I want is to refresh frmJournals, the one with the whole journals file.

But naming is confusing I know.. I'll play a little around it.
Yes, I know you have two form; confusing is only on its names :(

After a lot of stagger, I found that one of two is "parent" and than begun understanding :(

But still we have a serious problem on refresh :(

Let me look tomorrow.

Saludos

--

Esgici

Re: Doing Master detail in the best way..

Posted: Wed Jul 28, 2010 12:49 am
by esgici
cdsaenz wrote:Thinking back it must be something with the eight characters limit for variable names right? I guess so.
No, itsn't right; Harbour expanded variable name's length; AFAIK up to 64 :o
cdsaenz wrote:In my real project, name of the forms are different and they are working allright. Names of the forms are:

AsientoEdit
Asientos

If you observe the first eight (AsientoE and Asientos) are different. So that was it I assume.
Problem isn't on if its are different or not, problem is on readability and this meant easy to understand.

Please take a look on the doc today announced by melliott42 in "Naming Conventions" topic.

Under Code readability header it says :
Why is code readability such an important issue in this coding standard? First of all if a team of programmers is working in the same source code files, you need to have an agreement on how the layout of the code should look like. Even if you agree to don’t have general code layout, that’s still an agreement. This coding standard has got a lot of agreements about coding style and you can decide per item to use it or not.

Second, the better the code is readable, the better can be maintained. This reduces the chance of bugs and simplifies debugging the code and fixing the bugs.

Saludos

--

Esgici