Page 2 of 4

Re: TextEdit Gadget

Posted: Wed Sep 21, 2011 12:37 am
by Polo
Image
After many headaches, I implemented line wrapping, without too much bugs, i hope :|
The code begins to be quite complex, as it works with and without line wrapping :)
It needs optimisation indeed!

Next steps is to implement center and right (and maybe justify) align (when line wrapping is enabled).

I'd need to write some API for it at some point, too!
It might be interesting to add some features to turn this text editor into a code editor, I'll see (bye bye scintilla :mrgreen: )

Re: TextEdit Gadget

Posted: Wed Sep 21, 2011 12:49 pm
by flaith
It's looks really neat :D
Can't wait to test it, well done Polo

Just a question : can we add our own font, like a graphical one ?

Re: TextEdit Gadget

Posted: Wed Sep 21, 2011 1:25 pm
by WilliamL
Hey Polo

How do I get to the code in the TextEdit.rar file? (uncompress)

I guessing the file in your first post is the most updated version.

I want to try this on my mac.

Thanks

[edit]
Sorry, polo, I was being dense, it works fine on my computer. Good luck with your effort. :)

Re: TextEdit Gadget

Posted: Wed Sep 21, 2011 4:50 pm
by Polo
Hi Flaith, you can use any fonts from the OS, thus it has to be a "proper" font.
William: I didn't upload the latest version showed above, I want to go trough a few optimisations first :)
However, there's a .app in the rar file from the first post, you can consider it as a very early version. I'll post a new one soon!

I finished left, center and right alignment, works nicely it seems, not sure which next new features i'll add yet :)

Re: TextEdit Gadget

Posted: Sun Sep 25, 2011 3:49 pm
by Polo
Most recent version (Mac only):
http://www.megaupload.com/?d=8SU1L9JB

I optimised "a little bit" the line wrapping, not enough though so it can be slow, especially if the line is large.
There is one main bug, the line wrapping will cut the word if there is formatting at the end of the wrapped line, need to fix that :)

Otherwise it should be working well, you can see in the example I added line padding (to set a space before/after a paragraph), and also left and right margin. I didn't add it to the GUI so you can't really play with it :mrgreen:
Will add line spacing soon (for wrapped lines mode).

Re: TextEdit Gadget

Posted: Tue Sep 27, 2011 3:58 pm
by Polo
Just finished a new word wrapping calculation, that won't cut word when they are formatted, shouldn't have any bugs now :)

Added a line number margin, too! This can be turned on and off through the SetGadgetAttribute API.

Image

Re: TextEdit Gadget

Posted: Tue Sep 27, 2011 7:20 pm
by Derren
NUTS.
But the download isn't working.
Have you considered http://www.dropbox.com/ ?

Re: TextEdit Gadget

Posted: Tue Sep 27, 2011 8:09 pm
by Polo
Will do next time I release a demo :)

Re: TextEdit Gadget

Posted: Tue Sep 27, 2011 9:32 pm
by Polo
I'm having fun, just did some basic live syntax highlighting (won't be a core part of the gadget, just to prove it's possible).
This is using the gadget API i've made (still incomplete), crossplatform indeed.

I'm thinking of going further, and add to the gadget line folding and autocompletion.

Image

(please don't say the example code is useless :) )

Re: TextEdit Gadget

Posted: Wed Sep 28, 2011 6:50 pm
by Pureabc
Polo,

The screen shots look good.

Is there a windows version?

Thank you.

Re: TextEdit Gadget

Posted: Wed Sep 28, 2011 7:33 pm
by Polo
Hi Pureabc,

Yes, it works on Windows, and probably on Linux too :)

Re: TextEdit Gadget

Posted: Wed Sep 28, 2011 8:13 pm
by jesperbrannmark
How long are you gonna keep me drooling and dreaming? :wink:

Re: TextEdit Gadget

Posted: Wed Sep 28, 2011 8:30 pm
by Polo
:mrgreen:

I'm still want to be fully statisfied with it before releasing it :)

(and I still do not know if I release it as DLL/Dylib or PureLib, and not sure how much should I charge for that etc etc...) :wink:

Re: TextEdit Gadget

Posted: Sun Oct 02, 2011 10:37 pm
by Zach
I would go for DLL and/or .PBI

With a DLL you can load stuff in and call it easy as pie, using any version of PB.
With a *.PBI you can at least give the user the choice of editing it to make it work with the version of PB they want to use it with, versus restricting them to the version it was designed/compiled for if you were to distribute as a Userlib

That is the biggest problem with User Libraries. They run the risk of easily becoming outdated, and not working properly with any version of PB except what they were designed/compiled for.

IMHO the prevailing wisdom on the forum has been to steer people away from using/making such libraries, as more often than not Authors abandon them at some point and they can't be maintained and/or lack source code.

Re: TextEdit Gadget

Posted: Sun Oct 02, 2011 11:27 pm
by Polo
Yes, I'll go for a DLL, and a more expensive licence for code source.

Here's a very early attempt with autocompletion :)

Image