DataGrid:Control in Row Template:Messages

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
jsims
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 25
Joined: Thu Apr 30, 2009 1:45 pm
Contact:

DataGrid:Control in Row Template:Messages

Post by jsims » Tue Jun 02, 2009 6:49 pm

Hi,

I've been playing around with some DataGrid stuff and have come across something that I'm not sure if it is a bug or expected behavior.

I have a Row Template that contains a Button (checkbox type) and a couple of other fields. I edited the group in the Row Template and tried to edit the script of the Button (I'm trying to think through implementing some Behaviors to use as the Parent Script).

It did not appear that this code was being called (would not activate the breakpoint in the debugger). So I tried a simple script for the button in the Row Template:

Code: Select all

on mouseUp
  answer "here"
end mouseUp
When I populate my DataGrid with data (using dgData) and click on the checkbox, it doesn't say "here".

I found that I could work with the messages in the Row Behavior. I'm just really trying to wrap my head around the nuances of the DataGrid (which, btw, I think is just wonderful!!!) and trying to determine where/how to implement behaviors for the controls I put into the Row Template.

Thanks in advance for any help/advice anyone has to offer!
- John

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Post by trevordevore » Wed Jun 03, 2009 2:50 pm

All controls in a row template will receive their normal engine messages so a mouseUp script in a checkbox should work, assuming nothing else is getting in the way. Is there any change there is a nother control in front of the checkbox? When you click on the checkbox does the hilite state of it change?
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

jsims
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 25
Joined: Thu Apr 30, 2009 1:45 pm
Contact:

Post by jsims » Thu Jun 04, 2009 2:05 am

Hi Trevor,

First off, I have to apologize. It was a Button of type Option that was giving me the problem with the mouseup. I played with it some more and, after adding a plain button to do some other testing, I realized that I wasn't clicking the Refresh Datagrid button which seems to have completely solved the problem.

Thanks for your time! Sorry if I caused you any worry. I know how little things like this can just eat at you until you have an answer.
- John

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Post by trevordevore » Thu Jun 04, 2009 3:36 pm

No worries. Glad you got everything working.
Trevor DeVore
ScreenSteps - https://www.screensteps.com

LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder

Post Reply