Some beginner's questions
Posted: Thu Aug 12, 2021 6:53 pm
Hello,
I started PureBasic a year ago and of course consider myself still a beginner. Over time some questions popped up and I want to ask them now (I don't want to open a separate thread for each one):
1. Why does Define/Global/... use NewList/NewMap and Structure use List/Map? Wouldn't it be easier if both used the same keyword?
2. Reading in the forum it seems like #PB_EventType_RightClick was removed for buttons some time ago (or it never existed). I am used to use Windows APIs and can get the same behaviour with #WM_RBUTTONUP and it's not like it's hard to use. Anyway, thinking of portability (and also why not?), why is there not #PB_EventType_RightClick for buttons (and some other gadgets)? Also, I can only speak for Windows since I'm only using Windows.
3. Why is EnableExplicit not enabled by default? I for one am using it in every project (and it seems like everyone else does too) for obvious reasons. I only use DisableExplicit (not really, I just don't enable it) when I try a short piece of code from the forum or something similar. In my opinion EnableExplicit should be enabled by default.
4. Why is PureBasic not using the regular handles for gadgets/windows? Every other programming language i learned uses the handles (again, I only do Windows).
5. It looks like CEGUI is abandoned. So, from my point of view, wen don't need the Window3D library anymore. Or am I wrong?
6. OpenSubMenu() does not return anything and it doesn't get an ID (though Windows allows/needs that). With an ID I can disable/enable it afterwards and whatever. I guess there's no way beside using Windows API for creating a submenu with ID for later manipulation?
I started PureBasic a year ago and of course consider myself still a beginner. Over time some questions popped up and I want to ask them now (I don't want to open a separate thread for each one):
1. Why does Define/Global/... use NewList/NewMap and Structure use List/Map? Wouldn't it be easier if both used the same keyword?
2. Reading in the forum it seems like #PB_EventType_RightClick was removed for buttons some time ago (or it never existed). I am used to use Windows APIs and can get the same behaviour with #WM_RBUTTONUP and it's not like it's hard to use. Anyway, thinking of portability (and also why not?), why is there not #PB_EventType_RightClick for buttons (and some other gadgets)? Also, I can only speak for Windows since I'm only using Windows.
3. Why is EnableExplicit not enabled by default? I for one am using it in every project (and it seems like everyone else does too) for obvious reasons. I only use DisableExplicit (not really, I just don't enable it) when I try a short piece of code from the forum or something similar. In my opinion EnableExplicit should be enabled by default.
4. Why is PureBasic not using the regular handles for gadgets/windows? Every other programming language i learned uses the handles (again, I only do Windows).
5. It looks like CEGUI is abandoned. So, from my point of view, wen don't need the Window3D library anymore. Or am I wrong?
6. OpenSubMenu() does not return anything and it doesn't get an ID (though Windows allows/needs that). With an ID I can disable/enable it afterwards and whatever. I guess there's no way beside using Windows API for creating a submenu with ID for later manipulation?