View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003369 | JEDI VCL | 00 JVCL Components | public | 2005-12-16 05:38 | 2006-01-03 04:01 |
Reporter | WBenner | Assigned To | elahn | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.20 | |||
Summary | 0003369: Move for tjvSimpleXML | ||||
Description | I'm missing the feature to move an tjvSimpleXMLElem item in JVSimpleXML. There are only procedures to add and delete an item. | ||||
Tags | No tags attached. | ||||
|
If a Value of type TJvSimpleXMLElem is an element of MyElemA.Items, then you call: MyElemB.Items.Add(Value) ...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. |
|
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. |
|
Ok, now I understand what you're asking for. :) I've added Move and IndexOf to TJvSimpleXMLElems. This is now in CVS. |
|
I cannot compile jvSimpleXML.pas: Undeclared identifier "ReadCharsFromStream" :-( |
|
This must be an unrelated issue. Use the daily build: http://jvcl.sf.net/daily If it occurs then, create a new issue. |
|
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: idx1:=xml1.Parent.GetChildIndex(xml1); idx2:=xml2.Parent.GetChildIndex(xml2); If xml1.Parent = xml2.Parent then // is ok xml1.Parent.Items.Move(Idx1,Idx2) else // different Parent begin xml1.Parent.Items.Add(xml2); // moves to end of list xml1.Parent.Items.Move(xml2.Parent.Items.IndexOf(xml2),idx1); end; After this code, xml2 is a member of xml1.Parent.Items and old xml2.Parent.Items! |
|
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. |
|
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? |
|
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! |
|
I think you forgot to upload the zip file. :) |
2005-12-30 01:31
|
XMLTest.zip (3,879 bytes) |
|
Sorry, i have forgot to click on Upload Button :-) |
|
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. Bugfixes: - 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 Additions: - TJvSimpleXMLElems.Insert |
|
It works fine, good work! |
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: XMLTest.zip | |
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 |