Re: Invalid conversion error when using TEXT datatype in INPUT
Mike Aubury <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.aubit.general |
|---|---|
| Message-ID | <CAGAq4WGe9GTS=76mOu-3YoOkqUQ6_TePemvNp9VQzS_7s5hYmA@mail.gmail.com> |
Hmm - I think there is a problem with validation check - its trying to
convert to a string so it can run some checks - but I'm really not sure it
needs to run those on blobs..
I've committed the change to CVS - if you can try that and let me know if
you're still having compilation issues - I can try to fix those too..
If you just want to make the change on your own local source - try adding
the "if" test in lib/libui/ui_curses/ioform.c :
int
A4GL_check_and_copy_field_to_data_area (struct s_form_dets *form,
struct struct_scr_field *fprop,
char *fld_data, char *data_area, int var_dtype)
{
int pprval;
int dsize;
// Add these 3 lines
if ((fprop->datatype & DTYPE_MASK) == DTYPE_BYTE || (fprop->datatype
&DTYPE_MASK) == DTYPE_TEXT) {
return 1;
}
and see how you get on..
On 9 November 2013 12:51, <[email protected]> wrote:
> Hello,
>
> when I use the INPUT statement with a TEXT datatype I get an "Invalid
> conversion" error after finishing the INPUT with the accept key.
>
> Here is a minimal example:
> t1.4gl:
> =====
> main
> define b1 text
> open window w1 with form "f1"
> locate b1 in file "/tmp/b1"
> input b1 without defaults from myblob
> close window w1
> end main
> =====
>
> f1.per:
> =====
> database formonly
> screen
> {
> [a ]
> }
> end
> attributes
> a = formonly.myblob type text;
> =====
>
> compile with
> 4glpc t1.4gl -o t1.4ae
> fcompile f1.per
>
> then run t1.4ae, press "!" to start DBEDIT, write some text, close edtor,
> finish INPUT with accept key:
> Err:Program ./t1.4ae stopped at 't1.4gl', line number 5.
> Error status number -30284.
> Invalid conversion.
> 4gl function call stack :
> MAIN
>
> I seams the the INPUT statement accepts the datatype TEXT but returns it
> als CHAR?
>
> see also the attached debug.out.gz
>
> I used version 1.2_34 from aubit.com (not the latest CVS version, had
> some problems to compile on my machine).
> System: ubuntu linux 13.10 64bit (compiler: gcc (Ubuntu/Linaro
> 4.8.1-10ubuntu8) 4.8.1).
> This happens with A4GL_UI=TUI and also with XML (ventas client).
>
>
> thanks for any help!
> Walter
>
>
> ------------------------------------------------------------------------------
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models.
> Explore
> techniques for threading, error checking, porting, and tuning. Get the most
> from the latest Intel processors and coprocessors. See abstracts and
> register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
> _______________________________________________
> Aubit4gl-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss
>
>
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Aubit4gl-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss