Virtuoso: SKILL to toggle infix mode?

E

Edward Dodge

Guest
I'm trying to set up a bindkey to toggle infix off if it's on and on if it's
off. But for some reason the interpreter thinks I don't have enough operands
for the if-statement.


bk("Layout" "Ctrl<Key>i" "if (hiGetCIWindow()->infix \"t\" then
(hiGetCIWindow()->infix = nil) else (hiGetCIWindow()->infix = t))")


Any ideas?


--
Edward Dodge

__o
_`\(,_
(_)/ (_) --- ---
 
On 26 Apr 2006 17:15:50 -0700, Edward Dodge <user@foo.bar> wrote:

I'm trying to set up a bindkey to toggle infix off if it's on and on if it's
off. But for some reason the interpreter thinks I don't have enough operands
for the if-statement.


bk("Layout" "Ctrl<Key>i" "if (hiGetCIWindow()->infix \"t\" then
(hiGetCIWindow()->infix = nil) else (hiGetCIWindow()->infix = t))")


Any ideas?
You've put a space between the if and the open parenthesis - also you've
got a "t" in quotes in there. It should be:

bk("Layout" "Ctrl<Key>i"
"if(hiGetCIWindow()->infix then hiGetCIWindow()->infix = nil else hiGetCIWindow()->infix = t)")

Or more simply:

bk("Layout" "Ctrl<Key>i" "hiGetCIWindow()->infix = !hiGetCIWindow()->infix")

Andrew.

Andrew Beckett
Principal European Technology Leader
Cadence Design Systems, UK.
 

Welcome to EDABoard.com

Sponsor

Back
Top