• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Prototypes and Inheritance
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Prototypes and Inheritance


  • Subject: Re: Prototypes and Inheritance
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 25 Aug 2005 16:23:24 -0700


On Aug 25, 2005, at 4:16 PM, Dev WO wrote:

I may be wrong, but does prototypes work when inherited?
I'm actually trying prototypes on a project (I shouldn't read Chuck's book when it's time to sleep;)),




That all depends on whether you want to stay awake or not. ;-)

I really appreciated your course at WWDC, and I'd really want to learn more (as I know pretty much nothing). So I'd say I want to stay awake:)

I'd pick a different book then.  :-)



Probably the model is missing something or the connection dictionaries are different.


I started from the same project/eomodel, and just created my prototypes framework, importing it in the previous application framework.
Regarding the connection, I think it's ok as I have setup some fetch to be done at session creation and I can see it's working in the log using
EOAdaptorDebugEnabled=YES
I may be wrong and will recheck that, but I don't think the model is missing anything

I think it is. See below.



I'll investigate more, but I just wanted to know if it should work or if there specific "take care of"?

It should work.  What is the stack trace from the null pointer?

The application starts with a loggin panel, I enter an email and a password which are in the database (from when the application was working) and got:
----
[2005-08-26 01:02:55 CEST] <WorkerThread1> java.lang.NullPointerException
at com.webobjects.eoaccess.EOAttribute.adaptorValueByConvertingAttributeV alue(EOAttribute.java:2020)


I'm pretty sure I saw that on one of these list just last week. I'm also pretty certain that something is missing from the model. Check that the column names, value types, value class, entity name, table name etc. are all still there. Adding prototypes after an entity has been created will erase some of the information.



----
and finally the line which lead to the crash in my application:
----
if (password == null || password == "") return false;
if (email == null || email == "") return false;
NSMutableArray args = new NSMutableArray();
args.addObject(email);
EOQualifier qual = EOQualifier.qualifierWithQualifierFormat ("personEmail = %@", args);
EOFetchSpecification spec = new EOFetchSpecification ("Member",qual,null);
NSArray results = ec.objectsWithFetchSpecification(spec); // THIS is the line
----
So it looks like it doesn't find any entry in the database for this email?!


It looks like it is finding a null value in your EOModel definition when it is not expecting it.




How are your models set up (in xCode, installed, in the same project, in different ones?)

The models and frameworks are all in the /Library/Frameworks/ folder and referenced using absolute path (easier to move to production).
OK

Chuck

--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Prototypes and Inheritance
      • From: Dev WO <email@hidden>
References: 
 >Prototypes and Inheritance (From: Dev WO <email@hidden>)
 >Re: Prototypes and Inheritance (From: Chuck Hill <email@hidden>)
 >Re: Prototypes and Inheritance (From: Dev WO <email@hidden>)

  • Prev by Date: Re: Prototypes and Inheritance
  • Next by Date: Re: Prototypes and Inheritance
  • Previous by thread: Re: Prototypes and Inheritance
  • Next by thread: Re: Prototypes and Inheritance
  • Index(es):
    • Date
    • Thread