Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Model / View Issue

Posted on 2004-03-24
6
Medium Priority
?
147 Views
Last Modified: 2010-04-05
Well, this is not a real question but maybe I can benefit from the experience of others. Here it goes: I use a TTreeView to represent my data. If the data changes I've got two options (beside others). A) Rebuild the whole tree. B) Just care about the changes.

Ad A: My representation is always consistent but performance is worse and I loose the focus of the selected node.
Ad B: Performance is high but I hold a copy of my data that may (due a bug) differ from the original data.

What do you prefer?
0
Comment
Question by:__alex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10665960
i would prefer C:

modify your tree(node),
actualize the data

who changes the data?
you within the tree, or someother in the data (file?)?

above is for
-you within the tree

meikl ;-)
0
 
LVL 2

Author Comment

by:__alex
ID: 10666254
It is me but from somewhere else.
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 10666493
>It is me but from somewhere else.
??? rephrasing the question
does your instance changes the data, or any other instance

if first, then C
if second, then B

A depends on the amount of data

meikl ;-)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Author Comment

by:__alex
ID: 10666724
The data can be changed from outside my form and from the form containing my tree view. Changing one node can lead to multiple changes in other nodes:

Example:
node: Main_1
     node: Child_1   ***
     node: Child_2
node: Main_2
     node: Child_3
     node: Child_1   ***

Renaming Child_1 must appear in the node in Main_1 and in the node in Main_2.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 10666883
hmm,

there is a possibility,
to store relevant data in the data-property.

doing so, it is possible that nodes can share
relevant data
(multiple nodes pointing to one data-reference).

then i fyou do drawing the caption byelf in the tree,
you can lookup to the shared data

you may take a look into
(using mike lischkes virtualtree)

http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20407731.html#7873367

well, could be i'm on a wrong track,
and misunderstand this q

meikl ;-)
0
 
LVL 2

Author Comment

by:__alex
ID: 10684911
Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question