Skip navigation
Currently Being Moderated

Tabbed Panels/Tabs via Resource Strings

Sep 2, 2012 1:43 PM

Is it not possible to create Tabbed Panels and Tabs using a resource string?

 

On both CS5 and CS6 this works:

 

 

var win = new Window ("dialog","Tab Test");

win.matchtabs=win.add("tabbedpanel");

win.matchtabs.taba=win.matchtabs.add("tab",undefined,"Match #1");
win.matchtabs.tabb=win.matchtabs.add("tab",undefined,"Match #2");

win.show();

 

but this:

 

var res= "dialog { matchtabs: TabbedPanel { taba: Tab { text: 'Match #1' }, tabb: Tab { text: 'Match #2' } } }";

var win = new Window (res,"Tab Test");

win.show();

 

fails with "Error 19: ... TabbedPanel is not an object" , again both on CS5 and CS6.

 

Thanks for any insight.

 
Replies
  • Currently Being Moderated
    Sep 7, 2012 12:53 AM   in reply to badeshazer

    You can do this:

    "res = myTabbedPanel: Panel{type:'tabbedpanel' \
                                           myTab: Panel{type: 'tab', text: 'Tab Title'},  \
                                       }";
    

     

    FYI, I'm about one more script from righting an angry post about the terrible documentation and lack of instruction when it comes to scripting.

     
    |
    Mark as:
  • Currently Being Moderated
    Sep 11, 2012 3:13 AM   in reply to badeshazer

    Hi,

    for those who don't know it, there's a (unofficial but very informative) pdf called ScriptUI for Dummies - I've discovered it recently and it may be considered a nice add-on to the JS Tools Guide for building interfaces.

    Davide

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points