RE: [DUG]: AddObject and record structures

2000-12-17 Thread vss
recipients of list delphi > > Subject: RE: [DUG]: AddObject and record structures > > > > > > I do this by creating the record structure with new first - eg > > > > procedure add(strlst : TStringList; txt : string; [items for record] ...) > > var >

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Stephen Bertram
On reflection I would do as Patrick suggests - declare the structure as a class TNodeRecord = record ==> TNodeObject = class(TObject) typ : TRecType; typ : TRecType; ... ... my_pointer := new(TNo

RE: [DUG]: AddObject and record structures

2000-12-13 Thread vss
ogrammer > > Stephen > > > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Friday, 15 December 2000 05:47 > To: Multiple recipients of list delphi > Subject: RE: [DUG]: AddObject and record structures > > > I tried

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Stephen Bertram
I agree entirely Patrick, but when your existing application has screeds of treeviews the objects are very convenient for a Q&D extension using the existing node navigation. Stephen --- New Zealand Delphi Users group - D

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Stephen Bertram
for me, but then I'm not a C programmer Stephen -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, 15 December 2000 05:47 To: Multiple recipients of list delphi Subject: RE: [DUG]: AddObject and record structures I tried this, but had problems a

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Patrick Dunford
ED]]On > Behalf Of Stephen Bertram > Sent: Thursday, 14 December 2000 16:46 > To: Multiple recipients of list delphi > Subject: RE: [DUG]: AddObject and record structures > > > I do this by creating the record structure with new first - eg > > procedure add(strlst : TStr

RE: [DUG]: AddObject and record structures

2000-12-13 Thread vss
I tried this, but had problems at the other end when I went to extract the items i.e. alwasy GPF'd on me. Jeremy Coulter > I do this by creating the record structure with new first - eg > > procedure add(strlst : TStringList; txt : string; [items for record] ...) > var >rec_ptr : ^TNo

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Stephen Bertram
I do this by creating the record structure with new first - eg procedure add(strlst : TStringList; txt : string; [items for record] ...) var rec_ptr : ^TNodeRecord; begin new(rec_ptr); rec_ptr^.ntype := typ; rec_ptr^.level := level; rec_ptr^.actionable := actionable; r

RE: [DUG]: AddObject and record structures

2000-12-13 Thread vss
Oh ok...will do thanks... Jeremy Coulter > Change your record into a class derived from TObject. > > The string list objects are designed to hold TObjects (which are pointers). > > It looks like the complier can put a record with one integer field into the > space for a pointer which is

RE: [DUG]: AddObject and record structures

2000-12-13 Thread Wes Edwards
Change your record into a class derived from TObject. The string list objects are designed to hold TObjects (which are pointers). It looks like the complier can put a record with one integer field into the space for a pointer which is why the first one worked. Wes > -Original Message-