<div dir="auto">For getting the main class if there is different one you can use a loop you put in the collect class<div dir="auto"><br></div><div dir="auto"><br><div dir="auto">Private Sub GetMainClass ()</div><div dir="auto">Dim hParent as Object</div><div dir="auto">hParent = me</div><div dir="auto">Do</div><div dir="auto">hParent =Object.Parent (hParent)</div><div dir="auto">If Not (hParent is MyCollect) then break</div><div dir="auto">Loop</div><div dir="auto">Return hParent</div><div dir="auto">End</div><div dir="auto"><br></div><div dir="auto">The child class must have an event and the parent an handle to get object.parent setting</div><div dir="auto"><br></div><div dir="auto"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Le dim. 30 sept. 2018 12:12, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com">gambas.fr@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">The other way can be a direct call to a static function in the main class. <div dir="auto"><br></div><div dir="auto">This static function just add the log in a queued file. </div></div><br><div class="gmail_quote"><div dir="ltr">Le dim. 30 sept. 2018 12:08, Me <<a href="mailto:adamnt42@gmail.com" target="_blank" rel="noreferrer">adamnt42@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, 30 Sep 2018 10:20:03 +0200<br>
Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" rel="noreferrer noreferrer" target="_blank">gambas.fr@gmail.com</a>> wrote:<br>
<br>
> And by using an observer ?<br>
> <br>
> This observer can be created in the last object and maybe redirected to<br>
> your main class ?<br>
> <br>
> The only things you have to do is to have a way to get acces to the main<br>
> object handle. Maybe via a static property.<br>
> <br>
> So then the observer will duplicate the events and raise it to the main<br>
> class.<br>
> <br>
> So you can indicate to the observer to raise after the diplicate one an<br>
> lock the raising from the children class before the main class catch.<br>
> <br>
> If the error is managed in the far child then lock the raising else let the<br>
> main manage it.<br>
> <br>
> Hobs = new observer (me) as  "Satellite "<br>
> <br>
> Object.attach (hobs, CMain.Current,"Satellite")<br>
> <br>
> Maybe a way....<br>
> <br>
> <br>
> Le dim. 30 sept. 2018 06:07, Me <<a href="mailto:adamnt42@gmail.com" rel="noreferrer noreferrer" target="_blank">adamnt42@gmail.com</a>> a écrit :<br>
> <br>
> > On Sat, 29 Sep 2018 08:07:26 +0200<br>
> > Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" rel="noreferrer noreferrer" target="_blank">gambas.fr@gmail.com</a>> wrote:<br>
> ><br>
> > > ><br>
> > > > Sorry Bruce... bad read... forget the last post<br>
> > ><br>
> > > ><br>
> > > >><br>
> ><br>
> > Rats! You got me all excited there.<br>
> ><br>
> > regards<br>
> > Bruce<br>
> > --<br>
> > <a href="mailto:adamant42@gmail.com" rel="noreferrer noreferrer" target="_blank">adamant42@gmail.com</a><br>
> ><br>
> > ----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
> ><br>
<br>
Sounds promising, I'll give it a go tomoorow.<br>
<br>
I'll give a bit more explanantion though.<br>
Every day we process between 80 and 2000 auction lots (thouroughbred horses) from <br>
1 to 20ish auction houses. This involves (say about) 12 messages we receive in<br>
several (23) different ways.   Well over 80% of the messages we get in the morning (and<br>
during the day) go through the system with no "problem". However, some times there <br>
is an exception that, well, happens. An example would be - a horse is registered as a<br>
lot at a particular auction a few days before the actual sale, on the morning of the sale<br>
the horse is delivered to the auction yard. On inspection it is founf to be lame, or the <br>
wrong color or it's a cow not a horse, or any one of a gazillion other things that<br>
render the proposed lot disadvantageous for sale. While we are processing large<br>
batches of messages from the auction houses we encounter some exception that<br>
we cannot handle automatically, the most common being the delivered horse is not<br>
the same color as the registered sale horse. The problem is that someone, somewhere<br>
entered the wrong data: the vendor, the handlers at the yard, the clerical staff etc.<br>
It can only be rectified by a human (we, anywhere up to 400km away, have no idea what<br>
 color the actual horse is) and a phone call or a few phone calls.<br>
Meanwhile the incoming message process really needs to continue with handling the <br>
next messages. Due the nature of the parsers  the message that has the problem can<br>
be anywhere up to 6 or 7 levels deep in collections of collections of collections.   <br>
So the Error.Raise mechanism doesn't work as it would unravel the execution stream <br>
and probably lose its place. The general idea of what I'm looking to achieve is that the<br>
main code could catch an event, say "WrongColor" and write it out to a queue file of<br>
messages thet need manual handling. Trying to manage it from the top down would be<br>
a coding nightmare. So youre idea looks good so far.  (Decades ago, I could have <br>
written this in a dozen lines or so in PL1 using conditions and an OnAny$ condition<br>
handler! Such is life.)<br>
<br>
cheers<br>
Bruce<br>
<br>
-- <br>
<a href="mailto:adamant42@gmail.com" rel="noreferrer noreferrer" target="_blank">adamant42@gmail.com</a><br>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer noreferrer noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>
</blockquote></div>