Re: mixing of varchar and text functionality
Posted in 1993
>From: uunet!thalatta.com!bossert (John Bossert) >Subject: mixing of varchar and text functionality >Date: 16 Apr 93 20:49:52 GMT >X-Informix-List-Id: <news.3066> > >Scenario: a scrolling form (timesheet) with an "activity description" field. >I'd like to be able to treat the field as a varchar (direct typing into the >field) if it's 65 characters or less, OR allow the user to hit "!" and fire up >emacs or vi if they want to type a thesis. > >Is there any (inelegant is fine) way to accomplish this? > >This is with OnLine 5.01 on a Sparc with 4GL 4.10 I haven't checked in the context of INPUT (but it works in MENU, so I think it'll be OK)... What's wrong with: INPUT blah, varcharstuff, someotherfield ON KEY ('!') CASE WHEN INFIELD(varcharstuff) CALL fire_up_editor() NEXT FIELD someotherfield OTHERWISE CALL beep() END CASE The fire_up_editor function is going to have to make arrangements to collect the current line of data, dump it to file, run the editor on the file, decide what to do with the resulting file (locate a blob in the file for subsequent use?), etc. Yours, Jonathan Leffler (johnl@obelix.informix.com) #include <disclaimer.h>