xMask - A Masked Edit Gadget

Developed or developing a new product in PureBasic? Tell the world about it.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Re: xMask - A Masked Edit Gadget

Post 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?
When all is said and done, more is said than done.
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Re: xMask - A Masked Edit Gadget

Post 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
"Have you tried turning it off and on again ?"
A little PureBasic review
ASI
New User
New User
Posts: 5
Joined: Thu Sep 12, 2013 4:07 pm

Re: xMask - A Masked Edit Gadget

Post 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.
normeus
Enthusiast
Enthusiast
Posts: 470
Joined: Fri Apr 20, 2012 8:09 pm
Contact:

Re: xMask - A Masked Edit Gadget

Post 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.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
Post Reply