mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -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):
|
class WebRequestDispatcher(object):
|
||||||
"""
|
"""
|
||||||
@ -144,7 +152,11 @@ class WebRequestDispatcher(object):
|
|||||||
else:
|
else:
|
||||||
req.respond(result)
|
req.respond(result)
|
||||||
else:
|
else:
|
||||||
args["replyTo"] = req
|
if autoSkin:
|
||||||
|
rt = SkinningReplyTo(req, self, uri)
|
||||||
|
else:
|
||||||
|
rt = req
|
||||||
|
args["replyTo"] = rt
|
||||||
apply(callable,(),args)
|
apply(callable,(),args)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user