I have created a tree with several nodes. Display fine.
ROOT
node1
subnode 1-1
subnode 1-2
subnode 1-3
node2
node3
I want to insert a node between subnode 1-2 en subnode 1-3 without rebuilding the tree.
As I understand it right now new_node is adding at the end.
I tried creating node with lastnod_id + 1000 , and then create a node in between.
hilitedNodeIDs doesn't help . NextId and currentid would help.
Who has more ideas's
command buildtree
local sNodeId, sNodeIds, sDepthA
lock screen
dispatch "delete_nodeData" to control "Tree"
set the treeType of control "Tree" to empty
add 1000 to sNodeId
put sNodeId & cr after sNodeIds
put 0 into sDepthA[sNodeId]
---- level 1
add 1000 to sNodeId
put sNodeId & cr after sNodeIds
put 1 into sDepthA[sNodeId]
add 1000 to sNodeId
put sNodeId & cr after sNodeIds
put 1 into sDepthA[sNodeId]
---
delete character - 1 of sNodeIds
set the NodeIds of control "Tree" to sNodeIds
set the custompropertyset of control "Tree" to "depth_of_node_ID_"
set the custompropertyset of control "Tree" to sDepthA
set the custompropertyset of control "Tree" to empty
dispatch "renderTree" to control "Tree"
unlock screen
end buildtree
command InsertNode
local sNodeId, sNodeIds, sDepthA
lock screen
---- level 1
add 1500 to sNodeId
put sNodeId & cr after sNodeIds
put 2 into sDepthA[sNodeId]
dispatch "renderTree" to control "Tree"
unlock screen
end InsertNode
Insert a node in an existing tree, q howto
This is a forum focused on providing support for rTree
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 37
- Joined: Fri Sep 09, 2011 10:04 am
- Location: Netherlands
Jump to
- LiveCode Community
- ↳ Announcements
- ↳ Developer Services Marketplace
- ↳ User Groups and Events
- ↳ SoCal LiveCode Group
- ↳ Greater Toronto Area LiveCode Users Group
- ↳ Off-Topic
- ↳ Made With LiveCode
- Getting Started With LiveCode
- ↳ Getting Started with LiveCode - Complete Beginners
- ↳ Getting Started with LiveCode - Experienced Developers
- ↳ Converting to LiveCode
- ↳ App Building Course
- ↳ Simple Messages
- ↳ Calculator
- ↳ Notes
- ↳ Clock
- ↳ Web Browser
- ↳ Weather
- ↳ Compass
- ↳ Photos
- Developing With LiveCode
- ↳ Talking LiveCode
- ↳ Databases
- ↳ Games
- ↳ Internet
- ↳ Multimedia
- ↳ Software Engineering
- ↳ Version Control
- ↳ Feature Proposals
- ↳ Bug Triage
- ↳ Legacy Project: MetaCard
- Extending LiveCode
- ↳ Using Plugins for Customizing the LiveCode IDE
- ↳ Using Externals
- ↳ Making IDE Plugins
- ↳ Building Externals
- ↳ LiveCode Builder
- Platform Specific
- ↳ Windows
- ↳ Mac OS
- ↳ Linux
- ↳ iOS Deployment
- ↳ Android Deployment
- ↳ CGIs and the Server
- ↳ HTML5
- ↳ Raspberry Pi
- Academic Endeavors
- ↳ Teaching with LiveCode
- ↳ Research and Post Secondary
- ↳ LiveCode University
- ↳ Educational Outreach
- Livecode Open Source Archived Forum- closed to posting
- ↳ Engine Contributors
- ↳ IDE Contributors
- ↳ Documentation and Tutorials
- ↳ Brainstorms
- ↳ Community Projects
- ↳ rIDE
- Third Party Extension Support
- ↳ Marketing Your Products
- ↳ Animation Engine
- ↳ chartsEngine
- ↳ MobGUI
- ↳ lcTaskList
- ↳ SQL Yoga
- ↳ MergEXT
- ↳ Data Grid Helper
- ↳ idea2app and Coding School
- ↳ Admin Archive
- LiveCode Hosting
- Forum Archives
- ↳ Archived: Third Party Extension Support
- ↳ rTree
- ↳ rGrid
- ↳ Data Tree
- ↳ Archived: LiveCode Open Source
- ↳ LiveCode Global Jam
- ↳ Testing Support
- ↳ Archived: Academic Endeavors
- ↳ September Academy
- ↳ Summer School 2013
- ↳ Archived: Project Specific
- ↳ Business and Kiosks
- ↳ Digital Art and Portfolios