This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Oct 20, 2016, 9:38 AM
27 Posts
topic has been resolvedResolved

uidoc.copy does not work as expected

  • Category: Application Development
  • Platform: All Platforms
  • Release: 9.0.1
  • Role: Developer
  • Tags: Lotusscript
  • Replies: 4

The user marks two words (a name) with mousecursor in the 'source' field. My intention is, to transfer this marked text to another field 'target'. All Fields are plain text.

Notes documentation says that uidoc.copy takes text that is marked in edit mode. Here an extract of original documentation:

Copies the current selection in a document to the Clipboard. The current selection can be anything on the document, such as text or graphics.

I've put this script under a botton:

...
Call uidoc.Copy                     
Call uidoc.GotoField("target")      
Call uidoc.Paste                    

This does not work, an error occurs. Error message: Only text can be pasted into this type of field.

Does anyone have another idea to solve this issue ?

Hint: The following works. After that, target has the content of source:

Call uidoc.GotoField("source")          
Call uidoc.SelectAll
Call uidoc.Copy                     
Call uidoc.GotoField("target")      
Call uidoc.Paste                  
Oct 20, 2016, 5:49 PM
323 Posts
The copy may've caught more than text.

I've run into things like this when I copy the table enclosing some of the text, or the table cells.

Oct 20, 2016, 7:40 PM
82 Posts
Focus
Seems to me that when click the button the text you had 'marked' (which i ASSume means it has the selection focus) will lose that selection focus (ie, no longer be 'marked') when you click the button to invoke the copy
Oct 21, 2016, 5:12 AM
27 Posts
Thank you for the answers

@Mike:

They are plain text fields, as mentioned

 

@Bob:

That sounds plausible. But then, this function is absurd, because i don't know whow to invoke it without a button.

Oct 21, 2016, 6:41 AM
27 Posts
Reason found

I found out that a button in fact changes the focus to itself. That is the reason for that behaviour.

A possible solution is to use an Action which leaves the focus where it is.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal