What is preventing me from copying text from a field?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

What is preventing me from copying text from a field?

Post by Clarkey » Tue Jun 22, 2010 1:27 pm

Hi folks, Hopefully this is a simple new user issue. I can't copy the contents of some of my fields to the clipboard via ⌘-C or the Edit menu. Have I set some parameter or preference by accident?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by Mark » Tue Jun 22, 2010 1:33 pm

Hi Clarkey,

Have you written a script to handle the commandKeydown or the copyKey message? You might need this to make it work, but if you do it wrong it will (obviously) not work.
Do you have any other scripts that handle (raw)keyDown or other user input-related messages? Such scripts might prevent you from copying the contents of a field.
In the IDE this feature often broken but usually it works fine in a standalone, provided that you have added functional menus to your stack.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Tue Jun 22, 2010 2:00 pm

Mark, Thanks for responding. I don't have any scripts related to user key actions - nor is there anything fancy about the field. It's just a plain old text field into which is put the raw HTML/XML returned response from a libSOAP web service call.

Oh - I forgot to mention that I can't select the field's content text either, using ⌘-A whether in the card itself in run mode or in the properties inspector in edit mode.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by Mark » Tue Jun 22, 2010 2:07 pm

Clarkey,

Turn off the lockText and/or turn on the traversalOn of the field in the property inspector. Does that help?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Tue Jun 22, 2010 3:57 pm

Tried that - no change. So, I tried deleting the field and recreating it - same behaviour. New field on the same card - same behaviour. New field on different card - same behaviour.

So, then, just to check - new field on new main stack - expected behaviour.

Conclusion - it seems I either have some sort of parameter or corruption in my project at its main stack level. Quitting and restarting the project or Revolution doesn't seem to help.

So, I'm kind of stuck - not sure how I move forward from here.
Any suggestions appreciated,
Best,
Keith..

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by Mark » Tue Jun 22, 2010 6:40 pm

Hi Keith,

Apparently, you have a script higher up the message hierarchy, which runs as soon as you try to select text. This script should be somewhere in your stack. You can find it by disabling all scripts and enabling them again one by one. Of course, you'll get error messages, so you'll need to make small modifications to your scripts to avoid the error messages while testing.

You might also have a look at the message watcher. Does it show any messages, specifically when you try to select text?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Tue Jun 22, 2010 8:56 pm

Mark, I don't see how that could be. I've only three scripts in the project so far - two on buttons for mouseUps and one on the main stack to use a libSOAP stack and those in the libSOAP library. I don't even know how to code a script that runs as text is selected yet. Still, I've commented them out and no change. I think this is a bug or a corruption of my main stack.

If I create a new main stack I know I can move the sub-stacks across - can I move cards between stacks?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by Mark » Tue Jun 22, 2010 10:22 pm

Clarkey,

If it is such a simple stack, then it is probably best to re-create it to see when the problem pops up.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Wed Jun 23, 2010 8:25 am

Yes, I'm very much on the Revolution learning curve, so I may have done something silly - and there's not too much lost by starting afresh.

Still, I don't like unexpected behaviour or effects with unknown causes - as if I've no idea what might have made this happen, whose to say it won't just appear again at the last change of a complete app! :?

Anyway, thanks for your help.
Best,
Keith..

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by Mark » Wed Jun 23, 2010 12:02 pm

Hi Keith,

If you can find out at which point it happens again, I might be able to help you better. If you mess up a big commercial project after a year of hard work then you can always ask someone to look at it or even hire a consultant.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Wed Jun 23, 2010 7:29 pm

Hmm, the Find and Replace function can only see the references I've made to the original field with locked text issue and it can't find any reference to lockText in my stacks.

So, as it's affecting any new fields under my main stack, this looks very much like a main stack corruption or bug to me.

At this rate, I don't think I'll be rushing to use Revolution for any customer-facing projects or product development just yet.
Thanks for your help.
Best,
Keith..

mroam
Posts: 11
Joined: Tue Nov 27, 2007 8:11 pm
Contact:

Re: What is preventing me from copying text from a field?

Post by mroam » Fri Jun 25, 2010 1:39 am

Hi Keith,
is there any chance you "disabled" the field in the inspector?
Or by chance did you start by importing an old hypercard stack?
(this latter gives me occasional problems with field content in
inspector, sometimes.)
Maybe this forum will let you post the stack, or if you want to
email me the stack, I'd be willing to take a look at it...
--Mike
(mikeroam at gmail)

Clarkey
Posts: 109
Joined: Fri Jun 11, 2010 11:10 am

Re: What is preventing me from copying text from a field?

Post by Clarkey » Sat Jun 26, 2010 5:55 pm

Hi Mike, Nothing obvious seems to be setting the stack to make new fields locked, so having discussed the issue with support I've created a new main stack, transferred all my app across and will keep the old dodgy stack for reference, should the issue repeat.
Best,
Keith..

Post Reply