Author Topic: Questions about Version A42  (Read 6028 times)

0 Members and 1 Guest are viewing this topic.

Arnold

  • Guest
Questions about Version A42
« on: May 05, 2016, 12:16:24 AM »
Hi Charles,

I noticed the latest build of OxygenBasic 30 April 2016. My small projects run quite nice with this version which is now labelled A42. Are there new features added to this release?

You also performed some modifications to Oxide. But somehow the hotkeys for Find: ^F / F3 / F4 etc do not work with me - is there no dialog? Or must I use a special way to search for words / keywords? How could I replace text in a source file? I do not know about Scintilla, but should it not also be possible to add a Find/Replace dialog in Oxide as is the case in SciTE?

Roland

Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #1 on: May 05, 2016, 01:18:51 AM »
Hi Roland,

A42 supports namespaces, and has an improved storage/retrieval system, internally.

The source code has also been tweeked to compile with FreeBasic 1.05 (previous: FB 0.9)

simple example of namespaces:

Code: OxygenBasic
  1. sys i=1
  2. namespace AA
  3. sys i=2
  4. namespace BB
  5. sys i=3
  6. namespace CC
  7. sys i=4
  8. print aa::i '2
  9. print bb::i '3
  10. print i     '4
  11. namespace
  12. print i     '1
  13. namespace AA
  14. print i     '2
  15.  


Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #2 on: May 05, 2016, 01:53:55 AM »
I've started work again on Oxide.

Currently working on project files (file switching etc)
This works by dragging files onto the left panel

FIND Ctrl-F3 & Ctrl-F4 should work, but no find&replace option yet. I'll put the Edit menu back in

Latest Oxide build: goes in the main OxygenBasic folder:
« Last Edit: May 08, 2016, 12:39:12 AM by Charles Pegge »

Arnold

  • Guest
Re: Questions about Version A42
« Reply #3 on: May 06, 2016, 12:49:19 AM »
Hi Charles,

to use namespace looks very promising. It would help to avoid naming conflicts. Does it work for all types and structures? Reading about namespaces I learned that they are used in particular for oop, but I think namespace could be interesting for normal structered programming too. I would apply namespace to create .inc files as separate modules.

I now found my mistake using Ctrl+F in Oxide. I thought I had to enter the text in the Edit field right on top but I must use the left Edit field and press Enter. Then F3 works too. For a find / replace I think you maybe will have to split the top band into 3 fields.

Nevertheless I think using a Find, FindReplace dialog would be more comfortable. There would also be the options to search for case sensitive, whole words, forward and backward searching. In examples\Wingui you already provided FindReplace.o2bas and DialogFindReplace.inc (WinApi function FindText is missing). In any event implementing a Find & Replace functionality somehow would make Oxide a real alternative.

Roland

Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #4 on: May 07, 2016, 02:31:01 AM »
Hi Roland,

We have Find, Find&Replace on the Edit menu.

Find&Replace is accessed using F4, replacing the previous function.

F3 - forward search
Shift F3 - backward search
Ctrl - F3 Capture search term (can now capture selected phrase)

F4 find&replace works in a similar way

We also have Find&Replace All Within Selected Block, available from the Edit menu.

« Last Edit: May 08, 2016, 12:39:48 AM by Charles Pegge »

Arnold

  • Guest
Re: Questions about Version A42
« Reply #5 on: May 07, 2016, 09:08:12 AM »
Hi Charles,

you are incredibly fast. Until now I have only managed to start experimenting with FindReplace.o2bas. I added an Edit control and MainMenu and I managed to start the Find and FindReplace Dialog. But now I have to check what to do with the results. It will be a nice learning exercise.

Find, Find&Replace will work in Oxide although the unusual manner needs a bit getting used to.

Is there a special way to close a file with several opened source files ? For a single file I can use Menu Item New or Open, but if I drag and drop some files to Oxide, I assume I must modify new.proj afterwards?

Roland

Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #6 on: May 08, 2016, 12:57:29 AM »
Hi Roland,

When you drag and drop program files to the left panel, they become listed there, and the proj file is automically updated. It is also updated whenever files are switched or saved (F9), or when oxide is closed.

The project can also be edited manually, including changing the name of the proj file.
When manual edits are made, pressing F9 will autmaticall save the proj file using the specified name.

When proj files are dragged onto the left panel, they replace the current proj.

A few refinements to this scheme:
« Last Edit: May 18, 2016, 12:58:21 AM by Charles Pegge »

Arnold

  • Guest
Re: Questions about Version A42
« Reply #7 on: May 09, 2016, 01:46:14 AM »
Hi Charles,

probably it is necessary to work a little bit with Oxide to explore the facilities.

This issue is only a cosmetic one. For my menus I found that I can use tab for \t to set the hotkeys on the right side, for instance:

    hMenu = CreateMenu
    hMenuPopup = CreateMenu
    aps IDM_FILE_NEW,     "&New"
    aps IDM_FILE_OPEN,    "&Open  " tab "F8"
    aps IDM_FILE_SAVE,    "&Save  " tab "F9"
    aps IDM_FILE_SAVE_AS, "Save &As...  " tab "shift-F9"
    apm MF_SEPARATOR, 0,                null
    aps IDM_APP_CONS0,    "System Console " tab "F7"
    aps IDM_APP_CONS1,    "OxyConsole " tab "shift-F7"
    aps IDM_APP_FINDED,   "FindEd" tab "Ctrl-F7"
    apm MF_SEPARATOR, 0,                null
    aps IDM_APP_EXIT,     "E&xit " tab "Alt-F4"
    AppendMenu hMenu,      MF_POPUP,     hMenuPopup,       "&File"

To create binary and independant binary is a nice feature. But could the binaries not be compiled to the path of the original code with the name of the file? For a oxygen.dll dependant binary I think there would be no copy _.o2bas necessary. For an independant binary there could be a _.o2bas copy of the progname.o2bas in the path of the source code and #file would be set to progname.exe. As I do not know what side effects might occur it is only an idea for the moment.

Roland

Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #8 on: May 16, 2016, 02:15:51 AM »
Hi Roland,

Some further progress with Oxide, including tidier menus, better behaved find/replace, and more developed proj files, including the ability to specify the path for compiled binaries, and attach batch procedures to the menu.

I'm using Oxide to develop Oxide :)
Take this as an example project script:

Code: [Select]
$project [C:\cevp\code\OxygenBasic\tools\oxide.proj]

$files
<[Oxide.o2bas]> 000001 [C:\cevp\code\OxygenBasic\tools\Oxide.o2bas]
<[OxideUtil.inc]> 000058 [C:\cevp\code\OxygenBasic\inc\OxideUtil.inc]
<[WinUtil.inc]> 000032 [C:\cevp\code\OxygenBasic\inc\WinUtil.inc]
<[FindEd.o2bas]> 000011 [C:\cevp\code\OxygenBasic\tools\FindEd.o2bas]
<[SysUtil.inc]> 000003 [C:\cevp\code\OxygenBasic\inc\SysUtil.inc]
<[co2.o2bas]> 000077 [C:\cevp\code\OxygenBasic\tools\co2.o2bas]

$main [C:\cevp\code\OxygenBasic\tools\Oxide.o2bas]
$binary [C:\cevp\code\OxygenBasic\tools\Oxide]

$command install oxide A
[
..\co2.exe -c oxide.o2bas
LinkRes2Exe.exe Oxygen.res Oxide.exe
copy Oxide.exe ..\
del Oxide.exe
]

$command install oxide B
[
..\co2.exe -c -m oxide.o2bas
LinkRes2Exe.exe Oxygen.res Oxide.exe
copy Oxide.exe ..\
del Oxide.exe
pause
]


I'm keen to continue using fixed panels for find/replace instead of dialog boxes, since the latter are somewhat cumbersome.
« Last Edit: May 18, 2016, 12:59:01 AM by Charles Pegge »

Arnold

  • Guest
Re: Questions about Version A42
« Reply #9 on: May 17, 2016, 01:06:59 AM »
Hi Charles,

the scripting feature of Oxide will be very useful. As I did not find a proper project provided with OxygenBasic I tried an example of the Oxygen-BCXgui project which I saved as C:\BCXguiApps\Help-Demo\Setbitmap.proj.

It seems that modifications of Setbitmap.proj done in Oxide will be saved automatically if I exit Oxide?

If I try to use Execute F5 there will be an error message: SetbitmapDll.dll not found. But if I use ProjectUtil -> Execute SetBitmap.o2bas this will work. Is something missing with Execute F5?

