Page 1 of 1
DATAGRID template error
Posted: Thu Feb 07, 2013 8:36 am
by JosepM
Hi,
I have an strange error when I open a card from the template stack of a datagrid.
I get this:
88 Chunk: can't find card
95 Chunk: can't find object to store into
466 put: can't set destination
Any idea why or what cause this? I have one column behavior that stop working but is correctly assigned to his behavior button script. On IDE work fine but when I build the app don't work. Some weeks ago this behavior was running fine.
Salut,
Josep M
Re: DATAGRID template error
Posted: Thu Feb 07, 2013 1:00 pm
by Klaus
Hi Joseph,
please post the offending behavior script!
Best
Klaus
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 7:48 am
by JosepM
Hi Klaus,
I haven't any code on open card or open stack or preopen. Only the datagrid behaviors.
Code: Select all
on FillInData pData
-- This message is sent when the Data Grid needs to populate
-- this template with the column data. pData is the value to be displayed.
-- Example:
local tIndex,tControl,tarray
put the dgControl of me into tControl
put the dgIndex of me into tIndex
put the dgDataOfIndex[tIndex] of tControl into tArray
--
switch tArray["ID_TYPE"]
case 2
set the visible of group "status_red" of me to pData is 1
set the visible of group "status_yellow" of me to pData is 2
set the visible of group "status_green" of me to pData is 3
--set the visible of image "red_dot" of me to tArray["STATUS_PAID"] is 0
break
case 11
set the visible of group "status_red" of me to pData is 1
set the visible of group "status_yellow" of me to pData is 2
set the visible of group "status_green" of me to pData is 3
--set the visible of image "red_dot" of me to tArray["STATUS_PAID"] is 0
break
default
set the visible of group "status_red" of me to false
set the visible of group "status_yellow" of me to false
set the visible of group "status_green" of me to false
break
end switch
--set the visible of image "presupuesto" of me to pData is 2
--set the visible of image "pedido" of me to pData is 5
--set the text of field 1 of me to pData
end FillInData
Attach screen capture from the IDE where is working fine. See the semaphore lights at the right. The semaphore only must be showed for one type of documents.
Salut,
Josep M
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 10:11 am
by Klaus
Hi Josep,
hmm, "FillInData" is NOT send to the template groups in the template stack, so this is really strange.
The script is OK, and it is working as you said.
Sorry, no brilliant idea in the monent...
Addition:
I haven't any code on open card or open stack or preopen. Only the datagrid behaviors.
Does your mainstack have any pre/openstack or pre/opencard scripts?
Since the "Datagridtemplates 1234567" stack does NOT have these scripts, maybe the script of the mainstack is being executed?
Best
Klaus
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 4:25 pm
by sturgis
Are you using a splashstack? Does anything about the datagrid work, or does it pretty much turn into an unusable block? (data might show, but clicks, scrolls etc don't work)
If this is the case, the most likely answer is that the engine hasn't realized you have a datagrid in your project so its not including the datagrid library.
If you think this may be the problem, read this article here in reference to splash stacks.
http://lessons.runrev.com/s/lessons/m/d ... -data-grid
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 4:48 pm
by JosepM
No, no, the datagrid scroll fine and all the cols except the "semaphor" run fine. When I build the app all the images are hidden so the swith case do something.
On the IDE all run perfectly.
Salut,
Josep M
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 5:40 pm
by Klaus
Does the error tell you WHAT script is causing this?
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 8:33 pm
by JosepM
Mmmhh... no, any script reference..
If I open any other card template nothing happen, I mean that the card is opened normally, but with this something is firing this error...
Only these err codes:
88,67,38
95,67,38
466,67,1
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 8:54 pm
by JosepM
Hi Klaus,
Your mention about the open and preopen stack of the mainstack enlight me... and yes, on the main stack I have an error capture. I commented them and voilĂ , the behavior run fine as usual

so I guess that I can create the preopen and open scripts into the card template to override the mainstack, isn't?
But is strange.. something is broke inside the template isn't?
Salut,
Josep M
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 11:03 pm
by Klaus
Hi Josep,
I ususally put "pre-/openstack" scripts into the script of card 1 instead of the stack script,
if they need to be "exclusivley" for this stack.
Best
Klaus
Re: DATAGRID template error
Posted: Fri Feb 08, 2013 11:10 pm
by JosepM
Hi Klaus,
But the pre/open stack scripts are common to all cards into the mainstack. This card is created by the datagrids. I'm only change that I need for the columns behaviors.
Isn't correct?
About trap the errors. What are the best way to catch them?
Salut,
Josep M
Re: DATAGRID template error
Posted: Sat Feb 09, 2013 1:10 pm
by Klaus
Hi Josep,
JosepM wrote:But the pre/open stack scripts are common to all cards into the mainstack.
?
I was talking about a "preopenstack" and "openstack" handler that should go into the script of the first card.
All other handlers that are being accessed from the cards and their objects can of course remain in the stack script.
Or am I misunderstanding you?
JosepM wrote:About trap the errors. What are the best way to catch them?
You could use the "TRY" control structure:
Code: Select all
...
try
comand_that_may_fail_and_throw_an_error
## "Catch" a possible error and act accordingly:
catch errornum
answer "Sorry, I f***ed up! 8-)"
## Optional
exit HANDLER_NAME
end try
...
This way the standlone will not"halt" at this point if an error occurs.
Check "TRY" in the dictionary.
Best
Klaus