I have following code, which can run in notebook.
CreateDialog[
ExpressionCell[
Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2},
SphericalRegion -> True], Selectable -> True, Deployed -> False]]
It will pop out a window.
I tried to run it in .wls
file, but it said that
FrontEndObject::notavail: A front end is not available; certain operations require a front end.
So I add UsingFrontEnd
, but still get nothing.
UsingFrontEnd[
CreateDialog[
ExpressionCell[
Plot3D[Sin[x + y^2], {x, -3, 3}, {y, -2, 2},
SphericalRegion -> True], Selectable -> True, Deployed -> False]]
]
How to solve this problem?