DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Webarion
User
User
Posts: 43
Joined: Tue Sep 14, 2021 8:50 pm

DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

Post by Webarion »

In the code:

Code: Select all

  Procedure.i DestroyTrackWindow(Window.i)
    ; Remove Window from the ActiveWindows map, release the allocated memory,
    ; close the window and set the quit flag, if appropriate.
    Shared EventQuit, ActiveWindows()
    Protected *ThisData.DATEWINDOW <---
    ...
Perhaps this should be: .TRACKWINDOW
User avatar
mk-soft
Always Here
Always Here
Posts: 6588
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

Post by mk-soft »

You're wrong with your question here.

Source of the code not specified and (after searching for it) the code not copied correctly and completely with structures.

No Bug
My Projects EventDesigner V3 / ThreadToGUI / OOP-BaseClass / Windows: Module ActiveScript
PB v3.30 / v5.75 - OS Mac Mini - VM Window Pro / Linux Ubuntu
Downloads on my OneDrive
Webarion
User
User
Posts: 43
Joined: Tue Sep 14, 2021 8:50 pm

Re: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

Post by Webarion »

mk-soft wrote: Fri Feb 13, 2026 9:45 am You're wrong with your question here.

Source of the code not specified and (after searching for it) the code not copied correctly and completely with structures.

No Bug
Yes, this is a question about the code in the documentation:
https://www.purebasic.com/documentation ... _any2.html
I understand that TRACKWINDOW and DATEWINDOW are the same size and this will not cause an error, however I believe it is logically incorrect when creating a TRACKWINDOW in CreateTrackWindow() to free the DATEWINDOW in DestroyTrackWindow(Window.i). This creates confusion, which is why I didn't realize it at first when translating and analyzing it. The question is closed.
User avatar
spikey
Addict
Addict
Posts: 809
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: DestroyTrackWindow() in UserGuide code. Pointer type mismatch?

Post by spikey »

Webarion wrote: Fri Feb 13, 2026 2:25 am Perhaps this should be: .TRACKWINDOW
Yes, you are correct, it should be TRACKWINDOW. It's a "copy/paste/fail to update" error on my part.

It does prove that it's extremely difficult to proofread your own work fully!

Proposed fix in PR#349.
Post Reply