Florian Klaempfl wrote:
Warren Postma schrieb:
You still can't install packages in Lazarus because the underlying FPC
compiler lacks a runtime package system that could support a more
delphi-like designtime/runtime packages installation system.  Which by
the way is the worst part of Delphi. Everyone complains about Delphi
component installation headaches.

If Lazarus develops ANY package support whatsoever, I'll contribute and
help make it better.


We had this discussion hundred times already and nobody showed a use
case for dyn. packages in FPC/Lazarus which make the big troubles for
maintainance and deploying of FPC/Lazarus itself worth the effort.

_____

You might just be right. And aiming low (where Delphi currently is) might be the wrong idea.

I have a better idea, I think.

*Alternative Strategy to Packages – Out of Process Component Proxy System*

*Problem:*

Work-around allowing Lazarus to plug in and test/use a component without recompiling lazarus itself, and without requiring package support.

* *

*Bonus feature:* Better package support than Delphi in two critical ways: *While debugging a component*, it will be impossible to crash Lazarus using this system, as well, it is impossible to break your lazarus IDE so it won’t build. Secondly, because TComponentProxy feature is “always inside” Lazarus, any project you open that contains a component that is not compiled within the IDE, will be transparently loaded, and saved, and preserved within the DFM, perhaps even a saved image of what it looks like could be kept in the project directory, so you can easily open and view and even change a Lazarus app without rebuilding your IDE to contain some custom controls.

*Design:*

Introducing *TComponentProxy* –

A component proxy has three main uses:

1. stand-in (‘body double’) for a missing Tcomponent class.

2. A proxy for an out-of-process component located in another process stub. Communicates via TCP/IP with an out-of-process component instance.

3. RTTI/Streaming/Persistence/DFM-reader/DFM-writer features in Lazarus must become aware of TComponentProxy and make the process of using an out-of-process designtime component simpler.

It has a static appearance, a cached picture (bitmap image) of the control’s appearance, which is regenerated and refreshed. If the test-app is not running, then a big X appears indicating the place-holder controller. Actions (right click menu in designer) on the component are possible, and are sent to the test application via TCP/IP messages.

These controls have several limitations:

1. They cannot contain other controls (as in panels)

2. They will usually display a sample appearance that cannot reflect complex object linkage, and are thus unsuitable for such controls as data-aware components, image list links, or which require designtime object reference lookups.

Introducing *TcomponentTestApp –*

The test app is a TCP/IP server app, it creates 1 or more instances of a particular class. Using a hidden Tform, it renders each control at a given width,height, transmits this rendered picture to the TComponentProxy, which then paints this “skin” onto its otherwise blank rectangle in the designer surface.

The TCP/IP protocol has the following commands issued by the TComponentProxy, responses served up by the TComponentTestApp:

GetImage(width,height) – Gets Image for given width/height.

GetProperties – Gives text output of current properties in format all ready for DFM stream writing

SetProperties – Given text input of current properties read from a DFM, set all your properties

GetProperty(name) – get one property, return format in DFM compatible text.

SetProperty(name,strDfm) – set one proprty, must use DFM compatible format.

GetActions – Get list of strings which are actions.

ExecuteAction(index) – Execute a right-click-on-component action designer. Default index # 0 is also invoked by double-clicking the component.

The events that are fired (async) from the TcomponentTestApp are:

ImageInvalidate – Appearance has changed, please call GetImage again.

ActionComplete(index) – Action such as component editing is complete.

DfmChange – You should call GetProperties again, and update the DFM.

What do y'all think?

Warren


_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to