This question is answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 81 - Pages: 6 [ 1 2 3 4 5 | Next ] - Last Post: 06-Feb-2009 00:06 Last Post By: TomCee
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Integrated skin text editor for Jalbum!
Posted: 04-Jan-2009 22:42
 
  Click to reply to this thread Reply
Hi all skin developers,
During the Christmas holiday I've been having some great code flow with Jalbum. I got hold of a great free Java component I could build an integrated skin text editor around. The author of this component (Robert Futrell) has been extremely helpful and tweaking his component to our needs.

Jalbum now has an integrated skin text editor, accessible from the Tools->Skin developer menu that does the following:
  • Ordinary text editing
  • Syntax highlighting for all Jalbum skin file types (html, htt, css, xml, properties etc)
  • Code completion that looks up all Jalbum variables together with help text. No need to refer to http://jalbum.net/developer/skins/variables all the time for skin developers! This should simplify skin development significantly.
  • Flexible search & replace with regular expressions (\t for tab, \n for newline etc)
  • Drag and drop support
  • Indent/outdent
  • Flexible tab handling
  • UTF-8 encoding support
  • Printing support

The text editor (400K size) is implemented as a "Jalbum Plugin" using a new Plugin architecture that allows any Java developer to add new extensions to Jalbum. Plugins can be added to the Jalbum Tools menu and to the context menu of the Jalbum Explorer window. It is located inside "ext/JTextPad.jar" for those who wish to remove it or run it as a stand-alone app.

To try it out, get http://jalbum.net/download/Jalbum8.1.zip
Mac users can get it as a .dmg file from http://jalbum.net/download/8.1/MacOSX/Jalbum.dmg

When the final tweaks and bug fixes have been done (like removing debug info) I'll compile installers for all operating systems.
TomCee

Posts: 382
Registered: 11-Jul-2005
Re: Integrated skin text editor for Jalbum!
Posted: 04-Jan-2009 23:47   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
hi David,

very, very nice!! If now only it would work the same way for the .bsh files (please,please). One little hickup (I hope) When accessing from the tools menu, the index and the slide htt are opened, the index.htt is nicely formatted with line numbers and wraps, the slide.htt is a bit messy (no line numbers except no. 1, no line breaks)
Something on my side of the fence? Did I say very very nice!

Thanks,
Tom
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 00:26   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
It should work the same for .bsh files. Doesn't it? I made a default to open "index.htt" and "slide.htt" but you can easily open more files within the editor.
I can't reproduce that mess with slide.htt. Does it happen with a specific skin?
TomCee

Posts: 382
Registered: 11-Jul-2005
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 08:34   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment messedup.jpg (350.8 KB)
I tried out several skins last night, but all looked the same. This morning I tried again, but I guess I must have been sleepy last night. This is what happens: whatever skin I choose, the texteditor allways opens the files for the default skin. But I'm running it on the starjalbum.bat, not installed over the 8.1.5 edition. It should make no difference though. See attached screenshot for how the windows look.

Can I copy the ext dir to my regular 8.1.5. version? I will try that tonight, have to work now :(

regards,
Tom
jGromit

Posts: 7,748
Registered: 31-Jan-2006
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 08:53   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
TomCee wrote:
...whatever skin I choose, the texteditor allways opens the files for the default skin.

I'm seeing the same thing.
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 10:38   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Oops. Never make late-night fixes :-). I've updated the JTextPad.jar plugin to fix the issue with it getting stuck on the first skin now. Get your update here:
http://jalbum.net/download/JTextPad.jar
(replace it in the "ext" folder)

Regarding that very long line in the StoryBook skin. Does it only happen to Storybook or other skins too?
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 10:40   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I should add that you need to use the version of Jalbum that requires Java. The compiled version isn't updated yet and will always need a full recompilation.
jGromit

Posts: 7,748
Registered: 31-Jan-2006
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 11:03   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
davidekholm wrote:
Get your update here:

That's more like it!

davidekholm wrote:
Regarding that very long line in the StoryBook skin. Does it only happen to Storybook or other skins too?

There's something unusual about the line feeds/carriage returns in the Storybook slide.htt. Notepad doesn't like it, either - it all shows up as a single line. Notetab Light, on the other hand, has no issues with it.
TomCee

