TextInputCanvas

[quote]The compiled plugin can be obtained from:
http://www.bkeeneybriefs.com/2013/06/formatted-text-control-3-1-0-alpha-1/ [/quote]
Ok… I got the plugin, I see it in the library… does ANYONE have a sample project that shows how it works? anything?

Dave using a plugin? I don’t believe it. You must have really run in to tough situation to take that step. :wink:

LOL… yeah well… not going there if I can’t find instructions on how to use it…
And per my own restrictions :slight_smile: I don’t consider this one a 3rd party plugin
And it seems the only way to deal with replacinging the CEF code that Alex wrote as it doesn’t seem to play so nice anymore

I don’t think you scrolled far enough down the page because there is a link to what you need:

Formatted Text Control

Towards the bottom of the page is a link to a User Guide, Mac and Windows demos as well as a selection of other demo apps using it.

No, I do not want to buy Bob Keeney’s FTC control… (sorry Bob :wink: )
I wish to know how to use the TextInputCanvas Plugin that Xojo has released in open-source.
Yes this is a central piece of the FTC, but I have specific requirements that I wish to build around the “TIC”

If just happens that Bob posted a link to the plugin supplied by Xojo

Sorry about that Dave, my eyes quit going after seen the “formatted-text-control” I should have clicked on that link itself but I already have a bookmark to his site so I just used it. Doing so I see what you mean about needing some documentation. That sounds like quite a challenge without it, especially if Bob Keeney states that same thing. Good luck!

What version of CEF do you have? Alex’s copy is old and has been update over a dozen times. Latest version works on all 3 OSs still. Some kind of demo should be made for TIC for sure. I’ve tried countless methods to get it to work in 2 years and it is either lacking something obvious to developers (besides documentation) or requires an awful lot to get just a small way off the ground. It should automatically accept text and anything further can be maniplated by the user. TextInputCanvas is a very deceiving name when it’s more so, “custom canvas with special cocoa declares that accepts text input if you can figure out how to implement the code to make it work.” But that would be an awfully long name. Heck if I could figure out how to get it working even just a little I’d be glad to share and comment the code.

this can help ?

Looks like I might be chasing the wrong rabbit… I THOUGHT the TIC provided all the same functions as CEF did (line numbers, syntax highlight, etc), but it seems to (unless I am mistaken) to just be a substitute for TextArea… and I cannot believe that XOJO would have gone to this effort if that is the case.

Matthew… I have the most recent version (one I believe you updated)… but the last time I ran it … I had to changed the TextStorage method to NOT use UTF-16, and it is still full of CARBON declares

TextInputCanvas provides the only the functions and events required for proper text input handling (meaning keyboard shortcuts, input methods, etc). It does not do any drawing or have any other functionality.

Then isn’t the inclusion of the the word “Canvas” in the title a misnomer?

All of the drawing in TIC is up to you. TIC only gives you the hooks to tie into the OS. Cocoa has a bunch of things that Windows and Linux don’t do like the Candidate Window that you have to implement.

It is just a substitute for TextArea but Cocoa text handling is considerably different than Windows/Linux. TIC is a way to get them all working together.

FTC can do line numbers, syntax highlighting, spell checking, hyperlinks, inline graphics, better rtf read/write and more. But since you don’t want to purchase it (it is 100% Xojo code except for the TIC plugin) I’ll just stop now.

[quote=174506:@Dave S]Looks like I might be chasing the wrong rabbit… I THOUGHT the TIC provided all the same functions ahas lotss CEF did (line numbers, syntax highlight, etc), but it seems to (unless I am mistaken) to just be a substitute for TextArea…many of the… and I cannot believe that XOJO would have gone to this effort if that is the case.

Matthew… I have the most recent version (one I believe you updated)… but the last time I ran it … I had to changed the TextStorage method to NOT use UTF-16, and it is still full of CARBON declares[/quote]

Not sure if I have your email addy easily accessible but give me a bit here and I’ll email you the version in currently using. :slight_smile: TIC has lots of functionality and is quite pliable, that’s what makes it difficult to get past the learning curve I suppose with no docs. Many of the CEF functions are identical to TICs though. I’m sure I have you in my contacts Dave. … give me a little bit to finish up some stuff and I’ll send it along. If I can’t find your email, I’ll just upload and post the source for you. The newest code is fully cocoa compliant. Eventually though, Bob’s FTC is really good and should be considered a possible future addition to your code collection.

No, it’s entirely correct. Canvas itself doesn’t have line numbers or text rendering or anything except a Paint event and some events for handling input.

I meant no offense Bob, now what so ever, but FTC is a) out of my price range for this project b) has tons of features (spell checking, hyperlinks, inline graphics) that I simply do not need… I just need a simple line numbered, syntax highlighted text area…
CEF is what I have used for years, and if Matt has a Cocoa compliant modified version that would be great.

+1 for this.

None taken. FTC isn’t going away any time soon so if you have a need for something more advanced than what the TextArea you can revisit the decision then.

I dug around in TIC for quite a while now. I didn’t get as advanced with it as what Bob did with FTC (which I also recently purchased - its a HUGE time saver! Thanks Bob!) I wanted to make a control for a programming language which includes syntax highlighting, code folding, line numbers, background images, etc. Something I code use to make a more powerful GUI than the language currently had cross platform - primarily for Mac. I considered using other languages - Swing, Xamarin Studio, and Xojo. Xojo was my top choice and decided to renew my subscription as a result.

In my experiences with TIC, you REALLY need to understand the source to it first, as it needs special understanding of how it works internally and externally with your Xojo code. Understand how the events are called and executed, and know what it is sending to the Xojo events. Pay CLOSE attention to the DoCommand commands, those are key. Even Bob’s FTC has a method that allows any user’s source to call DoCommand directly.

Look at the post I had here: https://forum.xojo.com/conversation/edit/12824

Reviewing all that material took some time. If I get some time, I’ll see what I can put together to get people started with it. It takes a lot of time and patience…

A link to the latest CEF would be appreciated …

CEF is available on GitHub : https://github.com/tempelmann/custom-editfield