I would like to know if there is 开发者_开发知识库a Reference manual somewhere for Dashcode 3.0 Widgets' datasources.
I need to know the following:
- How to refresh (requery) a datasource
- How to listen for datasource events (onsuccess, onerror)
- 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.
精彩评论