Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle
On Wed, 14 Jun 2023, Marcos Douglas B. Santos wrote: On windows, the handle should work the same. If you're working on another platform, then it works very different, and then you'll need to see what sciter actually expects. I would like it to work on Windows, Linux and MacOS, but for now I will be glad that it only works on Windows. Michael, Do you have any more ideas to try to solve this issue? I think that first of all the result of API.SciterSetCallback (2 lines before) needs to be checked. If this also gives an error, then we at least know the window handle is totally not OK. If that does not give an error, then I think it means the createparams are not OK for the event handler. It can be that the customcontrol window handle is created with different create params than the one in Delphi. I don't know how to check this. There is also 'HANDLE_ALL' which requests event handling for all kinds of events, including DND So I would also change HANDLE_ALL to something like HANDLE_MOUSE OR HANDLE_KEY OR HANDLE_FOCUS Because maybe the window handle is not created with the correct parameters for HANDLE_ALL. I found some Go code that initializes OLE stuff for the window, and I would be surprised if Lazarus does this by default; if HANDLE_ALL also must handle OLE messages, then it can be it fails for those messages. Unfortunately, the sciter documentation is very unclear in terms of what is expected of the window handle. Michael. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle
On Wed, Jun 14, 2023 at 7:43 AM Marcos Douglas B. Santos wrote: > > On Wed, Jun 14, 2023 at 6:47 AM Michael Van Canneyt via lazarus > wrote: > > > > On Tue, 13 Jun 2023, Marcos Douglas B. Santos via lazarus wrote: > > > > > Hi, > > > I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, > > > which could be an open source project in the future — yes, > > > not the newer version (named Sciter.JS) as I don't need these new > > > features. > > > > > > I've started looking into https://github.com/da-baranov/SciDe (~8 years > > > ago). Then, I discovered a fork > > > https://github.com/Mikanoshi/SciDe (~5 years old) and forked from it > > > because it is "newer". > > > > > > The da-baranov's original repository already tried to run on Lazarus, but > > > they have an issue which couldn't be solved: > > > https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772 > > > > If you look at the issue, you see there is a commit that claims to solve > > this issue. Did you test if that commit is incorporated in your code ? > > Yes, it is incorporated. First I checked it, but later forked the > repository from the author of this commit (mr. Mikanoshi), which is > newer... > But it didn't work. > > > > I have the same issue, even using the newer version... > > > When it calls API.SciterWindowAttachEventHandler() here > > > https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440, > > > the result is always SCDOM_INVALID_HWND. > > > > > > Why am I asking this here? Well, the project claims that it works from > > > Delphi 7 to newer; they could compile on Lazarus; I also > > > could compile (creating a package, a component, etc) on Lazarus; but it > > > do not work because something looks like different about > > > how a Handle works on VCL comparing to LCL. > > > > On windows, the handle should work the same. If you're working on another > > platform, then it works very different, and then you'll need to see what > > sciter > > actually expects. > > I would like it to work on Windows, Linux and MacOS, but for now I > will be glad that it only works on Windows. Michael, Do you have any more ideas to try to solve this issue? Thanks, best regards, Marcos Douglas -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle
On Wed, Jun 14, 2023 at 6:47 AM Michael Van Canneyt via lazarus wrote: > > On Tue, 13 Jun 2023, Marcos Douglas B. Santos via lazarus wrote: > > > Hi, > > I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, which > > could be an open source project in the future — yes, > > not the newer version (named Sciter.JS) as I don't need these new features. > > > > I've started looking into https://github.com/da-baranov/SciDe (~8 years > > ago). Then, I discovered a fork > > https://github.com/Mikanoshi/SciDe (~5 years old) and forked from it > > because it is "newer". > > > > The da-baranov's original repository already tried to run on Lazarus, but > > they have an issue which couldn't be solved: > > https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772 > > If you look at the issue, you see there is a commit that claims to solve > this issue. Did you test if that commit is incorporated in your code ? Yes, it is incorporated. First I checked it, but later forked the repository from the author of this commit (mr. Mikanoshi), which is newer... But it didn't work. > > I have the same issue, even using the newer version... > > When it calls API.SciterWindowAttachEventHandler() here > > https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440, > > the result is always SCDOM_INVALID_HWND. > > > > Why am I asking this here? Well, the project claims that it works from > > Delphi 7 to newer; they could compile on Lazarus; I also > > could compile (creating a package, a component, etc) on Lazarus; but it do > > not work because something looks like different about > > how a Handle works on VCL comparing to LCL. > > On windows, the handle should work the same. If you're working on another > platform, then it works very different, and then you'll need to see what > sciter > actually expects. I would like it to work on Windows, Linux and MacOS, but for now I will be glad that it only works on Windows. Marcos Douglas -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Sciter for Lazarus: VCL Handle vs. LCL Handle
On Tue, 13 Jun 2023, Marcos Douglas B. Santos via lazarus wrote: Hi, I'm trying to run Sciter.TIS https://sciter.com/download/ on Lazarus, which could be an open source project in the future — yes, not the newer version (named Sciter.JS) as I don't need these new features. I've started looking into https://github.com/da-baranov/SciDe (~8 years ago). Then, I discovered a fork https://github.com/Mikanoshi/SciDe (~5 years old) and forked from it because it is "newer". The da-baranov's original repository already tried to run on Lazarus, but they have an issue which couldn't be solved: https://github.com/da-baranov/SciDe/issues/3#issuecomment-87698772 If you look at the issue, you see there is a commit that claims to solve this issue. Did you test if that commit is incorporated in your code ? I have the same issue, even using the newer version... When it calls API.SciterWindowAttachEventHandler() here https://github.com/Mikanoshi/SciDe/blob/master/source/Sciter.pas#L1439-L1440, the result is always SCDOM_INVALID_HWND. Why am I asking this here? Well, the project claims that it works from Delphi 7 to newer; they could compile on Lazarus; I also could compile (creating a package, a component, etc) on Lazarus; but it do not work because something looks like different about how a Handle works on VCL comparing to LCL. On windows, the handle should work the same. If you're working on another platform, then it works very different, and then you'll need to see what sciter actually expects. Michael.-- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus