Board index » delphi » Pointers to properties ?
Chris
![]() Delphi Developer |
Mon, 14 Dec 1998 03:00:00 GMT
|
Chris
![]() Delphi Developer |
Mon, 14 Dec 1998 03:00:00 GMT
Pointers to properties ?
HI !
Is there a way to make a pointer (preferrably Pchar) point to the Ive got a multipage(TabbedNotebook) Form with lots of Edit-Fields (170) If not, is there a way to do a loop that goes through these Properties |
Duncan Murdo
![]() Delphi Developer |
Mon, 14 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?On Thu, 27 Jun 1996 19:22:29 +0200, Chris Quote<stenc...@goofy.zdv.uni-mainz.de> wrote: Quote>Ive got a multipage(TabbedNotebook) Form with lots of Edit-Fields (170) components themselves. In fact, one already exists: accessed via the Components property of the form. What you can do is to cycle through this, selecting out components which are of the right type and which have the right page as their Parent (I think) property. Duncan Murdoch |
Tom Harriso
![]() Delphi Developer |
Mon, 14 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?Quote> Chris <stenc...@goofy.zdv.uni-mainz.de> wrote in article Quote> HI ! resources -- are you sure you can't think of another solution? I do not think you can create a pointer to a property. A property is However, depending on the kind of notebook you're using, you can loop over // iterate over all controls in the container Will this work? |
Christian Stenne
![]() Delphi Developer |
Tue, 15 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?Thank=B4s for all the help regarding my problem, I think I worked out a=20 solution for looping through the relevant components on my form and=20 reading their text properties: Procedure Tmyform.readalltext(Sender:TObject); var i :integer; Begin Thanks again, CUL8ER |
Chri
![]() Delphi Developer |
Tue, 15 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?Quote> Tom <tom...@sublimesoft.com> wrote: I had figured out a way almost equivalent to your suggestion, using the components property of my form. But youre right, I do get the feeling that theres a few to many ressources needed, to maintain all of those entry fields! My application is aiming to be a stand-alone input aid, for the remote writing of Database Records which can be saved in a Textfile and later be uploaded into an Informix-Online Database Server. Unfortunately, the individual records of this database are as big as the number of controls on my Form (170 fields or so each), that is excluding the Text-Blob-fields (about 20) which I administer in Memo-Fields. Considering that I have to do about 7 of these forms (with a tight deadline dooming above me) I am struggling to find different ways to accomplish this task. Do you know by any chance wether its possible to use the Delphi-Database-Access components on a remote basis, i.e. without a Database-Connection at runtime? Im not sure wether I should spend time in researching this or wether to go on with my first approach to the prob. Even if you dont find time to answer this, Bye, Chris. |
Meik Web
![]() Delphi Developer |
Wed, 16 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?QuoteChris <stenc...@goofy.zdv.uni-mainz.de> wrote: procedure TFormWithALotOfEditsToSaveToATableOrWhatever.DoIt; you cannot rely on the ordering, so you should use the TAG-Property to Hope this helps |
Phoenix Business Enterpris
![]() Delphi Developer |
Fri, 18 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?Quote>Is there a way to make a pointer (preferrably Pchar) point to the Writing to files... Yes for published... Sometimes for others. Look into the _ Quote>>SQUID - The ultimate 95/NT offline databasing reader |
J. K. Braswel
![]() Delphi Developer |
Sat, 19 Dec 1998 03:00:00 GMT
Re:Pointers to properties ?QuotePhoenix Business Enterprises wrote: obj.enumObjNames(raProperty) to an array, for instance, then use those names to reference the properties _indirectly_ in various methods and procedures. The indirect reference is done by putting the array entry in parentheses, whereas a direct reference to a property simply uses some property name. So, obj.color references the color property of obj. But obj.(raProperty[i]) looks up the property name in an array. Thus, the actual property can vary at runtime. You can also reference the object indirectly with constructions such as (obj).method() or (obj).value. Jan Braswell |