Sublime Forum

How to get phantom by pid

#1

I add EventListener on on_selection_modified_async, but I add many phantom on single string. How I chekc phatom exist by name?

0 Likes

#2

The pid is an integer number and returned from the view.add_phantom method. You can use

view.query_phantom(pid)
view.query_phantoms([pid])

to get the phantom regions and

view.erase_phantom_by_id(pid)

to erase it.

0 Likes