Oxygen Basic

Programming => Problems & Solutions => Topic started by: Arnold on February 09, 2015, 12:44:40 AM

Title: Small problem with SciTE
Post by: Arnold on February 09, 2015, 12:44:40 AM
Hi Charles,

most of the time I use PsPad for editing my files, because I can tile windows, can use highlighting and because I can start my files with o2 too. So I did not bother much about this little problem with SciTE:

For instance I load e.g. examples\wingui\childwin.o2bas, then open examples\math\Align.o2bas, then \examples\math\inProgress\Average.o2bas. After this "Go" or pressing F5 will only work with the last file. Changing the tabs and pressing F5 will give this message: Error 3: file empty or not found ...

I tried to change in \ide\Oxygen.properties line 79 and line 86 to:

command.go.subsystem.*.bas

(without =2)
and then all worked as expected. I have no idea why this is the case, or if this only works on my system.

In SciTEGlobal.properties I also changed line 91 to:

   command.scite.help="file://$(SciteDefaultHome)\ide\SciTEDoc.html"

(inserting ide\)
to get access to the SciTE help file.

Is there a way to show the full path of the .o2bas file in the windows title of SciTE? This is not a big problem though as I can see a tooltip when I move with the mouse over the tab.

Roland
Title: Re: Small problem with SciTE
Post by: Arnold on February 09, 2015, 02:08:37 AM
This is curious. When I started my system again and used SciTE then running the files had no effect. So I modified my lines 79 and 81 back. I do not know what happened. I thought I had a solution.
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 09, 2015, 03:21:59 AM
Hi Roland,

I noticed that it won't execute a program (F5) while the help file is open (F1).

You could try subsystem ... =1 instead of =2

I had no problems switching between tabs with different filepaths, and executing code (F5) with this setting.


Title: Re: Small problem with SciTE
Post by: Arnold on February 09, 2015, 04:48:12 AM
Hi Charles,

unfortunately setting =1 does not work in every case neither, e.g. in projectA\Leanlisp the files will not show the console. Some demos show the results in the output window.
If I understand the helpfile of SciTe correctly, =2 means using ShellExecute. I do not know anything about property files, but somehow there should be a parameter for the directory which can basically be used with ShellExecute.

Roland
Title: Re: Small problem with SciTE
Post by: Arnold on February 09, 2015, 07:12:18 AM
At least I found that I could insert in SciTEGlobal.properties after line 38:

title.full.path=1

to see the full pathname in the Windows Titel.
In a dos window I would enter this to run a .o2bas file:

cd c:\oxygenbasic\examples\basics
c:\oxygenbasic\gxo2.exe arrays.o2bas

In the help file of SciTE the command cwd: is mentioned, but I cannot find out if this can be used somehow.
Title: Re: Small problem with SciTE
Post by: Arnold on February 09, 2015, 04:05:34 PM
Hi Charles,

I searched in Internet for some SciTE properies files and came to the conclusion that there is actually nothing wrong with Oxygen.properties. It seems that some properties files are used with some helper files. Some properties files use $(FileDir) so I tried as a last option after line 69:

# RUN FROM SOURCE
# basgo="$(SciteDefaultHome)\gxo2" " $(FileNameExt)"
basgo="$(SciteDefaultHome)\gxo2" "$(FileDir)\$(FileNameExt)"

I did nothing change for compile and build. This does work to a certain extent. Sometimes I must still use "Build" or "Compile" for a tab, then "Go" will work again.

Roland

Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 09, 2015, 10:20:55 PM
Hi Roland,

I am updating The Scite property files with the changes you have tested. Are you going for subsystem 1 or subsystem 2 ?

But I think it's time to leave Scite out of /Oxygen, (It can go on the WebSite as a separate download) and focus on Oxide, which supports compilation in all modes, drag-and-drop editing and execution. It need syntax highlighting and multi-doc support, and for me to stop using Notepad as my main editor :)
Title: Re: Small problem with SciTE
Post by: JRS on February 09, 2015, 10:40:54 PM
Charles,

You should really give UltraEdit a try before investing in yet another IDE. You can compile directly from UE. You can try it for free for 30 days to see how you like it. I have been using it since Ian (author) released his first version.

John
Title: Re: Small problem with SciTE
Post by: Aurel on February 10, 2015, 12:02:46 AM
Quote
But I think it's time to leave Scite out of /Oxygen, (It can go on the WebSite as a separate download) and focus on Oxide, which supports compilation in all modes, drag-and-drop editing and execution. It need syntax highlighting and multi-doc support, and for me to stop using Notepad as my main editor

well
is there a still interest i can continue to work on ASciEdit which is completely written in Oxygen?
OxIDE is not bad at all  :)
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 10, 2015, 12:56:53 AM

Hi John,

Oxide is Oxygen-native, though rather spartan in its current form. It is very simple to add tools and provide tighter integration with the compiler. And it will always be open source - in fact small enough to run directly from script, without using a binary.

Scite was never intended to be a permanent fixture
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 10, 2015, 01:06:21 AM
Hi Aurel,

You are very welcome to continue developing AsciiEdit, if you like. I have learned a lot already from studying your code, since my knowledge of both Windows-API and Scintilla is very limited.
Title: Re: Small problem with SciTE
Post by: Arnold on February 10, 2015, 01:23:01 AM
Hi Charles,

I use subsystem 2, because subsystem 1 does not keep the console window e.g. in \LeanLips\*.o2bas files. The change which I did for "Go" does not always work, but the message is not because of a missing file, but because of the include statement. The message goes away after doing a "Build".

Offering SciTE as a separate download would be an interesting option. This way everybody can decide which editor he would like to use. I myself use PsPad and could provide instructions how I added highlighting and the macros for running the files. John could do this for UltraEdit, and maybe this can be done with NotePad++, TextPad or FBEdit too.

And the best idea of course is to proceed with OxIde, which already runs fine. This would be much learning fun.

Roland
Title: Re: Small problem with SciTE
Post by: Aurel on February 10, 2015, 01:01:31 PM
Quote
You are very welcome to continue developing AsciiEdit, if you like. I have learned a lot already from studying your code, since my knowledge of both Windows-API and Scintilla is very limited.

Hi Charles...
ok there is no problem at all..
ASciEdit is a very primitive and simple editor, but have tabs and SDI interface
and is really very easy to use with Toolbar buttons( maybe i can add Menu-s).
it is written in Oxygen Basic.
Also i always prefer to use editor which is specific for given compiler /interpreter
 :)
Title: Re: Small problem with SciTE
Post by: Arnold on February 14, 2015, 11:06:52 AM
Hi Charles,

experimenting with the properties files I maybe found a solution finally. Sometimes I had to delete properties.lnk files in AppData and subfolders as they were interfering sometimes.

My problem was that with several tabs when changing to another tab, I can see the correct directory, but opening a file shows a different folder. I examined the original SciteGlobal.properties and copied part of the Checking section to OxygenBasic's SciteGlobal.properties. In Oxygen.properties I used the subsystem=2 again and for basgo I used $(FilePath). Until now everything works as expected.

As your last build does not include SciTE, I copied a previous ide folder to OxygenBasic and renamed the subfolder to SciTE, copied SciTE.exe, SciLexer.dll and SciteGlobal.properties into it and adapted the properties files. In case you intend to provide the ide subfolder with SciTE as a separate download maybe you will check the attached files.

I also tried to copy the latest SciTE.exe and SciLexer into the ide(SciTE) folder and this worked too. Deleting these two files and using instead the latest sc353.exe, which is a standalone application did also work.

As hh.exe is only a single instance application, I do not yet know how to prevent opening the help file several times. But somehow it must be possible.

SciTE has some advantages and it is free. The problem seems to be mastering the properties files.

Roland

.
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 14, 2015, 01:21:59 PM
Thanks Roland,

I have now uncoupled SciTE from OxygenBasic, but ir can be dowloaded separately from the website downloads page.

Should I overwrite the property files with yours?

Oxide has advanced quite a lot this week. It has Scintilla syntax highlighting, and is best used with drag-and-drop. The left panel is for proj files, which is mainly for file-switching. First drag new.proj onto this panel. Then you will be able to drag any file onto the panel and its name will be added to the file list. double-click on files  to load them into the right panel for editing.


