Plugin-Based Apps

Share your advanced PureBasic knowledge/code with the community.
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

@quasiperfect
thanks a lot :D
POiNT.OF.PRESENCE group
User avatar
Demivec
Addict
Addict
Posts: 4257
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Post by Demivec »

@quasiperfect: It seems the TestApp crashes if the plugin creates a window whose # doesn't equal zero. I tested your code (by adding a missing EndProcedure) after changing the window# to zero and it worked. I then changed the window# to one and it failed the same as when the window# equaled 666. I'm not sure why it would matter what the window# was.

What changes would need to be made to a plugin that opens a window so that a second plugin could function at the same time? I noticed that in the code sample that after plugin#1 opens a window I can't cause plugin#2 to make a beep. I know it has to do with the event loop but I wasn't sure what needed to be done to make that possible.
quasiperfect
Enthusiast
Enthusiast
Posts: 157
Joined: Tue Feb 13, 2007 6:16 pm
Location: Romania
Contact:

Post by quasiperfect »

@SofT MANiAC for nothing is the least i could do for this great community.

i played a bit with this concept and it works.
i'm not a programmer (i'm a web developer php and mysql) like u guys and i don't know c,asm or winapi so if i say something stupid please excuse me.
i use pb for a hobby and it works great for that, recently i started to concentrate harder at learning pb.

to make the whole thing work i made only the main app catch all actions and a action procedure in each plugin.
u get the events in the main app and just send them to the procedure in the plugin and there treat every action related to the plugin.

it was something simple and i didn't keep the code but i'm sure everyone could make that code.

maybe someone with more experience can share some advanced examples like using threads to do separate things in the plugins at once (example : user inputs a title for a new article is adding and a plugin can check if the title is already in use, if the right chars are writen, or even do some spelling correction in a separate thread not sure if is the case because is a fast action but for a extremely large db i think this will help do things faster) or other interesting advanced stuff.

sorry for my bad english and for any idiotic things i maybe said.

p.s if u guys need hosting for files just ask i have some is just sitting unused
Registered user of PureBasic
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Post by SofT MANiAC »

I find this code useful :D
POiNT.OF.PRESENCE group
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

Link is broken.
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Post by Inf0Byt3 »

Link fixed, see first post.
X
Enthusiast
Enthusiast
Posts: 311
Joined: Tue Apr 04, 2006 6:27 am

Post by X »

Cool. Thanks.
martinpluss
New User
New User
Posts: 1
Joined: Mon Aug 10, 2009 3:14 pm
Location: Exeter, Devon, UK

Anbody have a copy of this - links are broken

Post by martinpluss »

Does anybody have a copy of this rar anywhere? All the links are broken...

Thanks.
leodh
Enthusiast
Enthusiast
Posts: 164
Joined: Sun Nov 06, 2005 6:07 am
Location: Perth Western Australia

Post by leodh »

Hi,

I am looking for some info on writing apps with plugins, does anybody have some example code or a good simple explaination on what to do.

I ant to write a base application and let the user select what they want to add for functionality.

Any help would be great.

Thanx
Regards
Leo
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Re: Plugin-Based Apps

Post by SofT MANiAC »

All links is broken
POiNT.OF.PRESENCE group
Inf0Byt3
PureBasic Fanatic
PureBasic Fanatic
Posts: 2236
Joined: Fri Dec 09, 2005 12:15 pm
Location: Elbonia

Re: Plugin-Based Apps

Post by Inf0Byt3 »

I don't have the original file anymore, but all I can tell you is that the example was very crude. For another demo, you can have a look at Bytessence PasswordManager which is based on a more advanced plugin architecture allowing for data exchange between the main program and the plugin DLL. For more info see this thread:

http://www.purebasic.fr/english/viewtop ... 27&t=35184
None are more hopelessly enslaved than those who falsely believe they are free. (Goethe)
SofT MANiAC
Enthusiast
Enthusiast
Posts: 142
Joined: Mon Sep 17, 2007 10:28 am
Location: P.O.P
Contact:

Re: Plugin-Based Apps

Post by SofT MANiAC »

Inf0Byt3 wrote:I don't have the original file anymore, but all I can tell you is that the example was very crude. For another demo, you can have a look at Bytessence PasswordManager which is based on a more advanced plugin architecture allowing for data exchange between the main program and the plugin DLL. For more info see this thread:

http://www.purebasic.fr/english/viewtop ... 27&t=35184
thanks!!
POiNT.OF.PRESENCE group
Post Reply