[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bindings and Renaissance
From: |
Xavier Glattard |
Subject: |
Re: bindings and Renaissance |
Date: |
Sat, 29 Mar 2008 13:48:48 +0100 |
User-agent: |
Internet Messaging Program (IMP) 3.2.8 |
Selon Fred Kiefer <fredkiefer <at> gmx.de>:
> >>> 1) Examples/bindings.gsmarkup, two textFields, one value.
> >>> I had to create two bindings between the two fields. I thought a bindings
> >>> was two-way....
(...)
> >
> > In bindings.gsmarkup i define 2 textFields. First i bind the 1st field to
> > the 2nd one :
> > [first bind:"value" toObject:second ...]
> > If i change the value of the 1st field, the 2nd one is updated. But I
> expected
> > that the value of the 1st would be updated when the value of the 2nd one
> > changes. To get that behavior i have to bind the 2nd field to the first.
> > [second bind:"value" toObject:first ...]
>
> I think that is the expected behaviour. At least it was what I
> implemented :-)
I get a good behavior (two-way) when the fields are updated through a
NSObjectController : both fields are bound to the controller content.
(see the new version of the example on the svn repos)
A NSControl can be bound, but can it be KVObserved ? (ie be the target of a
binding)
I think NSControl and (some?) subclasses are not KVC compliant : the accessors
are probably not used internally and observer notifications should be send
manually. Or some [setKeys:triggerChangeNotificationsForDependentKey:] would be
needed.
Or I need to find a key that is KVC compliant...
Anyway i dont care about binding two fields. Useless :-)
> >>> 2) Examples/stepper-bindings.gsmarkup
(...)
> > /.../gnustep/libs/renaissance/Tools/GSMarkupBrowser.app/GSMarkupBrowser:
> > Uncaught exception NSGenericException, reason: Glyph generation was
> triggered
> > for a layout manager while the text storage it was attached to had
> unprocessed
> > editing. This is not allowed. Glyph generation may be triggered only at
> points
> > where calls to -beginEditing and -endEditing are balanced.
> >
> > It doesn't look like a binding issue... Maybe Renaissance autolayout system
> ?
> >
> I don't think so. More a problem in the text system. Could you please
> send me a back trace from gdb? I would like to understand what is
> triggering the text change here.
There was an error in my example : i tried to bind a stepper value to a
stringValue. If the stepper is bound to an intValue it's ok.
Anyway you can get a bt there :
http://amstradstuff.free.fr/GNUstep/stepper-error.bt.log
The Glyph error seems to occur in an exception panel... ???
Thanks
Xavier
- Re: bindings and Renaissance, (continued)
Re: bindings and Renaissance, Xavier Glattard, 2008/03/29
Re: bindings and Renaissance, Gregory John Casamento, 2008/03/29
Re: bindings and Renaissance, Gregory John Casamento, 2008/03/29
Re: bindings and Renaissance, Nicola Pero, 2008/03/30
Re: bindings and Renaissance, Gregory John Casamento, 2008/03/30