You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to meteo...@googlegroups.com
I think adding such callbacks dynamically for an object that was already instantiated doesn't work by design.
Manuel De Leon
unread,
Feb 20, 2015, 6:59:36 PM2/20/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to meteo...@googlegroups.com
Why wouldn't you want people to be able to say "run this code when this particular instance is rendered (aside from whatever other rendered events) "?
If not from the created, then how can I add an onRendered to all templates? So I can check if a template variable was set during creation and then do something.
I have a package where I want to run code on a user's template rendered event if they call my library from the created event. Right now I can add helpers dynamically from the created event. I would like to do the same for onRendered.
Manuel De Leon
unread,
Feb 20, 2015, 7:37:30 PM2/20/15
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to meteo...@googlegroups.com
My ideal scenario is to be able to the add a method to all templates that when called from onCreated it sets something to run on rendered. e.g. if you add my package you'd be able to do:
Template.home.onCreated({ this.addStuff(); });
// And addStuff would then add helpers and code to be run when the template renders.
I thought I'd be able to do so with the new onRendered. Is there a way to do this?