newlink.ssc

来自「PowerBuilder8.0开发分散式应用所帶的例程」· SSC 代码 · 共 37 行

SSC
37
字号
<!--SCRIPT NewLink.ssc
  /* Add a folder linked to a directory*/
  var webRoot = site.GetRootDocument();
  import ( webRoot.location + '/system/utils/strtable.ssc' );
  import ( webRoot.location + '/system/utils/wizard.ssc' );
  
  var linkWiz;
  
  linkWiz.name = new wizardPage( 'Text',
    IntlStr.wizNewLink.p1.title,
    IntlStr.wizNewLink.p1.explanation,
    IntlStr.wizNewLink.p1.question
    );
    
  linkWiz.directory = new wizardPage( 'DirectoryBrowse',
    IntlStr.wizNewLink.p2.title,
    IntlStr.wizNewLink.p2.explanation,
    IntlStr.wizNewLink.p2.question
    );
    
  /* Display the wizard */
  if( site.CreateWizard(linkWiz) ) {
    /* Check if a folder name was provided */
    if( linkWiz.name.value.length > 0 ) {
      /* Create the folder in the specified directory */
      var fullname = document.location + '/' + linkWiz.name.value;
      var newFolder = site.CreateDocument( fullname,
	'directorylink', linkWiz.directory.value );
      if( newFolder == null ) {
	document.writeln( formatString( IntlStr.unableToCreate, fullname ) );
      }
    } else {
      document.writeln( IntlStr.noFolderName );
    }
  }
-->

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?