Posts: 382
Registered: 11-Jul-2005
Re: Integrated skin text editor for Jalbum!
Posted: 05-Jan-2009 16:10   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Ok, tested with the new jar: all skins opens, so that's solved. Still had the problem with the messed up storybook slide.htt. I normally use jEdit as editor, but it can be possible that I modified some text in the NetBeans editor but can't remember. I've solved it: I opened the file in jEdit, copied all to Notepad where it did look good formatted!, can this be system dependend??), selected all again and copied the text back to jEdit and saved it, now it opens fine formatted. So, all and so far, everything is okidoki. Going to play some more with the text editor this evening. David, are you planning on making the java files for the texteditor available? And telling us how we can put our own applications to expand jalbum. I have to say this again, I'm very pleased with the texteditor, and very enthousiastic about the concept of expanding jalbum with other applications.

regards,
Tom
alan927

Posts: 49
Registered: 18-Jun-2005
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 02:00   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
That's really cool! It loads very quickly and has keyboard shortcuts like Ctrl-Home/End.
mrag

Posts: 405
Registered: 26-Jul-2003
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 02:44   in response to: alan927 in response to: alan927
 
  Click to reply to this thread Reply
Attachment fancy_tool.jpg (57.6 KB)
Someday when I learn something about programming, this should be pretty cool. Meanwhile, the line numbering alone could be a big help in identifying troublesome issues. Sounds like at least one person had a Merry Christmas ;-)

I used the zip version (reads 8.1.6) like Tom. Is it just me that is seeing the "Skin Developer" entry TWICE?

(I downloaded the zipped version, then downloaded the fixed jar, then started via StartJAlbum.bat)

________
Simply renaming JTextPad.jar to something like JTextPadOLD.jar so one can insert/add the new file is NOT sufficient. You have to delete the old one. Otherwise, you will see
Skin Developer
Skin Developer
as David suggests later on in this thread

Edited by: mrag on 06-Jan-2009 17:36

jGromit

Posts: 7,748
Registered: 31-Jan-2006
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 02:59   in response to: mrag in response to: mrag
 
  Click to reply to this thread Reply
mrag wrote:
Is it just me that is seeing the "Skin Developer" entry TWICE?

It's just you.
It's just you.
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 17:17   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
There's something unusual about the line feeds/carriage returns in the Storybook slide.htt. Notepad doesn't like it, either - it all shows up as a single line. Notetab Light, on the other hand, has no issues with it.

I investigated this. That file had old Mac-style line endings (only CR code to separate lines). I've made JTextPad capable of understanding this too now (but not published it yet)
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 17:19   in response to: TomCee in response to: TomCee
 
  Click to reply to this thread Reply
David, are you planning on making the java files for the texteditor available? And telling us how we can put our own applications to expand jalbum. I have to say this again, I'm very pleased with the texteditor, and very enthousiastic about the concept of expanding jalbum with other applications.

regards,
Tom


Yes, I aim to release the source for JTextPad and also update our API section (http://jalbum.net/api) so you can see how you make your own plugins to Jalbum. Stay tuned! When the update is done, you only need to peek at the JAlbumPlugin and JAlbumContext classes.

Update: I've now released the source under the liberal Apache license (v2.0)
Get the source from http://jalbum.net/download/JTextPad-src.zip
If you make improvements to JTextPad, please pass them on! I'd like to see a "Create a skin" template.

Edited by: davidekholm on 21-Jan-2009 16:02
davidekholm

Posts: 3,698
Registered: 18-Oct-2002
Re: Integrated skin text editor for Jalbum!
Posted: 06-Jan-2009 17:21   in response to: mrag in response to: mrag
 
  Click to reply to this thread Reply
mrag wrote:
Someday when I learn something about programming, this should be pretty cool. Meanwhile, the line numbering alone could be a big help in identifying troublesome issues. Sounds like at least one person had a Merry Christmas ;-)

I used the zip version (reads 8.1.6) like Tom. Is it just me that is seeing the "Skin Developer" entry TWICE?

(I downloaded the zipped version, then downloaded the fixed jar, then started via StartJAlbum.bat)


Make sure your "ext" folder don't contain multiple versions of the JTextPad app, like "jtextpad.jar" and "JTextPad.jar".
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums