1. Bug in Euphoria?
- Posted by Thomas Oct 19, 2021
- 986 views
Hi, Can someone with a better knowledge of euphoria look at this code.
without warning include win32lib.ew include xcontrols.ew constant WS = {WS_CHILD,WS_VISIBLE}, WS_EX = WS_EX_CLIENTEDGE, Win = createEx(Window, "default", 0, Default, Default, 600, 600, 0, WS_CLIPCHILDREN), StatBar = createEx(StatusBar, "", Win, 0, {.35,-1}, 0, 0, 0, 0), LeftPane = createEx(Window, "", Win, 0, 0, 0, 0, WS, WS_EX), RightPane = createEx(Window, "", Win, 0, 0, 0, 0, WS, WS_EX), VSplit1 = createEx(VSplitter, "", Win, 0.33, 0, 0, 0, 0, 0), $ manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge,) /* Look like a bug */ manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win) setMousePointer(VSplit1, SizeWEPointer) /* -- */ procedure Win_onOpen(integer self, integer event, sequence params) -- end procedure setHandler(Win, w32HOpen, routine_id("Win_onOpen")) procedure Win_onClose(integer self, integer event, sequence params) -- end procedure setHandler(Win, w32HClose, routine_id("Win_onClose")) procedure Win_onTimer(integer self, integer event, sequence params) -- end procedure -- setHandler(Win, w32HTimer, routine_id("Win_onTimer")) -- procedure Win_onResize(integer self, integer event, sequence params) -- end procedure -- setHandler(Win, w32HResize, routine_id("Win_onResize")) procedure Win_onEvent(integer self, integer event, sequence params) -- end procedure -- setHandler(Win, w32HEvent, routine_id("Win_onEvent")) WinMain(Win, Normal)
Euphoria Interpreter v4.1.0 development 32-bit Windows, Using System Memory Revision Date: 2015-02-02 14:18:53, Id: 6300:57179171dbed Euphoria Interpreter v4.1.0 development 32-bit Windows, Using System Memory Revision Date: 2021-03-10 18:49:25 Id: 99dff754918b9f66267b631d9c0be1d63c256d87
2. Re: Bug in Euphoria?
- Posted by ghaberek (admin) Oct 19, 2021
- 953 views
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge,) /* Look like a bug */ manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
Are you talking about the trailing comma there? There could be a default parameter value. Track down the declaration of manage() and see what parameters it takes.
You could also try adding a question mark ? after the comma, which is the explicit way of saying "please use the default value here." (Just using commas would be the "implicit" way.)
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge, ?)
If this is a bug, then that should kick the interpreter into saying something like "procedure 'manage()' only accepts six parameters."
Also, which versions of Win32Lib and xControls are you using and where did you get them?
-Greg
3. Re: Bug in Euphoria?
- Posted by Thomas Oct 19, 2021
- 960 views
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge,) /* Look like a bug */ manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
Are you talking about the trailing comma there? There could be a default parameter value. Track down the declaration of manage() and see what parameters it takes.
You could also try adding a question mark ? after the comma, which is the explicit way of saying "please use the default value here." (Just using commas would be the "implicit" way.)
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge, ?)
If this is a bug, then that should kick the interpreter into saying something like "procedure 'manage()' only accepts six parameters."
Also, which versions of Win32Lib and xControls are you using and where did you get them?
-Greg
Hi Sorry it had slipped my brain to mention
xControls : version v2.0.6 Geometry.ew global procedure manage( integer pParent, integer pControl, object pX1, object pY1, object pX2, object pY2 )
Win32Lib : version 0.70 Patch#20, 13-Nov-2010
4. Re: Bug in Euphoria?
- Posted by Bhupen1277 Oct 19, 2021
- 938 views
The following code has a bug
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge,) manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
In my opinion, It should be
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge), (Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
Or it could be
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge) manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
5. Re: Bug in Euphoria?
- Posted by Thomas Oct 19, 2021
- 920 views
The following code has a bug
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge,) manage(Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
In my opinion, It should be
manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge), (Win, RightPane, {VSplit1, 0}, w32Edge, w32Edge, w32Edge) manage_now(Win)
<0117>:: Not expecting to see '''' here manage(Win, LeftPane, w32Edge, w32Edge, {VSplit1, 0}, w32Edge),You have tested the code?
To : ghaberek - I assumed that as it was old code assignment was not used e.g. myfunc(object somevar="?")