Rashmikapil1
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-18-2018
08:42 PM
Channelstore - action on command "doorder"
Hi,
I have observed the following behaviour:
store = createObject("roSGNode", "ChannelStore")
store.ObserveField("catalog", "onGetcatalog")
store.ObserveField("orderStatus", "onDoOrder")
When the command is set to "doorder"
store.command = "doOrder"
The actual behaviour is onDoOrder() function is invoked on orderStatus field change (expected)
But the function onGetcatalog() function is getting invoked in the process (after store.command = "doOrder" and before orderStatus field is changed).
1. Is this behaviour expected?
2. If yes then how to handle this senario so that the logic inside onGetcatalog() function should not be executed on "doOrder" ?
I have observed the following behaviour:
store = createObject("roSGNode", "ChannelStore")
store.ObserveField("catalog", "onGetcatalog")
store.ObserveField("orderStatus", "onDoOrder")
When the command is set to "doorder"
store.command = "doOrder"
The actual behaviour is onDoOrder() function is invoked on orderStatus field change (expected)
But the function onGetcatalog() function is getting invoked in the process (after store.command = "doOrder" and before orderStatus field is changed).
1. Is this behaviour expected?
2. If yes then how to handle this senario so that the logic inside onGetcatalog() function should not be executed on "doOrder" ?
2 REPLIES 2
Rashmikapil1
Binge Watcher
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2018
10:24 PM
Re: Channelstore - action on command "doorder"
This is observed only after the UI change for purchase.
I am attaching the logs running the sampleChannelStore app (from roku documentation)
------ Running dev 'Simple Channel Store' main ------
HERE>>>>>>>> onGetCatalog <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Items Received"
}
HERE>>>>>>>> onGetCatalog field catalog
>>>>>>command>>>>>>> getCatalog
>>>>>>>>>>>>>>> onProductSelected
HERE>>>>>>>> onProductSelected field: itemSelected
>>>>>>>>>>>>>>> onGetUserData
HERE>>>>>>>> onGetUserData field: userData
>>>>>>>>>>>>>>> MakePurchase
m.store.command = doOrder
HERE>>>>>>>> onGetCatalog <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Items Received"
}
HERE>>>>>>>> onGetCatalog field: catalog
>>>>>>command>>>>>>> doOrder
HERE>>>>>>>> onOrderStatus <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Order Received"
}
HERE>>>>>>>> onOrderStatus field: orderStatus
>>>>>>command>>>>>>> doOrder
There is a call for onGetCatalog() after calling MakePurchase and before orderStatus is changed..
I am attaching the logs running the sampleChannelStore app (from roku documentation)
------ Running dev 'Simple Channel Store' main ------
HERE>>>>>>>> onGetCatalog <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Items Received"
}
HERE>>>>>>>> onGetCatalog field catalog
>>>>>>command>>>>>>> getCatalog
>>>>>>>>>>>>>>> onProductSelected
HERE>>>>>>>> onProductSelected field: itemSelected
>>>>>>>>>>>>>>> onGetUserData
HERE>>>>>>>> onGetUserData field: userData
>>>>>>>>>>>>>>> MakePurchase
m.store.command = doOrder
HERE>>>>>>>> onGetCatalog <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Items Received"
}
HERE>>>>>>>> onGetCatalog field: catalog
>>>>>>command>>>>>>> doOrder
HERE>>>>>>>> onOrderStatus <Component: roSGNode:ContentNode> =
{
change: <Component: roAssociativeArray>
focusable: false
focusedChild: <Component: roInvalid>
id: ""
status: 1
statusMessage: "Order Received"
}
HERE>>>>>>>> onOrderStatus field: orderStatus
>>>>>>command>>>>>>> doOrder
There is a call for onGetCatalog() after calling MakePurchase and before orderStatus is changed..
gomad
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2018
10:26 PM
Re: Channelstore - action on command "doorder"
seems like a bug after the recent UI changes from Roku side.