Interpolated String Not Updating
JarredOlson opened this issue · comments
I tried using your Hello World example to get something working (I would like to help build out the reading of a session environment variable if possible). Anyways, I used an interpolated string with this value: \(hello_world_coroutine(knobs: "{}"))
. When I open iterm it will display a random greeting, but it never changes. Am I doing something wrong? I realize that this isn't necessarily an issue with your code, but I would greatly appreciate the assistance and would like to help you with this project as I see value in it.
Hey @JarredOlson, thanks for filing! When the status doesn't update that typically means the underlying script isn't being run in the long-running (daemon) mode. Can you verify that the script is in the AutoLaunch
folder and that you selected it from the AutoLaunch menu?
Huh, that does seem like the right setup. I just got a new computer, so I'll give this a try on it this morning and see if I missed documenting any steps.
Hey @JarredOlson, I just tried this on my pretty fresh machine, and unfortunately I'm seeing that the hello world component works just as I'd expect, updating every 5 seconds. After re-reading the initial description you provided and looking closer at your screenshot, I see that you're making your own, new component. Is that right? If that's the case, can you provide the full content of HelloWorld.py
here? I might be missing something about your interpolated string. I appreciate it 😄
Thanks for the assistance! The full contents of HelloWorld.py is copy pasted from your rempo. https://github.com/daneah/iterm-components/blob/master/hello_world.py
So you're just using the one from this repo? In that case I'm afraid I'm unable to reproduce your issue 😞 Can you elaborate on what you mean by this?
Anyways, I used an interpolated string with this value:
\(hello_world_coroutine(knobs: "{}"))
.
Ahhh.... I see now... I was invoking the python via an interpolated string status bar component (which runs once, but doesn't update). I didn't realized that this registered a different component that you could drag and drop in. I've got it working now. Thanks so much for you help! I look forward to being able to contribute to this repo!
Aha! This all makes a bit more sense now 😄 I'm so glad you got it working, and look forward to your contributions!