Re: Concatenating two fields into yet another field
Re: Concatenating two fields into yet another field
- Subject: Re: Concatenating two fields into yet another field
- From: Deirdre Saoirse Moen <email@hidden>
- Date: Fri, 12 Dec 2003 06:06:32 -0800
I'm replying to two messages here.
On Thursday, December 11, 2003, at 11:29 AM, Chuck Hill wrote:
I notice in your code example that valueForKey has a lower case k.
However
the case is right in the error message. I can't see why this would not
work unless it is picking up some other definition of EOGenericRecord.
I'd
do a full clean and rebuild and see if that helps. Otherwise it is
time to
start poking around in a debugger.
I just decided to opt for the custom class, which solved the problem.
It may have been the case problem (which I didn't see, thank you), but
the error message wasn't really helpful.
On Thursday, December 11, 2003, at 04:31 PM, Robert Walker wrote:
Instead of creating a fourth attribute (tsDescrip) on TimeSlot I would
just write a simple business method on the TimeSlot class.
A business method would work better if I didn't need to keep the values
for other reasons having to do with final output. Since this schedule
will be imported into some DTP program at the end, calculating it now
saves me another step later that isn't currently done in WO. Plus, it's
useful to know now.
Ultimately, a form of the data is also put up onto a web site with a
PHP/MySQL front end (not likely to be changed this year). Last year's
is up at http://www.baycon.org/schedule.php
This is a big bunch-o-data I (or someone else) do once a year, every
year, scheduling 100+ people into 100+ panels for a long weekend with
their schedule requirements, topic preferences, and who they do and
don't prefer to work with.
WO is simply what I'm using for data management of the scheduling
process and to highlight conflicts (though they are resolved manually,
simply because that's the most expedient method).
Then again, I've considered just biting the bullet and writing the
entire process this year. Time permitting, that's what I'll do.
1. In the model change TimeSlot's Class from EOGenericRecord to
TimeSlot (or something like com.myapp.TimeSlot) and generate the class
file (Note: Most people prefer using a code generator for this, but
using EOModler's class generator along with FileMerge will work as
well).
I finally did this, because it was just easier for other reasons. :)
2. Add the business method like this:
[example snipped]
Thank you.
Using this method there is no need to update anything since
tsDescrip() will always return the concatenation of the current values
of startTime, endTime and toDayNames.dayName(). The class browser in
WOBuilder will recognize tsDescrip as just another attribute of the
entity so you can bind it to WOString or any other element in the >
page.
Good point, thanks, I may use this for other display-only features.
One question I've had, completely unrelated to anything I'm doing now,
is whether or not that final DTP production would be easier to do in a
Cocoa EO application, where I have more control over the finer aspects
of final output and page layout. I'm thinking of saving the final as
PDF -- if it didn't annoy the person laying out the final copy too
much. In times past, it's been handed off as text or html and
hand-edited into shape.
--
_Deirdre http://deirdre.net
"Cannot run out of time. There is infinite time. You are finite.
Zathras is finite. This....is wrong tool." -- Zathras
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.