Re: Invalid conversion error when using TEXT datatype in INPUT

wh <[email protected]>
Newsgroups gmane.comp.lang.4gl.aubit.general
Message-ID <[email protected]>
Hello Mike,

in TUI mode there is one more little bug (I think):
When you start an external text editor with ! in a blob field, change 
the content, save & exit, the the content of the form field is not 
updated. I'm not sure what the original Informix behaviour is, but AFAIK 
the field content is updated after the end of the external-editor.

the datatype-conversion bug still exists in the XML UI. Can you give me 
a hint where this conversion take place? I'm a bit lost in the aubit 
sources :-)




> 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 [1] (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
>> [2]
>> _______________________________________________
>> Aubit4gl-discuss mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/aubit4gl-discuss [3]
> 
> 
> 
> Links:
> ------
> [1] http://aubit.com
> [2]
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&amp;iu=/4140/ostg.clktrk
> [3] 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

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.