Hi, thanks for reply.
 
Yes, I need something like
1) say to OI thah I'm going to delete TPersistent
2) delete it (my own code)
3) refresh OI (node must disappear)
 
I tried to search other people's code how they do it but I didn't find any.
 
Even worse, there is possibility to delete TPersistent in OI with Delete key 
which I didn't consider before so I have to redesign several components.
 
V.
 
______________________________________________________________


Od: Juha Manninen via Lazarus <lazarus@lists.lazarus-ide.org>
Komu: Lazarus mailing list <lazarus@lists.lazarus-ide.org>
Datum: 28.11.2017 13:10
Předmět: Re: [Lazarus] Deleting items in OI

On Sat, Nov 25, 2017 at 8:21 PM, Vojtěch Čihák via Lazarus
<lazarus@lists.lazarus-ide.org> wrote:
> I just have some more info. Everything was OK to revision 52209.
> OI was completly broken between 52210 and 52229 (components didn't appear at 
all).
> Revision 52230 improved OI but deleting didn't work as described in previous
> mails, it's up to now.

Yes, those were my commits. Sorry I did not answer earlier, something
always came up when I planned to study the issue.
The changes were more or less valid. At least they fixed bugs and
optimized the updates.
However your usage of TPropertyEditorHook looks suspicious and
counter-intuitive:

 aHook.PersistentDeleting(aECTab);
 aECTC.DeleteTab(aECTC.TabIndex);
 aHook.SelectOnlyThis(aECTC.Tabs);  { force the OI to refresh }

Calling aHook.DeletePersistent() would be intuitive. It that is not
possible in your case, then we should improve the API.
Something like "StartDeletingPersistent()" + "EndDeletingPersistent()"
pair maybe.
How about calling aHook.Modified?
What would be the most intuitive API in your opinion?

Juha
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus 
<https://lists.lazarus-ide.org/listinfo/lazarus>

-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to