What is the purpose of $main and $binary? To compile to an Binary32 or Independent Binary32 will work very well. Somehow I only miss the "Okay" message if there is success.

All things considered you have really achieved much progress with Oxide now.

Roland

Code: [Select]
$project [C:\BCXguiApps\Help-Demo\Setbitmap.proj]
$files
<[SetBitmapDLL.o2bas]> 000008 [C:\BCXguiApps\Help-Demo\Rsrc\SetBitmap\SetBitmapDLL.o2bas]
<[Setbitmap.o2bas]> 000025 [C:\BCXguiApps\Help-Demo\Setbitmap.o2bas]

$main [C:\BCXguiApps\Help-Demo\Setbitmap.o2bas]

$binary [C:\BCXguiApps\Help-Demo\Setbitmap]

$command Create SetBitmapDll.dll
[
cd C:\BCXguiApps\Help-Demo\Rsrc\Setbitmap
Build_dll.bat
cd C:\BCXguiApps\Help-Demo
pause
]

$command Execute SetBitmap.o2bas
[
cd C:\BCXguiApps\Help-Demo
C:\OxygenBasic\gxo2.exe Setbitmap.o2bas
pause
]


Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #10 on: May 18, 2016, 12:31:20 AM »
Hi Roland,

I've been working on current-directory logistics. I hope this resolves your compiling problem.

$main  specifies the file to be compiled/executed

This allows another file, say an inc file, to be in the editing window during compilation.

$binary  specifies the path and name of the executable (excluding the extension name: .exe or .dll).

Paths within the OxygenBasic folder are now condensed using '$': For example:

$\tools\oxide.o2bas

Code: [Select]
$project [$\tools\oxide.proj]

$files
<[Oxide.o2bas]> 000237 [$\tools\Oxide.o2bas]
<[OxideUtil.inc]> 000089 [$\inc\OxideUtil.inc]
<[WinUtil.inc]> 000032 [$\inc\WinUtil.inc]
<[FindEd.o2bas]> 000011 [$\tools\FindEd.o2bas]
<[SysUtil.inc]> 000003 [$\inc\SysUtil.inc]
<[co2.o2bas]> 000077 [$\tools\co2.o2bas]

$main [$\tools\Oxide.o2bas]
$binary [$\tools\Oxide]

$command install oxide A
[
..\co2.exe -c oxide.o2bas
LinkRes2Exe.exe Oxygen.res Oxide.exe
copy Oxide.exe ..\
del Oxide.exe
]

$command install oxide B
[
..\co2.exe -c -m oxide.o2bas
LinkRes2Exe.exe Oxygen.res Oxide.exe
copy Oxide.exe ..\
del Oxide.exe
pause
]

.
« Last Edit: May 18, 2016, 01:31:19 AM by Charles Pegge »

Arnold

  • Guest
Re: Questions about Version A42
« Reply #11 on: May 21, 2016, 05:53:25 AM »
Hi Charles,

after working with Oxide a little bit I would like to inform about my experience. I think Oxide works quite well. There is no problem with creating or opening files and execute them. I also tried to use Oxide as a second instance and this will work too.

Also using project files will work although some handcraft will be necessary. I did not use project files in the past but I suppose this should be common usage. I think I will create some template .proj files for some often used tasks.

Would it be possible to open a .proj in the left pane without drag and drop? And maybe it is also possible to add a splitter so that the extension of the left / right pane could be changed? These are only marginal aspects of course.

Roland

Charles Pegge

  • Guest
Re: Questions about Version A42
« Reply #12 on: May 22, 2016, 12:24:01 AM »
Hi Roland,

Many thanks for the feedback on Oxide.

I've changed slightly the way new projects are created. When you drag the main file onto an empty left panel, it will create a new project template of the same name, or retrieve a matching project file, if it already exists.

It is also possible to drag selected blocks of files, as well as single files, onto the project panel.

You can drag a project file onto the Oxide icon, or any of its shortcuts.

You can now specify the extension name for $binary: .dll or .exe. This will override the compile-menu setting.

Not sure how to implement a windows pane splitter. It could be done at low-level.

Ultimatetly, I would like to use an OpenGl-based GUI instead of Windows/Scintilla, which would open many new possibilities for more graphical and colorful programming :)

.