Board index » delphi » Run-time packages like expert packages

Run-time packages like expert packages

Thanx for reading...

I would like to create a package and load, unload it from my app (any
time I want), that works as the "Installed packages"... (it is not that
simple). I want my package and my exe to see the "same" memory (global,
local variables) as in the connection of the Delphi IDE and Expert
packages (*.bpl).

To understand my question I use the Screen variable (Menus.UniqueCommand
could be another example).

As I noticed the experts I wrote (*.bpl) and installed in the IDE has
seen the correct Screen variable, that is: Screen.FormCount=22 (suggest
there are 22 forms in the IDE this time).

In my app there are (lets say) 5 forms, code in the .exe says
Screen.FormCount=5 that is OK, BUT if I load (LoadPackage('mypack.bpl'))
my package, the code in the .bpl says Screen.FormCount=0. So the package
does NOT see the same Screen variable.

Thank You that You read it, I need help not for the Screen variable but
for the whole MEMORY THING.
(Sorry, I didn't know which newsgroup to post to)
Hoping for answers:
                                                BencE

ps:
Why I need this ?
My package would have many TPopupMenu, I link them to the main form
which already has some TMainMenu, TPopUpMenu, but if I click any
TMenuItem from the package it has the WRONG TMenuItem.Command after that
a wrong TMenuItem is processed which results in another TMenuItem's
Click.
Because : .exe UniqueCommand=48 (the mainform has 48 TMenuItem), .bpl
UniqueCommand=4 (the package has 5 TMenuItem).

 

Re:Run-time packages like expert packages


1. Don't crosspost.
2. you have to build the main exe with packages.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Re:Run-time packages like expert packages


Thanx,

But I would like to use the packages like plugins, so a new plugin
cannot be compiled to the main exe, and the user would choose which
plugin (package) to use or not, and each package could be developed
without the main executable.

I'm still searching the way to load a package in the "same" memory with
the exe, as the Delphi IDE does.

Thank You again

                                        BencE

Re:Run-time packages like expert packages


Read again. You have to build the main application with packages. Plugin
packages are completely independant. They just have to use same packages as
the main EXE.
The same way Delphi IDE works. It's the only way to share the same data and
object instances.

--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Quote
BencE Parhuzamos wrote in message <3957CECE.D09DB...@yahoo.com>...
>Thanx,

>But I would like to use the packages like plugins, so a new plugin
>cannot be compiled to the main exe, and the user would choose which
>plugin (package) to use or not, and each package could be developed
>without the main executable.

>I'm still searching the way to load a package in the "same" memory with
>the exe, as the Delphi IDE does.

>Thank You again

>                                        BencE

Re:Run-time packages like expert packages


Ok,ok. But If a third party developer would like to develop his own plugin what
then? I can't give him the full source (including the .exe's source) to compile
his own package. And if I build a Delphi IDE package I don't build it with the
IDE! It is a simple .DLL which is loaded by the IDE and "maps" its memory
there.

Here's my another letter sent to the newsgroups:

I created plugins using Delphi packages (desing-time & run-time package), they
should be loaded/unloaded at run-time into the main
executable. Then I want to develop on of these packages without recompiling the
main .exe (it loads the plugin (.bpl) with
LoadPackage()). The .exe is only the skeleton, plugins will build up the
application..

BUT if I use this method, the packages do NOT see the same global and local
variables of the main .exe (example:
Screen.FormCount=1 in the .blp and Screen.FormCount=6 in the .exe at the same
time).

There must be a solution, because the Delphi IDE DOES IT (I created a simple
expert in a package and it saw the same Screen
variable as the Delphi32.exe).

May target is to load the .bpl into the "same" memory as the .exe which is
loading it, not only to fool the Screen variable.

Please HELP!

                            BencE

Re:Run-time packages like expert packages


Well, I wrote it twice and it didn't help. I explained that it is the same
way as Delphi works.
I do it and it works perfectly.
Both application and plugins must share at least vcl50.bpl.
Don't be so obstinate. Try it and you'll see it works. If you don't want to
try, you don't need help. Why do you ask then?
--
----------------------
Regards
Robert Cerny
Remove both qwe when replying
email: robert.qwe.ce...@neosys.xrs.qwe.si

No questions via email, unless explicitly invited.

Re:Run-time packages like expert packages


IT WORKS! Man I'm so glad!!! Why didn't I lisent to You?!

A time ago I tried to use run-time pacakges, but I have included the plugin's
package in the executables run-time packages list, that is why I tought that
the exe must be recompiled. Sorry for not believing You. I mean really sorry, I
can think what You felt. BUT, whit Your help it is working now. Thanks again.

Thanks

                BencE

Re:Run-time packages like expert packages


IT WORKS! Man I'm so glad!!! Why didn't I lisent to You?!

A time ago I tried to use run-time pacakges, but I have included the plugin's
package in the executables run-time packages list, that is why I tought that
the exe must be recompiled. Sorry for not believing You. I mean really sorry, I
can think what You felt. BUT, whit Your help it is working now. Thanks again.

Sorry for crossposting, but I didn't know where to ask.

Thanks

                BencE

Other Threads