• 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. How to get the dialog box ID for hiDBoxCancel function?

Stats

  • Locked Locked
  • Replies 6
  • Subscribers 144
  • Views 16472
  • 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

How to get the dialog box ID for hiDBoxCancel function?

johntling
johntling over 13 years ago

I wrote this simple code for a dialog box to choose to edit 2 different files or to just cancel the dialog box.  But in order to cancel the dialog box I need to get the dialog box ID.  How do I do that for button 3 in the code under procedure myCallback using the hiDBoxCancel function? Skill UI reference document doesn't talk about how to get the g_dboxID from the hiDBoxCancel call.  I also tried getcurrentwindow function in this case but it doesn't seem to work either. 


procedure( callme()
textmsg = "lefpinconfig.il and lefpinconfig.csv has been generated"
dlogbox = hiDisplayAppDBox(
?name gensym( 'trReminderDialogBox ) ; unique variable
?dboxBanner "genPinConfig"
?dboxText textmsg

;dynamically built callback
;'?callback sprintf( nil "trReminderCB( \"%s\" )" textmsg )
?callback '("myCallback(1)" "myCallback(2)" "myCallback(3)")

; choices: hicWarningDialog hicErrorDialog hicInformationDialog hicMessageDialog hicQuestionDialog hicWorkingDialog
?dialogType hicInformationDialog

?dialogStyle 'modeless
; choices are: Close, CloseHelp, OKCancel, YesNo, YesNoCancel or CloseMore
;?buttonLayout 'Close
?buttonLayout 'UserDefined
?buttons '("Open il" "Open csv" "Cancel")
)
printf("%L\n" dlogbox)
)

procedure( myCallback(button)

when( button == 1 "open il file"
       il_file =  strcat( "/space/" getShellEnvVar("MYHOST") "/" getShellEnvVar("USER") "/" getShellEnvVar("PROJECT") "/"  getShellEnvVar("PROJECT_REV") "/cds_run" "/lefpinconfig.il" )
       printf("Open and edit il file %L\n" il_file)
       edit(eval(il_file))

)
when( button == 2 "open csv file"
       csv_file =  strcat( "/space/" getShellEnvVar("MYHOST") "/" getShellEnvVar("USER") "/" getShellEnvVar("PROJECT") "/"  getShellEnvVar("PROJECT_REV") "/cds_run" "/lefpinconfig.csv" )
       printf("Open and edit csv file %L\n" csv_file)
       edit(eval(csv_file))
)
when( button == 3 "Cancel"
;       hiDBoxCancel(dlogbox)
       hiDBoxCancel(

trReminderDialogBox)
)
)

callme()
  • Cancel
Parents
  • skillUser
    skillUser over 13 years ago

     Hi John,

    I just got your SR on this so I will answer there also, but the quick answer is that you don't need to explicitly cancel the dialog box, the button unmaps the box from the screen, and that is all that the "cancel" operation would need to do anyway, so the "when" branch for the Cancel button (button 3) is a no-op / do nothing operation.  I tested that briefly in IC5141 and will try in IC615 shortly.

    Hope this answers your question though?

    Regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 13 years ago

     Hi John,

    I just got your SR on this so I will answer there also, but the quick answer is that you don't need to explicitly cancel the dialog box, the button unmaps the box from the screen, and that is all that the "cancel" operation would need to do anyway, so the "when" branch for the Cancel button (button 3) is a no-op / do nothing operation.  I tested that briefly in IC5141 and will try in IC615 shortly.

    Hope this answers your question though?

    Regards,

    Lawrence.

    • 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