We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SB-Prime 1.1.10 Update
#21
(translated by Google translator)

Hi all.
LitDev, I mean the font color in the SB-Prime Text Editor, but not in the Aliases table.
For example, when I replace the name "GraphicsWindow" from Latin to Cyrillic, then the font color of these characters in the Editor becomes black, like the color of plain text.
I thought it was inevitable. After all, the Editor was created to work with Latin characters.
But then the idea came to my mind to assign a font color to an Alias directly in the Aliases declaration table.
I thought that then the Editor would not have to determine what font color each specific Alias should have.
Reply
#22
AB,

If you look at the top left of the image is has the colors on the SB-Prime Text Editor, I only added the Aliases window in the image so you could see the aliases I was using - "GWin.BgCol".

I can see the issue using ГрафикаОкно for GraphicsWindow - will look into it - turns out this is known issue that has been fixed before!

If you go to the Advanced->Options window and add "а-яА-ЯёЁ" (no quotes) to the Variable Regex box the Regex used to identify words for the lexer can also find Cyrilic characters.  Maybe restart SB-Prime after doing this.

EDIT

Uploaded an update to SB-Prime that should allow the same to be used for other non European languages.  I tested and Hindi for example seems to work with "\u0900-\u097F", again no quotes.  For any other language, try googling - Regex 'your language'.  Arabic seems to be "\u0621-\u064A".  Regex character match strings can actually be combined by just concatenation, I was testing the three above with "а-яА-ЯёЁ\u0900-\u097F\u0621-\u064A".
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#23
(translated by Google translator)

Amazing!  Smile
Everything works great!
Long live SB-Prime and its talented developer!

Hooray !!!..
Reply
#24
(translated by Google translator)
I was probably overjoyed early.  Huh
Now I have opened the example file. And I saw that when Aliases replace object and property names on the same line, the font color turns black.
Is there any way I can fix this?
   
Reply
#25
AB,

Thanks for reporting - this was a bug with regex string for methods.  Uploaded new SB-Prime for update.
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#26
(translated by Google translator)

Hi all.
First I want to say about the interesting feeling I get when using the new SB-Prime with Aliases.
Aliases turned the Small Basic programming language from a strict, rigid design into a cute Lego set for a warm home. Now I myself can create the parts for this designer that I want. And then, when I click the "Run" button, my program WORKS!  Rolleyes

However, when I use Cyrillic, I have to switch the input language every time I need to insert a " ' " character. (that is, when I need to create a comment)

I solved this problem by assigning hotkeys to this symbol.
But maybe it makes sense to add a “comment/uncomment” function to SB-Prime for selected lines of code?
Or at least add a button to the menu, clicking on which inserts the " ' " character into the place in the code where the text cursor is currently located.
Reply
#27
Hi AB,

There is context menu (right click) with comment/uncomment lines with shortcut Ctrl?  Also you could copy/paste a ' character.

But I get your point about insertion at the caret position.  Are there any other Latin characters that make things awkward using Cyrillic or other character sets?

I could for example extend Ctrl? to ShiftCtrl? to insert ' at caret, but unsure if there are other similar characters where a more generic solution may be better.
[-] The following 1 user Likes litdev's post:
  • AbsoluteBeginner
Reply
#28
(translated by Google translator)

This is cool!  Smile
With an IDE like our SB-Prime, I will soon no longer be able to call myself an “AbsoluteBeginner”.
Working using SB-Prime is so easy and interesting that I will soon rise to the simple “Beginner” level.

Thank you so much again!
Reply
#29
You have been doing SB for many years now, not a beginner at all.  I like tinkering with software, learning new stuff and its always nicer to do it with a purpose.

I added an option in SB-Prime to insert or remove ' at caret with ShiftCtrl? and also switch between SB and sVB compilers/default libraries by changing the installation path in Advanced->Options.  Doesn't work with sVB forms, but for fun you can switch between the two now.
Reply
#30
(translated by Google translator)

@litdev
For many years I have only been observing the fate of the project named "Small Basic". Over the years I have not created anything using SB.
Only the addition of Aliases to SB-Prime made using SB so interesting and enjoyable for me that I started my first "Snake" project.
Therefore, I am a true "AbsoluteBeginner" for Small Basic.  Smile
Using Aliases gives me the opportunity to do programming in the same way that people make small model airplanes, for example.
Now this is very cool!
[-] The following 1 user Likes AbsoluteBeginner's post:
  • litdev
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)