Hi:

> 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".


To give a little more perspective on this, RecordGrid.records is a
RecordView internally managed by the RecordGrid, that represents the records
as currently being viewed (i.e. after sorts and filters have been applied).

RecordGrid.record-source refers to the actual underlying data that was
supplied to the constructor.

You may operate on either of these recordsets, depending on your needs.  See
docs for RecordSetDisplay, RecordSetDisplay.record-source and
RecordSetDisplay.records for more information.


-Lee Wexler


> -----Original Message-----
> From: Friedger [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 29, 2005 6:34 PM
> To: curlbreaker-l@curl.com
> Subject: Re:DelegatingRecord (was: Is there encode library with Curl ?)
>
> 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]



*******************************************
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