forked from ObjectProfile/PythonBridge
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathPBCF.class.st
More file actions
112 lines (92 loc) · 2.26 KB
/
PBCF.class.st
File metadata and controls
112 lines (92 loc) · 2.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
Class {
#name : #PBCF,
#superclass : #Object,
#classInstVars : [
'current'
],
#category : #'PythonBridge-Global'
}
{ #category : #'as yet unclassified' }
PBCF class >> << aPythonStatement [
^ self current << aPythonStatement
]
{ #category : #'as yet unclassified' }
PBCF class >> addBinding: aBinding [
^ self current addBinding: aBinding
]
{ #category : #'as yet unclassified' }
PBCF class >> addObserver: anObserver [
^ self current addObserver: anObserver
]
{ #category : #'as yet unclassified' }
PBCF class >> append: aPythonStatement [
^ self current append: aPythonStatement
]
{ #category : #initialization }
PBCF class >> application [
^ self applicationClass uniqueInstance
]
{ #category : #initialization }
PBCF class >> applicationClass [
^ PBApplication
]
{ #category : #'as yet unclassified' }
PBCF class >> bindingAt: varName put: anObject [
^ self current bindingAt: varName put: anObject
]
{ #category : #'as yet unclassified' }
PBCF class >> bindingWrap: anObject [
^ self current bindingWrap: anObject
]
{ #category : #'as yet unclassified' }
PBCF class >> buildCommand [
| command |
command := self current buildCommand.
self reset.
^ command
]
{ #category : #accessing }
PBCF class >> current [
^ current
]
{ #category : #accessing }
PBCF class >> current: cf [
current := cf
]
{ #category : #'reflective operations' }
PBCF class >> doesNotUnderstand: aMessage [
^ aMessage sendTo: self current
]
{ #category : #'instance creation' }
PBCF class >> newCommandFactory [
^ self application newCommandFactory
]
{ #category : #'as yet unclassified' }
PBCF class >> observerFromCallback: aBlock [
^ self current observerFromCallback: aBlock
]
{ #category : #accessing }
PBCF class >> reset [
current := self newCommandFactory
]
{ #category : #'old api' }
PBCF class >> send [
^ self application send: self buildCommand
]
{ #category : #'old api' }
PBCF class >> send: aPythonStatement [
self << aPythonStatement.
^ self send
]
{ #category : #'old api' }
PBCF class >> sendAndWait [
^ self send waitForValue
]
{ #category : #'old api' }
PBCF class >> sendAndWait: aPythonStatement [
^ (self send: aPythonStatement) waitForValue
]
{ #category : #'as yet unclassified' }
PBCF class >> transformBlock: aBlock [
^ self current transformBlock: aBlock
]