Clickfield help needed

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 4:01 pm

I have a number of fields on a card and some report when using clickfield and others don't.
I have looked at the properties and the tickboxes are all matching.
I cannot see a reason in dictionary.
What would you suggest.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Clickfield help needed

Post by Klaus » Sat Aug 19, 2017 4:11 pm

What did you script and where did you put the script(s)?

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 4:16 pm

I put the script in a button on the card. There is only the 1 card so I suppose it is called the stack.
the script is simply answer clickfield

The odd thing is that some fields work, some don't and all have text in them
I am using Livecode 8.1.6

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Clickfield help needed

Post by Klaus » Sat Aug 19, 2017 4:36 pm

user#606 wrote:I put the script in a button on the card.
Then it is not in the message heriarchy and clicking any field should not produce/answer anything!?
What do you get when you put the "mouseup" handler into the card script, where it definitively should go?

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 4:52 pm

I have moved back to the App I am creation now and these are the results I get. The app wher some fields worked others didn't is much the same.
I placed the following in the Card
on mouseup
answer clickfield()
end mouseup

It needed the () to get past the error.
No report.
I deleted from card and put same in stack. Still no report.

There are several Image frames. Each frame to a text field and these are grouped into 14 groups. The 14 are in a group called block.
The image frame (empty) generates an empty message.

I also created a new field with no modifications and that does not generate a report either.

Thank you by the way.

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Clickfield help needed

Post by Klaus » Sat Aug 19, 2017 5:09 pm

Hm, works here as advertised!
Hint: Editable (unlocked) fields do NOT generate a "mouseup" message, if that helps?

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: Clickfield help needed

Post by jmburnod » Sat Aug 19, 2017 5:11 pm

Hi,
Is there a "on mouseup" handler in some of your groups ?
Best regards
Jean-Marc
https://alternatic.ch

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 5:17 pm

I created a new stack.
placed 3 ordinary text fields on it and added this script to the card
on mouseup
answer clickfield()
end mouseup
No report from any.
I added a table field and this reports field 4 (which it is)

So, why don't the other fields work?

OK Klaus, I see your message and have locked text. Those fields now work.

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 5:22 pm

All working now. Thank you very much.

How can you detect/report an unlocked field?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Clickfield help needed

Post by Klaus » Sat Aug 19, 2017 5:30 pm

Check the LOCKTEXT property!

Code: Select all

...
if the locktext of fld 1 = TRUE then
  answer "Field 1 is locked"
else
  answer "Field 1 is editable"
end if
...

user#606
Posts: 217
Joined: Sun Jan 27, 2008 12:25 pm
Location: Alderney, Channel Islands
Contact:

Re: Clickfield help needed

Post by user#606 » Sat Aug 19, 2017 5:39 pm

Thank you Klaus, I understand.
It is starting to come back to me after 3/4 years away from it.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”