Post

Replies

Boosts

Views

Activity

Window NSWindow 0x137632e40 ordered front from a non-active application and may order beneath the active application's windows
This message has started appearing in the Xcode console when I test run my app, I think after the 13.3 macOS update, or the associated Xcode update. This message is posted: when the app launches (my code does not do anything with the app window). when I right click the app window to open a contextual menu while the application is in the background. when I click a button on the window with the cmd key pressed, while the app is in the background. I don't see why a warning should be posted in these situations. It looks like log noise to me. EDIT: this warning is posted even when testing the template Mac app (objective-C, xib) with no additional code. This is on Xcode Version 14.3 (14E222b)
7
2
4.8k
Jul ’23
Xcode indexing broken after Ventura 13.4 update
After updating to Ventura 13.4, Xcode 14.3 no longer indexes files in my projects. The "indexing" phase that is reported on the status bar does not list a number of files that it should be processing, and doesn't seem to actually do anything. As a result, autocompletion, code checking, editing in scope, etc. not longer work. Am I the only one experiencing this issue, and how can I fix it?
1
0
1k
May ’23
Simple core data app doesn't support undo
Hello, Amateur developer here. I dusted off a hobby core data app coded mostly under OSX 10.7, and which supported undo "for free" (as Apple say it). It still works when I build it with recent Xcode versions, except that it no longer supports undo. To understand why, I coded the most basic objective-C, core data (not document-based) app. In short, a single table view with a single column bound to an NSArray Controller set in "entity name" mode and bound to the managed object context. The core data model has a single entity class with a single NSString attribute (called "name", and which the table view column shows). It all works well, I can add and remove entities, and change their names from the table. Changes are saved normally... except there is nothing I can undo. The undo menu item is greyed out. I checked that my App Delegate implements the windowWillReturnUndoManager method and that this selector is called regularly. So to check that the undo manager sees anything to undo, I added this method to my App Delegate: - (IBAction)reportUndo:(id)sender {     NSLog(@"undo: %d", [self.persistentContainer.viewContext.undoManager canUndo]); } I can call this method by pressing a button. But it always logs "undo: 0", even after I add or remove entities. I take that the undo manager sees nothing to undo. This seems like rather basic stuff, but I can't understand why it doesn't work give given that it used to work in my more complex app without me doing anything special.
2
0
1.7k
Jan ’23
can't get correct NSScrollView tiling with rulers
Hell, I'm making a macOS app with an NSScrollView showing a vertical ruler (subclass of NSRulerView). I want its clipview to fill the remaining space left by the ruler, I don't want it to be drawn underneath. Apple says this about the contentInsets property: When the value of this property is equal to NSEdgeInsetsZero, traditional tiling is performed. Rulers, headers, and other subviews are tiled with the contentView frame filling the remaining space. When the value of this property is not equal to NSEdgeInsetsZero, the rulers, headers, and other subviews are inset as specified. The contentView is placed underneath these sibling views and is only inset by the scroll view border and non-overlay scrollers. I get the later result. The clipview is placed underneath the ruler, even though my NSScrollView subclass implements this : -(void)awakeFromNib     [self setHasVerticalRuler:YES];     [self setRulersVisible:YES];     self.automaticallyAdjustsContentInsets = NO;     self.contentInsets = NSEdgeInsetsMake(0, 0, 0, 0); } If I specify positive insets (for example 10 instead of zeros), the scrollers are moved from the edges, which means the above code is executed. I can override the -tile command to get the tiling I want, but then the scrollview would scroll the document view too far (showing the srollview background at the left) to make sure that no content is hidden by the ruler (which cannot happen with my custom tiling). Any ideas?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
994
Mar ’22
NSCursor reverts to the default arrow cursor while scrolling
Hello, I have a custom NSView that pushes a crossHair cursor when the mouse enters the view via [[NSCursor crosshairCursor]push]; But when I scroll the view (with the track pad or Magic Mouse), the cursor quickly goes back to the default arrow cursor (this is not immediate though). I'm using an NSScrollView subclass to implement some method to synchronise scrolling between separate scroll views, but nothing that should affect NSCursor. 🤔 Any ideas?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
974
Feb ’22
Window NSWindow 0x137632e40 ordered front from a non-active application and may order beneath the active application's windows
This message has started appearing in the Xcode console when I test run my app, I think after the 13.3 macOS update, or the associated Xcode update. This message is posted: when the app launches (my code does not do anything with the app window). when I right click the app window to open a contextual menu while the application is in the background. when I click a button on the window with the cmd key pressed, while the app is in the background. I don't see why a warning should be posted in these situations. It looks like log noise to me. EDIT: this warning is posted even when testing the template Mac app (objective-C, xib) with no additional code. This is on Xcode Version 14.3 (14E222b)
Replies
7
Boosts
2
Views
4.8k
Activity
Jul ’23
Xcode indexing broken after Ventura 13.4 update
After updating to Ventura 13.4, Xcode 14.3 no longer indexes files in my projects. The "indexing" phase that is reported on the status bar does not list a number of files that it should be processing, and doesn't seem to actually do anything. As a result, autocompletion, code checking, editing in scope, etc. not longer work. Am I the only one experiencing this issue, and how can I fix it?
Replies
1
Boosts
0
Views
1k
Activity
May ’23
Simple core data app doesn't support undo
Hello, Amateur developer here. I dusted off a hobby core data app coded mostly under OSX 10.7, and which supported undo "for free" (as Apple say it). It still works when I build it with recent Xcode versions, except that it no longer supports undo. To understand why, I coded the most basic objective-C, core data (not document-based) app. In short, a single table view with a single column bound to an NSArray Controller set in "entity name" mode and bound to the managed object context. The core data model has a single entity class with a single NSString attribute (called "name", and which the table view column shows). It all works well, I can add and remove entities, and change their names from the table. Changes are saved normally... except there is nothing I can undo. The undo menu item is greyed out. I checked that my App Delegate implements the windowWillReturnUndoManager method and that this selector is called regularly. So to check that the undo manager sees anything to undo, I added this method to my App Delegate: - (IBAction)reportUndo:(id)sender {     NSLog(@"undo: %d", [self.persistentContainer.viewContext.undoManager canUndo]); } I can call this method by pressing a button. But it always logs "undo: 0", even after I add or remove entities. I take that the undo manager sees nothing to undo. This seems like rather basic stuff, but I can't understand why it doesn't work give given that it used to work in my more complex app without me doing anything special.
Replies
2
Boosts
0
Views
1.7k
Activity
Jan ’23
can't get correct NSScrollView tiling with rulers
Hell, I'm making a macOS app with an NSScrollView showing a vertical ruler (subclass of NSRulerView). I want its clipview to fill the remaining space left by the ruler, I don't want it to be drawn underneath. Apple says this about the contentInsets property: When the value of this property is equal to NSEdgeInsetsZero, traditional tiling is performed. Rulers, headers, and other subviews are tiled with the contentView frame filling the remaining space. When the value of this property is not equal to NSEdgeInsetsZero, the rulers, headers, and other subviews are inset as specified. The contentView is placed underneath these sibling views and is only inset by the scroll view border and non-overlay scrollers. I get the later result. The clipview is placed underneath the ruler, even though my NSScrollView subclass implements this : -(void)awakeFromNib     [self setHasVerticalRuler:YES];     [self setRulersVisible:YES];     self.automaticallyAdjustsContentInsets = NO;     self.contentInsets = NSEdgeInsetsMake(0, 0, 0, 0); } If I specify positive insets (for example 10 instead of zeros), the scrollers are moved from the edges, which means the above code is executed. I can override the -tile command to get the tiling I want, but then the scrollview would scroll the document view too far (showing the srollview background at the left) to make sure that no content is hidden by the ruler (which cannot happen with my custom tiling). Any ideas?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
994
Activity
Mar ’22
NSCursor reverts to the default arrow cursor while scrolling
Hello, I have a custom NSView that pushes a crossHair cursor when the mouse enters the view via [[NSCursor crosshairCursor]push]; But when I scroll the view (with the track pad or Magic Mouse), the cursor quickly goes back to the default arrow cursor (this is not immediate though). I'm using an NSScrollView subclass to implement some method to synchronise scrolling between separate scroll views, but nothing that should affect NSCursor. 🤔 Any ideas?
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
1
Boosts
0
Views
974
Activity
Feb ’22