需要一个很好的Google Generic Widget类参考

时间:2012-08-17 20:06:42

标签: google-apps-script

我希望看到我可以在Google Apps脚本中的Generic Widget上使用的所有方法,但我找不到任何不实际的内容。

4 个答案:

答案 0 :(得分:2)

有两种方法可以查看所有公开方法。以下代码执行此操作

function test() {
  var app = UiApp.getActiveApplication();
  // Method 1
  var functions1 = Object.keys(app);
  // Method 2
  var functions2 = [];
  for (var f in app) {
    functions2.push(f);
  }
}

数组functions1functions2包含任何对象的公共函数列表,也包含任何通用窗口小部件。

答案 1 :(得分:1)

答案 2 :(得分:1)

我认为这是您正在寻找的链接。 https://developers.google.com/apps-script/class_widget

请记住,Apps脚本是基于Google的Web Toolkit构建的(在App引擎服务中使用)。你可以看一下,以便更好地理解事物的运作方式。 但是,Apps脚本是另一项服务,正如您将很快看到的,每次在Apps脚本中实现小部件时,它都具有较少的属性和方法。

最后,您可以随时在http://code.google.com/p/google-apps-script-issues/上发布功能请求。如果其他人'明星'足够,谷歌可能会实施您的请求。它是一个相当诚实的系统,他们确实优先考虑它的工作。

答案 3 :(得分:0)

我不知道是否会有人使用,但是如果你想节省一些时间,可以在Google的Generic Widget上使用的所有方法列表。随意填写任何方法的一些信息。

addKeyPressHandler, 
setReadOnly, 
setDialogTitle, 
setStylePrimaryName,
 addMouseDownHandler, 
addBeforeSelectionHandler, 
addSubmitCompleteHandler, 
setModal, setGlassEnabled, 
setAutoHideEnabled, 
setWidgetPosition, 
setPreviewingAllNativeEvents,
 addSouth, 
addKeyUpHandler, 
setCellHorizontalAlignment, 
addMouseMoveHandler, 
setTabEnabled,
 setWidgetLeftRight,
 removeRow, 
setLimit, 
addStyleName, 
getId, 
showDatePicker, 
setWidgetBottomHeight, 
setDefaultValue, 
setCommand,
 setPopupPositionAndShow, 
setWidgetLeftWidth, 
setWidgetHorizontalPosition, 
setStyleName, 
setAlwaysShowScrollBars, 
addMouseWheelHandler, 
setHref, 
addTab, 
addSubmitHandler, 
setItemSelected, 
hideDatePicker, 
remove, 
addLoadHandler, 
setItemText, 
setVisibleRect, 
addItem, 
setLayoutData, 
showDocsPicker, 
clear, 
insertRow, 
setFormValue, 
setUrl, 
setWidgetVerticalPosition, 
addEast, 
setAction, 
removeCell,
setCellHeight, 
setId, 
addWest, 
addClickHandler,
 setCharacterWidth, 
setCaptionText, 
setTabText, 
setCellWidth, 
addScrollHandler, 
setScrollPosition, 
setVisible,
 setUserObject, 
setVisibleLines, 
setMaxLength,
 setSelectionRange,
 setMethod,
 setSelectedIndex,
 addMouseOverHandler,
addNorth, 
setWordWrap,
 removeItem,
 addCloseHandler,
 setStyleAttribute,
 setCellPadding,
 insertCell, 
addChangeHandler,
 setText,
 setContentWidget, 
setGlassStyleName, 
resize, 
setTarget,
 setAccessKey, 
addAutoHidePartner, 
setTag, 
setInitialView, 
setSelectedItem,
 addView,
 setBorderWidth, 
setSubMenu,
 removeCells, 
setCurrentMonth, 
setTextAlignment, 
setID, 
addFocusHandler, 
setVerticalAlignment, 
setPixelSize,
 setTabIndex, 
selectTab, 
setResource, 
setWidgetTopHeight,
 setFormat, 
setStackText, 
setVisibleLength, 
addSeparator,
 setTitle, 
setVisibleItemCount, 
setHeight, 
setSpacing,
 addMouseOutHandler,
 toString, 
addMouseUpHandler,
 setPopupPosition,
 setName, 
setWidgetTopBottom, 
setHorizontalScrollPosition, 
setTargetHistoryToken,
setCellSpacing, 
setPopupStyleName, 
getTag, 
addCell, 
addStyleDependentName, 
setDown, 
addInitializeHandler, 
setWidget, 
setChecked,
 add, 
addKeyDownHandler, 
setCursorPos, 
getType, 
setEnabled, 
setState, 
setWidth, 
setUrlAndVisibleRect, 
setFocus, 
setDirection, 
addErrorHandler,
 addValueChangeHandler, 
setSize, 
addSelectionHandler, 
addBlurHandler,
 setMultiSelectEnabled,
 setValue, 
setHorizontalAlignment, 
setEncoding,
 setAutoSelectEnabled,
 setAutoOpen,
 setWidgetMinSize,
 setCellVerticalAlignment,
 setWidgetRightWidth,
 setAnimationEnabled,
 setSelected, 
setHTML