How hide multiple lines using Livecode -


i try hide text between begin{equation} , end{equation}. using following code , it's working. problem it's work once if more 1 begin{equation} , end{equation} there it's not working.

on mouseup        put wordoffset("begin{equation}",fld "myfield") tbegin        put wordoffset("end{equation}",fld "myfield") tend           set hidden of line tbegin tend of fld "mytextfield" true     end mouseup 

check out 'wordstoskip' parameter of wordoffset in lc dictionary. if don't manage , have several sets of equation text find code find, , stop at, first match finds.

you have 2 ways handle multiple instances of equation text - either edit text searched proceed or make use of 'wordstoskip' parameter.

first use repeat loop 'if' statement find out how many instances of 'begin{equation} flag contained in text search. set repeat loop , use approach a) or b)...

approach a) don't use 'wordstoskip', copy text searched temporary variable , remove text found instances of flag.

approach b) keep text searched whole , place char number + 1 of endpoint of found instances in 'wordstoskip' parameter.


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -