Freepascal testplugin failed

Questions about NeoBook PlugIns

Moderator: Neosoft Support

User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Freepascal testplugin failed

Post by HPW »

Hello,

For a closer look at freepascal I installed CodeTyphoon on one of my systems:

http://www.pilotlogic.com/sitejoom/

I tried to port the SpinEdit Example from the SDK to freepascal.
But it does not work.
A lot things work similar in lazarus and freepascal to delphi and the supported librarys are very interesting.
But there remain inkompatibilitys:

http://www.pilotlogic.com/sitejoom/inde ... to-ct#3738

So it seems that I have to stay with delhi.


Regards

Hans-Peter
Hans-Peter
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,

I tried with Lazarus time ago, and, like you can view, I cannot obtain a valid NeoBook plugin. So...
So it seems that I have to stay with delhi.
;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,

Thinking in other things I want to try again the Delphi Plugin Template in Lazarus and, surprisingly, with a little modifications we can create a valid DLL in order to be used as a NeoBook plugin. I do not try with the Delphi Spin Edit Sample, but, since the basic template works, probably we can develop plugins with Lazarus without problems. The only thing I can't solve at the moment is the "DllProc", which is something that apparently do not exists (?) in a Lazarus library. But by my experience very few plugins need to use something like that.

The bellow link contain a modificated "Delphi Plugin Template" in a Lazarus library project ready to compile:

http://www.neoplugins.com/?download/lazarus.zip

Interested people can download Lazarus for Windows from here:

http://lazarus.freepascal.org/
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Freepascal testplugin failed

Post by Neosoft Support »

Thanks for sharing this with us David! Is it OK if we include your sample in a future version of the plug-in SDK?
NeoSoft Support
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,
Neosoft Support wrote:Thanks for sharing this with us David! Is it OK if we include your sample in a future version of the plug-in SDK?
You're welcome! Of course you can use the above sample for whatever you wanted Dave. However the sample I post above is a modification of the "Delphi Template", which itself is not a plugin sample. In few words, I think the above sample is not the better to be added into the SDK. Please let me sometime in order to prepare a better sample, which do not remove the comments (which can be useful for new developers) and add some "real sample" capabilities.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
Neosoft Support
NeoSoft Team
Posts: 5628
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA
Contact:

Re: Freepascal testplugin failed

Post by Neosoft Support »

Great! Thank you.
NeoSoft Support
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,

Yesterday I found a problem with Lazarus forms which apparently can be solve, and now a Lazarus plugin can use forms not only for action editor's but also for runtime purposes. However a problem remain. Apparently the "CreateParented" implementation is not perfect in Lazarus or at least do not work like we can expect in Delphi. This means that we can loss the form focus and even when we can try something like put the form "On Top" the behaviour is not exactly the same that we can vew in Delphi where we use "CreateParented" usually.

Anyway the bellow linked Zip contain a Lazarus plugin which include one sample action with their appropiate action editor form. The Zip include the source code and also the compiled NBP. I think that with some more work and maybe some little restrictions we can at least use Lazarus to create some NeoBook plugin. Depend on the plugin and the developer I think Lazarus can be also a good tool since their price cannot be compared with the Delphi price. So anybody can now at least experimenting a bit more with Lazarus and their possible usage.

http://www.neoplugins.com/?download/lazarus2.zip
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Freepascal testplugin failed

Post by HPW »

Hello David,

Great to hear that you make progress on this.
When I find some time I will have a look at your new template.

Regards
Hans-Peter
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,
HPW wrote:Hello David,

Great to hear that you make progress on this.
When I find some time I will have a look at your new template.

Regards
Thanks Hans. In fact I make very little changes in the original Delphi template: just remove the "@" operator when reference some methods and remove the DLL Procedure, which appear unusable. Doing this we obtain a valid template but with no user interface. If we want to use forms (which usually is) we need to do something like the sample I attach above (the lazarus2.zip sample).

Basically we need to add the Interfaces and Forms units and call the "Forms.Application.Initialize()" at the begin. Doing this we can use forms, but with the problem I mentioned before: apparently the "CreateParented" function do not works like we can expect and this can cause the "form focus loss problem". Anyway I think that Lazarus can be used to do at least certain things.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Freepascal testplugin failed

Post by dpayer »

dec wrote:Hello,
Anyway I think that Lazarus can be used to do at least certain things.
Interesting thread.

David P.
David Payer
Des Moines, Iowa
USA
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Freepascal testplugin failed

Post by HPW »

Hello David,

Whenever I try to download lazarus2.zip it says that it will download 651 KB, but when ready only a 308 KB corrupted file is downloaded.

Regards
Hans-Peter
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,
HPW wrote:Hello David,

Whenever I try to download lazarus2.zip it says that it will download 651 KB, but when ready only a 308 KB corrupted file is downloaded.

Regards
Try again Hans. I just try the link and works fine. Probably a temporal problem or something like that occur. ;)

http://www.neoplugins.com/?download/lazarus2.zip
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
HPW
Posts: 2571
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany
Contact:

Re: Freepascal testplugin failed

Post by HPW »

Tried it several times.
Everytime I get 316285 Bytes.
Hans-Peter
User avatar
dec
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain
Contact:

Re: Freepascal testplugin failed

Post by dec »

Hello,

It's rare since I can download well and the FTP show me the correct file size. However I download, unzip, zip and then upload again. ;)

http://www.neoplugins.com/?download/lazarus2.zip
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
Gaev
Posts: 3782
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada
Contact:

Re: Freepascal testplugin failed

Post by Gaev »

Just tried it ... used Firefox on Windows XP.

Downloaded as expected (652 KB).

Unzipped OK too ... a bunch of small files and Sample.nbp (1,661 KB).

@HPW: if you want, I can re-zip the files and send to you.
Locked