Page 1 of 1
[PB400] Please keep PB WinAPI compatible !
Posted: Sun Feb 05, 2006 10:43 am
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
Posted: Sun Feb 05, 2006 12:06 pm
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...

Posted: Sun Feb 05, 2006 1:30 pm
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.
Posted: Sun Feb 05, 2006 1:32 pm
by PB
Is SetGadgetData/GetGadgetData like Tags in Visual Basic? Cool, if so!

Posted: Sun Feb 05, 2006 1:55 pm
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) ?
Posted: Sun Feb 05, 2006 1:57 pm
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.
Posted: Sun Feb 05, 2006 4:16 pm
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.
Posted: Sun Feb 05, 2006 5:10 pm
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
Posted: Sun Feb 05, 2006 5:52 pm
by GedB
No, my mistake. Tied myself in a knot

Posted: Sun Feb 05, 2006 5:58 pm
by blueznl
then all you will have to worry about is that it's not a gordian one, and alexander is passing by...
Posted: Sun Feb 05, 2006 6:01 pm
by Dare2
ROFL!
That one came right out of the blue(znl) and floored me!
Posted: Mon Feb 06, 2006 9:06 am
by gnozal
Sorry if I got a bit emotional

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.