Hi guys,
I have a Live Preview feature in my app that I'm rewriting to accommodate PHP processing.
Basically, right now, I feed a string of all the text in my NSTextView to the WebView. The problem with this is, any server-side languages fed into the WebView will not be processed.
So, my question is, what would be the best method to make PHP execution possible. My idea was to save the contents of the NSTextView to a file somewhere (/tmp most probably), then feed that into the PHP engine (built into OS X), which should then spit out the executed code which I can then feed to the original WebView.
My only gripe with this is, I have a setting where you can update the preview everytime you type, so I'm worried that saving to this file, and passing it off to PHP everytime is going to cause some major performance issues.
Any ideas?
Thanks,
Oliver