<p style="font-family: 'Liberation Sans'; font-size: x-small;"><span style="font-size: small;">Hi, thanks for reply.</span></p>
<p style="font-family: 'Liberation Sans'; font-size: x-small;"> </p>
<p style="font-family: 'Liberation Sans'; font-size: x-small;"><span style="font-size: small;">Yes, I need something like</span></p>
<p style="font-family: 'Liberation Sans'; font-size: x-small;"><span style="font-size: small;">1) say to OI thah I'm going to delete TPersistent</span></p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">2) delete it (my own code)</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">3) refresh OI (node must disappear)</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">I tried to search other people's code how they do it but I didn't find any.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">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.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">V.</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"> </p>
<p style="padding:0 0 0 0; margin:0 0 0 0;"><span style="font-size: 10pt;">______________________________________________________________</span><br />
<br />
</p>
<p style="padding:0 0 0 0; margin:0 0 0 0;">> Od: Juha Manninen via Lazarus <lazarus@lists.lazarus-ide.org><br />
> Komu: Lazarus mailing list <lazarus@lists.lazarus-ide.org><br />
> Datum: 28.11.2017 13:10<br />
> Předmět: Re: [Lazarus] Deleting items in OI<br />
></p>
On Sat, Nov 25, 2017 at 8:21 PM, Vojtěch Čihák via Lazarus<br />
<lazarus@lists.lazarus-ide.org> wrote:<br />
> I just have some more info. Everything was OK to revision 52209.<br />
> OI was completly broken between 52210 and 52229 (components didn't appear at all).<br />
> Revision 52230 improved OI but deleting didn't work as described in previous<br />
> mails, it's up to now.<br />
<br />
Yes, those were my commits. Sorry I did not answer earlier, something<br />
always came up when I planned to study the issue.<br />
The changes were more or less valid. At least they fixed bugs and<br />
optimized the updates.<br />
However your usage of TPropertyEditorHook looks suspicious and<br />
counter-intuitive:<br />
<br />
aHook.PersistentDeleting(aECTab);<br />
aECTC.DeleteTab(aECTC.TabIndex);<br />
aHook.SelectOnlyThis(aECTC.Tabs); { force the OI to refresh }<br />
<br />
Calling aHook.DeletePersistent() would be intuitive. It that is not<br />
possible in your case, then we should improve the API.<br />
Something like "StartDeletingPersistent()" + "EndDeletingPersistent()"<br />
pair maybe.<br />
How about calling aHook.Modified?<br />
What would be the most intuitive API in your opinion?<br />
<br />
Juha<br />
-- <br />
_______________________________________________<br />
Lazarus mailing list<br />
Lazarus@lists.lazarus-ide.org<br />
<a href="https://lists.lazarus-ide.org/listinfo/lazarus">https://lists.lazarus-ide.org/listinfo/lazarus</a><br />