The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > Omni Frameworks
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Lion iOS 5 beta4 Xcode 4.2 build issues... Thread Tools Search this Thread Display Modes
Hi - just forked the latest tonight 081511 - and received the following runtime error on TextEditor. Does this sound familiar?

OBASSERT_NOTNULL failed: requires 'delegate', at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/OmniGroup.old/Frameworks/OmniUI/iPad/OUIScrollNotifier.m:30
ASSERT failed: requires '[delegate conformsToProtocol:@protocol(OUIScrollNotifier)]', at /Volumes/Shiva/Users/Me/Development/iPhone/iPhone_Apps/Lux/Framework/OmniGroup.old/Frameworks/OmniUI/iPad/OUIScrollNotifier.m:31
I understand this is "master" and thus pretty volatile, but your pushes to master are "usually" pretty clean. Is something in flux?

Also there are 3 private "undefined" functions in the OUIExportOptionsController.

- (void)_setInterfaceDisabledWhileExporting:(BOOL)sh ouldDisable;
- (void)_foreground_disableInterfaceForExportConvers ion;
- (void)_foreground_enableInterfaceAfterExportConver sion;
Had to stub them out just to get things to compile.

So my TextEditor doesn't build under Xcode 4.2 (Build 4D151a) + iOS 5 beta 4 + Lion.

Thanks in advance,


Until Tim has a chance to push to master, here's a patch that fixes the assertions:

Index: OUIEditableFrame.h
--- OUIEditableFrame.h	(revision 154259)
+++ OUIEditableFrame.h	(working copy)
@@ -94,6 +94,7 @@
         // Information about our content
         unsigned immutableContentHasAttributeTransforms:1;     // False if our -attributedText isn't a simple subrange of immutableContent
         unsigned mayHaveBackgroundRanges:1;                    // True unless we know we don't have any ... .
+        unsigned loadingFromNib:1; // Set in initWithCoder. Used to delay registration for scroll notifications until after any parent view's delegates have been set.
     } flags;
     // Range selection adjustment and display
Index: OUIEditableFrame.m
--- OUIEditableFrame.m	(revision 154259)
+++ OUIEditableFrame.m	(working copy)
@@ -243,6 +243,7 @@
     self->flags.textNeedsUpdate = 1;
     self->flags.delegateRespondsToLayoutChanged = 0;
     self->flags.showSelectionThumbs = 1;
+    self->flags.loadingFromNib = 0;
     self->selectionDirtyRect = CGRectNull;
     self->markedTextDirtyRect = CGRectNull;
@@ -279,7 +280,9 @@
     if (!(self = [super initWithCoder:aDecoder]))
         return nil;
-    return do_init(self);
+    id result = do_init(self);
+    flags.loadingFromNib = YES;
+    return result;
 #pragma mark -
@@ -1783,7 +1786,8 @@
     [super didMoveToSuperview];
     DEBUG_SCROLL(@"%s with superview: %@%p", __func__, [self.superview class], self.superview);
-    isRegisteredForScrollNotifications = OUIRegisterForScrollNotificationsAboveView(self);
+    if (!flags.loadingFromNib) // delay if loading from nib
+        isRegisteredForScrollNotifications = OUIRegisterForScrollNotificationsAboveView(self);
 - (void)didMoveToWindow
@@ -1803,6 +1807,12 @@
     if (!_content)
         [self setAttributedText:nil]; // Triggers all our sanity-ensuring checks
+    if (flags.loadingFromNib) {        
+        // was delayed if loading from nib
+        isRegisteredForScrollNotifications = OUIRegisterForScrollNotificationsAboveView(self);
+        flags.loadingFromNib = NO;
+    }
 - (void)setFrame:(CGRect)newFrame
Our internal uses of OUIEditableFrame were all constructing the view programmatically and I missed checking the case where we got the view from a nib.

I'm confused about the missing functions in OUIExportOptionsController. They're there in the current master starting at line 360 of OUIExportOptionsController.m. A fresh pull compiles fine for me. (Xcode 4.2 beta 5, 10.7.2 build 11C35)

Thanks curt...that fixed it. And yes not sure why those methods didn't catch. Just a glitch in Xcode on my part.

By the way, proxy previews are not being displayed correctly in (my?) TextEditor. I've stepped through in the debugger , with all the flags on, and I notice that they render momentarily (on a close document) and then are quickly "replaced" by the DocumentPlaceholder.png. Isn't the document picker view supposed to draw previews if it can? Or is it just meant for imported PDF documents. I haven't subclassed anything in TextEditor so an RTF document still defaults to the standard OUIDocumentProxy/OUIDocumentProxyPreview. The "hasPDFPreview" setting should kick-in for an RTF Document and start the op.

I would like images of various types to preview correctly in the picker I am customizing.

Thanks again,


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Build Framework Fails From Command Line But Build in XCode Succeeds davidbitton Omni Frameworks 2 2012-05-01 04:13 PM
Xcode 4 Customized Build Location jgarnham Omni Frameworks 4 2011-09-16 03:51 AM
Beta Build for Lion? (A: Yep! Check out our Sneaky Peeks) joeworkman OmniFocus 1 for Mac 1 2011-06-30 06:54 AM
Perspectives issues with build 712 ext555 OmniFocus 1 for Mac 10 2007-12-07 12:22 AM
Serious issues with build 712 ext555 OmniFocus 1 for Mac 2 2007-12-06 05:59 AM

All times are GMT -8. The time now is 01:36 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.