You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6be07dc
Browse filesBrowse the repository at this point in the historyBrowse files
Docs: Point the pinned int refusal at the binder issue that reverses it
python-multiplatform #69 will box scalars in an Any slot and unbox them on
read, so state(1) will work. The test that pins today's refusal and SPEC
S5.4 / section 8 now name it, so whoever lands #69 knows what flips.
documentation corrected: SPEC S5.4, section 8; a comment in test_app_root.py.
Tests unchanged.
Refs #11
setters, and an `Any?` slot carries a Python object as itself, so `mutableStateOf(x)` is callable and
218
218
the returned `MutableState`'s `.value` reads and writes. One consequence: the binder refuses an
219
219
`int` in an `Any?` slot (it would cross as an object handle), so `state(1)` raises `TypeError` today
220
-
and `pythonx` does not box it. Tests: `tests/test_app_root.py::TheLogic` (11) and `::TheStateFactory`
220
+
and `pythonx` does not box it. python-multiplatform #69 makes the binder box scalars in an `Any`
221
+
slot (bool, int, float, str) and unbox them on read; when it lands this refusal and its test flip. Tests: `tests/test_app_root.py::TheLogic` (11) and `::TheStateFactory`
221
222
(4) run against a test-only fake state patched in for `_new_state`; `::TheBinderPath` (5) uses the
222
223
real `_new_state` through the binder's Python layer and `tests/fake_host.py`, whose `mutableStateOf`
223
224
and `MutableState.value` rows are shaped after #38 (`KotlinSurface.kt`, `PythonxAdapter.kt`), not
@@ -366,7 +367,7 @@ the binder lists no member that would win over these groups.
366
367
367
368
| Name | Notebook use | Note |
368
369
|---|---|---|
369
-
|`remember_saveable`| imported from `pythonx.compose.runtime`; state read/written with `getValue()` / `setValue()`| INTENT §5.1: `state(initial)` read and written through `.value` (S5.4, `partial`, #11; an `int` initial value is refused by the binder, #38); keeping a value across recreation is not provided |
370
+
|`remember_saveable`| imported from `pythonx.compose.runtime`; state read/written with `getValue()` / `setValue()`| INTENT §5.1: `state(initial)` read and written through `.value` (S5.4, `partial`, #11; an `int` initial value is refused by the binder until python-multiplatform #69); keeping a value across recreation is not provided |
370
371
|`DefaultCoroutineScope`, `MainCoroutineScope`| imported from `pythonx.compose.runtime`| INTENT §4.1, open |
371
372
|`DefaultIcons`|`DefaultIcons.Add()`| INTENT §5.7: `Icons.Default` by alias, once python-multiplatform #37 binds `material-icons-core`|
372
373
|`modifier`| lower-case instance from `pythonx.compose.ui`| INTENT §5.4: not provided; written `Modifier`|
0 commit comments