Re: Specific Cloning Question
- From: Thomas Weidenfeller <nobody@xxxxxxxxxxxxxxxx>
- Date: Thu, 21 Sep 2006 18:10:58 +0200
Alex wrote:
I realise it is hard to help without seeing the code
It is actually a waste of our time.
but I am looking
for general advice on whether cloning is a sensible way to achieve what
I want.
No, it is not.
How do I know? I don't, I am just guessing, because you haven't shown us how you do things, haven't given us important information like the size of the tree or the complexity of the operations you intend to do on the clone and you eventually want to undo.
The reason why I still say it is not a sensible way is because you have not devised (or not told us) a sensible way of what should happen if you are satisfied with the changes to the clone and you decide to keep the cloned tree. Then you might have to "magically" change references to the old tree all over your program. Might, because we don't know your program. That's manageable with another level of indirection, but without you mentioning it, and without seeing your code I simply state cloning is not a good idea in this case.
If so...how do you go about it? If you think you can help I am
happy to send you my code but it seems silly to post it all here as
it's quite big.
If you can't be bothered to invest some time to cut down your code to some useful demo of the problem, and if you can't be bothered to even copy the exception error messages verbatim, why should we invest our time to second-guess? Is your time more valuable than ours?
/Thomas
--
The comp.lang.java.gui FAQ:
http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
.
- Follow-Ups:
- Re: Specific Cloning Question
- From: Alex
- Re: Specific Cloning Question
- References:
- Specific Cloning Question
- From: Alex
- Specific Cloning Question
- Prev by Date: Re: Specific Cloning Question
- Next by Date: Re: package private problem
- Previous by thread: Re: Specific Cloning Question
- Next by thread: Re: Specific Cloning Question
- Index(es):
Relevant Pages
|
|