Cadence InterProcess Communication - "hiSetBindKey freeze the ChildProcess"

Discussion in 'Cadence' started by bur.rosario, Jan 17, 2008.

  1. bur.rosario

    bur.rosario Guest

    Cadence InterProcess Communication - "hiSetBindKey freeze the Child
    Process"

    In my earlier post I cannot send data in my child process because I
    have set a binding.

    Then I tried to another solution. First I place all the data that I
    will send to my child process in a skill list. Then I have unset the
    binding. Then I tried to send the contents of my skill list in my
    child process and I am successful.

    Does hiSetBindKey freeze the Child Process?

    Please comment.

    Domo Arigato Gozaimasu! (^^_)v


    Best regards,

    charkle_kline
     
    bur.rosario, Jan 17, 2008
    #1
  2. bur.rosario

    S. Badel Guest

    Cadence InterProcess Communication - "hiSetBindKey freeze the Child
    No I don't think hiSetBindKey will do anything to your child process.

    You should really post some code if you want relevant feedback.


    Cheers,
    Stéphane
     
    S. Badel, Jan 17, 2008
    #2
  3. bur.rosario

    bur.rosario Guest

    Hi Step! How are you doing? I hope your doing fine.

    here's my code...


    procedure( ipc()
    let( (childPID)
    childPID = ipcBeginProcess( "command" "" 'DataHandler nil nil)
    ipcWaitForProcess( childPID )
    )
    )

    procedure( DataHandler( childPID childOutput )
    evalstring( childOutput )
    )


    procedure( GetNames()
    Bind()
    )

    procedure( Bind()
    hiSetBindKey( "Schematics" "<Btn1down>" "BindingCmd")
    )

    procedure( BindingCmd()
    .......
    .......
    if( name
    AddName( name )
    )
    )

    procedure( AddName( strName )
    ipcWriteProcess(
    childPID
    strcat( strName "\n")
    )
    )


    First I execute ipc(). Then in the child process I execute:

    "puts -nonewline "GetNames()"
    flush stdout

    The evalstring will perform the "GetNames()" function.

    Using the BindCmd I can select names from the schematic.

    Then I must retrieve the name:

    gets stdin nData

    But I got an error "childPID unbound variable..." so the strName was
    not transferred in my child process.



    yours truly,

    charkle_kline
     
    bur.rosario, Jan 17, 2008
    #3
  4. bur.rosario

    S. Badel Guest

    procedure( ipc()
    This procedure doesn't return the child process id, and childPID is a local variable. So it's lost...

    You should keep it global, to be able to access it in other procedures at any time (ie, remove the
    let())


    Stéphane
     
    S. Badel, Jan 17, 2008
    #4
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.