Subject Re: Mixing XDML and OODML Trouble
From Mervyn Bick <invalid@invalid.invalid>
Date Thu, 29 Sep 2022 09:21:01 +0200
Newsgroups dbase.getting-started

On 2022/09/28 21:14, Norman Snowden wrote:
> I have a XDML Program that is years old. Originally, I dragged the DBF Table directly onto the Form. In making later revisions I had to instead, drag a Query to the Form. My My Program has worked fine for years, but now I would like to add an additional entryfield. I can add the new entryfield, but it will not accept input, just a bleep sound. The existing datalinks are in the form SAVING->origcost. The added one is Form.Saving1.rowset.fields["origcost"]
> I don't want to have to rework the program in OOMDL !  Is there an easy way to add the entryfield ?
> Thanks for any comment, Norman

As Andy has pointed out, mixing XDML and OODML in a form needs VERY
careful management.

If you are using XDML to populate existing entryfields on a form it
means you have the form's view property set to the tablename.  In the
form's class definition there should be a line

    view = "SAVING.DBF"

You can use the form designer to place a new entryfield on the form but
you can't use the Inspector to set its datalink.

Once the new entryfield has been placed, close the designer and open the
form in the sourcecode editor.  Add the datalink property manually.

    this.ENTRYFIELDn = new ENTRYFIELD(this)
    with (this.ENTRYFIELDn)
       height = 1.0
       left = 11.4286
       top = 5.5455
       width = 8.0
       value = ""
       datalink = "saving->orgcost"

In this case you already have the entryfield on the form so simply
change it's datalink property to suit.