cancel
Showing results for 
Search instead for 
Did you mean: 

GetActiveSheet() returns invalid after changing WindowType to mdidockhelp!

0 Kudos

Hi everyone,

I've changed the application's mdi window's WindowType property form "mdihelp!" to "mdidockhelp!" to make docking windows possible and after that mdi.GetActiveSheet() no longer return a valid window. The mdi is not null, which should mean that there is no active window.. Can you make a window active somehow?

mdi.GetFirstSheet() does return the window I want, but it's not a replacement to GetActiveSheet() as it will only get the same window every time.

I think I should mention that a window of WindowType "response!" might be involved in this mess, but I fail to see how it works with "mdihelp!" and not with "mdihelpdock!".

Do anyone have an idea as to why GetActiveSheet() stopped working?

Any help is much appreciated!

Best regards,

Martin

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Martin;

Yep, I agree. I think that this is a PB 12.6 bug. I would suggest that you open a ticket with SAP Support on this one as MDI<anything> should return the MDI_Child window that has focus.

Regards ... Chris

0 Kudos

Hi Chris!

I see I'll create a ticket, but couldn't the "response!" window be the cause? Isn't that invalid, with IsValid()?

Former Member
0 Kudos

1) I am not sure how a "response" window fits into this picture.

2) The IsValid ( ) method works on ALL classes!

0 Kudos

We open a window (let's call it X) in the mdi frame, inside the open event we open a "response" window (to determine the filter of the window X).

I have noticed that window X doesn't get focus at the point when the response window use mdi.GetActiveSheet(). If I manually click the window X GetActiveSheet() gets the reference to window X (which it wants)

Former Member
0 Kudos

    Hmmm ... still sounds like a bug to me as the GAS ( ) method should really (IMHO) only return a reference to an MDI_Child window - which is the PB MAIN Window type converted at instantiation time when an  OpenSheet ( ) method is used.

Former Member
0 Kudos

Let the open event to complete before opening your response window or post open the response window.