Re[2]: Help with plugin concept

new topic     » topic index » view thread      » older message » newer message

How about this:

In dir plugins:
plugin1.plg
plugin2.plg
...
pluginn.plg

Then add one more file: plglist.e
which contain:
include plugins/plugin1.plg
include plugins/plugin2.plg
include plugins/pluginn.plg

which can be edited by IDE, so it's like this:

 fn = open("plglist.e", "w")
 files=dir(the_current_dir & "//Plugins")
 if sequence(files) then
     if length(files) then
         for i=1 to length(files) do
             if not find('d', files[i][D_ATTRIBUTES])) then
                 puts(fn, "include plugins/" & files[i][D_NAME] & "\n")
             end if
         end for
     end if
 end if
 close(fn)
 include plglist.e

So it will always load the plugin files.
 




J> The corrected routine is below but it doesn't really matter because it will
J> never work.

J> files=dir(the_current_dir & "//Plugins")
J> if sequence(files) then
J>     if length(files) then
J>         for i=1 to length(files) do
J>             if not equal("d",files[i][D_ATTRIBUTES]) then
J> --corrected line
J>               include files[i][D_NAME]    <=== gets ex.err
J> -----------------------------------
J>             end if
J>         end for
J>     end if
J> end if



J> TOPICA - Start your own email discussion group. FREE!

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu