Window Class

I got a question here

Why if I insert a new class in my project, and then set its Super to ‘Window’ its properties (and the window itself) don’t show up in the IDE as If I had just inserted a new window ?

So when I go to menu Insert -> Window the IDE creates a new instance of a window ?

I have notices the difference just now, and I am just trying to understand the differences (and implications) between one and the other

ok. got it.

But can you imagine a situation where you would not want a window added to the active objects ?

The example you gave can also be done with a inserted window via Insert-> Window, so I still don’t see clearly the use of creating a class with its superclass = window

What am I missing ?

I had thought there were other differences.
Thanks, Dave.

I’m always amazed at how completely two people can talk past each other. Have been noting it several times on this forum in the last few weeks.

Dave, Roman was asking about the IDE. Why there is a difference in how THE IDE treats window creation.

Roman, the IDE is an app, and what you perceive as an inserted “window” is not really a window, just a representation of one (like in a drawing program where you can insert boxes, circles, text etc). For example you can’t minimize the “window”. So think of the IDE more of like a graphics app. Now if you insert a “window” then it’s presentation has been set up to show its properties in the property pane. And if you run your project, then the project settings are converted into creating an actual window. But if you add a class and set its super to Window then the IDE is not set up to do all that for you (even though you’ll see all the window properties selected if you choose Inspector behaviour from the class context menu). It is simply not in the code. It doesn’t add the class window to its internal list of windows that the app recognizes. Should it be? Maybe. I would even say probably. But as for most questions, Xojo has more pressing matters to deal with …

[quote=380828:@Dave S]for an INSERTED window, you don’t need “dim w as new myNewWindow”
the instance is created for you…[/quote]

P.S. Sorry, that answer is completely off the mark. Auto-initiation has nothing to do with the question, and can be turned off for the default window, in which case you’d still need to dim a new window.

The answer is simply that the IDE has not been written to deal with Roman’s scenario. It could do it if that was desired, but it is unnecessary as a perfectly fine method for inserting windows exists.

ok. Markus, your reply helped a lot to better understand the situation !!

I don’t get why Dave deleted his messages… anyway, thanks