mnimer / dphibernate

Automatically exported from code.google.com/p/dphibernate
0 stars 0 forks source link

Create a new object on the flex side #9

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new object
2. Set some variables inside
3. try to read one of the variables

getProperty(obj:IHibernateProxy, property:String, value:*):* {
            var ro:IHibernateRPC;
            var entry:HibernateManagedEntry = hibernateDictionary[ obj ] as
HibernateManagedEntry   
            ro = entry.ro; -- Throws -->
TypeError: Error #1009: Cannot access a property or method of a null object
reference.

Original issue reported on code.google.com by robert.b...@gmail.com on 16 Apr 2008 at 9:46

GoogleCodeExporter commented 9 years ago
PS. for now i've changed the line to "if (entry!= null) ro = entry.ro;" and 
looks
like it works. But i didn't have time to analize the whole code so far.

Original comment by robert.b...@gmail.com on 16 Apr 2008 at 12:29

GoogleCodeExporter commented 9 years ago

Original comment by mni...@gmail.com on 16 Apr 2008 at 3:25

GoogleCodeExporter commented 9 years ago
Fair enough. I will verify the change

Original comment by malabri...@gmail.com on 20 Apr 2008 at 2:15

GoogleCodeExporter commented 9 years ago
Hi,

I'd got the same issue, the change l.152 corrected it.
But later, I'd an error on l.160 or l.169 from the call of 
"areServerCallsEnabled( ro )".
Because "ro" was null, "serverCallsEnanabled[ ro ] != false" (l.49) was always 
true !!!
So, here a solution :

public static function areServerCallsEnabled( ro:IHibernateRPC ):Boolean {
    return ro ? ( serverCallsEnanabled[ ro ] != false ) : false;
}

Thanks for the framework ;)

Original comment by sebastie...@gmail.com on 23 Jun 2008 at 12:29

GoogleCodeExporter commented 9 years ago
Closing this, it's no longer how we manage RO's.

Original comment by martypit...@gtempaccount.com on 15 Mar 2011 at 2:57