DataGrid error in Mac standalone

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 256
Joined: Sun May 27, 2007 8:19 pm

DataGrid error in Mac standalone

Post by Martin Koob » Sun Jan 26, 2014 4:19 pm

I have project that is using the GLX application framework. There are datagrids on the first card that loads. There are handlers in preopenstack that set the dgtext of the datagrid. Working in the IDE there are no problems, when the stack opens the dgtext of the datagrid is set. In the standalone there are errors thrown. This is the error output that is in the GLX error dialog in the standalone.

Software Version: 3.0.3d174
System: MacOS 10.8.5
Executing at 9:31:53 AM on Sunday, January 26, 2014
----------
Type: Chunk: error in object expression
Object: button "Data Grid" of group "Behaviors" of card "card id 1002" of stack "revDataGridLibrary"
Line: set the name of it to the short name of it && format("%04d", i)
Line No: 7699
Hint: _CacheControls
----------
Type: Handler: can't find handler
Object:
Line:
Line No: 1645
Hint: _CacheControls
----------
Type: if-then: error in statement
Object: button "Data Grid" of group "Behaviors" of card "card id 1002" of stack "revDataGridLibrary"
Line: if weHaveSomethingToDraw and sFormattedHeight is empty then
Line No: 1643
Hint: _DrawList
----------
Type: Handler: can't find handler
Object: dgData
Line:
Line No: 4785
Hint: _DrawList
----------
Type: Object Name:
Object:
Line:
Line No: 0
Hint: button "Data Grid" of group "Behaviors" of card "card id 1002" of stack "revDataGridLibrary"
----------
Type: Object: can't set object property
Object: button "Data Grid" of group "Behaviors" of card "card id 1002" of stack "revDataGridLibrary"
Line: set the dgData [theSequencing] of me to theDataA
Line No: 2539
Hint: _list.SetText
----------
Type: Handler: can't find handler
Object:
Line:
Line No: 4693
Hint: _list.SetText


I thought perhaps the datagrid on the card is not loaded at the point of preopen stack so I have tried moving the handlers that set the dgText of the datagrid to openstack, preopenCard and openCard and get the same result.

The other thing I thought is that the dataGrid Library is not loaded properly in the Standalone so It can't find the handlers.

Does anyone have an idea why this does not work in standalone?


Thanks

Martin Koob

Martin Koob
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 256
Joined: Sun May 27, 2007 8:19 pm

Re: DataGrid error in Mac standalone

Post by Martin Koob » Sun Jan 26, 2014 10:18 pm

I found the solution. I will explain it here just in case anyone else runs into this. (Or in case I forget how I solved this in the future and do another search for the answer and find it here... hi future me. :oops: )

I was using the GLX application framework which has an option to password protect your stacks when the application is packaged. I was using that option and therefore the data grid templates substack was being password protected.

I found a post in the Google Group - GLX application framework that indicated the solution was going to the 'Stacks and Externals' tab of the GLXapplicationproperties plugin and including the data grid template substack in the list of 'stacks to unlock in standalone'.
https://groups.google.com/forum/#!searc ... 7N3sgRUfMJ

This solved the problem and now my standalone launches properly.

My first attempt to solve the problem did not work but I will describe it here because it could have been another reason why the Datagrid wouldn't work in a standalone that uses a splash stack or a launcher stack.
My first thought as to what was going wrong was that the data grid library was not being loaded or not loaded early enough for the calls to the data grid to work. As GLX framework uses a launcher stack I had used the approach of adding a substack called "data grid templates dud" to the glxapplicationLauncher stack so the revDatagridlibrary.rev stack would be added to the application when the standalone was built.
http://lessons.runrev.com/s/lessons/m/d ... -data-grid

I thought maybe this method was the problem so I tried approach #2 as described by Trevor which involves manually including the revDataGridLibrary.rev stack in the components folder of your application. (Trevor describes Approach #1 as adding the "data grid templates dud" stack.)
http://revolution.screenstepslive.com/s ... app/l/6887

Changing to Approach #2 did not resolve the issue.

Adding the data grid templates stack to the "stacks to unlock" worked with both Approach #1 and Approach #2.

Martin Koob

Post Reply

Return to “Mac OS”