I can most certainly see this being registered on the actual class:

+        Method    {Void OnPropertyChanged(System.Object,
System.ComponentModel.PropertyChangedEventArgs)}
System.Reflection.MethodInfo {System.Reflection.RuntimeMethodInfo}
+        Target    {System.ComponentModel.PropertyChangedEventManager}
object {System.ComponentModel.PropertyChangedEventManager}

And the invocation list contains both of them.

The problem, however, is that the sender object that it sends is different
than the proxy.
WPF thinks that it is the proxy that it is handling, while the real object
behind the scene is raising the event, WPF catch that, but has nothing that
match this (because the proxy and the real object are different instances).

This is a leaking this issue, I am afraid.


On Tue, Sep 23, 2008 at 7:41 PM, Artur Dorochowicz <
[EMAIL PROTECTED]> wrote:

>
> I'm uploading a VS2008 solution that demonstrates the problem to:
>
> http://sites.google.com/a/dorochowicz.com/artur-public-files/files-1/WPF-NHibernate.zip
> The relevant part is in MainWindow.xaml.cs
>
> In the meantime, Paulo Quicoli has provided me with a working
> workaround that simply avoids using proxies.
>
> I used something like this:
> var rootEntity = session.Get<RootEntityType>( someId );
> NHibernateUtil.Initialize( rootEntity.otherEntity );
>
> Paulo showed me how to do this with criteria API, like so:
> var rootEntity = session.CreateCriteria(typeof(RootEntityType))
>                    .SetFetchMode("otherEntity", FetchMode.Eager)
>                    .Add(NHibernate.Criterion.Expression.Eq("Id", id))
>                    .UniqueResult<RootEntityType>();
>
>
> However, as Ayende mentioned, property changed notifications should
> work for proxies as well so I'm still interested in your opinions on
> this.
>
> Best regards
> Artur
>
>
>
> On 23 Wrz, 00:26, "WaYdotNET la potenza del .NET nella mani di Carlo"
> <[EMAIL PROTECTED]> wrote:
> > Hi Artur, if u publish yr sample 4 all ?
> > Many thx
> >
> > Carlo Bertini
> >
> > 2008/9/22 Artur Dorochowicz <[EMAIL PROTECTED]>
> >
> >
> >
> > > Hi Paulo
> >
> > > I've sent you an e-mail (it's from different e-mail address than I use
> > > here).
> >
> > > On 22 Wrz, 20:32, "Paulo Quicoli" <[EMAIL PROTECTED]> wrote:
> > > > Hi Arthur,
> >
> > > > i'm using NHibernate + WPF with no problems.. could you send me a
> simple
> > > > demo where that occurs ?
> >
> > --
> > WaY dot NET ... pura potenza .NET !!!!
> >
>

--~--~---------~--~----~------------~-------~--~----~
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