Create Context menu text on the fly?

Hi All,

Does anyone know how to create the context menu text on the fly?

This does not seem to work for me:

goMake(“ContextMenuButton”,
goMake(go.TextBlock, “Go to Process”),
{ click: onProcessNodeClicked },
new go.Binding(“text”, “”, getProcessNodeText),
new go.Binding(“visible”, “”, onCheckIfProcessNode).ofObject()),

Any suggestions?

Thanks.

Jonathan

This is the solution I have managed to come up with:

goMake(“ContextMenuButton”,
goMake(go.TextBlock, new go.Binding(“text”, “”, getProcessNodeTextFromAdornment).ofObject()),
{ click: onProcessNodeClicked },
new go.Binding(“visible”, “”, onCheckIfProcessNode).ofObject()),

Hope it helps someone else!