Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

Reply to "Field 'recordName' is not marked queryable" error when accessing cloud kit data
In the Dashboard:1) Select your container. Then choose Schema.2) In the sidebar select the record you want.3) With the record selected in the sidebar you should see a list of System fields and Custom fields. Scroll to the bottom and click the Edit Indexes.4) You'll now see a pop up button appear in the Fields column. Choose recordName (if it isn't already selected in the pop up button) then choose Queryable in the pop up button in the Index Type column. Click Add Index.5) Click Save Changes to save.
Dec ’19
Reply to controlTextDidEndEditing for View Based NSTableView
Yes, I usually set tags: func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { // … code cellView.textField!.tag = row + 256 * column. // If less than 256 rows ; otherwise cellView.textField!.tag = row + 256 * column This is a multiplexed value of row and col. I attach an IBAction to the tableViewCell: @IBAction func cellContentDidChange(_ sender: NSTextField) { // Let's find row and coll by demuxing the tag let rowIndiv = highWordTag % 256 let colVar = (sender.tag - rowIndiv) / 256 (that's Swift, but easily adaptable to objC)
Topic: UI Frameworks SubTopic: AppKit Tags:
Nov ’21
Cannot create a SwiftUI Table with more than 10 columns, attempts to use Group do not work .... HELP
Trying to overcome the 10 columns limit of Table in SwiftUI, I am trying to use Group to split the number of Views by group of 10. This generate a compiler error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Here is the code import SwiftUI //--------------------------------------------------------------------------------------------- struct TestStruct : Identifiable { var id = UUID () var name : String var val : Int } //--------------------------------------------------------------------------------------------- struct ContentView: View { @State var testData : [ TestStruct ] = [ TestStruct ( name: Leopold, val: 1 ), TestStruct ( name: Napoleon, val: 2 ) ] var body: some View { VStack { Table ( testData ) { Group { TableColumn ( Name ) { testStruct in Text ( testStruct.name ) } TableColumn ( Value ) { testStruct in Text ( String ( testStruct.val ) ) } } } } } } //---------------------------------------------------
0
0
1.8k
Sep ’22
Reply to give developer account to programmer?!
List the steps you take to sign in to your developer account. What you are seeing is what someone without a developer account would see if they signed in to Apple. When I sign in to my developer account, I see a Program Resources section with the following columns: App Store Connect, Certificates, IDs, and Profiles, and Additional Resources. Each of these columns has a list of links. Do you see these columns when you sign in? Are you able to click the Users and Access link I mentioned in Step 2 in my earlier answer? When I click the Users and Access link under App Store Connect, I see the following links at the top of the page: People, Sandbox, Keys, Shared Secret, and Xcode Cloud. The People link is the initially selected link. There is a Users sidebar with a list of categories. Selecting the All items shows all the users on my team with an Add button above the list of users. Clicking the Add button lets me add someone to my team. I am not an Apple employee so I cannot provide more
Topic: App & System Services SubTopic: General Tags:
Nov ’23
NavigationStack within NavigationSplitView's detail column clears the path when disappearing
I'd like to persist the path on a sidebar selection, so when user comes back to the sidebar selection, they land where they were before. Unexpectedly, the path gets cleared when sidebarSelection is changed from the NavigationStack that uses the path to something else. Is this an intended behavior? How to workaround it? Using TabView is one way, but TabView has its own problems, so I'm wondering if there's a solution within NavigationSplitView first. Here is a minimal reproduce of the issue: struct Home2: View { private enum SidebarSelection: CaseIterable, Identifiable { var id: Self { self } case files, tags } @State private var sidebarSelection: SidebarSelection? = .files @State private var path: [Int] = [] var body: some View { NavigationSplitView { List(SidebarSelection.allCases, selection: $sidebarSelection) { selection in switch selection { case .files: Label(Files, image: custom.square.stack) case .tags: Label(Tags, systemImage: grid) } } } detail: { switch sidebarSelection { case .files: NavigationStac
4
0
161
May ’25
Reply to SwiftUI Inspector ideal width
In SwiftUI, the inspectorColumnWidth modifier is meant to control the width of an inspector column within a TableView. The ideal parameter of this modifier should set the initial width of the inspector column, and the system should remember the user-adjusted width for subsequent launches. However, in the beta version of SwiftUI you're using, it seems that the ideal width might not be respected on initial launch. Workarounds: While waiting for potential updates or bug fixes from Apple, here are a few workarounds you can consider to achieve your desired behavior: Set Minimum Width to Ideal Width: Since you want to guarantee the initial width while allowing users to reduce the width, you can set the minimum width to the same value as the ideal width. This way, users won't be able to resize the inspector column to a width smaller than the ideal width. This could be a suitable approach if you're okay with users having a fixed minimum width of 550. TableView() .inspector(isPresented: $sta
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’23
Reply to Modeling Tabular Data from Excel file in Swift
hi,if you're willing to turn the Excel file into tab-separated text, it is easy to read the data into whatever is your data model. assuming your spreadsheet has column titles along its top row, the code below will give you a dictionary for every data row in the spreadsheet, keyed by the column titlesvar theDatabase = YourDatabase() // whatever is your database model // read the file as one big string var fileContents:String do { fileContents = try String(contentsOfFile: destinationPath, encoding: String.Encoding.utf8) } catch let error { print(Error reading file: (error.localizedDescription)) fileContents = } guard fileContents.count>0 else { return theDatabase } // split out records (separated by returns) let records = fileContents.split { $0 == r } // first record is field names, i.e., column titles let fieldNames = findFields(String(records[0])) // all remaining records are data, so match each with field names of record 0 for k in 1..<records.count { let values = findField
Topic: Programming Languages SubTopic: Swift Tags:
Oct ’19
Reply to "viewForTableColumn" vs "objectValueForTableColumn"
— All NSTableViews use NSTableColumn for their columns.— There are two ways of showing content in a table column:The old way uses subclasses of NSCell (like NSTextFieldCell), called a NSCell-based table view. The new way uses NSTableCellView, called a view-based table view. You should always use a view-based table view, and never the old way. (The old way is supported so that existing code doesn't stop working.)— In a view-based table view, you can still use objectValueForTableColumn, but you don't have to. Your table cells (NSTableCellView) has an objectValue property, that must be made to refer to an object that supplies data to the controls inside the table cell (buttons, text fields, etc). There are three ways of doing that:1. In your viewForTableColumn method, after you create the cell, you can simply set the property: NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self]; cellView.objectValue = …2. In your data source, you can implement objectValueForT
Topic: UI Frameworks SubTopic: AppKit Tags:
Feb ’18
Reply to "Field 'recordName' is not marked queryable" error when accessing cloud kit data
In the Dashboard:1) Select your container. Then choose Schema.2) In the sidebar select the record you want.3) With the record selected in the sidebar you should see a list of System fields and Custom fields. Scroll to the bottom and click the Edit Indexes.4) You'll now see a pop up button appear in the Fields column. Choose recordName (if it isn't already selected in the pop up button) then choose Queryable in the pop up button in the Index Type column. Click Add Index.5) Click Save Changes to save.
Replies
Boosts
Views
Activity
Dec ’19
Reply to controlTextDidEndEditing for View Based NSTableView
Yes, I usually set tags: func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { // … code cellView.textField!.tag = row + 256 * column. // If less than 256 rows ; otherwise cellView.textField!.tag = row + 256 * column This is a multiplexed value of row and col. I attach an IBAction to the tableViewCell: @IBAction func cellContentDidChange(_ sender: NSTextField) { // Let's find row and coll by demuxing the tag let rowIndiv = highWordTag % 256 let colVar = (sender.tag - rowIndiv) / 256 (that's Swift, but easily adaptable to objC)
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Nov ’21
Reply to Embedding a NavigationStack within the detail view of a NavigationSplitView
Can you share a code example that replicates the issue here? We're tracking similar bugs, but your callout of an explicit stack in the detail column is a configuration we haven't yet seen this issue with.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’23
Reply to Swift Playgrounds GridWorld
I found another way to do what I wanted. I just replaced let world: GridWorld = loadGridWorld(named: z) by: let world = GridWorld(columns: x, rows: y)
Replies
Boosts
Views
Activity
Feb ’24
Reply to Hide/Show tableview columns?
Yes, I was thinking to allow multiple selections in the popup, then setting the columns to zero width which are not selected. Why do you say this is not the best UI option? I am understanding you correctly? Thanks
Replies
Boosts
Views
Activity
Aug ’20
Cannot create a SwiftUI Table with more than 10 columns, attempts to use Group do not work .... HELP
Trying to overcome the 10 columns limit of Table in SwiftUI, I am trying to use Group to split the number of Views by group of 10. This generate a compiler error: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions Here is the code import SwiftUI //--------------------------------------------------------------------------------------------- struct TestStruct : Identifiable { var id = UUID () var name : String var val : Int } //--------------------------------------------------------------------------------------------- struct ContentView: View { @State var testData : [ TestStruct ] = [ TestStruct ( name: Leopold, val: 1 ), TestStruct ( name: Napoleon, val: 2 ) ] var body: some View { VStack { Table ( testData ) { Group { TableColumn ( Name ) { testStruct in Text ( testStruct.name ) } TableColumn ( Value ) { testStruct in Text ( String ( testStruct.val ) ) } } } } } } //---------------------------------------------------
Replies
0
Boosts
0
Views
1.8k
Activity
Sep ’22
Reply to Is it possible to create and updatable model in code?
Thanks for adding in the code for scikit. Does anyone have a link to code which will produce a classifier updatable model using csv files? Should be very easy to modify that to get the column prediction I need.Regards,Rob
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jul ’19
Reply to give developer account to programmer?!
List the steps you take to sign in to your developer account. What you are seeing is what someone without a developer account would see if they signed in to Apple. When I sign in to my developer account, I see a Program Resources section with the following columns: App Store Connect, Certificates, IDs, and Profiles, and Additional Resources. Each of these columns has a list of links. Do you see these columns when you sign in? Are you able to click the Users and Access link I mentioned in Step 2 in my earlier answer? When I click the Users and Access link under App Store Connect, I see the following links at the top of the page: People, Sandbox, Keys, Shared Secret, and Xcode Cloud. The People link is the initially selected link. There is a Users sidebar with a list of categories. Selecting the All items shows all the users on my team with an Add button above the list of users. Clicking the Add button lets me add someone to my team. I am not an Apple employee so I cannot provide more
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Nov ’23
How can I "right size columns individually" for every Finder window, permanently?
Common question / feature request for years online and in forums. Only functional answer today seems to be the free applet XtraFinder. But as of OSX 10.11 that tool requires disabling Apple's System Integrity Protection. Does Apple have a permanent fix available that doesn't require compromising SIP?
Replies
0
Boosts
0
Views
239
Activity
May ’16
NavigationStack within NavigationSplitView's detail column clears the path when disappearing
I'd like to persist the path on a sidebar selection, so when user comes back to the sidebar selection, they land where they were before. Unexpectedly, the path gets cleared when sidebarSelection is changed from the NavigationStack that uses the path to something else. Is this an intended behavior? How to workaround it? Using TabView is one way, but TabView has its own problems, so I'm wondering if there's a solution within NavigationSplitView first. Here is a minimal reproduce of the issue: struct Home2: View { private enum SidebarSelection: CaseIterable, Identifiable { var id: Self { self } case files, tags } @State private var sidebarSelection: SidebarSelection? = .files @State private var path: [Int] = [] var body: some View { NavigationSplitView { List(SidebarSelection.allCases, selection: $sidebarSelection) { selection in switch selection { case .files: Label(Files, image: custom.square.stack) case .tags: Label(Tags, systemImage: grid) } } } detail: { switch sidebarSelection { case .files: NavigationStac
Replies
4
Boosts
0
Views
161
Activity
May ’25
Reply to MSStickerView shows wrong sticker as a preview
hii have same issue using just the sticker app. It should be showing a different colored mouse in each column, some show correctly others dont...each has a unique name
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’16
Reply to ios 9 Safari / Web App Viewport Problem (expands to fit all elements in view)
I'm having a problem with flexbox on iOS9. See ieee-ac.org for an example. It overlays and overprints columns that should have been stacked vertically. iOS8 works fine but not iOS9. Could it be the same problem that's described here?
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’15
Reply to SwiftUI Inspector ideal width
In SwiftUI, the inspectorColumnWidth modifier is meant to control the width of an inspector column within a TableView. The ideal parameter of this modifier should set the initial width of the inspector column, and the system should remember the user-adjusted width for subsequent launches. However, in the beta version of SwiftUI you're using, it seems that the ideal width might not be respected on initial launch. Workarounds: While waiting for potential updates or bug fixes from Apple, here are a few workarounds you can consider to achieve your desired behavior: Set Minimum Width to Ideal Width: Since you want to guarantee the initial width while allowing users to reduce the width, you can set the minimum width to the same value as the ideal width. This way, users won't be able to resize the inspector column to a width smaller than the ideal width. This could be a suitable approach if you're okay with users having a fixed minimum width of 550. TableView() .inspector(isPresented: $sta
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Modeling Tabular Data from Excel file in Swift
hi,if you're willing to turn the Excel file into tab-separated text, it is easy to read the data into whatever is your data model. assuming your spreadsheet has column titles along its top row, the code below will give you a dictionary for every data row in the spreadsheet, keyed by the column titlesvar theDatabase = YourDatabase() // whatever is your database model // read the file as one big string var fileContents:String do { fileContents = try String(contentsOfFile: destinationPath, encoding: String.Encoding.utf8) } catch let error { print(Error reading file: (error.localizedDescription)) fileContents = } guard fileContents.count>0 else { return theDatabase } // split out records (separated by returns) let records = fileContents.split { $0 == r } // first record is field names, i.e., column titles let fieldNames = findFields(String(records[0])) // all remaining records are data, so match each with field names of record 0 for k in 1..<records.count { let values = findField
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Oct ’19
Reply to "viewForTableColumn" vs "objectValueForTableColumn"
— All NSTableViews use NSTableColumn for their columns.— There are two ways of showing content in a table column:The old way uses subclasses of NSCell (like NSTextFieldCell), called a NSCell-based table view. The new way uses NSTableCellView, called a view-based table view. You should always use a view-based table view, and never the old way. (The old way is supported so that existing code doesn't stop working.)— In a view-based table view, you can still use objectValueForTableColumn, but you don't have to. Your table cells (NSTableCellView) has an objectValue property, that must be made to refer to an object that supplies data to the controls inside the table cell (buttons, text fields, etc). There are three ways of doing that:1. In your viewForTableColumn method, after you create the cell, you can simply set the property: NSTableCellView *cellView = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self]; cellView.objectValue = …2. In your data source, you can implement objectValueForT
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Feb ’18