[Gambas-user] Catching an Event from an Object in another Class

Fabien Bodard gambas.fr at ...626...
Fri Jun 24 11:18:49 CEST 2011


PUBLIC SUB _new(hSubject AS Editor)

  hEditor = hSubject
  object.attach(hSubject, me, "heditor")

END

2011/6/24 tobias <tobiasboe1 at ...20...>:
> hi everyone,
>
> i want to get the Editor_Highlight event of an Editor on a form in a
> separate class, too. i have in the following in that class:
>
> PRIVATE hEditor AS Editor
>
> PUBLIC SUB _new(hSubject AS Editor)
>
>   hEditor = hSubject
>
> END
>
> PUBLIC SUB hEditor_Highlight()
>
>   PRINT Highlight.Text
>
> END
>
> in the form i just give my Editor to it:
>
> Instance = NEW Class(Editor1)
>
> but it doesn't work. i also tried using an extra Observer but i think i
> didn't unterstand something very fundamental in event management.
> can anyone explain it to me?
>
> regards,
> tobi
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense..
> http://p.sf.net/sfu/splunk-d2d-c1
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



-- 
Fabien Bodard




More information about the User mailing list