Today the Connect page asks me to confirm if I am a trader or not under DSA.
I am an independent developer and have several apps in App Store. I have no idea what a trader is.
The DSA defines a trader as “any natural person, or any legal person irrespective of whether privately or publicly owned, who is acting, including through any person acting in his or her name or on his or her behalf, for purposes relating to his or her trade, business, craft or profession.” If you have questions about your status as a trader, consult with your legal advisor.
I emailed Connect support but their reply is very "official" which confuses me more.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
According to the doc:
The value returned is the same as the value returned in the kEventParamKeyCode when using Carbon Events.
So where can I find kEventParamKeyCode?
I have a tableview with a column which has an inner tableview. I want to change height of the outer tableview to match the height of the inner tableview.
outerTableView.reloadData()
let range = outerTableView.rows(in: summaryTableView.superview!.visibleRect)
outerTableView.noteHeightOfRows(withIndexesChanged: IndexSet(integersIn: range.lowerBound..<range.upperBound))
The above code will cause an exception:
WARNING: NSTableView detected a rowView was requested from inside of the -heightOfRow delegate method. That is not supported!
(
0 CoreFoundation 0x000000019093eccc __exceptionPreprocess + 176
1 libobjc.A.dylib 0x0000000190426788 objc_exception_throw + 60
2 AppKit 0x000000019420be98 -[NSTableRowData _availableRowViewWhileUpdatingAtRow:] + 0
3 AppKit 0x000000019425a470 -[NSTableView viewAtColumn:row:makeIfNecessary:] + 32
I have an uncommon scenario here.
outer tableview
+--------------------------+
| column 1| inner tableview|
+--------------------------+
Now most often the out tableview has many rows and vertical scrollbar visible.
When user try to scroll vertically in the inner tableview but it has no vertical scrollbar (because it has only a few items), I want the scroll event sink into its parent view or better outer tableview, so that user does not have to move cursor to first column in outer tableview and scrolls.
Is this possible?
What unit does NSView.bounds/frame use? Pixel or point? How to convert between them?
I have a custom Objective-C ObjectCache class that utilized NSMutableDictionary to store named objects (specifically large NSImage objects).
The class has a maxItems property and clear method, which worked fine.
- (void)clear
{
@synchronized(_cache)
{
[_cache removeAllObjects];
}
}
But yesterday I received a customer feedback complaining one of my app consumes up to 24GB memory.
I verified that on my M1 Mac mini, and it's true. Even after calling clear method, memory usage shown in both Xcode debugger panel and Activity Monitor remains the same.
It did work before. Once I close a picture gallery window by calling clear method, memory usage dropped immediately as shown in Activity Monitor.
I suspect that this is a bug in ARM architecture. Does anyone else have same problem?
I tried many ways but it seems I just cannot get it working.
// AppDelegate
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
true // false does not work either
}
// MainWC
func windowShouldClose(_ sender: NSWindow) -> Bool {
print(#function)
if sender === NSApp.mainWindow {
print("is main window")
sender.setIsVisible(false)
return false
}
return true
}
Once I hide the main window (using setIsVisible or orderOut) the app quits; even if I return false from applicationShouldTerminateAfterLastWindowClosed, NSApp.mainWindow will become nil.
I calculate cell view's width in func tableView(_ tableView: NSTableView, sizeToFitWidthOfColumn column: Int). I have a need to resize the tableview's width to just match total width of all cell views' (without scrollbars).
But it seems changing tableview's width does not work:
tableView.bounds.size = CGSize(width: w, height: tableView.bounds.height)
I suspect that I should change its clipping view or enclosing scrollview, but don't have any idea on this.
Any help?
I use ProcessInfo.processInfo.environment["key"] to get test parameters, but all of a sudden I could not find the UI like below:
In the screenshot above, the 2 environment variables were actually what I entered for the unit test target. I don't have any idea why they were moved there!
Any similar problems?
I just want some experts on Swift to confirm that the following syntaxes are equivalent:
if a > b, c > d {
}
if a > b && c > d {
}
I consulted "The Swift Programming Lanugage (version 5.7)" but the book does not cover this issue. But I believe it's true because my tests show they are the same.
I remember long time ago I could click on a button in Xcode to launch a Web page to manage iCloud data. But now I cannot find the button.
I want to check if a given string matches a file pattern.
Does Swift have builtin support for filename globbing? Or is there any 3rd party packages for this?
I had a customer feedback about a "zero length data" error which was captured using an exception handler and displayed using NSAlert.
My app employs [NSURLSession dataTaskWithURL:] to download XML and image data.
But I got no idea what it is about. I assume it's related to NSData, but this error never happened before (for years).
Does anyone have any idea about the source of this error?
I used to run VirtualBox on macOS to run Windows guests for some reasons.
Recently I bought a new Mac mini M1, now I have a problem - VB does not have a stable release for arm (yet).
What other options do I have?
BTW, I came across this doc article (https://developer.apple.com/documentation/virtualization/running_macos_in_a_virtual_machine_on_apple_silicon). I read thru it, but could not conclude if it offers the same functionalities as a full-blown VM suite; and more specifically I want to run Windows guests.
Is it possible that I bypass tableView.makeView so that I can create a NSTableCellView on the fly (based on some logics)?
func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? {
if NSTableColumn.identifier.rawValue == "labelColumn" {
let myCellView = NSTableCellView()
myCellView.textField.strinValue = "label text"
return myCellView
} else {
let complexView = loadFromNib() // of NSTableCellView
// populate complexView
return complexView
}
}