gnustep-dev
[Top][All Lists]
Advanced

[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 14:07:11 +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 is attached.
The Glyph error seems to occur in an exception panel... ???

Thanks

Xavier

Attachment: stepper-error.bt.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]