Page 1 of 2

4.6 vs 4.5

Posted: Wed May 04, 2011 9:51 pm
by jassing
Is there a list of what 4.6 will break, fix, add, change?
Can we expect userlibs to be incompatible?

Re: 4.6 vs 4.5

Posted: Wed May 04, 2011 9:59 pm
by ts-soft
jassing wrote:Can we expect userlibs to be incompatible?
Yes, most tailbited userlibs a incompatible. for example the new optional Parameter FindString breaks many libs.

Re: 4.6 vs 4.5

Posted: Wed May 04, 2011 10:37 pm
by MachineCode
Userlibs usually break with every update. I wish it weren't so.

Re: 4.6 vs 4.5

Posted: Thu May 05, 2011 2:42 am
by netmaestro
Userlibs usually break with every update. I wish it weren't so.
I've always found it slightly odd that the production of a user library isn't a selectable output choice in the compiler options, native to Purebasic and maintained by the team. It's certainly popular enough to warrant such, imho. Maybe someday.. :mrgreen:

Re: 4.6 vs 4.5

Posted: Thu May 05, 2011 11:30 am
by Michael Vogel
MachineCode wrote:Userlibs usually break with every update. I wish it weren't so.
You're right, these (tiny) issues are the reason, why I try to ignore all user libs, if possible.

I understand, that a small developer team can't maintain tons of libraries and user defined functions -- but I still hope, that commonly used/needed functions will be implemented into standard libraries somewhen in the future. This may be possible for easy integer functions (like Minimum, Maximum) or even for OS/HW depended things (set user level, get CPU load etc.)

Re: 4.6 vs 4.5

Posted: Wed May 11, 2011 4:00 pm
by jassing
ts-soft wrote:
jassing wrote:Can we expect userlibs to be incompatible?
Yes, most tailbited userlibs a incompatible. for example the new optional Parameter FindString breaks many libs.
what about purebasic functions? A lot of examples on the forums do not compile because functions changed/removed

Re: 4.6 vs 4.5

Posted: Wed May 11, 2011 4:06 pm
by jassing
Michael Vogel wrote:these (tiny) issues are the reason, why I try to ignore all user libs, if possible.
I'm learning this -- it's unfortunate that people release userlibs and then abandon them it's one reason I won't even pay for userlibs -- I'll pay for source, but not userlibs...
Michael Vogel wrote:I understand, that a small developer team can't maintain tons of libraries and user defined functions -- but I still hope, that commonly used/needed functions will be implemented into standard libraries somewhen in the future. This may be possible for easy integer functions (like Minimum, Maximum) or even for OS/HW depended things (set user level, get CPU load etc.)
Other languages seem to handle upgrades a bit more gracefully allowing addons still to work.. I guess the key wiht purebasic is to ignore userlibs and use lib or obj files and link them in...

Re: 4.6 vs 4.5

Posted: Wed May 11, 2011 10:14 pm
by MachineCode
Apparently you can convert a userlib into a DLL, and then that lib will be compatible with future PureBasic versions, as DLLs don't "age". It wasn't explained how to do it, however. Maybe someone here could write a converter? I imagine it just wraps each userlib command with a DLL equivalent?

(Also, maybe a mod could edit this topic's subject?).

Re: 4.6 vs 4.5 or How to convert userlib to DLL/LIB?

Posted: Wed May 11, 2011 11:08 pm
by jassing
MachineCode wrote:It wasn't explained how to do it, however. Maybe someone here could write a converter?
+1 for that...
MachineCode wrote:(Also, maybe a mod could edit this topic's subject?).
to what?

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 1:52 am
by ricardo
Yes, its strange that almost every new version of PB is not fully compatible with recent code. Its a very strange strategy. This forum is full of code that now is almost useless.
I don't understand the point.

I know that code can be adapted to new version, but its not always easy to find and understand quickly which is the new name of the function or how is the new syntaxis needed. Takes sometime to get used to new changes... until new version ads more and more and more changes... Really don't understand the point.

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 3:43 am
by skywalk
ricardo wrote:Takes sometime to get used to new changes... until new version ads more and more and more changes... Really don't understand the point.
Progress :idea:

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 5:37 am
by sphinx
skywalk wrote:
ricardo wrote:Takes sometime to get used to new changes... until new version ads more and more and more changes... Really don't understand the point.
Progress :idea:
Progress does not mean spoiling old 'Things', it should enhance or at least allow you to use it the old way of doing things - OR -have the option to use the new one in future projects without breaking old ones.

I see this a good point for PowerBasic although I use and prefer PureBasic over PowerBasic.

Well, this is only my thoughts and may be I am wrong!

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 8:08 am
by dige
For those who use the editable ComboBoxGadget().

The EventType() seems to changed with v4.6
from 5 (?) to 768 (#PB_EventType_Change).

This is very important, for the event handling of keystrokes.

Code: Select all

  Debug "#PB_EventType_LeftClick = " + Str(#PB_EventType_LeftClick)
  Debug "#PB_EventType_RightClick = " + Str(#PB_EventType_RightClick)
  Debug "#PB_EventType_LeftDoubleClick = " + Str(#PB_EventType_LeftDoubleClick)
  Debug "#PB_EventType_RightDoubleClick = " + Str(#PB_EventType_RightDoubleClick)
  Debug "#PB_EventType_Focus = " + Str(#PB_EventType_Focus)
  Debug "#PB_EventType_LostFocus = " + Str(#PB_EventType_LostFocus)
  Debug "#PB_EventType_Change = " + Str(#PB_EventType_Change)
  
  If OpenWindow(0, 0, 0, 270, 180, "ComboBoxGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
    ComboBoxGadget(0, 10, 10, 250, 21, #PB_ComboBox_Editable)
    AddGadgetItem(0, -1, "Type some text here...")
    SetGadgetState(0, 0)
    
    Repeat
      Event = WaitWindowEvent()
      
      If Event = #PB_Event_Gadget
        Select EventGadget()
          Case 0 ; PB_ComboBox_Editable
            Debug EventType()
            ; PB 4.5 EventType() = 5
            ; PB 4.6 EventType() = #PB_EventType_Change 
        EndSelect
      EndIf
    
    Until Event = #PB_Event_CloseWindow
  EndIf
  

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 8:26 am
by jassing
I can understand changing a parameter to a function if it adds functionality -- but this sort of change is really atrocious.... what could be the justification for this?

Re: 4.6 vs 4.5

Posted: Thu May 12, 2011 9:08 am
by Rings
constants for values or types should never be used
with its number.