Subscribe Bookmark RSS Feed

Title for Graph -- 'send expects scriptable object'

twaintwist

Community Trekker

Joined:

Jun 14, 2012

I'm trying to add a title to my Graph --- using...

// Build the visualization Graph to show open enhancements//

wind = New Window( "Open Enhancements by Importance",

Graph Builder(

  Size( 570, 616 ),

  Show Control Panel( 0 ),

  Variables(

  X( :Name( "Affects Version/s" ) ),

  Group Y( :Open_Enhancements ),

  Overlay( :Priority )

  ),

  Elements(

  Bar( X, Legend( 2 ), Bar Style( "Stacked" ), Summary Statistic( "N" ) )

  ),

  SendToReport(

  Dispatch(

  {},

  "Affects Version/s",

  ScaleBox,

  {Show Major Ticks( 0 ), Rotated Labels( "Automatic" )}

  ),

  Dispatch(

  {},

  "400",

  ScaleBox,

  {Legend Model(

  2,

  Properties( 0, {Line Color( -3383340 ), Fill Color( -3383340 )} ),

  Properties( 1, {Line Color( -11722634 ), Fill Color( -11722634 )} ),

  Properties( 2, {Line Color( -2062516 ), Fill Color( -2062516 )} ),

  Properties( 3, {Line Color( -10931939 ), Fill Color( -10931939 )} )

  )}

  )

  )

)

);

db=wind<<report;

db[TextEditBox()]<<set text("Enhancements for each Version");

But I get an error on the last line (when using debugger)...."Send expects Scriptable Object"

I'm sure I'm not using the 'new window' and TextEditBox  correctly

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

the window object already is a display box. Thus wind<<report is not defined. And TextEditBox() need to specified. In this particular case you only have one so TextEditBox(1) should target the right one.

If there are several reports in the same window the easiest way to identify a display box out of multiple objects of the same kind is to invoke "Show Tree Structure", either by right clicking or running e.g. wind << Show Tree Structure

Compare the below snippets. Both give the same result.

wind[TextEditBox(1)]<<set text("Enhancements for each Version");

report(gb)[TextEditBox(1)]<<set text("Enhancements for each Version");

// assuming gb = Graph Builder(....)

2 REPLIES
Solution

the window object already is a display box. Thus wind<<report is not defined. And TextEditBox() need to specified. In this particular case you only have one so TextEditBox(1) should target the right one.

If there are several reports in the same window the easiest way to identify a display box out of multiple objects of the same kind is to invoke "Show Tree Structure", either by right clicking or running e.g. wind << Show Tree Structure

Compare the below snippets. Both give the same result.

wind[TextEditBox(1)]<<set text("Enhancements for each Version");

report(gb)[TextEditBox(1)]<<set text("Enhancements for each Version");

// assuming gb = Graph Builder(....)

twaintwist

Community Trekker

Joined:

Jun 14, 2012

MS ---- thank you ----- I understand now ----     I may have more reports but now just one for now.....