How to implement a Clipboard

From: Hector <"Hector">
Date: Mon, 28 Oct 2002 23:21:59 +0100

Hi, "BlackBoxers".
There was a long time ago I hadn't written, and finally, today, I hadn't any other chance.

My question, today is: "How to implement a Clipboard?".

 I'll explain:

 I'm developing an application that has to use a Clipboard for operations like "cut","copy", and all so. The objects I cut, copy... are part of a list, so in principle, I don't need anything else than an "anchor" to put there (in the anchor, I mean) the cuted objects (and if I want to paste these objects, the only thing I must do is to put that list again in the model). Isn't it?

But if I want to do that, I need the anchor to be a global variable. The problem is that that global variable only would be used when an operation of cutting or pasting is required and it would be unused all the other time (most part of the time, then). Another inconvenient is I don't like global variables very much, so I'm not sure if that way of solving this "Clipboard problem" is elegant (with a global variable).

 What about making a new module only for these Copy and Paste tools?. This module would have the global varible, but at least, that variable is not in the main module. Do you think that this solution is even worse than the global variable in the main module?.

So, for you, which should be the better way to solve that?

Thank you very much.

HECTOR

PE: Excuse me for my bad english.





Received on Mon Oct 28 2002 - 23:21:59 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:34 UTC