开发者

Dashcode Widgets Datasource

开发者 https://www.devze.com 2023-01-05 15:13 出处:网络
I would like to know if there is 开发者_开发知识库a Reference manual somewhere for Dashcode 3.0 Widgets\' datasources.

I would like to know if there is 开发者_开发知识库a Reference manual somewhere for Dashcode 3.0 Widgets' datasources.

I need to know the following:

  1. How to refresh (requery) a datasource
  2. How to listen for datasource events (onsuccess, onerror)
  3. How to pass parameter to datasource query

It's being very difficult for me to find this very basic information in Apple's documentation.

Thanks a lot.


To answer #3, to pass a parameter to the datasource query:

ds = dashcode.getDataSource("mydatasource");
ds.setValueForKeyPath("1", "parameters.count");
ds.setValueForKeyPath("bar", "parameters.foo");

will add ?count=1&foo=bar to the query URL.

For #1, an answer I saw whilst searching this topic was to add an additional parameter which you change for each query to trigger a requery:

ds.setValueForKeyPath(update++, "parameters.update");

I still need to know the answer to #2 myself.


This is not the most complete guid but it does do over reloading datasources.

0

精彩评论

暂无评论...
验证码 换一张
取 消