In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

when will TDataField:lModified set to .T.?

Xailer professional forum in English
Responder
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »


José,
how can I find out if the content of the DBDataControl (the DBDataControl's
buffer) is changed?
I'm using the OnExit like this:
METHOD FExit( oSender, oNextCtl ) CLASS TForm2
LOCAL lOk
lOk:= oSender:oDataField:lModified //it is always .F.
LogDebug(lOk)
RETURN Nil
The complete sample ist attached.
Can you spend a little time to have a look in it and tell me what I'm doing
wrong?
Thanks in advance
Ingo
--

Attached files TestEvent.zip (3.3 KB)Â
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

José,
when the DataSet is on the Append mode (AddNew) then it works but not when
it is on the Edit mode.
Have you any idea?
Regards
Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

José,
when the DataSet is on the Append mode (AddNew) then it works but not when
it is on the Edit mode.
Have you any idea?
Regards
Ingo
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9441
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

when will TDataField:lModified set to .T.?

Mensaje por ignacio »

Ingo,
It returns .F. because the DataField buffer is not changed yet. Only the
DataControl value is modified. Right now the DataField buffer is changed on
the Update() operation.
BTW, you are not the first one complaining about this problem so we have
decided to fix it so it works as expected for most users. In the next
revision any change to a data control value while in edit mode will provoke
the update of its underlaying data field value. In the same manner, any
change to DataField buffer value will udpate all its linked controls when
in edit mode.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> José,
>
> how can I find out if the content of the DBDataControl (the
> DBDataControl's
> buffer) is changed?
>
> I'm using the OnExit like this:
>
> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
> LOCAL lOk
> lOk:= oSender:oDataField:lModified //it is always .F.
> LogDebug(lOk)
> RETURN Nil
>
> The complete sample ist attached.
>
> Can you spend a little time to have a look in it and tell me what I'm
> doing
> wrong?
>
> Thanks in advance
>
> Ingo
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

when will TDataField:lModified set to .T.?

Mensaje por NoName »

Ingo,
It returns .F. because the DataField buffer is not changed yet. Only the
DataControl value is modified. Right now the DataField buffer is changed on
the Update() operation.
BTW, you are not the first one complaining about this problem so we have
decided to fix it so it works as expected for most users. In the next
revision any change to a data control value while in edit mode will provoke
the update of its underlaying data field value. In the same manner, any
change to DataField buffer value will udpate all its linked controls when
in edit mode.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> José,
>
> how can I find out if the content of the DBDataControl (the
> DBDataControl's
> buffer) is changed?
>
> I'm using the OnExit like this:
>
> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
> LOCAL lOk
> lOk:= oSender:oDataField:lModified //it is always .F.
> LogDebug(lOk)
> RETURN Nil
>
> The complete sample ist attached.
>
> Can you spend a little time to have a look in it and tell me what I'm
> doing
> wrong?
>
> Thanks in advance
>
> Ingo
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

Ignacio,
thanks for the response, but when DataSet is in Append mode then lModified
is set to .T. if the DataControl is modified like it is specified in the
documentation:
'TDataField:lModified
Returns .T. if the 'buffer' has been modified.'

But it isn't done when the DataSet is in Edit mode. It will be very helpfull
to fix it - thank you vbery much.
In the meantime have you any suggestion for a workaround?
On EditControls I can look at the lModify property but this doesn't exist
in ComboBox. What can I do there?
Thanks in advance
Ingo

"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>It returns .F. because the DataField buffer is not changed yet. Only the
>DataControl value is modified. Right now the DataField buffer is changed
on
>the Update() operation.
>
>BTW, you are not the first one complaining about this problem so we have
>decided to fix it so it works as expected for most users. In the next
>revision any change to a data control value while in edit mode will provoke
>the update of its underlaying data field value. In the same manner, any
>change to DataField buffer value will udpate all its linked controls when
>in edit mode.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> José,
>>
>> how can I find out if the content of the DBDataControl (the
>> DBDataControl's
>> buffer) is changed?
>>
>> I'm using the OnExit like this:
>>
>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>> LOCAL lOk
>> lOk:= oSender:oDataField:lModified //it is always .F.
>> LogDebug(lOk)
>> RETURN Nil
>>
>> The complete sample ist attached.
>>
>> Can you spend a little time to have a look in it and tell me what I'm
>> doing
>> wrong?
>>
>> Thanks in advance
>>
>> Ingo
>
>
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

Ignacio,
thanks for the response, but when DataSet is in Append mode then lModified
is set to .T. if the DataControl is modified like it is specified in the
documentation:
'TDataField:lModified
Returns .T. if the 'buffer' has been modified.'

But it isn't done when the DataSet is in Edit mode. It will be very helpfull
to fix it - thank you vbery much.
In the meantime have you any suggestion for a workaround?
On EditControls I can look at the lModify property but this doesn't exist
in ComboBox. What can I do there?
Thanks in advance
Ingo

"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>It returns .F. because the DataField buffer is not changed yet. Only the
>DataControl value is modified. Right now the DataField buffer is changed
on
>the Update() operation.
>
>BTW, you are not the first one complaining about this problem so we have
>decided to fix it so it works as expected for most users. In the next
>revision any change to a data control value while in edit mode will provoke
>the update of its underlaying data field value. In the same manner, any
>change to DataField buffer value will udpate all its linked controls when
>in edit mode.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> José,
>>
>> how can I find out if the content of the DBDataControl (the
>> DBDataControl's
>> buffer) is changed?
>>
>> I'm using the OnExit like this:
>>
>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>> LOCAL lOk
>> lOk:= oSender:oDataField:lModified //it is always .F.
>> LogDebug(lOk)
>> RETURN Nil
>>
>> The complete sample ist attached.
>>
>> Can you spend a little time to have a look in it and tell me what I'm
>> doing
>> wrong?
>>
>> Thanks in advance
>>
>> Ingo
>
>
Avatar de Usuario
ignacio
Site Admin
Mensajes: 9441
Registrado: Lun Abr 06, 2015 8:00 pm
Ubicación: Madrid, Spain
Contactar:

when will TDataField:lModified set to .T.?

Mensaje por ignacio »

Ingo,
>> but when DataSet is in Append mode then lModified is set to .T.
Surely because you have manually put a value on its buffer.
>>DataControl is modified like it is specified in the documentation:
Do not mix up 'Data Controls' and 'Data Fields'. lModified return .T. when
the DATAFIELD buffer has change. Nothing to do with DataControls.
> In the meantime have you any suggestion for a workaround?
> On EditControls I can look at the lModify property but this doesn't exist
> in ComboBox. What can I do there?
You can check if the combobox value is the same as the TDataField:Value. But
be aware that in the next revision that comparison will always be true.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:45064a44$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> thanks for the response, but when DataSet is in Append mode then lModified
> is set to .T. if the DataControl is modified like it is specified in the
> documentation:
>
> 'TDataField:lModified
>
> Returns .T. if the 'buffer' has been modified.'
>
> But it isn't done when the DataSet is in Edit mode. It will be very
> helpfull
> to fix it - thank you vbery much.
>
> In the meantime have you any suggestion for a workaround?
> On EditControls I can look at the lModify property but this doesn't exist
> in ComboBox. What can I do there?
>
> Thanks in advance
>
> Ingo
>
>
>
>
> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>>Ingo,
>>
>>It returns .F. because the DataField buffer is not changed yet. Only the
>
>>DataControl value is modified. Right now the DataField buffer is changed
> on
>>the Update() operation.
>>
>>BTW, you are not the first one complaining about this problem so we have
>
>>decided to fix it so it works as expected for most users. In the next
>>revision any change to a data control value while in edit mode will
>>provoke
>
>>the update of its underlaying data field value. In the same manner, any
>
>>change to DataField buffer value will udpate all its linked controls when
>
>>in edit mode.
>>
>>Regards,
>>
>>--
>>Ignacio Ortiz de Zúñiga
>>http://www.xailer.com
>>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>
>>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>
>>> José,
>>>
>>> how can I find out if the content of the DBDataControl (the
>>> DBDataControl's
>>> buffer) is changed?
>>>
>>> I'm using the OnExit like this:
>>>
>>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>>> LOCAL lOk
>>> lOk:= oSender:oDataField:lModified //it is always .F.
>>> LogDebug(lOk)
>>> RETURN Nil
>>>
>>> The complete sample ist attached.
>>>
>>> Can you spend a little time to have a look in it and tell me what I'm
>
>>> doing
>>> wrong?
>>>
>>> Thanks in advance
>>>
>>> Ingo
>>
>>
>
Ignacio Ortiz de Zúñiga
[OZ Software]
https://www.ozs.es
--
[Equipo de Xailer / Xailer team]
https://www.xailer.com
NoName
Mensajes: 531
Registrado: Vie Feb 03, 2006 7:27 pm

when will TDataField:lModified set to .T.?

Mensaje por NoName »

