• 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. Problems with callbacks in Window Forms

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 13432
  • 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

Problems with callbacks in Window Forms

JMPerdomo
JMPerdomo over 9 years ago

Hi, I am trying to display my form in a window in order to have the maximize/minimize option. Bu when I launched as a window form, all my callbacks stop working.

This is a extract of my GUI code:

; -----------------------------------------------------------------------------------
; Create Tab field
; -----------------------------------------------------------------------------------
; Note: attachment fields must be made for each field of each tab or it will not work
TabField = hiCreateTabField(
?name 'TabField
?fields list( Options_FieldList DocData_FieldList Question_FieldList)
?attachmentList list(
list(
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
)
list(
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet
)
list(hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet | hicBottomPositionSet)
)
?tabPlacement 'top
;?callback 'SampleTabFieldCB
?tabs list( "Options" "Document Data" "Questions" )
?defValue 1
)
; -----------------------------------------------------------------------------------
; Create Button field
; -----------------------------------------------------------------------------------
ButtonField = hiCreateButtonBoxField(
?name 'ButtonField
?choices list("Generate" "Save" "Cancel" )
?callback list("CallBack_Generate()" "CallBack_ButtonSave()" "CallBack_ButtonCancel()")
?prompt " "
; ?attachmentList list(hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet | hicBottomPositionSet)
)
; -----------------------------------------------------------------------------------
; Windows Layout
; -----------------------------------------------------------------------------------
; Calculate Window size
WindowHight = WindowHightMin
TabHight = WindowHight+10
TabSize = (MaxWide+10):TabHight
WindowSize = (MaxWide +30):(WindowHight+30+30)
;WindowSize = 500:500
;WindowSize = MaxWide:500
ButtonFieldSize = 200:40
; -----------------------------------------------------------------------------------
; Fields Layout
; -----------------------------------------------------------------------------------
; Set FielList and positions
Main_FieldList = list(
list(TabField 10:10 TabSize)
list(ButtonField (MaxWide-180):(TabHight+10) ButtonFieldSize 10)
)
; -----------------------------------------------------------------------------------
; Create Form
; -----------------------------------------------------------------------------------
ParamsForm = hiCreateAppForm(
?name 'Menu_LCR
; ?fields list( list( TabField 10:10 TabSize ))
?fields Main_FieldList
?attachmentList list(
hicTopPositionSet | hicLeftPositionSet | hicRightPositionSet | hicBottomPositionSet
hicRightPositionSet | hicBottomPositionSet
)
?formTitle "Layout Review CheckList"
?buttonLayout 'Empty
; ?callback "LRCMenuRun()"
?minSize WindowSize
; ?maxSize WindowSize
?initialSize WindowSize


)
; -----------------------------------------------------------------------------------
; ToolTips
; -----------------------------------------------------------------------------------
;ParamsForm->FloatField_Jump->hiToolTip = " Size of the Jump/Stretch to Do"
;ParamsForm->ToggleField_Option->hiToolTip = "Control if the figures will be stretched"
;ParamsForm->RadioField_Direction->hiToolTip = " Direction to do the Jump/Stretch"

; -----------------------------------------------------------------------------------
; Load last checklist if data is available
; -----------------------------------------------------------------------------------
(if LRCMenu_LastCheckList_Questions != nil then
LoadLastChecklist(?InitialForm ParamsForm)
)
; -----------------------------------------------------------------------------------
; Launch form
; -----------------------------------------------------------------------------------
;hiDisplayForm( ParamsForm )
 Window = hiCreateWindow('default "form" "MyApp" "" nil ParamsForm)
 hiDisplayWindow(Window)

 

Can you tel me if I am doing something wrong?

Best regards!

  • Cancel
  • skillUser
    skillUser over 9 years ago

    Hi Juan,

    My guess is that your callback is using geGetEditCellView() or some similar function to get the design dbId or design window Id, and now that the form is in a window the current window is the one that contains the form (and not the design).  If this is the case, try using hiGetWindowList() to take a guess at which window is the one to use for the callback.  Or you could store the window Id or dbId of the design on the form structure when you invoke the form from a design window, then there is no ambiguity, the callback should then just 'read' the design window ID or dbId from the form structure.

    Hope this helps!

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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