Cant Select fields

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
maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Cant Select fields

Post by maxs » Sat May 14, 2011 10:16 pm

OK. I have the insertion mark blinking in a field. Then I click on the card outside the field, and the insertion mark disappears, and I cannot select the field. I even made sure "set cantselect" WAS set to false.


I cant debug, because I cant find the handler. The only messages I get are openfield, cRevTable, exit field, and mousedown. I cant find those scripts usinf the find command, so I can't set a checkpoint.

Any ideas on what would make the fields frees up?

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

Re: Cant Select fields

Post by Mark » Sun May 15, 2011 12:00 am

Hi Maxs,

To select a field, choose the Pointer tool in the tools palette and click on the field. Make sure that "Select Grouped Controls" has been enabled in the Edit menu.

The pointer tool is the tool in the upper-right corner of the tools palette. It shows a small + sign.

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

maxs
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 421
Joined: Sat Jun 24, 2006 12:02 am
Contact:

Re: Cant Select fields

Post by maxs » Sun May 15, 2011 1:07 am

Thank you Mark, I appreciate your effort and quick response, but I did not do a good job communicating my problem.


I need to keep the insertion mark blinking inside a text field, so a user can always enter text, even if the user accidentally clicks outside the field. Somehow, whenever the user clicks ourside the field, there is some kind of message being sent disabling the text fields . The insertion mark disappears, and the user cannot select or enter text into that field any more.

Somehow, an exitfield message is being called, which disables that field. Is there a way to block exitfield from being called when the user clicks outside the field?

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

Re: Cant Select fields

Post by Mark » Sun May 15, 2011 1:51 am

Hi Maxs,

It seems to me that you need to do something about that exitfield handler. It is normal that it executes as soon as you click outside the field, but why did you make it disable the field?

The exitField message is called if the text of a field is no longer being edited while it's contents hasn't been changed. The closeField message is called if the text of a field is no longer being edited while it's contents has been changed.

I hope this helps.

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

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Cant Select fields

Post by jacque » Sun May 15, 2011 7:46 pm

It looks like you are using a table field. This is a specially-formatted field that is always locked, and you can't type into it. When you click in a "cell" a second, temporary field is displayed over the entry so you can type there. When you tab out of the cell, or click elsewhere, the temporary field disappears and its value is placed into the appropriate position in the locked field.

Clicking into the table field should show the temporary editing field again. But it sounds like you shouldn't be using a table field at all. You'd have better luck with a regular, editable field that has its tabstops set so it appears as a grid. In fact, you can probably get what you want just by unchecking the "cell editing" property in the inspector.

The table field isn't a native object, by the way. It's just a scripted solution that looks like a table. For better grid control, the datagrid object in the tool palette has pretty much replaced so-called table fields.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply