Question about ipcBeginProcess

Discussion in 'Cadence' started by bedoune, Jun 16, 2008.

  1. bedoune

    bedoune Guest

    Hello !!

    I have a small question regarding ipcBeginProcess.

    My code is below: (actually, it's Andrew-san's code ^^)

    procedure(Main()

    cv = geGetWindowRep()
    Com = "calibre ... options ... "
    CalibreId = ipcBeginProcess(
    Com
    ""
    'DataHandler
    'DataHandler
    'ExitProc
    ) ;; end ipcBeginProcess

    ) ;; end Main
    -----------------------------------------------------
    procedure(DataHandler(CalibreId data)
    printf("%s" data) )

    -----------------------------------------------------

    procedure(ExitProc(CalibreId status)
    println("calibre has finished")

    if(cv~>mode == "r" then
    println("read only")
    else println("write")
    )
    ) ;; end ExitProc


    My problem is that my program displays "calibre has finished", but
    never do the if test.
    Maybe because parameter cv in not defined ?

    So i would like to know how to define parameter cv in my procedure
    ExitProc.
    i tried
    procedure(ExitProc(CalibreId status cv)

    but no changes.

    I think this is not the good way, but i don't know how to. Is there
    something to define in
    ipcBeginProcess, to say to pass cv as argument for ExitProc ?

    thanks a lot for your help.

    Regards,

    b.
     
    bedoune, Jun 16, 2008
    #1
  2. bedoune

    bedoune Guest

    Hi,

    It's ok, i found a way to solve my problem ^^v <3

    thx

    b.
     
    bedoune, Jun 17, 2008
    #2
  3. You might also want to look at my sourcelink solution number 11239406
    entitled "Can I avoid using global variables to pass data between
    handlers with ipcBeginProcess()"

    This does exactly what you want...

    Andrew.
     
    Andrew Beckett, Jun 18, 2008
    #3
  4. bedoune

    bedoune Guest

    Hello Andrew,

    tha'ts exactly what i did. your code works very fine ^^


    thanks a lot for your help.


    b.
     
    bedoune, Jun 19, 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.