On Jul 9, 2009, at 10:24 AM, Lon Varscsak wrote:
Is there a way for a controller object to listen for changes to an EO
(and a specific key)?
Thanks,
Lon
EOEditingContext has ObjectsChangedInEditingContextNotification, but
it is on an object by object basis, not a key by key one.
You
also, if you are using wonder, check out
hasKeyChangedFromCommittedSnapshot in ERXGenericRecord. maybe listen
for the notification mentioned by chuck, then use
hasKeyChangedFromCommittedSnapshot to check the particular key you are
looking at.
simon
2009/7/9 Chuck Hill ch...@global-village.net:
Thanks. I figured there was nothing built to do exactly what I
needed, but I figured I would ask.
Do you know if there is much overhead if I implemented this in my EO
superclass even if there were no observers?
-Lon
On Thu, Jul 9, 2009 at 11:50 AM, Simon McLeansi...@potwells.co.uk wrote:
On Jul 9, 2009, at 12:26 PM, Lon Varscsak wrote:
Thanks. I figured there was nothing built to do exactly what I
needed, but I figured I would ask.
Do you know if there is much overhead if I implemented this in my EO
superclass even if there were no observers?
EOF makes heavy use of
Thanks for the tips!
-Lon
On Thu, Jul 9, 2009 at 12:34 PM, Chuck Hillch...@global-village.net wrote:
On Jul 9, 2009, at 12:26 PM, Lon Varscsak wrote:
Thanks. I figured there was nothing built to do exactly what I
needed, but I figured I would ask.
Do you know if there is much overhead if
Uh, another question. :) Since I have a custom EO super-super class,
I decided to try to implement this in takeStoredValueForKey(..).
It works, although I was also trying to post the old value, and
asking for this current value at this point makes EOF not so
happy...but that's not strictly
Just a clarification, do you want to know when the value changes, even
if it's not saved to the database? Or do you just want to know if a
change is being saved? That would make a difference. ;-)
Regards,
Mark
On Jul 9, 2009, at 3:28 PM, Lon Varscsak wrote:
Uh, another question. :)
I want to know if it's being changed. I have a controller object that
will need to recalculate some values when a specific attribute changes
in the EO.
-Lon
On Thu, Jul 9, 2009 at 1:42 PM, Mark Morrisma...@onpointsoftware.com wrote:
Just a clarification, do you want to know when the value
Sorry I didn't finish the first sentence. I want to know when the
value is being changed regardless of whether it's committed or not.
On Thu, Jul 9, 2009 at 1:45 PM, Lon Varscsakvarsc...@smarthealth.com wrote:
I want to know if it's being changed. I have a controller object that
will need to
On Jul 9, 2009, at 1:28 PM, Lon Varscsak wrote:
Uh, another question. :) Since I have a custom EO super-super class,
I decided to try to implement this in takeStoredValueForKey(..).
It works, although I was also trying to post the old value, and
asking for this current value at this point
On Jul 9, 2009, at 1:45 PM, Lon Varscsak wrote:
I want to know if it's being changed. I have a controller object that
will need to recalculate some values when a specific attribute changes
in the EO.
Why not just override the set... method to send the notification?
-Lon
On Thu, Jul 9,
I was trying to make something more generic to be able to use in more
than one case and keep my Velocity template clean of that stuff.
Thanks again for all the help!
-Lon
On Thu, Jul 9, 2009 at 1:52 PM, Chuck Hillch...@global-village.net wrote:
On Jul 9, 2009, at 1:45 PM, Lon Varscsak wrote:
You would put it in the sub-class, in a method that overrode the super-
class, NOT in the generated class.
e.g.
public void setFoo(Number foo) {
Number oldFoo = foo();
super.setFoo(foo); // calls the generated version
// broadcast notification of this, this.editingContext(),
13 matches
Mail list logo