Page 1 of 1

Cant Select fields

Posted: Sat May 14, 2011 10:16 pm
by maxs
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?

Re: Cant Select fields

Posted: Sun May 15, 2011 12:00 am
by Mark
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

Re: Cant Select fields

Posted: Sun May 15, 2011 1:07 am
by maxs
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?

Re: Cant Select fields

Posted: Sun May 15, 2011 1:51 am
by Mark
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

Re: Cant Select fields

Posted: Sun May 15, 2011 7:46 pm
by jacque
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.