Hi again,

rg.records returns a RecordView not the RecordSet used in constructor of
RecordGrid. That is why you don't get the same objects. Use
source-record  to get the same object

{if (rd asa DelegatingRecord).source-record== ({rg.records.get 0} asa
DelegatingRecord).source-record then

Alternatively, use a recordset variable instead of rg.records, also
append to the RecordSet, not the RecordView. That would make things
easier and less "delegating".

Friedger



[EMAIL PROTECTED](B schrieb:
> Hi Friedger,
> 
> here is the code I tried:
> -------------------------------------------------------------------------
> {curl 3.0 applet}
> {curl-file-attributes character-encoding = "shift-jis"}
> 
> {import * from CURL.GUI.BASE}
> {import * from CURL.GUI.CONTROL-BASE}
> {import * from CURL.GUI.CONTROLS}
> {import * from CURL.GUI.DIALOGS}
> {import * from CURL.DATA-ACCESS.BASE}
> 
> {value
>     let rg:RecordGrid =
>         {RecordGrid record-source =
>             {RecordSet
>                 {RecordFields
>                     {RecordField "A", caption="A",domain=String},
>                     {RecordField "B", caption="B",domain=String},
>                     {RecordField "C", caption="C",domain=String}
>                 }
>             }
>         }
> 
>     let rd:Record = {rg.records.new-record}
>     {rd.set "A", "a"}
>     {rd.set "B", "b"}
>     {rd.set "C", "c"}
> 
>     {rg.records.append rd}
> 
>     {if rd == {rg.records.get 0} then
>         {popup-message "OK"}
>     else
>         {popup-message "rd:" & rd & " \{rg.records.get 0\}:"
>            {rg.records.get 0} }
>     }
> 
>     rg
> }
> ---------------------------------------------------------------
> the popup-message's output is;
>  rd:[DelegatingRecord @0x02A8D460] {rg.records.get 0}:[DelegatingRecord
> @0x02A8D46C]
> 
> I'm surprised,
> "Why the record appended is not same to the record which exists at
> appended index?!"
> ...and I can't understand about it.
> 
> I wonder that I do misunderstand something.
> Please tell me where I'm wrong.
> 
> Regards.

*******************************************
To unsubscribe from this list, send a mail to:
mailto:[EMAIL PROTECTED]
To contact a human list administrator, send a mail to:
mailto:[EMAIL PROTECTED]
To recieve a list of other options for this list, send a mail to:
mailto:[EMAIL PROTECTED]

Reply via email to