Skip to content

Commit de143c6

Browse files
committed
update pages
1 parent 4eed73f commit de143c6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/tutorials/build_stimulus.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ StimUnit('block',win,kb).add_stim(stim_bank.get_and_format('block_break',
313313

314314
In this pattern, placeholders `{block_num}`, `{total_blocks}`, and `{score}` are replaced at runtime, and the resulting `TextStim` is passed to a `StimUnit` for display and input handling.
315315

316-
Note: `get_and_format()` works by manually reconstructing a new text stimulus rather than attempting a deep copy of the original. Internally, it inspects the constructor signature of TextStim or TextBox2, pulls out all of the original instance’s stored keyword arguments (from its __dict__), replaces the text field with your formatted string, and then calls the class constructor with that argument set. This approach avoids mutating the version cached in StimBank, but because PsychoPy objects don’t support true deep copying, some complex properties—especially in TextBox2 (e.g. wrapping behavior or anchor points)—may not carry over exactly as in the original. If you hit unexpected layout or formatting issues using `TextBox2`, consider using `TextStim`type or `rebuild()` with a new `text` override instead.
316+
Note: `get_and_format()` works by manually reconstructing a new text stimulus rather than attempting a deep copy of the original. Internally, it inspects the constructor signature of `TextStim` or `TextBox2`, pulls out all of the original instance’s stored keyword arguments (from its __dict__), replaces the text field with your formatted string, and then calls the class constructor with that argument set. This approach avoids mutating the version cached in StimBank, but because PsychoPy objects don’t support true deep copying, some complex properties—especially in TextBox2 (e.g. wrapping behavior or anchor points)—may not carry over exactly as in the original. If you hit unexpected layout or formatting issues using `TextBox2`, consider using `TextStim`type or `rebuild()` with a new `text` override instead.
317317

318318

319319
### 6. Rebuilding and Modifying Stimuli

docs/tutorials/build_stimunit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 🎯 StimUnit: Modular Trial Controller for PsychoPy
1+
# StimUnit: Modular Trial Controller
22

33
## Overview
44

0 commit comments

Comments
 (0)