• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. From CallBack Function

Stats

  • Replies 3
  • Subscribers 158
  • Views 13138
  • Members are here 0
More Content

From CallBack Function

archive
archive over 17 years ago

Hi All,

I have a questions on the CallBack function for forms

-------------------------------------------------------------------------------------
; Here I create my form using the axl skill function  axlFormCreate

MyForm_GlobalHandle = axlFormCreate('MyForm_GlobalHandle        \
                                                               "MyFormName"                    \
                                                                MyFormPosition                  \
                                                               'MyForm_Callback                \
                                                                t                                          \
                                                                nil )


; Later I create the callback function

procedure( MyForm_Callback(TempFormHandle)
  prog( (aaa bbb)
    (printf "aaa = %L\n" aaa)
    (printf "bbb = %L\n" bbb)
  )
--------------------------------------------------------------------------------------


When I load the skill function I get an error message that insist there there are 2 variables for my callback function. The only way I can remove this error is to add a " prog ( (aaa bbb) )"  to  have 2 variables for my callback function.

May I know what are there 2 values.  When I printf is out.. the values are always  'nil'


Thanks,
newbie



Originally posted in cdnusers.org by Newbie
  • Sign in to reply
  • Cancel
  • archive
    archive over 17 years ago

    Try calling your form like this:
    MyForm_GlobalHandle = axlFormCreate(gensym() "MyFormName" MyFormPosition 'MyForm_Callback t nil)

    What is the verbatim error message that you receive?

    Cheers, Dave


    Originally posted in cdnusers.org by Dave Elder
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • archive
    archive over 17 years ago

    Hi Dave,

    I removed the  prog ( (aaa bbb) ....   from my callback function and changed the axlFormCreate code for 2 cases


    1) MyForm_GlobalHandle = axlFormCreate(MyForm_GlobalHandle() "MyFormName" MyFormPosition 'MyForm_Callback t nil)

    E- *Error* eval: undefined function - MyForm_GlobalHandle
    ERROR

     


    2) MyForm_GlobalHandle = axlFormCreate('MyForm_GlobalHandle() "MyFormName" MyFormPosition 'MyForm_Callback t nil)

    E- *Error* axlFormCreate: argument #1 should be a symbol (type template = "stlggg") - (MyForm_GlobalHandle)
    ERROR




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

    Strange thing is that when I tried back the earlier case after removing the prog ( (aaa bbb) ....

    MyForm_GlobalHandle = axlFormCreate('MyForm_GlobalHandle "MyFormName" MyFormPosition 'MyForm_Callback t nil)


    The earlier error I had is gone.

    Anyway Thanks Dave


    Originally posted in cdnusers.org by Newbie
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • archive
    archive over 17 years ago

    You should follow the example @
    /share/pcb/examples/skill/form/basic/axlform.il

    look at function IFormTest.

    The 1st argument to axlFormCreate should be a global symbol. It is used to store the returned formHandle and you can
    use its nil/formhandle value to see if you already have the form opened.


    Originally posted in cdnusers.org by fxf
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information