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
#0  0xb7f7e410 in ?? ()
#1  0xbfc23b18 in ?? ()
#2  0x00000006 in ?? ()
#3  0x00001f7a in ?? ()
#4  0xb7622811 in raise () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7623fb9 in abort () from /lib/tls/i686/cmov/libc.so.6
#6  0xb78a5e9c in _terminate () at NSException.m:695
#7  0xb78a60b6 in _NSFoundationUncaughtExceptionHandler (exception=0x81bcdd8) 
at NSException.m:722
#8  0xb78a682c in -[NSException raise] (self=0x81bcdd8, _cmd=0xb7eea390) at 
NSException.m:862
#9  0xb7de2cd3 in -[GSHorizontalTypesetter 
layoutGlyphsInLayoutManager:inTextContainer:startingAtGlyphIndex:previousLineFragmentRect:nextGlyphIndex:numberOfLineFragments:]
 (self=0x82703b8, _cmd=0xb7ee8970, layoutManager=0x82741d8, 
textContainer=0x8274378, 
    glyphIndex=0, previousLineFragRect={origin = {x = 0, y = 0}, size = {width 
= 0, height = 0}}, nextGlyphIndex=0xbfc23e7c, 
    howMany=0) at GSHorizontalTypesetter.m:1278
#10 0xb7ddb9e6 in -[GSLayoutManager(LayoutHelpers) _doLayoutToContainer:] 
(self=0x82741d8, _cmd=0xb7ee8958, cindex=0)
    at GSLayoutManager.m:1689
#11 0xb7ddd530 in -[GSLayoutManager(layout) usedRectForTextContainer:] 
(self=0x82741d8, _cmd=0xb7ea8fa0, container=0x8274378)
    at GSLayoutManager.m:2283
#12 0xb7d29423 in cache_lookup_attributed_string (string=0x81950f0, hasSize=0, 
size={width = 0, height = 0}, useScreenFonts=1)
    at NSStringDrawing.m:346
#13 0xb7d29e58 in -[NSAttributedString(NSStringDrawing) size] (self=0x81950f0, 
_cmd=0xb7e44dc0) at NSStringDrawing.m:501
#14 0xb7c2daac in -[NSCell cellSize] (self=0x81a3c00, _cmd=0xb7e3a360) at 
NSCell.m:1792
#15 0xb7c13563 in -[NSBox(Private) calcSizesAllowingNegative:] (self=0x81bde48, 
_cmd=0xb7e3a288, aFlag=0 '\000') at NSBox.m:689
#16 0xb7c10570 in -[NSBox setContentView:] (self=0x81bde48, _cmd=0xb7e3a268, 
aView=0x81bc998) at NSBox.m:271
#17 0xb7c0fcc0 in -[NSBox initWithFrame:] (self=0x81bde48, _cmd=0xb7e2aa70, 
frameRect=
        {origin = {x = 0, y = 95}, size = {width = 362, height = 2}}) at 
NSBox.m:92
#18 0xb7bd9c04 in -[GSAlertPanel _initWithoutGModel] (self=0x8264868, 
_cmd=0xb7e2aa40) at NSAlert.m:394
#19 0xb7bd8c3d in -[GSAlertPanel init] (self=0x8264868, _cmd=0xb7e2ae88) at 
NSAlert.m:247
#20 0xb7bdec87 in -[GSExceptionPanel init] (self=0x8264868, _cmd=0xb7e2ad68) at 
NSAlert.m:1727
#21 0xb7bde9c4 in GSRunExceptionPanel (title=0x81b8708, exception=0x81a1278, 
defaultButton=0x81cb3b0, alternateButton=0x0, 
    otherButton=0x8242058) at NSAlert.m:1693
#22 0xb7beb984 in _NSAppKitUncaughtExceptionHandler (exception=0x81a1278) at 
NSApplication.m:126
#23 0xb78a6821 in -[NSException raise] (self=0x81a1278, _cmd=0xb7ae1aa0) at 
NSException.m:853
#24 0xb78a627e in +[NSException raise:format:arguments:] (self=0xb7ae1880, 
_cmd=0xb7ae1a88, name=0xb7ae1610, format=0xb7af4f20, 
    argList=0xbfc244cc "S2­·\022hª·x(°·\200\030®·_a\212·x([EMAIL 
PROTECTED],[EMAIL PROTECTED]") at NSException.m:765
#25 0xb78a61b6 in +[NSException raise:format:] (self=0xb7ae1880, 
_cmd=0xb7af58d0, name=0xb7ae1610, format=0xb7af4f20)
    at NSException.m:751
#26 0xb78ef650 in -[NSObject doesNotRecognizeSelector:] (self=0x81ca240, 
_cmd=0xb7af59c8, aSelector=0xb7ac7d88) at NSObject.m:1705
#27 0xb78ef82c in -[NSObject forwardInvocation:] (self=0x81ca240, 
_cmd=0x8052a78, anInvocation=0x81a2350) at NSObject.m:1733
#28 0xb79a012a in GSInvocationCallback (callback_data=0xb7b3b2b0, 
args=0xbfc24644) at GSFFCallInvocation.m:1047
#29 0xb731a7b5 in __vacall_r () from /usr/lib/libcallback.so.0
#30 0xb7b3b2b0 in returnTypeInfo () from 
/usr/GNUstep/System/Library/Libraries/libgnustep-base.so.1.15
#31 0xbfc24644 in ?? ()
#32 0x00000004 in ?? ()
#33 0xbfc24678 in ?? ()
#34 0x00000000 in ?? ()

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to