Subject Re: Assigning Values
From Norman Snowden <duluth@msn.com>
Date Sat, 14 Apr 2018 14:27:56 -0400
Newsgroups dbase.getting-started

Thanks Andy,
  It seems form.area1.rowset.save() is not the problem.

If I arbitrarily set m->tard = 40 and m->tarm = 30  rather than using the calculated m->tard and m->tarm values  the tard and tarm Entryfields immediately appear in the Form as expected.

20         54         18.56681 m->tard m->tarm m->tars
40 tard
30 tarm
18.56700 tars

It makes absolutely no sense that the calculated m->tars value works and the calculated m->tard and m->tarm values appear as zeros. I think the WW2 era gremlins have returned!

Thanks for any comment,   Norman



Andy Taylor Wrote:

> Norman,
>
> Unlikely that you've maxxed out on entryfields.
> I might be able to suggest a different way of doing what you want... that form must be a monster (drop me an e-mail if you want).
>
> Having looked at your code I think it more likely that the rowset.save() method has not completed (because of the huge number of datalinks)
>  before you start asking for the replaced values. Incidentally I assume the last three commands are really tard, tarm and tars instead of tard 3 times.
>
> Try using..
> form.area1.rowset.save()
> do until form.area1.rowset.modified = false
>    _app.executemessages()
> enddo
> ? .... etc
>
> Of course that might give you an endless loop if there's a problem with the save... so perhaps a count on the loops with maximum value?
> Andy
>
>
> > This code changes a decimal angle to degrees minutes and seconds. On the Form.wfm the seconds, called tars, prints out  just fine in the tars Entryfield.
> >
> > However the decimal tard value and the minute tarm value show as zeros in their Entryfields as zero, which they are.
> >  
> > As you can  see from the printouts tard and tarm refuse to accept their assigned values.
> >
> > Can the program just be maxed out with too many Entryfields?
> >
> > Thanks for any comments, Norman Snowden
> >
> > with (this.ENTRYFIELD428)
> >       dataLink = form.area1.rowset.fields["tard"]
> >       height = 0.1667
> >       left = 10.1458
> >       top = 5.375
> >       width = 0.34
> >       picture = "99"
> >       fontSize = 8.0
> >       fontBold = true
> >    endwith
> >
> >    this.ENTRYFIELD429 = new ENTRYFIELD(this)
> >    with (this.ENTRYFIELD429)
> >       dataLink = form.area1.rowset.fields["tarm"]
> >       height = 0.1667
> >       left = 10.52
> >       top = 5.375
> >       width = 0.32
> >       picture = " 99"
> >       fontSize = 8.0
> >       fontBold = true
> >    endwith
> >
> >    this.ENTRYFIELD430 = new ENTRYFIELD(this)
> >    with (this.ENTRYFIELD430)
> >       dataLink = form.area1.rowset.fields["tars"]
> >       height = 0.1667
> >       left = 10.875
> >       top = 5.375
> >       width = 0.5833
> >       picture = "99.999"
> >       fontSize = 8.0
> >       fontBold = true
> >    endwith
> >
> >    tcnvr = RTOD(Atan(m->yty/m->xtx))  && 03/16/2017                     
> >         m->tard = INT(tcnvr)
> >         m->tarm = INT((tcnvr - m->tard) * 60)
> >         m->tars = ((((tcnvr - m->tard) * 60) - INT((tcnvr - m->tard) * 60))) * 60
> >         ? m->tard, m->tarm, m->tars, "m->tard", "m->tarm", "m->tars"                
> >         form.area1.rowset.fields["tard"].value = m->tard
> >         form.area1.rowset.fields["tarm"].value = m->tarm
> >         form.area1.rowset.fields["tars"].value = m->tars
> >         form.area1.rowset.save()
> >      ? form.area1.rowset.fields["tard"].value , "tard"
> >         ? form.area1.rowset.fields["tard"].value , "tarm"
> >         ? form.area1.rowset.fields["tard"].value , "tars"  
> >           
> >    
> >         20         54         18.56681 m->tard m->tarm m->tars
> >         0 tard
> >         0 tarm
> >         18.56700 tars
> >    return
>