Ingo,
>> but when DataSet is in Append mode then lModified is set to .T.
Surely because you have manually put a value on its buffer.
>>DataControl is modified like it is specified in the documentation:
Do not mix up 'Data Controls' and 'Data Fields'. lModified return .T. when
the DATAFIELD buffer has change. Nothing to do with DataControls.
> In the meantime have you any suggestion for a workaround?
> On EditControls I can look at the lModify property but this doesn't exist
> in ComboBox. What can I do there?
You can check if the combobox value is the same as the TDataField:Value. But
be aware that in the next revision that comparison will always be true.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
news:45064a44$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>
> Ignacio,
>
> thanks for the response, but when DataSet is in Append mode then lModified
> is set to .T. if the DataControl is modified like it is specified in the
> documentation:
>
> 'TDataField:lModified
>
> Returns .T. if the 'buffer' has been modified.'
>
> But it isn't done when the DataSet is in Edit mode. It will be very
> helpfull
> to fix it - thank you vbery much.
>
> In the meantime have you any suggestion for a workaround?
> On EditControls I can look at the lModify property but this doesn't exist
> in ComboBox. What can I do there?
>
> Thanks in advance
>
> Ingo
>
>
>
>
> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>>Ingo,
>>
>>It returns .F. because the DataField buffer is not changed yet. Only the
>
>>DataControl value is modified. Right now the DataField buffer is changed
> on
>>the Update() operation.
>>
>>BTW, you are not the first one complaining about this problem so we have
>
>>decided to fix it so it works as expected for most users. In the next
>>revision any change to a data control value while in edit mode will
>>provoke
>
>>the update of its underlaying data field value. In the same manner, any
>
>>change to DataField buffer value will udpate all its linked controls when
>
>>in edit mode.
>>
>>Regards,
>>
>>--
>>Ignacio Ortiz de Zúñiga
>>http://www.xailer.com
>>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>
>>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>
>>> José,
>>>
>>> how can I find out if the content of the DBDataControl (the
>>> DBDataControl's
>>> buffer) is changed?
>>>
>>> I'm using the OnExit like this:
>>>
>>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>>> LOCAL lOk
>>> lOk:= oSender:oDataField:lModified //it is always .F.
>>> LogDebug(lOk)
>>> RETURN Nil
>>>
>>> The complete sample ist attached.
>>>
>>> Can you spend a little time to have a look in it and tell me what I'm
>
>>> doing
>>> wrong?
>>>
>>> Thanks in advance
>>>
>>> Ingo
>>
>>
>
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

Ignacio,
thank you very much again. I see it's better to wait for the next revision.
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>>> but when DataSet is in Append mode then lModified is set to .T.
>
>Surely because you have manually put a value on its buffer.
>
>>>DataControl is modified like it is specified in the documentation:
>
>Do not mix up 'Data Controls' and 'Data Fields'. lModified return .T. when
>the DATAFIELD buffer has change. Nothing to do with DataControls.
>
>> In the meantime have you any suggestion for a workaround?
>> On EditControls I can look at the lModify property but this doesn't exist
>> in ComboBox. What can I do there?
>
>You can check if the combobox value is the same as the TDataField:Value.
But
>be aware that in the next revision that comparison will always be true.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:45064a44$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> thanks for the response, but when DataSet is in Append mode then lModified
>> is set to .T. if the DataControl is modified like it is specified in the
>> documentation:
>>
>> 'TDataField:lModified
>>
>> Returns .T. if the 'buffer' has been modified.'
>>
>> But it isn't done when the DataSet is in Edit mode. It will be very
>> helpfull
>> to fix it - thank you vbery much.
>>
>> In the meantime have you any suggestion for a workaround?
>> On EditControls I can look at the lModify property but this doesn't exist
>> in ComboBox. What can I do there?
>>
>> Thanks in advance
>>
>> Ingo
>>
>>
>>
>>
>> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>>>Ingo,
>>>
>>>It returns .F. because the DataField buffer is not changed yet. Only the
>>
>>>DataControl value is modified. Right now the DataField buffer is changed
>> on
>>>the Update() operation.
>>>
>>>BTW, you are not the first one complaining about this problem so we have
>>
>>>decided to fix it so it works as expected for most users. In the next
>>>revision any change to a data control value while in edit mode will
>>>provoke
>>
>>>the update of its underlaying data field value. In the same manner, any
>>
>>>change to DataField buffer value will udpate all its linked controls
when
>>
>>>in edit mode.
>>>
>>>Regards,
>>>
>>>--
>>>Ignacio Ortiz de Zúñiga
>>>http://www.xailer.com
>>>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>>
>>>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>>
>>>> José,
>>>>
>>>> how can I find out if the content of the DBDataControl (the
>>>> DBDataControl's
>>>> buffer) is changed?
>>>>
>>>> I'm using the OnExit like this:
>>>>
>>>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>>>> LOCAL lOk
>>>> lOk:= oSender:oDataField:lModified //it is always .F.
>>>> LogDebug(lOk)
>>>> RETURN Nil
>>>>
>>>> The complete sample ist attached.
>>>>
>>>> Can you spend a little time to have a look in it and tell me what I'm
>>
>>>> doing
>>>> wrong?
>>>>
>>>> Thanks in advance
>>>>
>>>> Ingo
>>>
>>>
>>
>
>
Ingo Junge-Herrmann
Mensajes: 339
Registrado: Lun Jul 02, 2007 7:17 pm

