[PB400] Please keep PB WinAPI compatible !

Everything else that doesn't fall into one of the other PB categories.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

[PB400] Please keep PB WinAPI compatible !

Post by gnozal »

Freak wrote:You can no longer use the lParam field of the LVITEM structure for your own data.
Sorry for this post, but I think it is very important. Please keep PB WinAPI compatible. I can understand it's for multiplatform compatibility, but I suppose 99% of PB users code for Windows. Purebasic will be the only not WinAPI compatible compiler ...

What do the professionnal coders think about it ?
viewtopic.php?t=19112&start=15
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

explain the context as i do not see the problem

quick check on msdn shows that it's a windows structure, with a field that could be modified depending on the needs of the user

if fred's using it to set certain attributes / aspects of the gadget, he's doing that the proper way, perhaps he needed it for some of the changes / new gadget commands, dunno

again, i probably don't understand :-) so go easy on me... :-)
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Why the complaining?
added : SetGadgetData(#Gadget, Value) - associate a value with the Gadget (works for all Gadgets.)
added : GetGadgetData(#Gadget) - read the associated value
That's not only easier, shorter and more transparent, but also compatible to future versions on other platforms.
<°)))o><²³
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post by PB »

Is SetGadgetData/GetGadgetData like Tags in Visual Basic? Cool, if so! :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Fred
Administrator
Administrator
Posts: 18351
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

There is also a Get/SetGadgetItemData() especially for this. I'm sorry but we can't improve the commandset if we have to deal with all the API codes floating around. How would you do a Set/GetGadgetItemData() command then (which seems quite important to me to attach a particluar data to each item) ?
freak
PureBasic Team
PureBasic Team
Posts: 5948
Joined: Fri Apr 25, 2003 5:21 pm
Location: Germany

Post by freak »

> Purebasic will be the only not WinAPI compatible compiler ...

You are way overreacting here. Just because you don't have this one value field
at your disposal anymore does not mean PB is incompatible with the WinAPI.
quidquid Latine dictum sit altum videtur
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

The compiler is as 100% api compatable as it ever was.

There is nothing to stop you creating your own windows directly with the Win32 api.

This restriction only applies to the Gadget library.
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

Now I get it. Subclassing is no longer possible. This is a major issue! I've created a separate, specific thread since there is so much confusion here.

viewtopic.php?p=123859
User avatar
GedB
Addict
Addict
Posts: 1313
Joined: Fri May 16, 2003 3:47 pm
Location: England
Contact:

Post by GedB »

No, my mistake. Tied myself in a knot :?
User avatar
blueznl
PureBasic Expert
PureBasic Expert
Posts: 6172
Joined: Sat May 17, 2003 11:31 am
Contact:

Post by blueznl »

then all you will have to worry about is that it's not a gordian one, and alexander is passing by...
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB - upgrade incoming...)
( The path to enlightenment and the PureBasic Survival Guide right here... )
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

ROFL! :lol:




That one came right out of the blue(znl) and floored me!
@}--`--,-- A rose by any other name ..
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

Sorry if I got a bit emotional :oops:
I suppose I got angry because some valid code no longer worked without any documented reason.
If I can reliably replace SendMessage() and #LVM_GET/SETITEM by Get/SetGadgetItemData(), I guess it's ok ...

PS :
Freak wrote:PB uses this value for performance reasons. It speeds up stuff like the coloring a lot. btw, the TreeGadget has used this value since it existed in PB.
Well, now I understand some issues I had with TreeGadgets ... Some information about PB's internals would be usefull, I believe.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Post Reply