How to place an image (JPG,, GIF, etc.) with YAB?

yabIDE is working an 32 and 64bit

1 Like

Hi I am learning the Hightlighting of a textedit, is it possible to add more than 4 colors?

If yes how could I do?

Also I try to put "INT " with a space at end for hightligting it but that don’t work, I must put “INT” without space but if I enter this in the TextEditBox as example:
interpreter

the int of interpreter is highlighted.
Also wath about the " caracter in a string? If y want a purple " as example.
I tried to highlight “love.load” and I think the point “.” makes a mess.
I have also attempt to recognize “love\x2eload” but that’s don’t work. 2E is the hexadecimal number for the point.

Don’t know if that use some ASCII table in TextEd for recognize a special char in a string.

Only 4 colors iirc. And you can not mix words with signs as one syntax.

@lorglas : Could be a task for yab 1.9 if this is possible. Some times more the for colors for syntax highlightning are great.

1 Like

I will take a look and test it.

2 Likes

@Kitsune64

What is the stand of your editor (included love2d funktion)? Can we help or you just test and leave it?

1 Like

I left that for quite a while… but wanted to include the Love2D syntax in it at a period.

Will be fine to get a full love2D Editor for haiku. please work on it. I can help if you need some.

Ok, I have compiled it right now…I must go into the coding part but if I remind the Yab editor don’t permish to perform a powerfull coloring syntax for Love2d.

You mean diferent colors for you develoment names in you editor? You can add syntax highlightning for 4 or 5 color (i need to look at home). One of them for special characters (.,-:).

You can look into my editors or the yabIDE himself. For every color you need to create a textfile with the words who need to colored in this color.

Hi,

No that was not really a trouble about colors but about the characters synthax. If I remind Yab don’t permish to take a sentance with a point/space in it like I said before in this post:

But I will try again to work on it.

sub EditorSyntaxHightlightning()

        local handle
        handle=0

        handle = open(ProgramFolder$+"data/settings/colors/color-blue")
        if(handle) then
                while(not eof(handle))
                        line input #handle tmp$
                        textedit color Editor$+str$(opendeditor), "color1", tmp$
                wend
                close(handle)
        endif

        handle = open(ProgramFolder$+"/data/settings/colors/color-red")
        if(handle) then
                while(not eof(handle))
                        line input #handle tmp$
                        textedit color Editor$+str$(opendeditor), "color2", tmp$
                wend
                close(handle)
        endif

        handle = open(ProgramFolder$+"/data/settings/colors/color-green")
        if(handle) then
                while(not eof(handle))
                        line input #handle tmp$
                        textedit color Editor$+str$(opendeditor), "color3", tmp$
                wend
                close(handle)
        endif

        handle = open(ProgramFolder$+"/data/settings/colors/color-grey")
        if(handle) then
                while(not eof(handle))
                        line input #handle tmp$
                        textedit color Editor$+str$(opendeditor), "color4", tmp$
                wend
                close(handle)
        endif

        handle = open(ProgramFolder$+"/data/settings/colors/char-color")
        if(handle) then
                while(not eof(handle))
                        line input #handle tmp$
                        textedit color Editor$+str$(opendeditor), "char-color", tmp$
                wend
                close(handle)
        endif                                   
end sub

You can not mix words with signs, thats the only bad thing (The code shows my synthax highlightning for WebConceptCreator)

1 Like

Yes thanks for the example but Love2D have a lot of command with “point” in it…As few example:
love.graphics.newImage
love.graphics.draw
love.audio.play

I have attempt to use a hex value of “point” before but that don’t work also.

Understand. Ok then test with my example and add colors first. If you only need two colors you can use the third one for the point alone an the fourth for the signs (without point).

1 Like

In the YabIDE editor, I can see this sign “(” or “)” have colors…But I had trying to put colors in the same way on my editor → but these symbols stay black.
Have you using special character (ASCII/Hex code) for make it work?

I have put this:
textedit color “TextEd”+str$(Row),“color4”,"("

work with a word and not work with this “(”.

I have implemented your code partialy but the “(” doesn’t work for now but int, float,…work.

handle = open(ProgramFolder$+"/data/settings/colors/char-color")
if(handle) then
     while(not eof(handle))
           line input #handle tmp$
          textedit color Editor$+str$(opendeditor), "char-color", tmp$
     wend
close(handle)
endif

BeSly — Haisly

TEXTEDIT COLOR TextEdit$, Option$, Command$

Option$ =“color1, color2, color3, color4, char-color”, Command$

Add the command Command$ to the list of words that are checked for syntax highlighting The char-color behaves differently and highlights only the first character of Command$ (this happens after the highlighting of the other colors).

TEXTEDIT COLOR TextEdit$, Option$, r, g,b

Option$ =“bgcolor, textcolor, color1, color2, color3, color4, char-color”, r,g,b

1 Like

The trouble is a bit that the point is /just/ a lua table beeeing accessed, without parsing the full code it is not fully possible to determine if something is a love2d c function or not
many example projects of love2d do something like this

local lg = love.graphics

function love.update(dt)
lg.draw(object)
end

Here it’s quite hard to figure out already.

Maybe just highlighting known love2d function names works as an “okay” solution? (or treating love.graphics.draw as a single function even if it really isnt that technically)

As a side note: Koder can now do lua syntax highlighting.

1 Like

Ha yes, this is this char-color, that work now, Thanks.

And yes using the Koder software is the simple way. :slight_smile:

The Textedit is not the best, included yab, but we have no other one and no one have enough expierience to add a better one. The same with the Columnbox.

But the Textedit is able to recognize the special characters as I can see… There must be a way to upgrade the syntax recognition by nesting.

I will take a look with the sign “(”. Maybe is a little issue.