New Window

I see this code in a sample application.

win2 = new Window2(win1)

however when I put similar code in my application I get an error: Parameters are not compatible with this function
If I change it as follows I get no compile error:

win2 = new Window2

I can not find anything in the documentation which explain what the (win1) does.

Help Please?

Window2 most likely has a constructor added that takes a window as a parameter

You have to look in the sample app to see how Window2 is defined, specifically the Constructor.

Thank.
This passes a parameter to Win2, in this case a custom control. Yes?

It looks like a window, but I can’t tell from what you’ve posted.

Yes, it’s a window. A ‘Search’ window which searches a field in the ‘calling’ window.

[quote=79638:@James A Smith]
I can not find anything in the documentation which explain what the (win1) does.
Help Please?[/quote]
Any time you see a line like
something = NEW whatever
thats a tip off that you’re probably interested in a CONSTRUCTOR in that class

See User Guide Fundamentals - Constructors & Destructors

Thanks guys.

That was a big jump in my knowledge of ‘not so basic’ Xojo!