mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
added skinning support to manual response mechanism
This commit is contained in:
parent
ccee3d2db9
commit
678dc259b8
@ -62,6 +62,14 @@ class WebRequest(object):
|
||||
|
||||
# --------------------------------------------------------------------------------
|
||||
|
||||
class SkinningReplyTo:
|
||||
def __init__(self, replyTo, dispatcher, uri):
|
||||
self._replyTo = replyTo
|
||||
self._dispatcher = dispatcher
|
||||
self._uri = uri
|
||||
|
||||
def respond(self, response):
|
||||
self._replyTo.respond(self._dispatcher.landingPage.skin(response, self._uri))
|
||||
|
||||
class WebRequestDispatcher(object):
|
||||
"""
|
||||
@ -144,7 +152,11 @@ class WebRequestDispatcher(object):
|
||||
else:
|
||||
req.respond(result)
|
||||
else:
|
||||
args["replyTo"] = req
|
||||
if autoSkin:
|
||||
rt = SkinningReplyTo(req, self, uri)
|
||||
else:
|
||||
rt = req
|
||||
args["replyTo"] = rt
|
||||
apply(callable,(),args)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user