[Kommander-devel] KTextEditor in Kommander

Eric Laffoon eric at kdewebdev.org
Tue Sep 5 12:56:40 EDT 2006


On Tuesday 05 September 2006 1:48 am, Andras Mantia wrote:
> On Tuesday 05 September 2006 11:09, Eric Laffoon wrote:
> > Thanks Andras, this is a big improvement. Unfortunately a few things
> > are not handled well yet. At least one may be a real headache but
> > most should be easy. I'm sure you're way faster at this than me...
>
> Well, it's only about writing the correct rules. ;-)
>
> > 1) functions that don't use method definitions lock highlighting
> > until something else comes along...
> > @dcop()
> > @global()
> > @setGlobal()
> > @exec()
> > @readSetting()...
> > These continue highlighting into the parenthesis and beyond.
>
> Should be fixed, but for some reason here the parenthesis are not bold,
> while for the rest are. I have no idea why, as the rule for them is
> exactly the same...
>
> > 2) Loop variables (@i) are not handled and I'm not sure how much of a
> > pain they are, but if we could at least stop highlighting on a space
> > after @unknown that would be good.
>
> Same bug as above.
>
> > 3) This function statement seems to confuse quote and parenthesis
> > highlights @exec(@readSetting(photoviewer, kuickshow)
> > "@String.section(@TreeWidget3.selection(),"\t", 0)")
>
> I enabled highlighting inside the strings, but the above will still be
> incorrect as it's not easy to handle quoted strings inside quoted
> string and usually no language allows that, unless you escape the inner
> quotation marks (or use single quotes instead of double quoted there).
> So I think this part cannot be solved on the highlighting level, it
> should be solved on parsing level.

It was solved on a parsing level to be more intuitive for non technical 
users. ;-)
>
> > 4) Maybe I should apologize for making too much work. ;-) The
> > following is utterly trashed...
> > @if(@String.length(@readSetting(photopath, "")) < 5)
> >   @exec(kdialog --title "khphoto setup" --msgbox "You will need to
> > set your root directory for where your photos are. This only offers
> > this the first time it runs, but it helps it to start faster if it
> > doesn't have to search your whole home directory.")
> >   @writeSetting(photopath, @exec(kdialog --getexistingdirectory
> > --title "Photo Root?"))
> > @endif
> > It appears the period after "are" ends the green function
> > highlighting, but the apostrophe in doesn't starts red quote
> > highlighting which overrides everything for the remainder of all
> > text.
>
> Works fine now.
>
> If you find anything wrong, just tell me. ;-)
>
> Andras
Thanks, I'll test it.
-- 
Eric Laffoon
Project Lead - kdewebdev module


More information about the Kommander-devel mailing list