Page 4 of 4
Re: xMask - A Masked Edit Gadget
Posted: Sat Mar 30, 2013 1:17 am
by DevilDog
Has anyone tried this code with version 5.10 x64?
I get a compile error in line 43:
"Procedure InsertCharacter(*HoldText.i, Index.i, Character.c)"
the error is "Native types can't be used with pointers"
Any ideas?
Re: xMask - A Masked Edit Gadget
Posted: Sat Mar 30, 2013 1:24 am
by luis
DevilDog wrote:
the error is "Native types can't be used with pointers"
Any ideas?
Yes, insert that string in the forum search ->
http://www.purebasic.fr/english/search. ... mit=Search
Re: xMask - A Masked Edit Gadget
Posted: Thu Sep 12, 2013 4:09 pm
by ASI
I have used this file in my program quite a lot. (THANKS!!!)
Now with 5.10 i had similar problem of the error.
i was a little confused with what had to change, but done and fixed now.
I can upload the fixed code if anyone requires it.
Re: xMask - A Masked Edit Gadget
Posted: Mon Dec 02, 2013 11:30 pm
by normeus
to fix the error "Native types can't be used with pointers" which you'll get for PB 5.11
first an explanation
from PB Help
As a consequence the type of a pointer depends of the CPU address mode, (‘long' on 32-bit CPU and ‘quad' on 64-bit one for example), so a pointer is a variable of type pointer.
It results from this that assigning a native type to a pointer (*Pointer.l, *Pointer.b ...) makes no sense.
now for the fix:
line 43 replace this:
Code: Select all
Procedure InsertCharacter(*HoldText.i, Index.i, Character.c)
with this:
Code: Select all
Procedure InsertCharacter(*HoldText, Index.i, Character.c)
the pointer "*HoldText" is not defined as integer anymore.
line 248 replace this:
Code: Select all
Procedure.c _xm_ReturnCharacter(List xMask.__s_xMask_Main(), Character.c, *Index.i, UsingPlaceholder.b = #False)
with this:
Code: Select all
Procedure.c _xm_ReturnCharacter(List xMask.__s_xMask_Main(), Character.c, *Index, UsingPlaceholder.b = #False)
the pointer "*Index" is not defined as integer anymore.
Norm.