Datagrid can't not find stack

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Datagrid can't not find stack

JosepM
Hi List,

I have a stack with a datagrid that add and delete rows without problem.
Then I open a substack as sheet where the user fill some customer data and close the substack. Then if I try to add a row to the datagrid... "an error has ocurred in behavior for the column template: Chunk: can't find stack."

The substack can be filled manually or from the database, if I recover the data from the database, the grid works fine, but if I fill the data manually, then don't work. The data is passed with dialogdata.

What is wrong?


Salut,
Josep
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

Trevor DeVore
On May 7, 2010, at 5:41 AM, JosepM wrote:

> I have a stack with a datagrid that add and delete rows without  
> problem.
> Then I open a substack as sheet where the user fill some customer  
> data and
> close the substack. Then if I try to add a row to the datagrid...  
> "an error
> has ocurred in behavior for the column template: Chunk: can't find  
> stack."

Add a try/catch statement around the code in FillInData or  
LayoutControl and then print the error throw to the message box.

on FillInData ...
    try
       ...
    catch e
       put e
    end try
end FillInData

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

Andre.Bisseret
In reply to this post by JosepM

Le 7 mai 10 à 11:41, JosepM a écrit :

>
> Hi List,
>
> I have a stack with a datagrid that add and delete rows without  
> problem.
> Then I open a substack as sheet where the user fill some customer  
> data and
> close the substack. Then if I try to add a row to the datagrid...  
> "an error
> has ocurred in behavior for the column template: Chunk: can't find  
> stack."
>
> The substack can be filled manually or from the database, if I  
> recover the
> data from the database, the grid works fine, but if I fill the data
> manually, then don't work. The data is passed with dialogdata.
>
> What is wrong?
>
>
> Salut,
> Josep

Bonjour,
Thanks a lot Joseph for this post, very relevant to this list named  
"HOW to use Revolution", among an ocean  of "OT"! :-))


I just created
1 - a stack "TrialJosep"
a data grid on it named "dgjosep" with 2 columns : "name" and "forename"
and a button whose script is " topLevel stack "pickTheData"

2 -  a substack "pickTheData"
on it 2 fields : one to enter a name
the other to enter a forename
and a button "OK" whose script is :

on mouseUp
    local tInfo,
    -------
    put fld "fldName" & tab & fld "fldForeName" into tInfo
    put tInfo
    close this stack
    dispatch "addLine" to grp "dgJosep" of cd 1 of stack "TrialJosep"  
with tInfo
end mouseUp

Seems working well here (I hope I have correctly understood your  
problem?)

If yes, might be "close this stack" before adding the line is important

Best regards from Grenoble

André

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

JosepM
In reply to this post by Trevor DeVore
I don't get any, it's very strange.. apperar the same error 
Two buttons, "OK" and "Edit Script", if I click on OK, it's OK :) and "Edit Script" also is OK :D

Other thing, the stack is created on the fly, cloned from the original, so many instances can be opened.
The worst thing is that recovering the data from the db run fine and entered from the user no. It's the same substack with many fields, nothing special... :(

Following investigating

Salut,
Josep



El 07/05/2010, a las 14:56, Trevor DeVore [via Runtime Revolution] escribió:

On May 7, 2010, at 5:41 AM, JosepM wrote:

> I have a stack with a datagrid that add and delete rows without  
> problem.
> Then I open a substack as sheet where the user fill some customer  
> data and
> close the substack. Then if I try to add a row to the datagrid...  
> "an error
> has ocurred in behavior for the column template: Chunk: can't find  
> stack."

Add a try/catch statement around the code in FillInData or  
LayoutControl and then print the error throw to the message box.

on FillInData ...
    try
       ...
    catch e
       put e
    end try
end FillInData

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

JosepM
In reply to this post by Trevor DeVore
Some info..

Error getting rugged id of object
pObject = control id 2111 of stack "LMWS"
Context = group id 1046 of card id 1002 of stack "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",updateGutterDo,2237
group id 3333 of group id 1046 of card id 1002 of stack "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",update,35
group id 3333 of group id 1046 of card id 1002 of stack "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",updateGetContext,94
stack "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",seGetObjectState,731
stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",seGetRuggedId,896
button id 1041 of card id 1002 of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/revlibrary.rev",revRuggedId,2671


El 07/05/2010, a las 14:56, Trevor DeVore [via Runtime Revolution] escribió:

On May 7, 2010, at 5:41 AM, JosepM wrote:

> I have a stack with a datagrid that add and delete rows without  
> problem.
> Then I open a substack as sheet where the user fill some customer  
> data and
> close the substack. Then if I try to add a row to the datagrid...  
> "an error
> has ocurred in behavior for the column template: Chunk: can't find  
> stack."

Add a try/catch statement around the code in FillInData or  
LayoutControl and then print the error throw to the message box.

on FillInData ...
    try
       ...
    catch e
       put e
    end try
end FillInData

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution





Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

Trevor DeVore
On May 7, 2010, at 10:52 AM, JosepM wrote:

> Error getting rugged id of object
> pObject = control id 2111 of stack "LMWS"
> Context = group id 1046 of card id 1002 of stack "revNewScriptEditor
> 1" of stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/
> revscripteditor.rev",updateGutterDo,2237
> group id 3333 of group id 1046 of card id 1002 of stack
> "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/
> 4.0.0-gm-1/Toolset/revscripteditor.rev",update,35
> group id 3333 of group id 1046 of card id 1002 of stack
> "revNewScriptEditor 1" of stack "/Applications/Revolution Enterprise/
> 4.0.0-gm-1/Toolset/revscripteditor.rev",updateGetContext,94
> stack "revNewScriptEditor 1" of stack "/Applications/Revolution
> Enterprise/4.0.0-gm-1/Toolset/revscripteditor.rev",seGetObjectState,
> 731
> stack "/Applications/Revolution Enterprise/4.0.0-gm-1/Toolset/
> revscripteditor.rev",seGetRuggedId,896
> button id 1041 of card id 1002 of stack "/Applications/Revolution
> Enterprise/4.0.0-gm-1/Toolset/revlibrary.rev",revRuggedId,2671

