Skip to content

Instantly share code, notes, and snippets.

@edcrypt
Last active September 6, 2019 20:14
Show Gist options
  • Save edcrypt/2789458f029c5828607e2cecdf407754 to your computer and use it in GitHub Desktop.
Save edcrypt/2789458f029c5828607e2cecdf407754 to your computer and use it in GitHub Desktop.
Bloc's Rope data structure usage
| text |
[
EpMonitor current disable.
Metacello new
baseline: 'Bloc';
repository: 'github://feenkcom/Bloc/src';
load: 'Bloc-Text-Rope'
] ensure: [ EpMonitor current enable ].
text := 'test test test' asRopedText.
text
when: BlTextStringInserted
do: [ Transcript clear;
show: text asString ];
insertText: 'foo ' asRopedText at: 5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment