On Wed, 27 Dec 2006 15:19:47 +0100
Aleš Katona <[EMAIL PROTECTED]> wrote:
> Hey again, new thread - old problem.
>
> I've now figured out (thanks to jesus) how to work with the designer
> stuff and OI with a property editor in a package. Problem is, glscene
> expects the Designer.SelectOnlyThisComponent() to accept a TPersistent
> (delphi does) whereas the designer expects a TComponent.
>
> I tried re-inheriting the problematic object from TComponent but that
> produced AV eventualy. Honestly I don't have the time to debug this
> so .. the questions.
>
> 1. Why doesn't lazarus/LCL accept a TPersistent for Designer.Select...
> when delphi does?
It does. Only the above function only supports TComponent.
Here is the more general selection function:
In package IDEIntf unit propedits.pp:
GlobalDesignHook.SelectOnlyThis()
Keep in mind to update the GlobalDesignHook.LookupRoot after selecting
a non TComponent. Otherwise the IDE won't know, to which unit the
object belongs to and several features will not work (e.g. setting
events).
> 2. Is there a way to work around without changing the item passed? I
> don't want to force TComponent inheritance because the mentioned item
> explicitly doesn't use it for a reason.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives