Forums

Posting in these forums is disabled. These forums will be available for archive purposes. Please join the new forums at the links below:

  • yui-support - replaces the `YUI 3.x` and `YUI 3 Gallery` forums.
    We have created the following discussion categories within this group to aid discoverability for these most-used topics:
    • Charts for YUI Charts support.
    • DataTable for YUI DataTable support.
    • Gallery for YUI Gallery support, including support for published Gallery components as well as the Gallery process in general.
    • Tools for support of YUI’s suite of developer tools such as selleck, shifter, grover, yogi, etc.
    • Everything Else for questions that don’t fit one of the categories above, we’ve got you covered here.
  • yui-deprecated - replaces the `YUI 2.x` forum and the forums of other deprecated products (`YUI Doc`, `Builder`, `YUI PHP Loader`, etc.).
  [ 2 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic

paolo nesti poggi

YUI Contributor

  • Username: paolo
  • Joined: Sat Mar 14, 2009 9:53 am
  • Posts: 77
  • Location: Roskilde DK
  • GitHub: tribis
  • Gists: tribis
  • Offline
  • Profile
Tags:
  • flickr
  • events

triggering calls on events

Post Posted: Tue Apr 12, 2011 2:39 am
Hi,

thank you for this module.
I find it would be still more useful if there was a way to trigger calls based on events. Like kind of:

Code:
var flickrCall = Y.flickrAPI.prepare('flickr.photos.search',
             {
                 api_key: ...,
                                .....
                             }
                             );

myModule.on('specialEvent, flickerCall,...)


Maybe you can advise a way to accomplish this?
/paolo

paolo nesti poggi

YUI Contributor

  • Username: paolo
  • Joined: Sat Mar 14, 2009 9:53 am
  • Posts: 77
  • Location: Roskilde DK
  • GitHub: tribis
  • Gists: tribis
  • Offline
  • Profile

Re: triggering calls on events

Post Posted: Wed Apr 13, 2011 12:58 am
Answering to myself:

It just needs to be wrapped up inside a function declaration as shown below.
Code:
var flickrCall = Y.flickrAPI.prepare('flickr.photos.search',
             {
                 api_key: ...,
                                .....
                             }
                             );

myModule.on('specialEvent, function () { flickerCall },...)



/paolo
  [ 2 posts ]
New Topic | Post Reply | Print view
Previous topic | Next topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum