View Issue Details

IDProjectCategoryView StatusLast Update
0003369JEDI VCL00 JVCL Componentspublic2006-01-03 04:01
ReporterWBennerAssigned Toelahn 
Status resolvedResolutionfixed 
Product Version3.00 
Target VersionFixed in Version3.20 
Summary0003369: Move for tjvSimpleXML
DescriptionI'm missing the feature to move an tjvSimpleXMLElem item in JVSimpleXML. There are only procedures to add and delete an item.
TagsNo tags attached.



2005-12-18 01:45

developer   ~0008221

If a Value of type TJvSimpleXMLElem is an element of MyElemA.Items, then you call:


...then Value is removed from MyElemA.Items and added to MyElemB.Items

So, to move an item, simply add it to where you want it to go.


2005-12-20 09:27

reporter   ~0008230

But there is no solution for insert an item to another place within MyElemA.Items. Add moves the node to the last place. I need this feature to reorganize a XML-Tree like a tree with drag and drop notes from one to another place.


2005-12-20 20:05

developer   ~0008231

Ok, now I understand what you're asking for. :)

I've added Move and IndexOf to TJvSimpleXMLElems. This is now in CVS.


2005-12-22 02:32

reporter   ~0008232

I cannot compile jvSimpleXML.pas: Undeclared identifier "ReadCharsFromStream" :-(


2005-12-22 03:09

developer   ~0008233

This must be an unrelated issue. Use the daily build:

If it occurs then, create a new issue.


2005-12-26 03:08

reporter   ~0008237

Many thanks for the two features Move and Indexof, but i have trouble with MyElemB.Items.Add(Value). If Value is a member of MyElemA.Items, then it is added to MyElemB.Items but not removed from MyElemA.Items! Look for my code:

    If xml1.Parent = xml2.Parent then // is ok
    else // different Parent
      xml1.Parent.Items.Add(xml2); // moves to end of list

After this code, xml2 is a member of xml1.Parent.Items and old xml2.Parent.Items!


2005-12-26 22:29

developer   ~0008242

It's working correctly in my test program... Please create a demo program that produces the bug and attach it to this issue. Please zip up only the .dpr, .dfm & .pas files.


2005-12-27 07:19

reporter   ~0008244

It's difficult for me to extract the code from my project. I will send you an test project in the next days (or next year :-)

Can you still add a routine "MyElems.Insert(fromItem,ToItem)" where fromItem is a member of a different parent and ToItem is a member of MyElems?


2005-12-29 05:25

reporter   ~0008251

I have made a exmaple program to demonstrate the bug. Compile the program and start it. You see in the bottom of screen the elements of <elem>.parent.
ADR_Anspar has 17 elems and Wiedervorlagen has 3 elems.

Drag the node Geburtstag in ADR_Anspar/Wiedervorlagen and drop onto the node "Handy" (or another elem in this level). After this action ADR_Anspar has 18 elems but "Wiedervorlagen" shows 3 elemtents and not 2!


2005-12-29 05:49

developer   ~0008252

I think you forgot to upload the zip file. :)

2005-12-30 01:31 (3,879 bytes)


2005-12-30 01:32

reporter   ~0008255


i have forgot to click on Upload Button :-)


2006-01-01 08:22

developer   ~0008260

The first bugfix in the CVS log message below, is the one that was causing your issue. This is now fixed in CVS. Please check that this works correctly for you and let me know.

- TJvSimpleXMLElem.Container was not being set when XML data is loaded (Mantis 0003369)
- TJvSimpleXMLElem.JvSimpleXML was not being set when XML data is loaded
- TJvSimpleXMLElem.Parent was not being set in AddChild or AddChildFirst
- TJvSimpleXMLElems.Insert


2006-01-03 03:43

reporter   ~0008265

It works fine, good work!

Issue History

Date Modified Username Field Change
2005-12-16 05:38 WBenner New Issue
2005-12-18 01:45 elahn Note Added: 0008221
2005-12-20 09:27 WBenner Note Added: 0008230
2005-12-20 20:05 elahn Status new => resolved
2005-12-20 20:05 elahn Resolution open => fixed
2005-12-20 20:05 elahn Assigned To => elahn
2005-12-20 20:05 elahn Note Added: 0008231
2005-12-22 02:32 WBenner Status resolved => feedback
2005-12-22 02:32 WBenner Resolution fixed => reopened
2005-12-22 02:32 WBenner Note Added: 0008232
2005-12-22 03:09 elahn Status feedback => resolved
2005-12-22 03:09 elahn Resolution reopened => fixed
2005-12-22 03:09 elahn Note Added: 0008233
2005-12-26 03:08 WBenner Status resolved => feedback
2005-12-26 03:08 WBenner Resolution fixed => reopened
2005-12-26 03:08 WBenner Note Added: 0008237
2005-12-26 22:29 elahn Note Added: 0008242
2005-12-27 07:19 WBenner Note Added: 0008244
2005-12-29 05:25 WBenner Note Added: 0008251
2005-12-29 05:49 elahn Note Added: 0008252
2005-12-30 01:31 WBenner File Added:
2005-12-30 01:32 WBenner Note Added: 0008255
2006-01-01 08:22 elahn Note Added: 0008260
2006-01-03 03:43 WBenner Note Added: 0008265
2006-01-03 04:01 elahn Status feedback => resolved
2006-01-03 04:01 elahn Resolution reopened => fixed