Popup windows in CDF player

I am trying to give information to the user of the code via popup windows with CreateDialog. It is working fine when I use .nb file, the windows has the information and the plots and after 5seconds pause they close. But when I save .nd file as EnterPrise CDF it is not working, no windows there for I don't know if they would close. I don't know why? Any ideas. Here is a "toy code" what I am trying to do.

Get[FileNameJoin[{NotebookDirectory[EvaluationNotebook[]],
"Trialpack3.wl"}]]
Panel@Framed[DynamicModule[{Heval = 1, Leval = 1},
Grid[{
{Style["                              "], SpanFromLeft},
{Style["                Inputs ", 16, Blue], SpanFromLeft},
{Style["                              "], SpanFromLeft},
{Row[{Style["H, (m) ", 12, Blue, Editable -> False],
InputField[Dynamic[Heval], FieldSize -> {10, 1.5}]},
Spacer[70]],
Row[{Style["L, (m) ", 12, Blue, Editable -> False],
InputField[Dynamic[Leval], FieldSize -> {10, 1.5}]},
Spacer[45]]},
{Grid[{ {Style["  ", 12, Black, Editable -> False]}, {Button[
Style["Compute", Green, Bold],
Res = Trialpack3MainFunc[Heval, Leval];,
Method -> "Queued"]}}], SpanFromLeft},
{Style["", 12, Blue], Style["", 12, Blue]}
}],
Initialization :> (
Get[FileNameJoin[{NotebookDirectory[EvaluationNotebook[]],
"Trialpack3.wl"}]])
], Background -> Lighter[Gray, .6]]


And the package file is

BeginPackage["Trialpack3"];
MainFunc::usage=" ";
Begin["Private"];
\$MaxExtraPrecision=\[Infinity];
MainFunc[H_,L_]:=Module[{},
Quiet[LaunchKernels[]];
DimenScales=CreateDialog[Row[{Style["        Variables   \n",18,Black],
Row[{Style["   \n       H=
",14,Red]}],
Row[{Style["   \n       L=
",14,Red]}]
}]];

Tplot3DINI=Plot3D[Sin[x*z],{x,0,L},{z,0,H},ImageSize->Medium];

T3DplotDialog3D=CreateDialog[Grid[{{Row[{Style["         FIELD
\n",15,Red]
}]},{Tplot3DINI}}],Background->White];

Pause[5];
NotebookClose[DimenScales];
NotebookClose[T3DplotDialog3D];

];

SetAttributes[MainFunc,{HoldAll}];
End[];
EndPackage[];


Because I could not find a way to attach documents in here I posted the same question in mathematica community where I attached the documents. http://community.wolfram.com/groups/-/m/t/1396848?p_p_auth=X3vsM61w

• It is not the first time I will ask you to prepare a minimal example. Is everything above needed to show an issue with a dialog window which does not appear? Is the code of the package related to the problem? Have you tried to remove loading external package from possible reasons? etc etc. It is in your interest to prepare as short and clear example as possible. – Kuba Aug 3 '18 at 11:57
• Can you tell me what is too complicated? I don't know if the package related to the problem or not. I use the package while using .nd format. Also, I need the package, I can't put my code inside the GUI. As I said this is not my real code. Also, if I compare my question and some other in here, mine is much simpler. I can remove one of the plots from the package but the rest is there to mimic my real code. – Erdem Aug 3 '18 at 12:04
• Frankly, I don't remember the status of creating dialog windows in various cdfs types. First thing I'd do is to deploy a specific .cdf type containing e.g. Button["test", MessageDialog["test"], Method -> "Queued"] to make sure. – Kuba Aug 3 '18 at 12:07
• That is working, I feel like there is problem with loading the package, it is not the popup windows. I simply run the code as .nb and right after that I do the CDF PreReview from File and nothing. – Erdem Aug 3 '18 at 12:14
• Deploying a .cdf is not the same as clicking "cdf preview", how is it supposed to interprete NotebookDirectory[] then? Is deployed .cdf next to the package file? – Kuba Aug 3 '18 at 12:17

Button["test",