Compiler error on MessageDialog

Using 2019 3.2

Why would I be getting a compiler error on this:

HLGlobals.PushBatch, line 280
This item does not exist
MessageDialog.Show("PID " + rs.Field(“PersonID”).StringValue + _

MessageDialog.Show("PID " +  rs.Field("PersonID").StringValue + _
" Suffix CPD has no CPD Recertification Date." )

The debugging tools will highlight which item doesn’t exist.

I can tell you from testing just now that MessageDialog.Show(message as String) in a Desktop project in 2019r3.2 does exist.

MessageDialog

Shows as doesn’t exist.

This is a web app.

The documentation states that MessageDialog is only in the Desktop framework.
https://documentation.xojo.com/api/language/me.htmlssageDialog

This compiled before an is deployed…

Can I wrap it in some compiler directive and use Msgbox in webb version.

This is a shared fille, and it was updated after the web app was deployed.

You should be able to use the Target conditionals for this:

#If TargetWeb Then
  var m as new WebMessageDialog
  // Do other stuff
#else
  // Do desktop stuff
#endif
1 Like