Re: [Lazarus] Getting common documents folders

2015-05-27 Thread Glaucos Ginez
Hi, you can use GetEnvironmentVariable('LocalAppData')

2015-05-27 14:53 GMT-04:00 Richard Mace richard.m...@gmail.com:

 Hi All,
 I need to use/get a common windows folder (in Win XP,Vista,7,8 and 8.1)
 that all users will have read/write access to by default.
 I think it is CSIDL_COMMON_DOCUMENTS

 Any ideas how I can code this in Lazarus?

 Many thanks

 Richard

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


Re: [Lazarus] Fwd: Need help in streaming components

2014-12-15 Thread Glaucos Ginez
Try TObjectList.

2014-12-15 1:02 GMT-03:00 Kiên Nguyễn Tiến Trung kc97...@gmail.com:

 Thank you for your respond. I find that my real problem is more complex
 and need more help from you.

 I want my TClass1 can contain many TClass2. It means that number of
 TClass2 in TClass1 is not fixed.

 I've tried to use TComponentList, but it does not work. I knew that
 TCollection supports streaming, however, TClass1 and TClass2 must be
 TComponent.

 2014-12-15 0:23 GMT+07:00 Howard Page-Clark h...@talktalk.net:

 On 14/12/2014 12:23, Kiên Nguyễn Tiến Trung wrote:


 I am trying to streaming. I spent a lot of time but I didn't find the
 proper solution.

 I have two classes, TClass1, TClass2. Although the parent of AClass2 is
 AClass1, AClass2 isn't saved into specified file, only AClass1 is.


 AClass1 is not the parent of AClass2. The two classes have no
 relationship, certainly not a hierarchical relationship.

 You make AClass1 the *owner* (not the *ancestor*) of AClass2 for that
 single instantiation in your program (i.e. responsible for correctly
 freeing the instance).

 However, TClass1 and TClass2 are completely unrelated, and know nothing
 about each other's properties.
 Perhaps you are looking for something like the attached zipped unit1.pas.

 Howard





 ---
 This email has been checked for viruses by Avast antivirus software.
 http://www.avast.com

 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


 --
 ___
 Lazarus mailing list
 Lazarus@lists.lazarus.freepascal.org
 http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus


--
___
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus