Author Topic: Aurel Edit  (Read 19115 times)

0 Members and 1 Guest are viewing this topic.

Arnold

  • Guest
Re: Aurel Edit
« Reply #30 on: March 22, 2018, 08:22:47 AM »
Hi Aurel,

as you asked about awinh35.inc, I downloaded your project and it runs ok with me, if I comment out: include RTL32.inc in AurelEdit.o2bas. I did not use the exe file. I also replaced gxo2.dll, oxygen.dll,Scilexer.dll with the files of Oygen Beta and removed RTL32.inc from the folder.

I did not test much. "Web Site" and "add compiler Path" seem not to be integrated? Find does not work correctly, it does only find whole words. Save seems not to work if I enter a different filename. Running a compiled file does not work: missing oxygen.dll (because oxygen.cfg is missing)

I can only tell you what I would do and have done. I removed gxo2.exe, oxygen.dll, RTL32.inc, SciLexer.dll from the folder. They are really not necessary. And if someone would compile a program he / she will need a path to Oxygen's include files anyway.

At the beginning of AurelEdit.o2bas I inserted:
$ Filename "AurelEdit.exe"
'Include "RTL32.inc"
use corewin
Include "awinh035.inc"
...

For developing I modified the line 147:
string gxName="\gxo2.exe"   ' for oxygen change path to \gxo2.exe
to:
string gxName="c:\oxygenbasic\gxo2.exe"   ' for oxygen change path to \gxo2.exe
and the line 887:
sRet = ShellExecute(0,"open",cdPath,"-c" + fName,"" , 5) ' if work sRet = 42
to:
sRet = ShellExecute(0,"open",gxName,"-c" + fName,"" , 5) ' if work sRet = 42

Then in awinh035.inc I commented out line 579-699

...
#lookahead
/*
Dim kernel32,user32,gdi32,riched32,comdialog32,comctl32
...
Declare Function ImageList_AddMasked Lib "comctl32.dll" (byval hImageList as sys,byval hBitmap as sys,byval crMask as sys) as sys
'-----------------------------------------------------------------------------------------------------------
*/
...

After saving Aureledit.o2bas and awinh035.inc I ran AurelEdit.

Following the error messages, I modified in AurelEdit:
Line 150: GetCurrentDirectory
and in awinh035.inc I added in Line 700:
Declare Function timeGetTime   Lib "winmm.dll" () As Long

I now have at least a running AurelEdit.o2bas. It does not work correctly, because for using the unprotyped WinApi functions most probably some parameters must be applied differently, e.g. after compiling a loaded file and running the compiled exe (with error message) the tabs will disapear.

But before examining the subs and functions I would first check which structures and constants I will not need, because they are already included in WinData.inc. Then I would go into the details.

But as I stated, this is only what I would do (trial and error).

Roland



Aurel

  • Guest
Re: Aurel Edit
« Reply #31 on: March 22, 2018, 09:22:59 AM »
First
thank you Arnold for try ...
... and you probably figured what kind of troubles I have when i try to compile
and run AurelEdit on progress_o2 version
for example #lookahead works different in progress version than in old A041
that also complicate things and some stuff ...

It looks that  constants with &H not respond like before
My problem with toolbar control is because i use ImageList and I figured that
also i must modify toolbar style too.

all in all
thanks   :)
 

Charles Pegge

  • Guest
Re: Aurel Edit
« Reply #32 on: March 22, 2018, 09:30:20 AM »
Aurel and Roland,

I now have the skeleton Menu/Toolbar Test working 64bit, using corewin, and ensuring all handles are sys

I've put in a few annotations.


Aurel

  • Guest
Re: Aurel Edit
« Reply #33 on: March 22, 2018, 10:28:51 AM »
Hi Charles and Roland/Arnold
Thank you !

