Virtuoso: SKILL to toggle infix mode?

Discussion in 'Cadence' started by Edward Dodge, Apr 27, 2006.

  1. Edward Dodge

    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
    _`\(,_
    (_)/ (_) --- ---
     
    Edward Dodge, Apr 27, 2006
    #1
  2. 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.
     
    Andrew Beckett, Apr 27, 2006
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.