trichview.com

trichview.support




Re: ChartDemo problem 2: Storing and retrieving component data not defined as published fields


Return to index


Author

Message

Sergey Tkachenko

Posted: 08/30/2002 15:59:59


Yes, it looks like TChart does not save its data.

But in your component you can create properties and "pseudo-properties" with

your own procedures for reading and writing.

I've attached a simple example of component - grid that can save its cells

in DFM (and RVF).


For arbitrary data, use Filer.DefineBinaryProperty instead of

Filer.DefineProperty.


>

> My second problem is not related to printing but interresting anyway, at

least

> to me... :-)

>

> Is there an "official" RV way to handle the situation when the components

> are containing data not related to a published field. (I guess that's the

> case in the TChart demo: When saving the demo page containing the

data-filled

> charts and loading it back, the data is gone...)

>

> My own solution is adding a persistent stream to the component, and saving

> the data to this one BEFORE saving the rvf, and later reading the data

back

> from the persistent stream for each component AFTER the rvf is loaded.

>

> Is there a simpler way? Would it be possible to extend the demo whith this

> kind of "saving and loading charts pages containing chart

data"-functionality?

>

> Reagards, and thanks for a superb product! / Jonas



begin 666 StreamedGrid.pas

M>R @5&AI<R!F:6QE(&ES(&)A<V5D(&]N(&UE<W-A9V4@;V8@4&5T97(@0F5L

M;W<@*%1E86U"*2!I;B!B;W)L86YD(&YE=W-G<F]U<"!]#0IU;FET(%-T<F5A

M;65D1W)I9#L-"@T*:6YT97)F86-E#0H-"G5S97,-"B @5VEN9&]W<RP@365S

M<V%G97,L(%-Y<U5T:6QS+"!#;&%S<V5S+"!'<F%P:&EC<RP@0V]N=')O;',L

M($9O<FUS+"!$:6%L;V=S+ T*("!'<FED<SL-"@T*='EP90T*("!44W1R96%M

M961'<FED(#T@8VQA<W,H5%-T<FEN9T=R:60I#0H@('!R:79A=&4-"B @("![

M(%!R:79A=&4@9&5C;&%R871I;VYS('T-"B @("!P<F]C961U<F4@0V5L;'-7

M<FET97(H=W)I=&5R.B!45W)I=&5R*3L-"B @("!P<F]C961U<F4@0V5L;'-2

M96%D97(H<F5A9&5R.B!44F5A9&5R*3L-"B @<')O=&5C=&5D#0H@(" @>R!0

M<F]T96-T960@9&5C;&%R871I;VYS('T-"B @("!P<F]C961U<F4@1&5F:6YE

M4')O<&5R=&EE<RAF:6QE<CH@5$9I;&5R*3MO=F5R<FED93L-"B @<'5B;&EC

M#0H@(" @>R!0=6)L:6,@9&5C;&%R871I;VYS('T-"B @<'5B;&ES:&5D#0H@

M(" @>R!0=6)L:7-H960@9&5C;&%R871I;VYS('T-"B @96YD.PT*#0IP<F]C

M961U<F4@4F5G:7-T97([#0H-"FEM<&QE;65N=&%T:6]N#0H-"G!R;V-E9'5R

M92!296=I<W1E<CL-"F)E9VEN#0H@(%)E9VES=&5R0V]M<&]N96YT<R@G4FEC

M:%9I97<G+"!;5%-T<F5A;65D1W)I9%TI.PT*96YD.PT*#0I[(%13=')E86UE

M9$=R:60@?0T*#0IP<F]C961U<F4@5%-T<F5A;65D1W)I9"Y#96QL<U)E861E

M<BAR96%D97(Z(%1296%D97(I.PT*=F%R('(L(&,Z($EN=&5G97([#0IB96=I

M;@T*("!R96%D97(N4F5A9$QI<W1"96=I;CL-"B @<B Z/2 P.PT*("!W:&EL

M92!N;W0@<F5A9&5R+D5N9$]F3&ES="!D;R!B96=I;@T*(" @(')E861E<BYR

M96%D3&ES=$)E9VEN.PT*(" @(&,@.CT@,#L-"B @("!W:&EL92!N;W0@<F5A

M9&5R+D5N9$]F3&ES="!D;R!B96=I;@T*(" @(" @0V5L;'-;8RQR72 Z/2!R

M96%D97(N4F5A9%-T<FEN9SL-"B @(" @(&EN8RAC*3L-"B @("!E;F0[#0H@

M(" @<F5A9&5R+E)E861,:7-T16YD.PT*(" @(&EN8RAR*3L-"B @96YD.PT*

M("!R96%D97(N4F5A9$QI<W1%;F0[(" -"F5N9#L-"@T*<')O8V5D=7)E(%13

M=')E86UE9$=R:60N0V5L;'-7<FET97(H=W)I=&5R.B!45W)I=&5R*3L-"G9A

M<B!R+"!C.B!);G1E9V5R.PT*8F5G:6X-"B @=W)I=&5R+E=R:71E3&ES=$)E

M9VEN.PT*("!F;W(@<B Z/2 P('1O(%)O=T-O=6YT+3$@9&\@8F5G:6X-"B @

M("!W<FET97(N5W)I=&5,:7-T0F5G:6X[#0H@(" @9F]R(&,@.CT@,"!T;R!#

M;VQ#;W5N="TQ(&1O#0H@(" @("!W<FET97(N5W)I=&53=')I;F<H0V5L;'-;

M8RQR72 I.PT*(" @('=R:71E<BY7<FET94QI<W1%;F0[#0H@(&5N9#L-"B @

M=W)I=&5R+E=R:71E3&ES=$5N9#L-"D5N9#L-"@T*#0IP<F]C961U<F4@5%-T

M<F5A;65D1W)I9"Y$969I;F50<F]P97)T:65S*&9I;&5R.B!41FEL97(I.PT*

M8F5G:6X-"B @:6YH97)I=&5D.PT*("!&:6QE<BY$969I;F50<F]P97)T>2@G

M0V5L;',G+"!#96QL<U)E861E<BP@0V5L;'-7<FET97(L#0H@(" @(" @(" @

M(" @(" @(" @(" @(" @*%)O=T-O=6YT/C I(&%N9" H0V]L0V]U;G0^,"DI

1.PT*96YD.PT*#0IE;F0N#0H`

`

end





Powered by ABC Amber Outlook Express Converter