• 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. Custom IC SKILL
  3. form in form problem

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 144
  • Views 14532
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

form in form problem

Adrian Nistor
Adrian Nistor over 15 years ago

 Hello, I replicated one problem with a smaller test; Please see below:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
procedure
( testforms()
    let( (form)
        form = hiCreateAppForm(
            ?name 'firstForm
            ?formTitle "First Form"
            ?buttonLayout 'OKCancel
            ?fields list( 
               list
(
hiCreateButton(
                       ?name 'theTestButton

                       ?buttonText "Test Button"
                       ?callback "TestButtonCollback()")  230:10 140:30)
                 )

             )
        hiDisplayForm(form)
        printf("First form is finished; Ok button or Cancel button was pressed;")
    )
)

procedure( TestButtonCollback()
    let( (form2)
        form2 = hiCreateAppForm(
            ?name 'IfxERC_SecondForm
            ?formTitle "Second form"
            ?buttonLayout 'OKCancel
            ?fields list(  
                 list(hiCreateButton(
                        ?name 'uselessButton

                        ?buttonText "Useless button"
                        ?callback "UselessButtonCollback()")  10:100 140:30)
                 )

             )
        hiFormCancel(firstForm)
        hiDisplayForm(form2)
        hiDisplayForm(firstForm)
    )
)

procedure( UselessButtonCollback()
    let( ()
        printf("The useless button was pressed;\n");
    )
)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In these example I want to open a form (first form), than , pressing a button in this first form (Test button), I want to hide the first form, and showa second form; When this second form is closed I want to show back the first form; But I have a problem; 

Please teste next 2 cases:

First case (non-problematic) :
1:  run testforms() => the "first form" appears;
2: close the form (Ok or Cancel Button) => the form is closed and in ICFB is printed "First form is finished; Ok button or Cancel button was pressed;" This is ok becasue the hiDisplayForm() is finished after Ok/Cancel was pressed;

Second case (problematic) :
1: run testforms() => the "first form" appears;
2: Press "Test Button" button =>"TestButtonCollback" procedure is called; Second form is created (form2); first form is closed ( "hiFormCancel(firstForm)" ) but the string from first procedure is NOT executed !!! ; Second form is displyed;
3: Close (or Ok) second form => second form is closed and first form is backon the screen;
4: Close (or Ok) the first form => the first form is closed;

 After this second case, in ICFB, doesn't appear: "First form is finished; Ok button or Cancel button was pressed;" string from the printf which is called after the first form is closed;  WHY ? 

Why the "hiFormCancel(firstForm)" from the TestButtonCollback() doesn't end the "hiDisplayForm(form)" from the "testforms()" ?

Where am I wrong ?

How can I hide the first form and than bring back again ?

I don't want to set the second form as modal, and I don't want to let both forms (modaless) on the screen;

 

Thank you,

Adi.

  • Cancel
Parents
  • Adrian Nistor
    Adrian Nistor over 15 years ago

     Hy Andrew,

    Thank you for the explanation, I understand your sugestion. I will try to avoid this kind of code (like in my examples) and use only the callbacks. Like you said seems that everything is acting normally, but one little stream of ideea remains in my head regarding the missing reson of the strange relation between each hiDisplayForm and it's coresponding hiDisplayCallback; 

     

    Thank you,

    Best Regards,

    Adi.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Adrian Nistor
    Adrian Nistor over 15 years ago

     Hy Andrew,

    Thank you for the explanation, I understand your sugestion. I will try to avoid this kind of code (like in my examples) and use only the callbacks. Like you said seems that everything is acting normally, but one little stream of ideea remains in my head regarding the missing reson of the strange relation between each hiDisplayForm and it's coresponding hiDisplayCallback; 

     

    Thank you,

    Best Regards,

    Adi.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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