Problem calling a command
Posted: Fri Feb 19, 2010 3:34 am
I have the following snippet of code:
The handler containing this code works fine until it reaches the call to highlightLineByKey. I have a break point at the first line of highlightLineByKey and it never reaches that breakpoint. I can tell that the send command is working fine and the object it responds to does what it's supposed to do.
Here's the code for the highlightLineByKey:
If I cut and paste that code line-for line (except for replacing the parameters with real names/etc) into the higher level handler,it works fine.
Only other thing I can think of is that the highlight routine is in a front script but there's plenty of other commands and functions in there and they are working fine.
Any ideas?
Pete
Code: Select all
send "menuPick " & the label of button "GigsFilterMenu" to button "GigsFilterMenu"
highlightLineByKey myKey,1,group "GigList"
Here's the code for the highlightLineByKey:
Code: Select all
command highlightLineByKey pKey,pColumn,pList
/*
Finds a value in a column of a datagrid and scrolls to the line containing it
Parameters are:
- pKey: the key value to be found
-pColumn: the number of the column to be searched
-pList: the short name of the datagrid to be searched
*/
put 1 into myLine
set the itemdelimiter to tab
repeat with count=1 to the dgNumberOfLines of pList
if item pColumn of line count of the dgText of pList = pKey then
put count into myLine
exit repeat
end if
end repeat
set the dgHilitedLine of pList to myLine
end highlightLineByKey
Only other thing I can think of is that the highlight routine is in a front script but there's plenty of other commands and functions in there and they are working fine.
Any ideas?
Pete