So main problem is with this stupid structure  TBBUTTON
everything else seems to me same - as i see ?
i suspect that something is wrong with that  ::) !"#$%&/((#$%%  >:(
I am wondering how then work with old way-  is a mistery ...
ok i can continue...
 :)

tnx
Aurel




chrisc

  • Guest
Re: Aurel Edit
« Reply #34 on: March 22, 2018, 10:43:14 AM »
very beautiful menu

it would be nice to have tooltips and the button working as well

Arnold

  • Guest
Re: Aurel Edit
« Reply #35 on: March 22, 2018, 11:15:21 AM »
Yes Charles,

this is exactly the way I would suggest to Aurel. Your example can be used in JIT mode and created as a 32-bit or 64-bit executable. Perhaps Aurel can be convinced too. If he gets rid of the unnecessary constants and types, he will get a better overview of what is missing or does not work.

Roland

Aurel

  • Guest
Re: Aurel Edit
« Reply #36 on: March 22, 2018, 12:11:03 PM »
hi chrisc
tooltips work in Charles example just keep mouse pointer over toolbar button.

Arnold
Yeah maybe this is the way to avoid all problems .
I try to use Charles example but with api declaration with changes he made
and i get again nothing ..
so somewhere types are strict and somewhere are not...
I will try to compile AurelEdit with CoreWin.inc that is not problem
but i suspect that would work like in with old version scintilla not respond very well to.  ::)

chrisc

  • Guest
Re: Aurel Edit
« Reply #37 on: March 22, 2018, 04:41:49 PM »
Hello Aurel

i have placed the mouse over the toolbar but there isn't any tooltips?

Charles Pegge

  • Guest
Re: Aurel Edit
« Reply #38 on: March 22, 2018, 07:22:28 PM »
A few more INT to sys, and the tooltips are now working 64bit.

Aurel

  • Guest
Re: Aurel Edit
« Reply #39 on: March 22, 2018, 10:50:37 PM »
Quote
A few more INT to sys

Charles
Is that general problem?
I see that  - when i replace INT with SYS in Function Declaration
o2 throw error  - linker found unidentified name
I mean why is this time too strict?
In another word why we dont have ERROR TYPE  -> ERROR -> VARIABLE WRONG TYPE ! at LINE

Charles Pegge

  • Guest
Re: Aurel Edit
« Reply #40 on: March 23, 2018, 02:33:47 AM »
Hi Aurel,

That error may be caused by a mismatch between forward-declaration and prototype. In 64bit, int no longer matches sys.

Aurel

  • Guest
Re: Aurel Edit
« Reply #41 on: March 23, 2018, 04:01:29 AM »
Hi Charles
but i use 32bit win7
and also if is not matched sys /int and int/sys
In my programs i prefer to use INT...but i don't have nothing against SYS
if i must i will use sys.

Arnold

  • Guest
Re: Aurel Edit
« Reply #42 on: March 23, 2018, 04:02:29 AM »
This is also something which I forgot to mention. During creating the app I do not use #lookahead. Either I declare the subs/functions at the beginning of the programm or I use the bottom_up way. If everything works correctly then I can use #lookahead also.
From now on I will also use #autodim off, which enforces variable declarations. I think some of my problems in the past arose because I forgot to declare some sensitive variables.

Aurel

  • Guest
Re: Aurel Edit
« Reply #43 on: March 23, 2018, 04:06:23 AM »
Quote
#autodim off

Yes Arnold #lookahead make problems and also it looks that i will start use #autodim off
I always (only when forget   ::)) like first to define all  variables.
« Last Edit: March 23, 2018, 04:34:47 AM by Aurel »

Charles Pegge

  • Guest
Re: Aurel Edit
« Reply #44 on: March 23, 2018, 04:53:07 AM »
#lookahead runs through the rest of the script collecting function prototypes, and turning them into declarations. These declarations are then inserted into the script.

If the prototypes contain any types or typedefs defined below #lookahead, the declarations will not be properly processed.

I will see if this situation can be improved