Hi Fritz, you can bind a context to the handler using qx.lang.Function.bind:
rpc.callAsync(qx.lang.Function.bind(myFrontendHandlerFunction, contextToBind), "myBackendMethod"); Regards, Andreas -----Ursprüngliche Nachricht----- Von: Fritz Zaucker [mailto:[email protected]] Gesendet: Dienstag, 8. September 2009 11:20 An: [email protected] Betreff: [qooxdoo-devel] Context for rpc.callAsync() handler Hi, would it be possible to add a (self) context to qx.io.remote.Rpc.callAsync() as there is for addListener()? E.g., callAsync(Function handler, String methodName, Object self) The context should of course be passed on to the handler and not to the backend. This would allow for defining the handler in the members: section of a class and still have access to the other class elements. I realize, that this would be a not-backward-compatible change, as arguments after methodName are now passed to the backend. So perhaps there should be a variant like callAsyncWithContext(Function handler, String methodName, Object self) or somethink like that ... Or is there a fundamental reason for not passing the context? Thanks and best regards, Fritz -- Oetiker+Partner AG tel: +41 62 775 9903 (direct) Fritz Zaucker +41 62 775 9900 (switch board) Aarweg 15 +41 79 675 0630 (mobile) CH-4600 Olten fax: +41 62 775 9905 Schweiz web: www.oetiker.ch ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
