Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Unit for cbButtons in jsDialog

I have started using the jsDialog unit but cannot find reference to the unit containing the cbButtons.  Any reference to the buttons in code results in an undeclared identifier when compiling.  For example,  jsDialog1.ButtonBar.Default := cbNo.  Using other units offered by code completion in the interface > uses section did not resolve the issue.

Suggestions?

ps.  It would be useful if the LMDDialogCreator displayed the units required to implement the generated code.

TIA 
John Eastman  

Comments

  • 3 Comments sorted by Votes Date Added
  • The unit in which "cbNo" enum member is declared is JSDialogs.pas. 

    You can download and install the separate source installer and use Delphi's "Find in Files" feature for searching declarations (trial versions provides "interface" files instead).
  • Interesting.  I placed a jsDialog component on a form and the jsDialog unit was placed in the Implementation > Uses area.  Changing that unit to jsDialogs resolved the cbButton issue but this resulted in a different compiler error "Ambiguous overloaded call to ShowMessage" whenever ShowMessage was used.  A function I use frequently in the process of testing.  

    The issue is resolved by changing ShowMessage to MessageDlg, but I thought the error was interesting.  

    I was considering the use of jsDialog as a substitute for MessageDlg simply to eliminate the bell sound associated with MessageDlg.

    Thanks for your reply.  Any comments would be appreciated.

    John

  • The error "Ambiguous overloaded call to ShowMessage" is occured due to compiler changes in latest Delphi versions. To resolve it you have to prefix ShowMessage with the unit name, like:

    JSDialogs.ShowMessage(...);
Sign In or Register to comment.