when will TDataField:lModified set to .T.?

Mensaje por Ingo Junge-Herrmann »

Ignacio,
thank you very much again. I see it's better to wait for the next revision.
Regards
Ingo
"Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>Ingo,
>
>>> but when DataSet is in Append mode then lModified is set to .T.
>
>Surely because you have manually put a value on its buffer.
>
>>>DataControl is modified like it is specified in the documentation:
>
>Do not mix up 'Data Controls' and 'Data Fields'. lModified return .T. when
>the DATAFIELD buffer has change. Nothing to do with DataControls.
>
>> In the meantime have you any suggestion for a workaround?
>> On EditControls I can look at the lModify property but this doesn't exist
>> in ComboBox. What can I do there?
>
>You can check if the combobox value is the same as the TDataField:Value.
But
>be aware that in the next revision that comparison will always be true.
>
>Regards,
>
>--
>Ignacio Ortiz de Zúñiga
>http://www.xailer.com
>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>news:45064a44$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>
>> Ignacio,
>>
>> thanks for the response, but when DataSet is in Append mode then lModified
>> is set to .T. if the DataControl is modified like it is specified in the
>> documentation:
>>
>> 'TDataField:lModified
>>
>> Returns .T. if the 'buffer' has been modified.'
>>
>> But it isn't done when the DataSet is in Edit mode. It will be very
>> helpfull
>> to fix it - thank you vbery much.
>>
>> In the meantime have you any suggestion for a workaround?
>> On EditControls I can look at the lModify property but this doesn't exist
>> in ComboBox. What can I do there?
>>
>> Thanks in advance
>>
>> Ingo
>>
>>
>>
>>
>> "Ignacio Ortiz de Zúñiga" <NoName@xailer.com> wrote:
>>>Ingo,
>>>
>>>It returns .F. because the DataField buffer is not changed yet. Only the
>>
>>>DataControl value is modified. Right now the DataField buffer is changed
>> on
>>>the Update() operation.
>>>
>>>BTW, you are not the first one complaining about this problem so we have
>>
>>>decided to fix it so it works as expected for most users. In the next
>>>revision any change to a data control value while in edit mode will
>>>provoke
>>
>>>the update of its underlaying data field value. In the same manner, any
>>
>>>change to DataField buffer value will udpate all its linked controls
when
>>
>>>in edit mode.
>>>
>>>Regards,
>>>
>>>--
>>>Ignacio Ortiz de Zúñiga
>>>http://www.xailer.com
>>>"Ingo Junge-Herrmann" <[email=XPRO-0031BA74-01@10.0.0.11]XPRO-0031BA74-01@10.0.0.11[/email]> escribió en el mensaje
>>
>>>news:450559cd$[email=1@news.xailer.com...]1@news.xailer.com...[/email]
>>>>
>>>> José,
>>>>
>>>> how can I find out if the content of the DBDataControl (the
>>>> DBDataControl's
>>>> buffer) is changed?
>>>>
>>>> I'm using the OnExit like this:
>>>>
>>>> METHOD FExit( oSender, oNextCtl ) CLASS TForm2
>>>> LOCAL lOk
>>>> lOk:= oSender:oDataField:lModified //it is always .F.
>>>> LogDebug(lOk)
>>>> RETURN Nil
>>>>
>>>> The complete sample ist attached.
>>>>
>>>> Can you spend a little time to have a look in it and tell me what I'm
>>
>>>> doing
>>>> wrong?
>>>>
>>>> Thanks in advance
>>>>
>>>> Ingo
>>>
>>>
>>
>
>
Responder