Forum > General

TEdit. Append it.

(1/2) > >>

captian jaster:
Im using a TEdit to work with my program. im trying to open a XML and write something to the TEdit. But theres no Append.

--- Code: ---Form1.ForEdit.Text := Child.Attributes.Item[0].NodeValue;

--- End code ---
This raises an error and all i want to work on now is editing the TEdit.

Wodzu:
What kind of error is raised?

skalogryz:

--- Code: ---Form1.ForEdit.Text := Child.Attributes.Item[0].NodeValue;

--- End code ---

captian jaster, are you sure you have following objects existing?
Child
Child.Attributes
Child.Attributes.Item[0]

if any of these objects is nil you'll get the access violation

captian jaster:
thatts the only way i know how to write it. any other way it raises an error on compile.

eny:
What skalogryz is trying to say is that you have to test if the node ('Child') has attributes at all.
If not then it will raise an error as soon as you hit a node without one.

Navigation

[0] Message Index

[#] Next page

Go to full version