Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

Reply to Illegal NSTableViewDataSource
Do you create the tableView in IB ?If so, look at hierarchy of objects in IB for the viewController.Should haveView ScrollView ClipView TableView Column1 => That's the identifier you use TableCellView => That's the identifier you have to use TableViewCell Column2Do you get this ?Then set the identifier for the tableViewCell (if you have multiple columns, if they use the same cell prototype, just need to define once.Note: you could also give the same identifier for each column and its tableCellView (not the TableViewCell !) and keep using your code.To check the problem is caused by the identifier, add a print:extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView { let column = tableView.tableColumns.firs
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Reply to Xcode Build Failure
@darkpaw: I have included snippet of my code below as reference. The 'width' parameter can be changed later ... However, same error would still show up: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions ... struct ViewShelter: View { // TH: helps safely update UI. @State private var rowEven: Bool = true @State private var pathBlocked: Bool = true @State private var borderColorBackEnd: Color = Color.black @State private var borderColorBackEndOperation: Color = Color.black var body: some View { VStack (alignment: .leading){ ForEach(0...(ViewConstants.TARGET_STRING_BACK_0_DIMENSION-1), id:.self) { row in if let row_x = shelterViewModel.getShelter(row: row) as [RecommendationEntity]? { if let row_x_count = row_x.count as Int? { if row_x_count > 0 { let row_x_columns = Array(0...row_x_count-1) GeometryReader { geometry in HStack(alignment: .center) { ForEach(row_x_columns, id:.self){ column in self.rowEven = (row%2==0)
Apr ’25
Reply to Reset Matrix Help
for anyone who might have the same question/problem. here's the sample that works as I wanted. import SwiftUI struct ContentView: View { let numberOfRows = 5 let numberOfColumns = 5 @State var matrix: [[Int]] = Array(repeating: Array(repeating: 0, count: 5), count: 5) @State var selectedRow1 = 0 @State var selectedColumn1 = 0 @State var selectedRow2 = 0 @State var selectedColumn2 = 0 @State var selectedRow3 = 0 var body: some View { VStack { Image(systemName: globe) .imageScale(.large) .foregroundColor(.accentColor) Text(Hello, world!) Form { Section(header: Text(Question 1)) { Picker(Select a row:, selection: $selectedRow1) { ForEach(1...numberOfRows, id: .self) { row in Text((row)) } } .pickerStyle(SegmentedPickerStyle()) Picker(Select a column:, selection: $selectedColumn1) { ForEach(1...numberOfColumns, id: .self) { column in Text((column)) } } .pickerStyle(SegmentedPickerStyle()) } Section(header: Text(Question 2)) { Picker(Select a row:, selection: $selectedRow2) { ForEach(1..
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’23
Reply to Question About Swift
So you're making the columns wider as necessary? That's a bit of work, as you've seen, to compute the widths. What happens if a name has a million characters? So, there is more to think about here.A simpler approach is to keep the column widths, but then you can't show all the data. So, what can you show instead? You can solve the crashing problem by only showing as much data as fits, but that's going to be misleading to anyone using the table.Either way, solving the problem takes a bit of analysis and planning.
Topic: Programming Languages SubTopic: Swift Tags:
Mar ’18
Reply to Mojave beta 6 breaks Applescripts
This worked for me, but it requires converting to an app first!1. Open the app's plist file is xcode2. add row (from right click context menu)3. in ‘key’ column select ‘Privacy - AppleEvents Sending Usage Description’ from the drop down menu (you need to scroll down)4. add ‘This script needs to control other applications to run.' in the value column.5. Build the application again... it should now prompt for accessibility and automation permissions.Hope it helps...
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’18
Reply to iOS 13 crash creating reminders
This is usually the result of a storyboard outlet connected to a class property that is no longer there. That is, you might have removed/renamed a property in code that was still connected to an outlet. This is not handled automatically by Xcode, if you remove a connected property in code, you also have to remove that connection in storyboard. To check for this, switch to storyboard and bring up the utilities column (upper right). Select the element and the connections inspector (top right of the utilities column). Check if there are any unwanted connections and remove them if necessary.
Topic: App & System Services SubTopic: General Tags:
May ’20
Reply to Nesting engineering type tracks under custom instrument
Hey there!Great question.In general, you can specify multiple levels in the engineering-type-track elements by specifying multiple hierarchy levels.Your tracks can be nested under instrument if you specify <self/> as the first hierarchy level, like so:<hierarchy> <level> <self/> </level> <level> <column>value-column</column> </level> </hierarchy>Then, in the matching augmentation, you'll need to provide Instrument type ID as the first restriction level:<slice-type-hierarchy> <level> <slice-type>instrument-type</slice-type> <equals> <instrument-type>com.example.your-instrument-id</instrument-type> </equals> </level> <level> <slice-type>value-column-type</slice-type> </level> </slice-type-hierarchy>Please keep in mind that you can create hierarchies even if you don't nest something under instrument track — just specify more levels in
Feb ’20
Reply to UIPickerView row descriptions
I don't understand what are each component. Component is a column, it seems you are trying to use a component as a title for column ? If I understand correctly, you should have only 3 components. And titleForRow 0 should hold the title. To forbid selection of title, do it in func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { with the following code: var selectedRow = row if selectedRow == 0 { // title not to be selected selectedRow = 1 pickerView.selectRow(selectedRow, inComponent: component, animated: false) }
Topic: Programming Languages SubTopic: Swift Tags:
May ’22
Reply to Illegal NSTableViewDataSource
Do you create the tableView in IB ?If so, look at hierarchy of objects in IB for the viewController.Should haveView ScrollView ClipView TableView Column1 => That's the identifier you use TableCellView => That's the identifier you have to use TableViewCell Column2Do you get this ?Then set the identifier for the tableViewCell (if you have multiple columns, if they use the same cell prototype, just need to define once.Note: you could also give the same identifier for each column and its tableCellView (not the TableViewCell !) and keep using your code.To check the problem is caused by the identifier, add a print:extension RegistrationReportsViewController: NSTableViewDelegate { func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if tableColumn == nil { return nil } // Extra safety if let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView { let column = tableView.tableColumns.firs
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’20
Reply to Xcode Build Failure
@darkpaw: I have included snippet of my code below as reference. The 'width' parameter can be changed later ... However, same error would still show up: The compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions ... struct ViewShelter: View { // TH: helps safely update UI. @State private var rowEven: Bool = true @State private var pathBlocked: Bool = true @State private var borderColorBackEnd: Color = Color.black @State private var borderColorBackEndOperation: Color = Color.black var body: some View { VStack (alignment: .leading){ ForEach(0...(ViewConstants.TARGET_STRING_BACK_0_DIMENSION-1), id:.self) { row in if let row_x = shelterViewModel.getShelter(row: row) as [RecommendationEntity]? { if let row_x_count = row_x.count as Int? { if row_x_count > 0 { let row_x_columns = Array(0...row_x_count-1) GeometryReader { geometry in HStack(alignment: .center) { ForEach(row_x_columns, id:.self){ column in self.rowEven = (row%2==0)
Replies
Boosts
Views
Activity
Apr ’25
Reply to Reset Matrix Help
for anyone who might have the same question/problem. here's the sample that works as I wanted. import SwiftUI struct ContentView: View { let numberOfRows = 5 let numberOfColumns = 5 @State var matrix: [[Int]] = Array(repeating: Array(repeating: 0, count: 5), count: 5) @State var selectedRow1 = 0 @State var selectedColumn1 = 0 @State var selectedRow2 = 0 @State var selectedColumn2 = 0 @State var selectedRow3 = 0 var body: some View { VStack { Image(systemName: globe) .imageScale(.large) .foregroundColor(.accentColor) Text(Hello, world!) Form { Section(header: Text(Question 1)) { Picker(Select a row:, selection: $selectedRow1) { ForEach(1...numberOfRows, id: .self) { row in Text((row)) } } .pickerStyle(SegmentedPickerStyle()) Picker(Select a column:, selection: $selectedColumn1) { ForEach(1...numberOfColumns, id: .self) { column in Text((column)) } } .pickerStyle(SegmentedPickerStyle()) } Section(header: Text(Question 2)) { Picker(Select a row:, selection: $selectedRow2) { ForEach(1..
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Question About Swift
So you're making the columns wider as necessary? That's a bit of work, as you've seen, to compute the widths. What happens if a name has a million characters? So, there is more to think about here.A simpler approach is to keep the column widths, but then you can't show all the data. So, what can you show instead? You can solve the crashing problem by only showing as much data as fits, but that's going to be misleading to anyone using the table.Either way, solving the problem takes a bit of analysis and planning.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Mar ’18
Reply to Mojave beta 6 breaks Applescripts
This worked for me, but it requires converting to an app first!1. Open the app's plist file is xcode2. add row (from right click context menu)3. in ‘key’ column select ‘Privacy - AppleEvents Sending Usage Description’ from the drop down menu (you need to scroll down)4. add ‘This script needs to control other applications to run.' in the value column.5. Build the application again... it should now prompt for accessibility and automation permissions.Hope it helps...
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’18
Reply to iOS 13 crash creating reminders
This is usually the result of a storyboard outlet connected to a class property that is no longer there. That is, you might have removed/renamed a property in code that was still connected to an outlet. This is not handled automatically by Xcode, if you remove a connected property in code, you also have to remove that connection in storyboard. To check for this, switch to storyboard and bring up the utilities column (upper right). Select the element and the connections inspector (top right of the utilities column). Check if there are any unwanted connections and remove them if necessary.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’20
Reply to CKRecordValue type NSDate stores nil value?
So for a column that represents NSDate, it is considered nonnull and you have to use a placeholder date value instead? Is there any particular reason why you can't set a date nil?
Replies
Boosts
Views
Activity
Oct ’19
Reply to Datagrid view for cocoa-swift? like phpgrid
An NSTableView object displays data for a set of related records, with rows representing individual records and columns representing the attributes of those records.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Oct ’16
Reply to appStoreReceiptURL size getting out of hand
There is no need to store anything other than used transaction_ids. The rest is for your own corporate needs. If they are not sufficient to justify adding additional columns then don't.
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Jul ’16
Reply to is there a way you can track number of downloads/installs for your BETA app on Testflight?
Yes, it's right there in the builds list on the TestFlight tab in iTC. There's a column named Installations which shows the number of installations.
Replies
Boosts
Views
Activity
Dec ’17
Reply to Nesting engineering type tracks under custom instrument
Hey there!Great question.In general, you can specify multiple levels in the engineering-type-track elements by specifying multiple hierarchy levels.Your tracks can be nested under instrument if you specify <self/> as the first hierarchy level, like so:<hierarchy> <level> <self/> </level> <level> <column>value-column</column> </level> </hierarchy>Then, in the matching augmentation, you'll need to provide Instrument type ID as the first restriction level:<slice-type-hierarchy> <level> <slice-type>instrument-type</slice-type> <equals> <instrument-type>com.example.your-instrument-id</instrument-type> </equals> </level> <level> <slice-type>value-column-type</slice-type> </level> </slice-type-hierarchy>Please keep in mind that you can create hierarchies even if you don't nest something under instrument track — just specify more levels in
Replies
Boosts
Views
Activity
Feb ’20
Reply to UIPickerView row descriptions
I don't understand what are each component. Component is a column, it seems you are trying to use a component as a title for column ? If I understand correctly, you should have only 3 components. And titleForRow 0 should hold the title. To forbid selection of title, do it in func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) { with the following code: var selectedRow = row if selectedRow == 0 { // title not to be selected selectedRow = 1 pickerView.selectRow(selectedRow, inComponent: component, animated: false) }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Refreshable lists with 2 columns
Have you considered using a LazyVGrid? You can specify the number of columns and it should grow vertically as needed. https://developer.apple.com/documentation/swiftui/lazyvgrid
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to xcode organizer crash report shows no data
Sorry, I just noticed that the Crashes column was set to Last Year. When I set it to Last Two Weeks, I get the data.
Replies
Boosts
Views
Activity
Apr ’23
Reply to MLClassifier increase maxIterations in CreateML
I am having the same problem. My training set has 26 columns and 178 rows.I just found this in a blog: https://www.captechconsulting.com/blogs/a-weekend-with-createml-and-coreml
Topic: Machine Learning & AI SubTopic: Core ML Tags:
Replies
Boosts
Views
Activity
Jul ’18