TakeA Component

TakeA

Description

This button/panel was developed to illustrate how a scripted control can be used in conjuction with the BNCS V4.5 connections engine to create an unscripted router panel with a Take button. This control is designed to work with source selections sent from a Name Grid control, and destination selections sent from a Dest Grid control.

Set both the Name Grid and Dest Grid properties to generate a notification when the index value changes. Configure the connections engine to send the reported index values to the TakeA component. The following screenshot of the connections engine shows the entries that should be present. In this example, the source Name Grid has an ID of Src, and the destination Dest Grid has an ID of Dest.

When valid (non-zero) values are reported for both source and destination indexes, the TAKE button is enabled. When the Take button is activated, it emits a notification to the host connections engine of the format cmd=*, where the * is the source number previously sent to the take component. The take action is done by by the Dest Grid component. This requires sending a command from the connection engine of the of the format take=[value]

Note that the drop down box for the command in the connections engine does nor have a valid template, so the field content of take=[value] must be manually typed and confirmed by pressing the keyboard return key.

After 100 ms, a second notification is issued in the form "cleardown=-1". We can use this notification to send a new source selection to the source grid using "index=[value]" and to the destination grid using "selected=[value]". The value of -1 means that the existing selections are cleared.

Commands

Name | Required? | Use
Source=<source_index> | Yes | To tell the component the source number needed when take is pressed.
Dest=<destintion_index> | Yes | To tell the component that a valid destination is set in the Dest Grid control.

Notifications

Name | Use
cmd=<source_number> | Send to destination grid, take=[value]
cleardown=-1

Clear destination selection in Dest Grid. Use selected=[value] in connections engine command.

Clear source selection in Name Grid. Use index=[value] in connections engine command.

Stylesheets

Name | Use
None | Fixed settings for colour and typeface (Arial)

Developers Notes

I can't think of anything useful to put here. Maybe one day in the future I may put add something

Andy Woodhouse, BBC Academy
Copyright BBC Academy 2015