The looks like an IDE error rather than an error generated by any of  
your Data Grid code.

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

JosepM
In reply to this post by Andre.Bisseret
Bonjour Andre,
Reply | Threaded
Open this post in threaded view
|

Re: Datagrid can't not find stack

Andre.Bisseret
Buenos dias Josep,
I replicated your two stacks according to your explanations

The main stack "s_document" with
-  a data grid "dg_lineas" with 7 columns: Name,  
TaxNumber,Address,ZipCode,City,State,Country (I just suppressed  
"customer" to get the headers shorter ;-))
- a button "OpenSheet" with your script
- a field "lbl_datos_cliente"
- a button "add" whose script is :
---------------
on mouseUp
  dispatch "addLine" to group "dg_lineas" of this stack with the  
dialogData ## instead of tLinea (seems to me that your problem was  
here ; See below)
end mouseUp
---------------
- a button "delete line" whose script is :
on mouseUp
    local tLine,
    --------
    put the dgHilitedLines of group "dg_lineas" into tLine
    dispatch "deleteLines" to group "dg_lineas" with tLine
end mouseUp

The substack "ss_newcustomer with
the 7 fields (with their nice spanish names ;-) (I pratically don't  
speak it but like your language a lot ;-))
and the button "OK" with exactly your script

Then all is working as (it seems to me that) your are expecting (If I  
have well understood ;-))

Le 7 mai 10 à 20:24, JosepM a écrit :

> Code from the Button on the main stack that open the substack.
> In the substack only I have some fields that are as I said filled  
> manually
> or from the database.
>
> on mouseup
>   go stack ss_newcustomer of stack "s_document" as sheet
>
>   set itemdel to tab
>
>   put item 1 of dialogdata into tCliente[1]["CUSTOMER_NAME"]
>   put item 2 of dialogdata into tCliente[1]["CUSTOMER_TAXNUMBER"]
>   put item 3 of dialogdata into tCliente[1]["CUSTOMER_ADDRESS"]
>   put item 4 of dialogdata into tCliente[1]["CUSTOMER_ZIPCODE"]
>   put item 5 of dialogdata into tCliente[1]["CUSTOMER_CITY"]
>   put item 6 of dialogdata into tCliente[1]["CUSTOMER_STATE"]
>   put item 7 of dialogdata into tCliente[1]["CUSTOMER_COUNTRY"]
>
>   ## Rellenar los datos del cliente, numero documento y fecha
>   put empty into fld lbl_datos_cliente
>   put tCliente[1]["CUSTOMER_NAME"] & return after fld  
> lbl_datos_cliente
>   put tCliente[1]["CUSTOMER_TAXNUMBER"] & return & return after fld
> lbl_datos_cliente
>   put tCliente[1]["CUSTOMER_ADDRESS"] & return after fld  
> lbl_datos_cliente
>   put tCliente[1]["CUSTOMER_ZIPCODE"] && tCliente[1]
> ["CUSTOMER_CITY"] &
> return after fld lbl_datos_cliente
>   put "(" & tCliente[1]["CUSTOMER_STATE"] & ")" after fld  
> lbl_datos_cliente
>
> end mouseup
>
> Then from the main stack. I have two buttons, one to add and other  
> to delete
> rows from the datagrid.
> It's here when I try to add a row the error occur.
>
> Button add:
>
> on mouseUp
>
>   put the dgNumberOfLines of group "dg_lineas" of this stack into  
> tFilas
>   if tFilas<10 then
>      put "0" & tFilas+1 into tLinea
>   else
>      put tFilas+1 into tLinea
>   end if
Here from the above, I understand that you want to add the line after  
the lines which are already in the data grid.
In this case, you don't have to indicate the line. it will be added  
automatically to the end of the current content (see "AddLine" in the  
doc)

>   dispatch "addLine" to group "dg_lineas" of this stack with  tLinea
Here the dialogData is missing (could be the problem) ; you should  
have :

dispatch "addLine" to group "dg_Lineas" of this stack with the  
dialogData

In fact the complete syntax is :  AddLine pText, pColumns, pLine (see  
addLine in the doc from Trevor
a line number is necessary only if you want to add the line between  
two current lines (for example if you already have 5 lines and you  
want your new line be the second one then you should put
dispatch "addLine" to group "dg_Lineas" of this stack with the  
dialogData,,2   --(note the two commas, it is a place reserved for  
pColumns in case it should be necessary)
>   dispatch "ResetList" to group "dg_lineas" of this stack
this line seems not necessary with addLine (it's working as well  
without it)

>
> end mouseUp
>
> I don't see where can fail... :(
>
> Button "OK" from the substack
>
> on mouseUp
>
>   put fld f_NOMBRE & tab & fld f_NIF & tab & fld f_DIRECCION & tab &  
> fld
> f_CP & tab & fld f_POBLACION & tab & fld f_PROVINCIA & tab & fld  
> f_PAIS into
> tDatosCliente
>   set the dialogdata to tDatosCliente
>
>   close this stack
> end mouseUp
>
> Salut,
> Josep
> --
¡Hasta luego!

André

_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution