Hi Ayende,

I have read your article earlier. Very interesting, but in order to
drop manual support for INotifyPropertyChanged, I would have to always
instantiate all my model classes through some proxy generator.
Besides, I'm pretty sure change notifications work, it's just that WPF
does not subscribe to them for unknown reason.

I think I will still try your suggestion so that I can better observe
who is subscribing to PropertyChanged notification on proxies (or that
no one actually is).

On 22 Wrz, 20:02, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> What happen if you use this ability?Advance: Extending NHibernate
> Proxies<http://www.ayende.com/Blog/archive/2007/04/17/Advance-Extending-NHibe...>
>
> The issue is that the proxy will forward the call to the real object, which
> is hidden.
> It _should_ forward registration for events as well, though.
>
> On Mon, Sep 22, 2008 at 8:57 PM, Artur Dorochowicz <
>
> [EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > I have a simple hierarchy of classes in my model. I retrieve the root
> > of the hierarchy with ISession.Get<>(), so that that is my actual
> > class, and then I initialize the rest of the hierarchy with
> > NHibernateUtil.Initialize() (so they are just proxies).
>
> > Classes in the model implement INotifyPropertyChanged and I use them
> > in WPF data binding. Change notifications work fine for the root of
> > the hierarchy (which is my actual class), but does not work with
> > proxies.
>
> > After some debugging I noticed that WPF simply does not subscribe to
> > PropertyChanged notifications on proxy objects. Even though proxies
> > implement INotifyPropertyChanged interface and change notifications
> > are raised.
>
> > I use ObjectDataProviders in WPF but same thing happens when I
> > directly assign object to DataContext property.
>
> > I have no clue why that happens. I probably did some silly mistake
> > somewhere.
> > Maybe someone have seen something like this.
> > I will really appreciate any advice on this.
>
> > Thanks
> > Artur
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to