1
Index: imagination/facets.py
2
===================================================================
3
--- imagination/facets.py (revision 179)
4
+++ imagination/facets.py (working copy)
6
for interfaceClass in interfaceClasses:
7
self.register([origInterface], interfaceClass, '', adapterFactory)
9
+def _hook(iface, ob, lookup=registry.lookup1):
10
+ factory = lookup(declarations.providedBy(ob), iface)
16
+interface.adapter_hooks.append(_hook)
19
class IReprable(Interface):
20
Index: imagination/wiring/web.py
21
===================================================================
22
--- imagination/wiring/web.py (revision 179)
23
+++ imagination/wiring/web.py (working copy)
25
from nevow import rend
26
from nevow.loaders import stan
27
from nevow.tags import *
28
-from nevow.livepage import handler, glue, literal
29
+from nevow.liveevil import handler, glue, literal
30
from nevow import entities
32
getinput = literal.getinput
33
Index: imagination/simdata.py
34
===================================================================
35
--- imagination/simdata.py (revision 179)
36
+++ imagination/simdata.py (working copy)
38
map[iface] = (map[iface][0], lazy(map[iface][1], kw))
39
return ThingTemplate(templateMap=map, order=order)
41
- def apply(self, method, *args, **kw):
42
+ def apply(self, methodClass, methodName, *args, **kw):
43
map = self.templateMap.copy()
46
- lazyApply(method.im_class, method.im_func.func_name, args, kw))
47
+ lazyApply(methodClass, methodName, args, kw))
48
return ThingTemplate(templateMap=map, order=order)
51
Index: imagination/architecture.py
52
===================================================================
53
--- imagination/architecture.py (revision 179)
54
+++ imagination/architecture.py (working copy)
57
def iterImplementors(self, interface):
59
- selfish = interface(self, default=None)
62
+ selfish = interface(self)
65
return iter([selfish])
67
Index: sandbox/simplemap.py
68
===================================================================
69
--- sandbox/simplemap.py (revision 179)
70
+++ sandbox/simplemap.py (working copy)
73
description=("This room is visible through a transparent door.")).new()
75
-passage = basic.Portal.apply(architecture.IExit.between, room, room2).fill(
76
+passage = basic.Portal.apply(architecture.IExit, 'between', room, room2).fill(
77
INoun, name="Fancy Passageway Between Alpha and Omega").new()
79
door = basic.Door.fill(
81
- ).apply(architecture.IExit.between, room2, room3).new()
82
+ ).apply(architecture.IExit, 'between', room3, room3).new()
84
door2 = basic.Door.fill(INoun, name="glass door"
86
architecture.IExit, transparent=True).apply(
87
- architecture.IExit.between, room, room4).new()
88
+ architecture.IExit, 'between', room, room4).new()
91
book1 = basic.Book.fill(containment.ILocatable, location=room).fill(