Rename whitespace with underscore

A little question, is it possible to rename objects by typing in the edittext field f.e. "Box version concept" and it would be automatically rename the objects with an underscore f.e. "Box_version_concept"

Thx

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
andrfil's picture

rename

Try this:

rollout renameObject "Rename"
(
	edittext etName "name:" text:""
 
	fn replaceWtoU txt = substituteString etName.text " " "_"
 
	on renameObject open do etName.text = selection[1].name
 
	on etName changed txt do selection[1].name = replaceWtoU etName.text
)
createDialog renameObject
Dragan_ilic's picture

Thank you, but is it possible

Thank you, but is it possible without realtime rename, but instead with a Button (rename now)?

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.