Home > Community > Forums > PCB SKILL > dbid removed

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 dbid removed 

Last post Mon, Oct 14 2013 1:25 PM by B Bruekers. 2 replies.
Started by B Bruekers 14 Oct 2013 07:16 AM. Topic has 2 replies and 3629 views
Page 1 of 1 (3 items)
Sort Posts:
  • Mon, Oct 14 2013 7:16 AM

    • B Bruekers
    • Not Ranked
    • Joined on Tue, Feb 9 2010
    • Son, Netherlands
    • Posts 8
    • Points 245
    dbid removed Reply

    Hi all,

    I've made some code that copies the dbid's of the symbol definitions to a global list (copy(axlDBGetDesign()->symdefs)) because i need to sort the list. After sorting the name of the symb. definitions are shown in a grid on a form. 

    Now when my skill is started from the skill prompt everything works well. dbid's are stored in the list, shown in the grid and even after i closed the skill code the list contains valid dbis.

    However when I registrate the skill command with axlCmdRegister (interactive) the dbid's are copied in the list, sorted and shown OK on the form. But right after this the dbid's are 'removed'. 

    I've putted some pp() statemens in my main procedure, just before it ends the list contains valid dbid's. When I request the list at the skill command prompt it shows me 'dbid:removed'.

    So shortly, code works fine when started from skill prompt, but when started from allegro prompt the dbid's are removed right after the main procedure has finished. If I then restart the code it shows me the exact same dbid's as previously, so they are not removed from the db.

    What's going on here?

    Thanks. 

    Bram Bruekers

    Filed under:
    • Post Points: 20
  • Mon, Oct 14 2013 7:44 AM

    • fxffxf
    • Top 25 Contributor
    • Joined on Thu, Jul 17 2008
    • ., AK
    • Posts 295
    • Points 4,705
    Re: dbid removed Reply

     While the form is open, you do not want to return control to Allegro's main UI loop. You can resolve this by adding code similar to the example code in:

    <cdsroot>/share/pcb/examples/skill/cmds/cns-design.il

    • Duplicate functon _AcDesignEvent() and call it after you display your form (axlFormDisplay)
    • In your form's callback handler add a axlFinishenterFun() call to any curField event where you close your form
    Alternatively declare your form to be blocking.
    • Post Points: 20
  • Mon, Oct 14 2013 1:25 PM

    • B Bruekers
    • Not Ranked
    • Joined on Tue, Feb 9 2010
    • Son, Netherlands
    • Posts 8
    • Points 245
    Re: dbid removed Reply

     Hi fxffxf,

     I've tried the blocking function from the cns-design.il and it works!  

    Still to figure out what axlEnterEvent('(PICK) "" nil) does exactly to understand the mechanism better. 

    Thanks for you help!

    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by B Bruekers at 14 Oct 2013 07:16 AM. Topic has 2 replies.