Handler not working in standalone

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
japino
Posts: 78
Joined: Sun Oct 14, 2012 10:56 am

Handler not working in standalone

Post by japino » Mon Dec 21, 2015 3:07 pm

I have a handler which is working in LiveCode but not in my standalone.

My stack contains an option menu with a few (less than 10) dynamic entries. All these entries also exist in a datagrid in the same stack. The datagrid may have dozens of rows. What I am trying to achieve is that my selection from the option menu works as a filter for the datagrid, meaning that the datagrid gets updated by showing only the rows that contain the selection from the option menu.

The handler below works in LiveCode, but not in my standalone.

Code: Select all

on menuPick pItemName
   put label of btn "Option menu" into myLabel
   
   send mouseup to btn "Reload" -- this populates a data grid
   put false into firstLineContainsHeaders
   put the dgText [firstLineContainsHeaders] of group "DataGrid" into myAll
   
   repeat with x = 1 to the number of lines of myAll
      if word 1 of line x of myAll is myLabel then 
         put line x of myAll & return after myList
      end if
   end repeat
   
   set the dgText [firstLineContainsHeaders] of group "DataGrid" to myList
   
end menuPick
Does anyone have any idea why this would be?

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Handler not working in standalone

Post by Klaus » Mon Dec 21, 2015 3:12 pm

Hi japino,

do your datagrid(s) work in general in your standalone?
If not the "datagrid" library may be missing.


Best

Klaus

japino
Posts: 78
Joined: Sun Oct 14, 2012 10:56 am

Re: Handler not working in standalone

Post by japino » Mon Dec 21, 2015 3:49 pm

Thanks Klaus, that's indeed it! It was included before, but somehow (???) it wasn't there anymore. I've created a substack "Data Grid Templates Dud", and now it works as expected. Thanks again!!

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Handler not working in standalone

Post by Klaus » Mon Dec 21, 2015 4:10 pm

Okie Dokie! :D

Post Reply