Re: mixing of varchar and text functionality
Posted in 1993
On Apr 19, 10:36am, Jonathan Leffler wrote: } Subject: Re: mixing of varchar and text functionality }>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 ('!') Stuff Deleted The problem with this is that input will not allow the on key "!". The cleanest solution is to use a function/control key. If you must use a ! then I think you will probably have to use a 1 character autonext field just before your varchar field. And then test the value entered in this field for a ! and then call your fire_up_editor function. } 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> }-- End of excerpt from Jonathan Leffler -- ----------------------------------------------------------------------------- Steve Weet - European Mis - Motorola Cellular Subscriber Group Beechgreen Court, Chineham, Basingstoke, HANTS England. Phone : +44 (0)256 790154 E-Mail stevew@chineham.euro.csg.mot.com Fax : +44 (0)256 817481 Mobile : +44 (0)850 335105 Post : w10075