Alaska Software Inc. - Help with replace numeric XbpSLE
Username: Password:
AuthorTopic: Help with replace numeric XbpSLE
RIBO SALAMANCAHelp with replace numeric XbpSLE
on Tue, 12 May 2009 16:25:24 -0500
Hello all

I am clogged, 
have a field called TARIF numerical type and to updated the record, 
METHOD NewFormTar:writeData() 
   FIELD -> TARIF: =:: TARIF:XbpSle:getData() 
   
   he says invalid data type for database field
   ,am sure that my XbpSle is a numerical type 

helps with this

Thank you
Ribo
Andreas Gehrs-Pahl
Re: Help with replace numeric XbpSLE
on Tue, 12 May 2009 19:25:46 -0400
Ribo,

>FIELD -> TARIF: =:: TARIF:XbpSle:getData()

>he says invalid data type for database field
>,am sure that my XbpSle is a numerical type 

XbpSLE:GetData() always returns a character string -- the contents of the
XbpSLE's Edit Buffer -- which is documented!

You could sub-class the XbpSLE and create your own class that returns a
numeric value -- or use an existing replacement, like XbpGet or SLEPic,
or any of the other available 3rd-party products -- or you could simply 
use the following:

Field->Tarif := val(::Tarif:XbpSLE:GetData())

-- Andreas

---                                                                      ---
  Andreas Gehrs-Pahl              E-Mail: GPahl@CharterMI.net
  415 Gute Street                     or: Andreas@DDPSoftware.com
  Owosso, MI 48867-4410               or: Andreas@Aerospace-History.net
  Tel: (989) 723-9927           Web Site: http://www.Aerospace-History.net
---                                                                      ---
James Loughner Re: Help with replace numeric XbpSLE
on Wed, 13 May 2009 13:36:15 -0400
My SLEPic class manages the get/set so that the type is preserved. ie if
you set it with a numeric value the get will return a numeric. Note the
editbuffer() method still returns value as a string. The SLEPic class is
a drop in replacement for XbpSLE class.

http://gogalthorp.com/splash

Jim

Andreas Gehrs-Pahl wrote:
> Ribo,
> 
>> FIELD -> TARIF: =:: TARIF:XbpSle:getData()
> 
>> he says invalid data type for database field
>> ,am sure that my XbpSle is a numerical type 
> 
> XbpSLE:GetData() always returns a character string -- the contents of the
> XbpSLE's Edit Buffer -- which is documented!
> 
> You could sub-class the XbpSLE and create your own class that returns a
> numeric value -- or use an existing replacement, like XbpGet or SLEPic,
> or any of the other available 3rd-party products -- or you could simply 
> use the following:
> 
> Field->Tarif := val(::Tarif:XbpSLE:GetData())
> 
> -- Andreas
> 
> ---                                                                      ---
>   Andreas Gehrs-Pahl              E-Mail: GPahl@CharterMI.net
>   415 Gute Street                     or: Andreas@DDPSoftware.com
>   Owosso, MI 48867-4410               or: Andreas@Aerospace-History.net
>   Tel: (989) 723-9927           Web Site: http://www.Aerospace-History.net
> ---                                                                      ---