Greetings, all. I've been subscribed to the list for ages, but the
messages, for the most part, are beyond me, so I haven't read lots of them.
Our paper docs arrived the other day, and I've read all of the first section
of the WO book, parts of the second and none of the third (WebScript), as
well as part of the EO book.
I'm currently trying to implement an application in WO, and as part of that,
I'm trying to get a feel for the EO Framework so that I know what it's
doing, even if I allow the wizard to generate portions of pages.
So, first thing I started is a login page. I saw an example in the
RentalStore app, but at first I didn't like the way it was doing it: it was
allowing for multiple entries to be returned. It did however point me
towards EOUtilities. I used EOUtilities.objectWithPrimaryKeyValue to get
the user object for the username (which is the PK).
Here was my first problem: what do I put the returned object in? I
considered EOGenericRecord briefly before settling on EOEnterpriseObject,
which seems to have worked. Should I have used the former instead?
Once I had the value, I used valueForKey to get the password entry and
compare it with the user-entered password. This also seems to work.
In fact, all in all, it's working pretty well, other than the fact that a
lack of entries throws an NSObjectNotFoundException (or something like
that). The docs say it will throw an exception, but didn't tell me which
one, which annoyed me. Further, I tried to catch the exception it was
throwing, but Java didn't seem to know what it was. Am I missing an import
statement that would allow me to use it or something like that?
My WO/EO is just starting, as I've said, and my Java is very rusty: I
haven't used it since 1.1, but I've done tons of C/C++/Javascript so the
basic syntax is quite familiar to me.
Anyway, my real questions are these:
- should I have used EOEnterpriseObject, EOGenericRecord or neither?
- where do I find the definition for NSObjectNotFoundException (or, if I
have that wrong, whatever the exception that
EOUtilities.objectWithPrimaryKeyValue throws)
- am I going about this in a really bass-ackwards way? Should I be doing it
entirely differently?
- is there anywhere I can go to familiarize myself with the EO Framework's
classes more fully? The reference, is, well, a reference, and the
developer's guide is more of a "what is" and theoretical than a HowTo. I'd
like to find a way to familiarize myself with all the EO classes so that I
know what to use for what, and what returns what, and so forth, without
reading each class reference one by one.
I may just move mine over to more closely match the example in RentalStore,
but I'd still like to know the answers to the above.
Thanks in advance,
- Geoffrey
--
Geoffrey Wiseman,
New Media Developer, Medium One Productions
[EMAIL PROTECTED] http://www.mediumone.com/ (416)361-2030
"If only you could see what I've seen with your eyes."