As seen in the first picture, I have a view rendered into a column (the one with the clock).
Upon clicking on the clock, it takes calls a view as a popup. This popup view also has a table with a button as a rendered view.
Pressing the button supposedly downloads a file, but I want to use a popup to let the users know that the download has either succeeded or failed.
I have made it to the point where the popup will show, but the error text is not being shown.
I have used some AI to resolve this issue, but they say that there is nothing wrong with the script.
Currently, the button is scripted to call the popup when pressed, and it is passing on parameters directly through the script.
Is there some kind of parameter pathing I am not aware of? Will it not directly handover values to the notification view?
Apologies for it being in a different language, but the script is 98% English, so it shouldn't make a big difference.
The popup parameter path is probably the issue. Define an input parameter on the notification view, for example message, then bind the label to view.params.message. When opening it, the dictionary key must match exactly:
system.perspective.openPopup(
"downloadStatus",
"Popups/DownloadStatus",
params={"message": "The file was generated successfully."}
)
(This is a guess. Samuel is right we'll need more details to go further than this)
Hum, probably irrelevant here (or maybe not ?), but when calling system.perspective.openPopup the height and width parameters do not exist.You need to specify them in the position parameter.
position = {'height': 150, 'width': 400}
Also is there a reason each of your brackets are preceded by \ ?
I'm also assuming you have a binding on the text prop of your label which is similar to {view.params.notifyMsg} + {view.params.notifyKind} ? Just to be sure ahah
I was thinking the same thing about the properties, I have fixed it but it does seem irrelevant to handing over values.
Regarding the slashes, I don't see them in the original script. (attached)
The text editor must've added it when I pasted it in here maybe?
And yes, I do have the text prop bound to the parameter.
In the attached picture, its an expression, but ultimately, I will be binding it to just the parameter.
Can you add a log after the "OPNENING POPUP" and give us the output in the logger :
logger.info(str(message),str(msgType))
I copied and pasted your code in my app and recreated a view etc and everything works on my end.. although I did have to change some tab formatting ?
Also can you provide us with a screenshot of the beginning of your code ? I feel like the indent might be wrong but it may be due to a copy and paste error...
No problem, the script with white spaces and the log is attached.
Changing it the message+msgType allowed the popup to show, but there aren't any logs referring to it.
Regarding the red line that usually appears on the side, no I do not see any.
Actually, I have one last idea. May or may not work.
Since you are using a different language, you have to use unicode, so using the str() function is irrelevant when calling system.perspective.openPopup.
So I would completely remove the str() function calls. You are already using the u'string' notation.
Thank you so much for your time and effort to help me.
I'm not tryna work overtime, so I will be trying this code tomorrow.
I will come back if I need any assistance, so it would be much appreciated if I could get some help then as well.