Solved

Model / View Issue

Posted on 2004-03-24
6
136 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
  • 3
  • 3
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
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
Comment Utility
It is me but from somewhere else.
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
>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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
LVL 2

Author Comment

by:__alex
Comment Utility
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 125 total points
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now