Kaju question

I use Kaju in most of my apps and it works well.

However, I have an issue with the Kaju new version opening if the app is in full screen. In this case the window opens but is behind the main window. This means that the user never sees the update window and, therefore, does not know there is a new update available.

How can I get the update window to be on top?

Interesting. I’m not sure you can when another window is full-screen, but you can check to see if the update window open and force the other window out of full-screen, or give the user a warning that an update awaits, or some other option I’m too tired to think of right now.

That’s interesting. I will try that. How can I check that the update window is open?

Solved the KajuUpdateWindow being open by just setting a global property in the Open event.

Unfortunately it did not work!

[quote]Solved the KajuUpdateWindow being open by just setting a global property in the Open event.
Unfortunately it did not work![/quote]

Im fairly sure that’s not what ‘Solved’ means. :slight_smile:

Which OS is this?
There is a Windows API call that can be used to set a window to be topmost
To use it you need to have the handle of the window that is being displayed.

I dont use Kaju myself: does the window get created by the library, or do you create a window to display the messages?

From the documentation:

@Jeff Tullin , Kaju displays the update window and handles every aspect of self-updating. It also displays error messages. Any other interaction is up to the coder, but Kaju gives lots of feedback and has options to disable its own interactions.

You’re right!

Sorry, my bad. I’m on MacOS 10.12.4 and using Xojo 2017 R1.1.

By solved I meant that I created a new global property which I set to true in the update window. I checked the value of this property on my main window Open event after running KajuCheck and, if true, set the full screen window to not fullscreen. This is the bit that did not work.

I can’t get to the UpdateWindowIsOpen property from outside the Kaju classes.

I’m not sure what you mean. UpdateWindowIsOpen is a property of UpdateChecker.

I mean that I cannot check this property.

In my main window (called Main) Open event I run:


That will open the update window if it is required, but continues with the Open event. Following that I load my preferences, one of which is whether to set to full screen. If yes then Main resizes to full screen and effectively hides the Update Window before the user has a chance too see it! So the user does not know that there is an update.

I need a way, within my Main.Open event, to check if the update window is open and I cannot find a way to access the UpdateWindowIsOpen property.

First, why Main.Open instead of App.Open? If you do it there, you can decide whether to open Main at all and at what point. Also, it won’t run the update check every time you open a new Main, assuming you can.

But aside from that, I assume KajuCheck is a method you wrote, so you can store the UpdateChecker used in an accessible place like an App property, or just have that method return the UpdateChecker so your calling method can check it.

Without seeing your code, I’d bet you have other options too. You have complete control over this.

I use Main.Open as I have a single window app with multiple page panels and container controls so Main.Open is only executed the once.

I had forgotten that I had created the KajuCheck method as it was a long time ago! So, I changed that method (in a test environment) to check whether my UpdateChecker property had the value UpdateWindowIsOpen set to True and then attempted to ‘shrink’ the Main window. This failed.

I fear that I am wasting everybody’s time now, so I shall mark your previous answer as Answered. I am not too bothered about this, but will have another go when I have more time to concentrate on it.

Thanks Kim, for your help so far. I will experiment later.