Re: Expression parsing
Re: Expression parsing
- Subject: Re: Expression parsing
- From: Public Look <email@hidden>
- Date: Sun, 18 Jul 2004 19:14:25 -0400
I think Mike Ferris's TextExtras includes the support for entering
expressions into any text fiel, but I may be mis-remebering.
http://www.lorax.com/FreeStuff/TextExtras.html
There are lots of cool things that can be done. You can include TCL or
Python expression handling (or the whole langiuages for that matter) in
any text field.
One of my company's products includes a partial C interpreter that
works with any NSTextView including the field editor that text fields
use.
I demonstrated a "Just In Time" JIT C compiler at Mac Hack a few years
ago and the source code should still be on their site. With this, you
can type in any legal C function body including the use of math.h and
constants like PI and it will be "recompiled" in less time than it
takes to move the mouse to another user interface control. It has
automatic support for action messages so it can be connected in-line.
For example, type in a simple equation with four variables, math
functions and constants, a call to sprintf to compose strings or
whatever. Then connect sliders or text fields up so the variables
-takeFloatValueFrom
: the other user interface controls. Connect still other variables in
the code to other controls using outlets. Then, as you move the
sliders that control inputs, the little C program is executed over and
over sending the outputs to other controls like text fields...
Finally, I think Building Cocoa Applications : A Step by Step Guide
by Simson Garfinkel, Michael K. Mahoney includes a "Math Paper" example
that demonstrated expression parsing and function graphing.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.