.
Title: Re: Small problem with SciTE
Post by: Aurel on February 14, 2015, 01:46:50 PM
Hi Charles ..
That looks interesting ,i also have similar idea for improve OxIDE with scintilla or
even add syntax coloring inside richedit control as main editor.
Is there a exe or source of new oxIDE?
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 14, 2015, 02:06:35 PM
Hi Aurel,

You will find the source (moved) to ProjectsA/Tools, and several files in inc

Drag and Drop:

from oxide.o2bas:
Code: [Select]
case WM_DROPFILES
  =================
    '
    f = GetDropFiles(wparam)
    DragFinish(wparam)
    f=rtrim f
    ...

from Winutil.o2bas:
Code: [Select]
  function GetDropFiles(sys hDropParam) As string
  ===============================================
  string sDropFiles, sFiles
  sys i,e
  e=DragQueryFile(hDropParam, -1, null, 0)-1
  '
  for i = 0 To e
    le=DragQueryFile(hDropParam, i, null, 1)
    sfile=space le             
    DragQueryFile(hDropParam, i, StrPtr sFile, le+1)
    If Ucase(mid(sFile, -4)) = ".LNK"
    else
      sDropFiles+= sFile + chr(13,10)
    end if
  next i   
  return sDropFiles
  end function

Oxide will be going through a number of rapid iterations so I will be providing quick links for the binary.

Title: Re: Small problem with SciTE
Post by: Arnold on February 14, 2015, 02:26:14 PM
Oh well. I did not realize that there is already a zip file  of SciTE in the Downloads section. The files above were assumed for a subfolder Scite (which is actually ide) with scite.exe, a copy of scilexer.dll and the modified properties files in it. Then the above files would work.

If your zip file is applied, then scite.exe and SciteGlobal.properties are copied into OxygenBasic folder and ide is a subfolder. Then the attached properties files below are intended to replace the original files and should work as expected.





.
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 14, 2015, 03:19:05 PM
Many thanks, Roland, I have updated SciTE.zip with your new properties files :)
Title: Re: Small problem with SciTE
Post by: Aurel on February 16, 2015, 12:35:59 PM
sorry Charles but in my last oxygenbasic download i cannot found
Quote
You will find the source (moved) to ProjectsA/Tools
so i will download again ...
Title: Re: Small problem with SciTE
Post by: Aurel on February 16, 2015, 01:04:36 PM
Charles
I just download latest oxygenbasic pack and i found OxIDE under Tools
In fact i like when i see your OxIde in main folder.
Syntax coloring work fine and is nice  :)
But when i try to compile with OxIde-  my ruben2.o2bas with this new RTL32.inc
compiler don't report Okay!
I ma not sure why ?
Then i try to use ASciEdit and now compiler claim that my ruben2.o2bas is empty file  :o
hmm i think that is not problem in old RTL32.inc which i use then in last dll
i don't see any thing else what might cose problem ... ???
Title: Re: Small problem with SciTE
Post by: Aurel on February 18, 2015, 11:35:08 AM
Charles
what kind of error is this :?
do you change something for command line ?


.
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 18, 2015, 03:01:52 PM
Oxide in the tool section is the source I am developing. Use the oxide on the main directory. This is where it is meant to be for compiler access.
Title: Re: Small problem with SciTE
Post by: Aurel on February 18, 2015, 10:38:46 PM
OxIde is in main folder like Ascio2exe to.
Oxide see file  but when i try to compile with Ascio2(AsciEdit) then i get this error.
i use standard :

sRet = ShellExecute 0,"open",cdPath,cOption + chr(34)+fName+chr(34),"",5
Title: Re: Small problem with SciTE
Post by: Charles Pegge on February 19, 2015, 09:45:46 AM
Hi Aurel,

I think it's to do with specifying the correct pathnames.

When Oxide is launched, it captures its own full directory name before changing to the current script/source directory.

Code: OxygenBasic
  1.     GetCurrentDirectory 256, buf
  2.     o2dir=buf
  3.  

This path is used for accessing the compiler, and any files with a specified includepath relative to this directory.