Hi
I created a lookup routine using a listbox and allowed for return or doubleclick as a selection - everything worked fine.
I then wanted to do other processing that the listbox by itself couldn't do (or maybe me?) so I selected the listbox and made it a group.
I transferred all the listbox code into the group script - and it all works EXCEPT the returninfield handler is not called withingeither the group or the listbox scripts.
If I add a returninfield handler in the main stack it gets called - I would have thought it would get passed up to the group first as the next closest container, or am I missing something.
Best Regard Lagi
ReturnInField listbox/group Messagepath problem [SOLVED]
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
Lagi Pittas
- VIP Livecode Opensource Backer

- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
ReturnInField listbox/group Messagepath problem [SOLVED]
Last edited by Lagi Pittas on Sat May 16, 2015 4:16 pm, edited 2 times in total.
Re: ReturnInField listbox/group Messagepath problem
Hi.
Not sure I have this right. If I make a new list field and place this into its script:
I get what I expect.
If I then group that field, and move the handler into the group script (note the modification required):
All works fine. Is that small change helpful?
Craig Newman
Not sure I have this right. If I make a new list field and place this into its script:
Code: Select all
on returninfield
put the selectedText of me
end returninfieldIf I then group that field, and move the handler into the group script (note the modification required):
Code: Select all
on returninfield
put the selectedText of the target
end returninfieldCraig Newman
-
Lagi Pittas
- VIP Livecode Opensource Backer

- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: ReturnInField listbox/group Messagepath problem
Hi Craig
Thats what I did - but the Handler is never called in the Group script but gets handled in the main stack.
That's what had me stumped
Lagi
Thats what I did - but the Handler is never called in the Group script but gets handled in the main stack.
That's what had me stumped
Lagi
Re: ReturnInField listbox/group Messagepath problem
If you put a breakpoint in the group script handler, it does not detect the message? I assume you deleted the handler in the field script, right?
If it is firing in the stack script, something has made the message bypass several controls.
Craig
If it is firing in the stack script, something has made the message bypass several controls.
Craig
-
Lagi Pittas
- VIP Livecode Opensource Backer

- Posts: 367
- Joined: Mon Jun 10, 2013 1:32 pm
Re: ReturnInField listbox/group Messagepath problem [SOLVED]
Hi Craig
As soon as I read your answer/question the answer flashed into my head - I am using rrpgrid from runrevplanet.com (a fantastic piece of coding btw every(commercial) livecode user should check it out you'll be glad you did - anybody who has wished the standard grid was orthogonal, consistent and obvious in the way it works - anyway I digress). I remembered that the main routine uses a rawkeydown and although the code is not in a front script, I was pretty sure rawkeydown is called before returninfield in the standard message hierarchy . I put a blank rawkeydown handler within the menu button and lo and behold the group script returninfield is called (taking precedence over the returninfield I placed within the list box).
It's all very logical after the problem has been solved.
Thanks again Craig
Regards lagi
As soon as I read your answer/question the answer flashed into my head - I am using rrpgrid from runrevplanet.com (a fantastic piece of coding btw every(commercial) livecode user should check it out you'll be glad you did - anybody who has wished the standard grid was orthogonal, consistent and obvious in the way it works - anyway I digress). I remembered that the main routine uses a rawkeydown and although the code is not in a front script, I was pretty sure rawkeydown is called before returninfield in the standard message hierarchy . I put a blank rawkeydown handler within the menu button and lo and behold the group script returninfield is called (taking precedence over the returninfield I placed within the list box).
It's all very logical after the problem has been solved.
Thanks again Craig
Regards lagi