RE: Clipboard... always clipboard

From: [at]} <frei{>
Date: Wed, 13 Nov 2002 11:18:06 +0100

----boundary-LibPST-iamunique-1748149721_-_-
Content-type: text/plain

Hector,

as far as we can guess from your description, you simply have to implement
your own PasteGuard and use it in your "Paste" menu entry:

MODULE YourView;
...
  PROCEDURE PasteGuard (VAR par: Dialog. Par);
  BEGIN
    par.disabled := my paste buffer is empty
  END PasteGuard;
...
END YourView.

MENU "YourMenu" ("YourView.View")
...
  "Paste" "" "YourView.Paste" "YourView.PasteGuard"
...
END

Some aspects of this are explained in the BlackBox Help section "Component
Software: A Case Study Using BlackBox Components" Chapter 4: Forms and
Chapter 6: View Construction. Please have a look at Help->Contents.
Additionally, it may help to browse through the different "Overview by
Example" programs that can be found under Help->Examples.

Cheers,
Marc
Oberon microsystems, Inc.



-----Original Message-----
From: Hector [mailto:460853{([at]})nowhere.xy
Sent: Montag, 11. November 2002 15:29
To: Circulo de BlackBox
Cc: BorrajaX{([at]})nowhere.xy
Subject: Clipboard... always clipboard


Thank you for your answer, Renee, but I’m afraid I haven’t explained myself
very well, becasuse it isn’t what I was looking for. I’m afraid you have
thought that I’m working with a Text View, and what I copy and paste are
characters, but it isn’t that. I’m working with geometric figures.

So, I don’t want to link the HostCmds. PasteGuard to my Edit menu. I want to
be able to "transform" that PasteGuard for recognising when a figure has
been copied to my clipboard (and I said my clipboard, because I have
implemented it in my Views module). I mean, I don’t use any System
clipboard or something like that (anyway, I don’t know if I could use any)
because I made one on my own.

I have decided that, at least, I’d like to enable the Paste option. I don’t
mind if it is activated even when nothing is in the clipboard, because the
big problem I have now is that if I open the BlackBox, and I start working
with my figures, the Paste option is always disabled. I have discovered that
the only way to activate it is writing something in the Log window,
selecting it, and copying it. Doing that, the “Paste” option becomes active,
so I can copy and paste my figures perfectly. But if I don’t do that trick,
I can copy my figures, but I can’t paste them. But, as I said, if I copy a
piece (I don’t mind what) of text, the paste option becomes active, and I
can copy and paste every figure I want. What do I have to do?. Do I have to
implement my own Edit menu?. Do I have to re-write the HostCmds.PasteGuard
method?. I tried to do something like:

IMPORT HostCmds, … ;

PROCEDURE PasteGuard (VAR par: Dialog. Par);
BEGÍN
         par. disabled := FALSE;
END PasteGuard;

Hoping that doing that, the “Paste” option would become always active, but
it didn’t work.


Thank you in advance, HECTOR.

PS:
Could anybody write something easy to answer??. I am feeling very badly
because I can’t answer any of the expounded questions I receipt in my mail,
so, the only thing I do is asking and asking.

--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-1748149721_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzc1xmY2hhcnNldDAgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJc
Zm5pbFxmY2hhcnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnNldDAgQ291cmllciBO
ZXc7fX0NCntcY29sb3J0YmxccmVkMFxncmVlbjBcYmx1ZTA7XHJlZDBcZ3JlZW4wXGJsdWUyNTU7
fQ0KXHVjMVxwYXJkXHBsYWluXGRlZnRhYjM2MCBcZjBcZnMyMCBIZWN0b3IsXHBhcg0KXHBhcg0K
YXMgZmFyIGFzIHdlIGNhbiBndWVzcyBmcm9tIHlvdXIgZGVzY3JpcHRpb24sIHlvdSBzaW1wbHkg
aGF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IHVzZSB0aGUgc2FtZSBhZGRyZXNzIGJ5IHdoaWNoIHlvdSBhcmUgc3Vic2NyaWJlZCB0byB0aGUg
bWFpbGluZyBsaXN0LiBUaGF0IHdheSwgdGhlIGxpc3Qgc2VydmVyIHdpbGwgcmVjb2duaXplIHlv
dSBhcyBzdWJzY3JpYmVyIGFuZCBmb3J3YXJkIHlvdXIgcG9zdGluZyBpbW1lZGlhdGVseSwgd2l0
aG91dCBjcmVhdGluZyBhbnkgb3ZlcmhlYWQuXHBhcg0KXHBhcg0KYikgSWYsIGZvciBzb21lIHJl
YXNvbiwgeW91IGNhbm5vdCBwb3N0IGZyb20gdGhlIGFkZHJlc3MsIGJ5IHdoaWNoIHlvdSBhcmUg
c3Vic2NyaWJlZCwgeW91ciBtZXNzYWdlIHdpbGwgYmUgbW9kZXJhdGVkIHRvIGF2b2lkIHNwYW0u
IFBsZWFzZSB1bmRlcnN0YW5kIHRoYXQgbW9kZXJhdGlvbiB3aWxsIG9mdGVuIGNhdXNlIHNvbWUg
ZGVsYXksIGluIHBhcnRpY3VsYXIgb3ZlciB3ZWVrZW5kcyBvciBob2x5ZGF5c319ACBmaWd1


----boundary-LibPST-iamunique-1748149721_-_---
Received on Wed Nov 13 2002 - 11:18:06 UTC

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