Page 1 of 1

PB6.10 B8 x64 @DropCallback() mismatch

Posted: Wed Mar 13, 2024 7:40 pm
by HeX0R

Code: Select all

Procedure DropCallback(Handle, Status, Format, Action, x, y)
	ProcedureReturn #True
EndProcedure

OpenWindow(0, 0, 0, 300, 300, "D&D", #PB_Window_SystemMenu)
EditorGadget(0, 5, 5, 290, 290)

EnableGadgetDrop(0, #PB_Drop_Files, #PB_Drag_Copy)
SetDropCallback(@DropCallback())

Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
Results in:
[ERROR] SetDropCallback(): The Procedure specified in '@DropCallback()' does not have the required argument or returntype.
Happens in both x64 compilers, the two x86 compilers work fine.

Re: PB6.10 B8 x64 @DropCallback() mismatch

Posted: Wed Mar 13, 2024 7:53 pm
by fryquez
Using longs, it works.

Code: Select all

Procedure DropCallback(Handle, Status.l, Format.l, Action.l, x.l, y.l)
	ProcedureReturn #True
EndProcedure

Re: PB6.10 B8 x64 @DropCallback() mismatch

Posted: Wed Mar 13, 2024 7:56 pm
by Fred
Yes callbacks check are now stricter in 6.10. it should perfectly match the doc definition (before we allowed integer where long were needed but it could be issues with this)

Re: PB6.10 B8 x64 @DropCallback() mismatch

Posted: Wed Mar 13, 2024 8:08 pm
by HeX0R
o.k. thanks!
It's pretty difficult to test new beta versions, when the help files keep outdated.

I even looked into the DragDrop.txt before creating the bug report, and there it is still:

Code: Select all

Procedure DropCallback(TargetHandle, State, Format, Action, x, y)

Re: PB6.10 B8 x64 @DropCallback() mismatch

Posted: Thu Mar 14, 2024 10:26 am
by Fred
You're right, the doc is currently shared edited on SVN before being merged to GIT before the release which is not ideal (but using GIT isn't straight forward for doc editors so we leave it that way for now).