# Window skips OPEN event

**URL:** <https://forum.xojo.com/t/window-skips-open-event/50422>\
**Category:** General\
**Created:** [September 28, 2019, 9:38pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422 "2019-09-28T21:38:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 9:38pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/1 "2019-09-28T21:38:05Z")

</div>

I have a window that is activated by the command

```auto
myWindow.showModal
```

in the action event of a button

myWindow is a “Modal Dialog”, and all of a sudden the OPEN event never fires. This is where various controls are enabled/disabled, visible/hidden etc based on what the current app status is.

I put a break point on the first line, and a few lines within the event and it never stops

What possibly could cause this to occur …

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [September 28, 2019, 9:51pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/2 "2019-09-28T21:51:46Z")

</div>

I’ve seen this in the past, pop a break in after the myWindow.showModal and see if it stops on the modal?

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:01pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/3 "2019-09-28T22:01:41Z")

</div>

No it doesn’t  
This window is called (shown) from 3 places… I placed a BREAK after each one.  
Those breaks never hit… even though the window shows  
There is a CANCEL button on the window which causes the window to close (self.close / return )  
there is a “SAVE” button… that "saves the data ; self.close / return )…but what happens here is the SAVE button vanishes, and the window stays… and it seems to freeze as the Cancel button now no longer works

What is strange is that a few days ago, this window worked perfectly, and hasn’t been changed since

I have also reduced the OPEN event to just “BREAK” and still nothing

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:12pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/4 "2019-09-28T22:12:51Z")

</div>

Oh… and the Constructor never fires either… not that I use it… but as a test I checked.

Activate however DOES

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:21pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/5 "2019-09-28T22:21:21Z")

</div>

well as a BAND-AID … i used a status flag and moved things to the ACTIVATE

But I would still love to know what possibly could cause this… it very annoying, and if I can keep it from happeneing in the future, that would be great

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [September 28, 2019, 10:29pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/6 "2019-09-28T22:29:55Z")

</div>

[quote=455764:@Dave S]Oh… and the Constructor never fires either… not that I use it… but as a test I checked.

Activate however DOES[/quote]  
Just out of curiosity, how are you initializing MyWindow? Did you turn on Implicit Instance recently?

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:33pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/7 "2019-09-28T22:33:27Z")

</div>

> [@455767:@Greg O'Lone](#):
>
> Did you turn on Implicit Instance recently?

is always on as default

same as all other windows in the app

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [September 28, 2019, 10:37pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/8 "2019-09-28T22:37:36Z")

</div>

[quote=455768:@Dave S]is always on as default

same as all other windows in the app[/quote]  
And if you turn that off and create one from scratch, do the constructor and open events fire then?

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:43pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/9 "2019-09-28T22:43:23Z")

</div>

really didn’t want to go thru an re-engineering effort, when it did and should work

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [September 28, 2019, 10:45pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/10 "2019-09-28T22:45:50Z")

</div>

> [@455770:@Dave S](#):
>
> really didn’t want to go thru an re-engineering effort, when it did and should work

I was only asking that you test it. In that same method where you call ShowModal, just Comment your current call and do this:

`Dim zzz as new MyWindow
Zzz.ShowModal`

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:46pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/11 "2019-09-28T22:46:20Z")

</div>

Ok… I’m in the Twilight Zone here now.  
There is a method that is being called… and I have a BREAKPOINT on EVERY SINGLE reference

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:53pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/12 "2019-09-28T22:53:13Z")

</div>

[quote=455771:@Greg O’Lone]I was only asking that you test it. In that same method where you call ShowModal, just Comment your current call and do this:

`Dim zzz as new MyWindow
Zzz.ShowModal`[/quote]

I replaced all the instances of

```auto
editWindow.showmodal
```

with

```auto
showEditWindow
```

and added

```auto
Public Sub showEditWindow()
  //editWINDOW.ShowModal
  Dim newWindow As NEW editWINDOW // had to add NEW
  newWindow.ShowModal
End Sub
```

and it still calls that one method taht is breakpointed

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [September 28, 2019, 10:56pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/13 "2019-09-28T22:56:51Z")

</div>

I’m really trying to drag this out of my memory here, I saw this helping someone over a year go. Maybe make sure you dont have a global property in your project somewhere that has the same name as myWindow

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 10:57pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/14 "2019-09-28T22:57:58Z")

</div>

> [@455774:@](#):
>
> you dont have a global property in your project somewhere that has the same name as myWindow

just checked… I don’t

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [September 28, 2019, 11:25pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/15 "2019-09-28T23:25:25Z")

</div>

Do you have doevents anywhere in your project?

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 11:31pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/16 "2019-09-28T23:31:07Z")

</div>

> [@455776:@](#):
>
> Do you have doevents anywhere in your project?

no

this is getting really wierd…

now is is ignoring “some” breakpoints.  
It I call this particular window… the app won’t quit (I checked there are no remaining open windows)  
but even so, I have to issue a close for the MAIN window specifically in the APP cancelClose

there is “something” strange here (play Twilight Zone theme)

---

<div class="post-metadata">

**Author:** ![anon20074439](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/ac8455/32.png) [@anon20074439](https://forum.xojo.com/u/anon20074439)\
**Post date:** [September 28, 2019, 11:38pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/17 "2019-09-28T23:38:31Z")

</div>

Do you want to zip it and send it over or screen share and walk through it?

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 11:44pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/18 "2019-09-28T23:44:27Z")

</div>

It is a very large app… and only on Mac right now…

FYI… it DOES CALL the proper events ON WINDOWS!

---

<div class="post-metadata">

**Author:** ![Rick\_Araujo](https://forum.xojo.com/user_avatar/forum.xojo.com/rick_araujo/32/251_2.png) [@Rick\_Araujo](https://forum.xojo.com/u/Rick_Araujo)\
**Post date:** [September 28, 2019, 11:51pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/19 "2019-09-28T23:51:59Z")

</div>

What Xojo version? Just out of curiosity and fear. 😃

---

<div class="post-metadata">

**Author:** ![DaveS](https://forum.xojo.com/letter_avatar_proxy/v4/letter/d/848f3c/32.png) [@DaveS](https://forum.xojo.com/u/DaveS)\
**Post date:** [September 28, 2019, 11:53pm UTC](https://forum.xojo.com/t/window-skips-open-event/50422/20 "2019-09-28T23:53:05Z")

</div>

2019r1.1 64bit

all tests seem to work just fine for Windows… for macOS not so much

But here is something … I tried macOS for 32bit and got an error that I did NOT get in 64bit

XOJCanvaas documentview] unrecognized selector set to instance 0x2013380

[Next page](https://forum.xojo.com/t/window-skips-open-event/50422.md?page=2)
