No title bar..

For a reason I cannot know, now the mainWindow (opens by default) opens hiding the title bar, any idea?

I workaround it putting in the Open Event

me.Top=45

but, something should be wrong inside the window, no?

Usually opened as

If you’re not purposely positioning your mainWindow to begin with, then I would report this in Feedback as a bug.

Just curious, are you using Catalina?

In your Open event, what does Screen.AvailableTop say? For example:

System.DebugLog("Available Top: " + Str(Screen(0).AvailableTop))

Top is the top of the CONTENT area NOT the top of the window frame
I’ve written about this

[quote=466818:@Scott Cadillac]If you’re not purposely positioning your mainWindow to begin with, then I would report this in Feedback as a bug.

Just curious, are you using Catalina?

In your Open event, what does Screen.AvailableTop say? For example:

System.DebugLog("Available Top: " + Str(Screen(0).AvailableTop))

Where should I look to see this log?
oh I found, it says:
8:58:54 : NLB Launched
Available Top: 23

Mojave

23 sounds about right for the macOS Menu bar.

[quote=466822:@Norman Palardy]Top is the top of the CONTENT area NOT the top of the window frame
I’ve written about this[/quote]

For some of my projects, where I’m recording the previously opened position and size of Windows (when they close), so that specific Windows always reopen in that same previous position, Norman’s post was very helpful to me.

But if you’re not doing anything like that in your project, then this does sound like some kind of bug.

I hope that helps.

yes
like Scott said
if you’re NOT specifically opening at a specific position and the title bar is hidden then it seems like a bug

But this not happened until today and that is a project that last for months. If I create a new empty window and choose that as the default then it open correct. It seems that the mainWindow is corrupted but I do not know how to fix it.

In the design view of mainWindow, what happens if you change the “Default Location” in the Inspector, to something like “Parent Window”? Or at least something different than what you have already?

Same.
Once opened, I may select the point of the window right border and the drag the window dow so the bar title appears. It seems that the window opens behing the menu bar.

Weird.

Are saving your project in text format and have it under source-control of some kind? If you do, maybe you can rollback to an prior commit to help identify what happened to cause this. Or maybe you have a backup of previous version?

Yes, I’ve backups but I made many changes since last one, so for now, adding me.top = 45 it works
One think I will try tomorrow is, create a clean window and then copy all objects, properties, from the old window to the new.

I never did it, I do not know how is done, I should read the language reference,

on macOS ?
it likes to save the positions of windows for you and restore them :stuck_out_tongue:
I find it to be a real pain in the ass most times

I believe you need a Xojo “Pro” license to permit saving a project to the text format. But if you have that, it is as simple as File > Save As… > then choose “Xojo Project”, like in this screenshot:

But…, before doing that, I would recommend setting up a source-control system and designate a new folder where to keep your source code in and hook that folder up to a “Repository”.

I use GitHub, where you can sign up for free “private” repositories where no one can get access to your code but you. I then use the GitHub Desktop application (also free) to manage my local code and commit (save to the remote repository). There are more sophisticated source-control systems out there, but GitHub is pretty straight-forward and will take care of 90% of your needs.

The benefits of having your project under source-control management, event if you work alone, are numerous, but here are the highlights.

  • Having a clear record of the changes you made.
  • Go back to earlier versions more easily when you run into trouble like this.
  • Move the latest copies of your code between computers, like for Windows vs. macOS testing (just install GitHub Desktop on both computers).
  • You have an off-site back up of your project, in the case of some unforeseen disaster where you loose the use of your computer(s).

Note: Even if you don’t have a Xojo Pro license, and you are limited to only saving in binary format, you can still use source-control - you just won’t be able to see that actual changes in your code, but you still gain the other benefits.

Just remember to commit often, like several times a day. I do :slight_smile:

Getting Started with GitHub

I hope that helps.

[quote=466868:@Norman Palardy]on macOS ?
it likes to save the positions of windows for you and restore them :stuck_out_tongue:
I find it to be a real pain in the ass most times[/quote]
I’ve seen macOS do that for Finder windows, but I never knew it did that for other applications. If it does, it sure does a poor job of it.

So maybe in Enric’s case, that information got corrupted and not his project?

@Enric Herrera, if you move a copy of your project to another Mac (or even a Windows computer), does it still do the same thing?

I don’t mean to hijack this thread but Scott…

Your screenshot - what is that? Is that the MAC version? My windows version doens’t have anything like that. No “New Folder”, no “Format”, no “Cancel/Save”. I have a paid Pro version. What gives?

[quote=466874:@Peter Greulich]I don’t mean to hijack this thread but Scott…

Your screenshot - what is that? Is that the MAC version? My windows version doens’t have anything like that. No “New Folder”, no “Format”, no “Cancel/Save”. I have a paid Pro version. What gives?[/quote]
Did you do a “Save as …” ?

That’s exactly what my window (above) is showing. See the dialog?

If I click yes, I get this:

Could there be a corrupt preference for your app in ~/Library/Preferences/? Look for the bundle ID as a plist in that folder.

You might also try creating a new user account and trying from there.

In your case Peter, you have 2019r2.1 and when you do a File > Save As…, in a project that was previously created in an earlier version of Xojo - that dialog is asking whether you want to upgrade to higher version, a.k.a., API 2.0. Doing so will prevent you from opening your project in earlier versions of Xojo in the future (I believe).

You have to click “Yes” to then get to the Save dialog, which would look like the following, on Windows:

If you don’t see this option, then check your licensing in the Xojo About box or contact hello@xojo.com

I hope that helps.