Subexpression automation in strings

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 6 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Subexpression automation in strings

Post by Lembasts »

Greetings,

I am often copying and pasting object properties into strings.
So I might start with "User []" and then paste in the property which becomes "User [$textboxUser.Tag.Name]" but then I have to manually change this to "User [$($textboxUser.Tag.Name)]".
It would be nice to just highlight the variable and press a shortcut key to enclose the variable in a subexpression.
What would be even way cooler is detecting that an object with a property has been pasted in to a string and automatically do the following:
If the string is enclosed in single quotes, automatically change it to double quotes AND automatically apply the subexpression.

Cheers
David
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Subexpression automation in strings

Post by davidc »

Hello David,

You can wrap the command in parenthesis using the following command (but does not include the $):

[Ctrl + Shift + 9]

I will see if we can add a new command to wrap the selection in subexpression $().

For the other wrap commands, please refer to the following article:

https://www.sapien.com/blog/2015/07/15/ ... 5-support/

To toggle string quotes, use the following command:

[Ctrl+Alt+']

Thank you for your feedback!
David
SAPIEN Technologies, Inc.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Subexpression automation in strings

Post by davidc »

We added the command in the latest service release (v5.4.141):

https://www.sapien.com/blog/2017/06/27/ ... -v5-4-141/
David
SAPIEN Technologies, Inc.
User avatar
Lembasts
Posts: 405
Last visit: Wed Mar 20, 2024 1:40 pm
Has voted: 1 time
Been upvoted: 1 time

Re: Subexpression automation in strings

Post by Lembasts »

Thanks! 8-)
This topic is 6 years and 8 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked