I'm doing a drag and drop operation on a tree using some help from Adobe's quick Starts:
http://www.adobe.com/devnet/flex/quickstart/working_with_tree/
The code suggested is roughly this:
var dropTarget:Tree = Tree(evt.currentTarget);
var i:int = dropTarget.calculateDropIndex(evt);
myTree.selectedIndex = i;
var node:XML = myTree.select...
OK I've got a little more research on this done so I'm going to totally rephrase the question:
I have two trees, I want to be able to drag items from one tree to the other. In the receiving tree I have some logic that allows or denys the drop. I am using the native cursor feedback Like this :
DragManager.showFeedback(DragManager.COPY);
...
I am able to understand preorder traversal without using recursion, but I'm having a hard time with inorder traversal. I just don't seem to get it, perhaps, because I haven't understood the inner working of recursion.
This is what I've tried so far:
def traverseInorder(node):
lifo = Lifo()
lifo.push(node)
while True:
...
It is possible, generally, by means of Ruby library to output a symbol at specific location on a common Windows console screen, which seems to be 80x25 ?
The problem came up with the need to draw a specific 'tree' structure like this, for example:
│
├──x──y──z
│ │
│ ├──a──b──c
│ │
│ └──e──f──g
│
└──u──v──o
...
I am denying a user the ability to drop into my tree during certain conditions, it's all going well, but I want to tell the user why I'm denying the drop. I would prefer to do it with a toolTip, but it doesn't seem to work. Can I not have a toolTip during a drag operation? How can I force one?
Flex seems to treat toolTips as a property...
Hi, I am required to print out(visit) the nodes on a single level of a binary tree.
I don't see how this can be done but then again I not very skilled with algorithms in general.
I know that in Breadth-First traversal you use a queue and that you start by putting the root node in the queue then you dequeue it visit it and enqueue it's ch...
Hi,
I have an xml string fetched as a remote object like:
<metadata>
<system name="A">
<serviceGroup name="SG1">
<version id="id1" />
<service name="S1"/>
</serviceGroup>
<serviceGroup name="SG2">
<version id="id2" />
<serviceGroup name="SG3">
<version id="id3" />
...
Hello,
I cannot get focusNode() or expandNode() get working. I also tried switching back to dojo 1.32 and even 1.3, no difference to 1.4. And I debugged with firebug, the node is a valid tree node and no errors occur but the node wont get focused. Help is VERY appreciated!
<head>
<script type="text/javascript">
dojo.declare("itcTre...
Hello again, Stackoverflow.
Continuing on my journey into Antlr (Previous questions may provide additional clues on what I'm trying to achieve! Q1 - How do I make a tree parser and Q2 - Solving LL recursion problem) I've hit yet another roadblock I cannot flathom.
Basically (I believe) the expression rule in my grammar needs to either ...
How can you find out if a Flex Component (in my case the tree) is scrollable? I tried it like this
if (_listOwner.height < _listOwner.measuredHeight) {
// so stuff
}
from within the tree's item renderer but didn't succeed. Access to the tree's scrollbar is private so that I can't get the info that way.
...
The background: I'm building a trie to represent a dictionary, using a minimal construction algorithm. The input list is 4.3M utf-8 strings, sorted lexicographically. The resulting graph is acyclic and has a maximum depth of 638 nodes. The first line of my script sets the recursion limit to 1100 via sys.setrecursionlimit().
The prob...
Hi,
I've been trying to workout a good way of doing this fast but I'm not sure what will be the most optimal, I'm hoping some of you more experienced developers can assist via your Data Structures knowledge :-)
Essentially I have a list of paths (Eg. C:\inetpub\wwwroot\, C:\www\websites\vhosts\somesite.com\, D:\www-mirror\websites\vhos...
I have a list (graph?) of nodes, and each node is connected to other nodes in the list one or more times. I want to take these nodes and lay them out in a nice 2d diagram with lines connecting them together in an optimal way. What's the best algorithm for doing this so that they're spaced evenly apart and the lines connecting them are ...
Hi everybody,
I have a XML based Tree Control. The XML Structure is recursive, so the children's can have the same Element as the parent. I now want to let the user add and remove the elements. Do do so I need to get the parent element of the selected Item. Following code I already collected together:
var selected:XML = treeControl.sel...
Hi everybody,
I have a Tree Control on which I let user add some nodes. When a node gets added I want to let the user edit the added control right away. How do I get the itemEditorInstance of a just added xml node?
Thanks for hints!
Markus
...
Basically what I have is a tree with 3 nodes, created like so:
for (var i=0; i<response.length; i++) {
response[i]["type"] = "project";
}
var data = {
"identifier": "name",
"label": "name",
"items": response
};
var store = new dojo.data.ItemFileRea...
Has anyone got a working example on howto insert and delete nodes in a tree that is directly connected to a datastore (FileItemWriteSotre) without explicit declaring a Model?
I tried everything I found searching net and forums, nothing works. Inserting the node into the datastore seems to work but does not insert a node in the Tree.
A...
I'm reading a lot about vocabulary trees when it comes to fast queries for similar images or texts in big databases. But I couldn't find any good (easy to unserstand) description on what such an vocabulary tree is and how to build one out of features.
...
is there better way than just go left or right based on the input digit 0 or 1?
...
hello, i have a problem with breadth first algorithm, my script generates curves in maya, position them, rotate and scale them so they give me the tree shape,
i have these variables
cs=current State,
p=parent,
nodes=non visited node List
lvl=current depth
maxlvl= max depth
the problem is that i cant determine current depth, and ter...