Found an issue in SpiderBasic ? Please report it here !
DanLJr
 
Posts: 45
Joined: Wed Jul 04, 2018 4:24 am

Normal Webpage not MDI How?

by DanLJr Fri Jul 06, 2018 1:25 pm

Peter wrote:
DanLJr wrote:
Code: Select all
If OpenWindow(#PB_Any, #PB_Ignore, #PB_Ignore, 600, 600, "Window Is Supposed To Be Background. Why Is It Not?", #PB_Ignore, #PB_Window_Background)

Code: Select all
If OpenWindow(#PB_Any, #PB_Ignore, #PB_Ignore, 600, 600, "Window Is Supposed To Be Background. Why Is It Not?", #PB_Window_Background)


Greetings ... Peter


Thanks, Peter, but now I'm really confused. Is the documentation wrong? There is supposed to be a WindowID argument passed between Title$ and Flags, according to the SB help file! Here is a copy/paste of the help documentation that I'm following:

#Window A number to identify the new window. #PB_Any can be used to auto-generate this number.
x, y The initial position of the window, in pixels (unless one of the center flags is used). If 'x' or 'y' is set to #PB_Ignore, the OS will choose a position for the window.
InnerWidth, InnerHeight The required client area, in pixels (without borders and window decorations).
Title$ The title of the newly created window.
ParentWindowID (optional) The WindowID the new window belongs to. 'ParentWindowID' value can be easily obtained with WindowID().
Flags (optional) Can be a combination of the following values:
#PB_Window_SystemMenu : Enables the system menu on the window title bar (default).
#PB_Window_Background : The window doesn't have a frame and is put in the web browser background. It can only have one window
with the background flag opened at the same time. This window will be automatically resized when the
web browser is resized.
#PB_Window_SizeGadget : Adds the sizeable feature to a window.
#PB_Window_Invisible : Creates the window but don't display.
#PB_Window_TitleBar : Creates a window with a titlebar.
#PB_Window_BorderLess : Creates a window without any borders.
#PB_Window_ScreenCentered: Centers the window in the middle of the screen. x,y parameters are ignored.
#PB_Window_WindowCentered: Centers the window in the middle of the parent window ('ParentWindowID' must be specified).
x,y parameters are ignored.
#PB_Window_NoActivate : Don't activate the window after opening.
Return value

Nonzero if the window was successfully created, zero otherwise. If #PB_Any was used for the #Window parameter then the generated number is returned on success.

-------------

I think I found it... Note that the top it shows:

Syntax

Result = OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]])
Description
Opens a new window according to the specified parameters. The new window becomes the active window, it's not needed to use SetActiveWindow() (unless the window is created as invisible).

-------------

Now I see it! Looks like the ParentWindowID is the LAST argument, however in the detailed description (copied/pasted above), below the syntax section in help, it appears that WindowID is BEFORE the Flags... re-reading the Syntax descriptor at the top it is not... but that's VERY confusing and the documentation/help should be corrected so that it is in consistent order in both places. (I looked at it like 20 times and never saw the difference until comparing with your corrected code. Why are the descriptions out of order from the syntax itself?)

Anyhow, thanks Peter, and on to the next experiment/challenge!!!
User avatar
Peter
 
Posts: 576
Joined: Mon Feb 24, 2014 10:17 pm
Location: 127.0.0.1

Re: Normal Webpage not MDI How?

by Peter Fri Jul 06, 2018 2:58 pm

yes, you're right.

The Syntax-Description is correct.

The Parameters-Description is in the wrong order.

https://www.spiderbasic.com/documentation/window/openwindow.html

Greetings ... Peter
DanLJr
 
Posts: 45
Joined: Wed Jul 04, 2018 4:24 am

Re: Normal Webpage not MDI How?

by DanLJr Fri Jul 06, 2018 7:52 pm

Peter wrote:yes, you're right.

The Syntax-Description is correct.

The Parameters-Description is in the wrong order.

https://www.spiderbasic.com/documentation/window/openwindow.html

Greetings ... Peter


Thanks Peter! At least now I know I'm not crazy. :D

I'll just confirm with the 'syntax area' in the docs from now on and not trust the order of the detailed documentation. No biggie.

(I did find what I THINK is a bug??? Other thread: viewtopic.php?f=11&t=1527 , if interested in taking a look...)
Fred
Site Admin
 
Posts: 1130
Joined: Mon Feb 24, 2014 10:51 am

Re: Normal Webpage not MDI How?

by Fred Tue Jan 15, 2019 10:04 am

Moved to bug report
Return to Bugs Reports

Who is online

Users browsing this forum: No registered users and 1 guest