• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: packed NSTextfield and NSFormatter in IB3 plugin...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: packed NSTextfield and NSFormatter in IB3 plugin...


  • Subject: Re: packed NSTextfield and NSFormatter in IB3 plugin...
  • From: Cyril Kardassevitch <email@hidden>
  • Date: Thu, 7 Aug 2008 20:54:04 +0200

hi list,

I've investigated further and try to reproduce the problem with a simpler configuration. So, instead of using my custom objects, I've tried to pack directly NSTextField and NSNumberFormatter into one object inherited from NSTextField. An NSNumberFormatter is generated and become the formatter for the object inherited from NSTextView (testIBView) during its initialization.

Here is its implementation :


// testIBView.m

#import "testIBView.h"

@implementation testIBView

-(id)initWithFrame:(NSRect)frame
{
  self = [super initWithFrame:frame];

  if (self)
    [self setFormatter:[[NSNumberFormatter alloc] init]];

  return self;
}

- (id)initWithCoder:(NSCoder *)decoder
{
  self = [super initWithCoder:decoder];

if (self)
[self setFormatter:[[NSNumberFormatter alloc] initWithCoder:decoder]];


  return self;
}

- (void)encodeWithCoder:(NSCoder *)encoder
{
  [super encodeWithCoder:encoder];
  [[self formatter] encodeWithCoder:encoder];
}

@end


tesIBView is the main object of the interface builder 3 plugin project that is generated via XCode. Interface builder generates the same error and the same backtrace when I tried to click on the formatter button (bottom right of the text field)


Obviously, I have missed something... Any idea ?

Thanks,
Cyril.


Le 7 août 08 à 11:02, Cyril Kardassevitch a écrit :

hi,

I have designed customs NSTextField and NSFormatter objects that I have tried to pack in an interface builder 3 plugin...

This works fine (can drag and drop the field, can access field inspector), except that when I select the formatter, interface builder generates an assertion failure with :

Backtrace:
1. Interface Builder 0x00006620 [IBApplication handleAssertion:inFile:onLine:]
2. InterfaceBuilderKit 0x0021bed4 [IBObjectContainer objectIDForObject:]
3. InterfaceBuilderKit 0x0021c0ec [IBObjectContainer metadataForKey:ofObject:]
4. InterfaceBuilderKit 0x00224e84 [IBDocument customClassNameForObject:]
5. InterfaceBuilderKit 0x00224e0c [IBDocument classNameForObject:]
6. InterfaceBuilderKit 0x0023f210 [IBDocument commonCustomClassNameOfObjects:]
7. InterfaceBuilderKit 0x0023f15c [IBInspectorController computeTitle]
8. InterfaceBuilderKit 0x0023f08c [IBInspectorController refresh]
9. InterfaceBuilderKit 0x0023b630 [IBInspectorController rebuildInspectorStack]
10. InterfaceBuilderKit 0x0023b4c0 [IBInspectorController validate:]
...


The NSTextField and NSFormatter child have their own working plugins, and there is absolutely no problem if I combine the 2 above objects manually in interface builder. The field and its formatter are then fully accessible and designable.

I've tried various things without success. Has anyone got a tip on how to expose a programmatically attached formatter ?

Thanks.
Cyril.


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: packed NSTextfield and NSFormatter in IB3 plugin...
      • From: "Michael Ash" <email@hidden>
References: 
 >packed NSTextfield and NSFormatter in IB3 plugin... (From: Cyril Kardassevitch <email@hidden>)

  • Prev by Date: Re: Saving Outline View Column Widths
  • Next by Date: Re: Core Data question
  • Previous by thread: packed NSTextfield and NSFormatter in IB3 plugin...
  • Next by thread: Re: packed NSTextfield and NSFormatter in IB3 plugin...
  • Index(es):
    • Date
    • Thread