Board index » delphi » TransferData(tmSetData) doesn't work after upgrade from 5.0 to 5.02

TransferData(tmSetData) doesn't work after upgrade from 5.0 to 5.02

Quote
Shea Martin wrote:
> I have a dialogue box with TEdit boxes.  I would like to fill this TEdit
> boxes with data. My program works fine with the 5.0 ide, but I can't get it
> to work with the 5.02 ide.  I need the 5.02 ide for compatibility reasons
> beyond the scope of this message.

> Here is a sample of the method that is ineffective:

> void TTAdmDlgClient::FileDataToBuffers()
> {
>   // INSERT>> Your code here. (different field)
>   sprintf(TTAdmDlgClientData.Profile, "%-d", t_rec.Profile);
>   strcpy (TTAdmDlgClientData.UserCol, t_rec.UserCol);

>   MessageBox(TTAdmDlgClientData.Profile,"DEBUG DATA",MB_OK);
>   MessageBox(TTAdmDlgClientData.UserCol,"DEBUG DATA",MB_OK);
>   TransferData(tdSetData);  // Transfer data from buff to dlgbox
> }

> The method is definitely being invoked.  The values of
> TTAdmDlgClientData.Profile, and TTAdmDlgClientData.UserCol do contain
> strings, and are not null.  I don't know why the TEdit boxes are not being
> filled out.  THIS DOES WORK WITH THE 5.0 compiler!!!

Did you call SetTransferBuffer() ? If you don't, TDialog doesn't where your
data is. However, if you do call SetTransferBuffer(), TDialog will also be
calling TransferData() and possibly overwriting the reusults of your call. The
best way to use a transfer buffer is to simply fill it with data prior to
calling TDialog::Execute() and let TDialog handle the data transfering.

I don't know why this works with BC5.0 and not with BC5.02. But remember that
BC5.0 had lots of bugs in it.

HTH

Marvin.Av...@hrdc-drhc.gc.ca

 

Re:TransferData(tmSetData) doesn't work after upgrade from 5.0 to 5.02


Quote
> Did you call SetTransferBuffer() ? If you don't, TDialog doesn't where
your
> data is. However, if you do call SetTransferBuffer(), TDialog will also be
> calling TransferData() and possibly overwriting the reusults of your call.
The
> best way to use a transfer buffer is to simply fill it with data prior to
> calling TDialog::Execute() and let TDialog handle the data transfering.

> I don't know why this works with BC5.0 and not with BC5.02. But remember
that
> BC5.0 had lots of bugs in it.

> HTH

> Marvin.Av...@hrdc-drhc.gc.ca

Marvin

The situation which I need data transfered is this:
A user enters information in a TEdit box, then hits enter. This triggers a
method to refill the transfer buffer and display the new corresponding data
to the screen.  So after refilling the transfer buffer, should I call
Execute()?

SetTransferBuffer is being used in the dialogue boxes contructor.  This code
was generate for me by the IDE.

Thanks in advance.

~S

Other Threads