Open source XojoScript editor available


at project launch time, choose another image for the picComment.png, then you will be able to run the project. Do not save the project or at the next run - if the picComment.png image is available - you will have to change it.

OK Emile,
Thanks. Lennox

[quote=316891:@Axel Schneider]In Linux

It is not possible to write more than 2 lines, no matter what I write

I type hello -> ENTER for new line
I type hello -> ENTER for new line -> crash

this line in cnvScrp.Paint
if Line.Ubound <> -1 then XCur = XCur + IndentCount(SelLine) * TextLineHeight //else empty, but cursor must be drawn[/quote]

I’m seeing the exact same behaviour on OSX 10.11 with 2017r1a35.

same on mac 10.9.5 and xojo 2016r41
psss the 2017r1a35 does not exists !

I added the missing picture to the Zip file. Sorry for the sloppy picture supply.
The issue reported with SHIFT+ENTER I could reproduce on Windows. Turns out that this key combination places a ASCII &H0B (Vertical tab) symbol in the TextArea control as opposed to a Mac endofLine (also for Win) , which interferes with the text processing method used. I had to disable SHIFT+ENTER for windows. I have the feeling that some of the problems observed for Linux and Mac are also caused by an EndOfLine problem. Unfortunately I cannot test this on my hardware. I guess I should buy a Mac. Let’s see what they cost :wink:
I know that not all Help hyperlinks link to an existing web page. I will fix that later when I have some time.

Time to go to my basket now. Ciao, Gerard

Yes, I meant I was using the same setup as you. My apologies.

you can have a free virtual machine using virtualbox and any linux distribution on your windows machine.
for macos, it’s another story. but linux and macos are very close (OS speaking)

Last time I checked, there was a text size trouble (larger on Linux than on macOS); is it still the case ? (say on openSUSE)

After changing all EndOfLine.Macintosh to EndOfLine it works on Linux.

and it works on mac too !

I’m having fun playing around with this. Thank you for sharing.

A few keywords I found that are not highlighting

Module -> also not in indent logic
Interface -> also not in indent logic

Posted a new version that uses EndOfLine instead of EndOfLine.Macintosh for Linux and Mac. Hope it works better now for these platforms. Also added the above-mentioned keywords, although the Interface method does not seem to work in XojoScript.

Thanks for sharing with the community, Gerard. I’ve added Sxscript to the Open Source projects page:

Using EndOfLine will use the proper EndOfLine on the platform the code is running on… This is the easiest and safest way to do line endings…

It should, but it’s not for reading line terminators from a TextArea control in windows, which surprisingly uses EndOfLine.Macintosh.

If that is what you are seeing, I would say that is a bug (either in your code or in the framework)… I couldn’t see anything documented to support that, but it was a quick look… The one thing I did see was the fact that Linux and Mac OS X both use EndOfLine.Unix and EndOfLine.Macintosh is the older line endings from Class Mac OS and Carbon…

Hi Gerard,

I thought that this was just what I was looking for. However, when I try to set a script context (to include some functions that I want the script to have access to) the context remains as nil (even in the line directly after setting the context). There are no compile errors - it just doesn’t seem to take. I noticed that you set the context to the script object itself, but that doesn’t do anything either.

I’ve no idea what’s happening here!

Hi Gerard,

The About MenuItem have to be of Class ApplicationMenuItem (so it will appears at the correct location under macOS).

Also, changing the main window (WindowMain) Placement to MainScreen is a plus.

GDIPlus is ON: useless if you are Xojo current.

In Help, the link to the Language Reference faile to…
This page is now located in web site.

At last, a well written example (script and project ?) is welcome for Joe Newbie.

Now, it is easy to write the above, far less to give the answers. I know, I understand.

PS: Did I told you about the images that one have to locate ?
[I just downloaded the zip file).

Ignore me - I’m an idiot. I forgot to create an instance of the context object. Works fine now!

Thanks - this has saved me a pile of work.

An update of the script editor has been posted on Github. This version fixes most of the issues discussed above.

Also, support for the Python script language was added, accessible by a switch on the menu bar.