comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Updated CW_Field Replacements
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Updated CW_Field Replacements [message #18384] Sun, 02 January 2000 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Hi Folks,

Hope all of your computers survived the New Year! :-)

I kept waiting around for Struan to step into the breech
here and update my CW_FIELD replacement programs so that you
can specify the format of numbers in the field, but he must
have other things to do. :-)

So, anyway, since I found I needed this functionality
myself, I went ahead and figured something out (although
I'm not sure this is what Struan had in mind when he made
the request for number formats in the field). It turns
out that actually formatting the numbers with a FORMAT
statement (which was how I originally unsuccessfully
approached the problem) is problematic, for several
reasons, but probably closely related to lousy initial
design choices.

But since all I really needed for my application is
a way to specify the number of digits to the right of
the decimal point in floating numbers and the number
of total digits in an integer number, I implemented
the functionality with new DECIMAL and DIGITS keywords.

The programs (which, as you recall, were designed
to solve the problem of CW_FIELD input fields not looking
editable on Windows machines) can be found here:

http://www.dfanning.com/programs/coyote_field.pro
http://www.dfanning.com/programs/fsc_inputfield__define.pro

The first program is a "normal" compound widget and is
a drop-in replacement (with better functionality, obviously)
for CW_FIELD. The second program is the same as the first,
but written as an object compound widget to give people
some idea of how this is done.

Compiling either program will reveal an EXAMPLE program
at the bottom of the code that will exercise the program
functionality a bit for you, including this new formatting
functionality.

As always, I appreciate the feedback.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Previous Topic: IDL FAQ
Next Topic: Xinteranimate problem!!

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 03:13:22 PDT 2025

Total time taken to generate the page: 0.80477 seconds