Forum OpenACS Development: Re: RFC: Callbacks

Collapse
16: Re: RFC: Callbacks (response to 1)
Posted by Jeff Davis on
One comment on the etags issue:

For one thing invoking things via a callback means you don't know the terminal bit (implementation name) anyway since say for user delete you have:

callback user::delete $user_id
in the code which introspects all the implementations of the user::delete callback and calls them. You have to just know the implementation name you are looking for anyway. find-tag is not going to be able to guess you want to look at user::delete::forums since forums just isn't there.

Maybe we should make the above

callback::user::delete $user_id
since I agree being able to findtags the contract definition would be useful and saying callback:: instead of callback{space} is pretty unimportant.

The proc declaration would not be an issue either way:

ad_proc -callback acs_user::change_state -implementation dotlrn  { ... }
with etags (simplified to make things clear):
etags --lang=none --regex='/ad_proc -contract \([^ ]+\) -implementation \([^ ]+\) /callback::\1::\2/'
produces
x.tcl,110
ad_proc -callback acs_user::change_state -implementation dotlrn ##callback::acs_user::change_state::dotlrn,8
which would seem to work fine.