Search results for

“column”

2,091 results found

Post

Replies

Boosts

Views

Activity

Reply to Unable to install app on 9.2.1
If you plug the device in to your Mac and view the console output in Xcode while installing, what errors do you see? (In Xcode, Window > Devices, choose device on left column, look at the bottom part of the right column. You may need to click the upward pointing triangle in the bottom left corner of the right hand column to show the console output.)
Feb ’16
Reply to vLookup In App?
Additionally, how does the array formatting go?Why would row 1, column 2 be 6? Are columns horizontal, and rows vertical here? Also, is there a 3-number limit per row of code? If I add a 4th number to each row, it still returns 6.SO confused regarding the order. It makes zero sense why the rows/columns aren't logically ordered.
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’16
how to change NSOutlineView or NSTableView column header font?
is it really impossible to do this?I tried changing it form the xib designer view and it just reverted back to System font size 11so I tried overriding the header cell, and put my custom font directly to theclass MyTableHeaderCell: NSTableHeaderCell { let customFont: NSFont = NSFont.systemFont(ofSize: 13) // setting the custom font to use on the header cell override func drawInterior(withFrame cellFrame: NSRect, in controlView: NSView) { var mutable = NSMutableAttributedString(attributedString: attributedStringValue) mutable.removeAttribute(.font, range: NSRange(location: 0, length: mutable.length)) mutable.addAttribute(.font, value: customFont, range: NSRange(location: 0, length: mutable.length)) attributedStringValue = mutable super.drawInterior(withFrame: cellFrame, in: controlView) }}this would work most of the time, but sometimes when I move/resize the columns around I would get a crash due to the font's _sharedFontInstanceInfo being nil. _sharedFontInstanceInfo is a private property of NSFontI
Topic: UI Frameworks SubTopic: AppKit Tags:
2
0
1.4k
Oct ’18
Reply to SwiftUI charts, how do I align these X axis labels correctly?
Look at your image and imagine there's a blue column immediately to the right of every red column. Now, the x-axis labels look like they're in the centre of the two columns. So, is your chart supposed to have two columns for each value? If not, in this line: AxisMarks(position: .automatic, values: shownXValues) { val in can position: .automatic be changed to something else? Also, is .useAppFont() a SwiftUI thing, or something you've written yourself? I've never seen it before.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Reply to NavigationSplitView
For column one I setup an enum enum Nav: String, Hashable, CaseIterable and the cases are the different Entity names. And then use a list to display them. For column two I'd need a way to show the ListView() for whatever Entity name was selected from column one. And then the third column you show the DetailView() of the selected ListView() item. I guess is my sudo way of thinking about how it should work. But maybe that's not a great way of how you'd go about it?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’23
Reply to Illegal NSTableViewDataSource
It is normal delegate is not called when 0 row. But as soon as at least 1, should be called.Your code is wrong:extension RegistrationReportsViewController: NSTableViewDelegate{ func configureCell(cell: NSTableCellView, row: Int, column: Int){ let registration = fetchedResultsController.fetchedObjects! [row] print (Start NSTableView Delegate) switch column { case 0: cell.textField?.stringValue = registration.lastName ?? case 1: cell.textField?.stringValue = registration.firstName ?? case 2: cell.textField?.stringValue = registration.middleName ?? default: break } func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView?{ let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView let column = tableView.tableColumns.firstIndex(of: tableColumn!)! configureCell(cell: cell!, row: row, column: column) return cell } } }Look, viewFor is defined inside configureCell.So it is not vis
Topic: Programming Languages SubTopic: Swift Tags:
Jan ’20
Table column cannot show value with function tableView:aTableView objectValueForTableColumn:aTableColumn row:rowIndex
I hope the table column show the values after I pressed the button. The following is the IBAction Button. - (IBAction)buttonTapped:(id)sender { //Filling the arrays Test_name = [NSArray arrayWithObjects:@test_item_a,@b,@c,@Current,nil]; Min = [NSArray arrayWithObjects:@0.5,@0.7,@0.8,@100,nil]; Max = [NSArray arrayWithObjects:@5,@5,@9,@140,nil]; uint16 index = 0; NSInteger i = 0; //Show_Datagrid this function move the above values to another 3 arrays table_item, //table_min, table_max. And the following code is just to verify the value. [self Show_Datagrid:index]; [self showMeg:@Button Tapped!2n]; [self showMeg:[table_item objectAtIndex:0]]; [self showMeg:@n]; [self showMeg:[table_min objectAtIndex:0]]; [self showMeg:@n]; [self showMeg:Column_test_item.identifier]; //call this function to show the values in tableview. [self tableView:_tableview objectValueForTableColumn:Column_test_item row:i]; } following is the function (Column_test_item.identifier is verified correct.): -(id)tableView:(NSTableView
1
0
620
May ’22
Reply to Schema to collect event signposts
Perfect! Thanks for the pointer. I'm finally starting to grasp the documentation a bit and ended up using slice.Something like this seems to work:<list> <title>List: Writes</title> <table-ref>writes</table-ref> <slice> <column>event-type</column> <equals> <event-type>Event</event-type> </equals> </slice> <column>name</column> <column>message</column> </list>It seems like maybe there's a way to filter in create-table using the attribute element but it keeps telling me that event-type is not an attribute of the os-signpost schema (perhaps it's a column and not an attribute, not sure I fully grasp the terminology yet). I'll take a look at a custom modeler as shown in your final advanced example to better filter based on the message.I think it'd be useful to have some type of model generator (os-signpost-point-schema?) for these events where a p
Jan ’19
Create a grid table with fixed number of rows and columns of variable widths
I've tried a few approaches to create a standard table - with a fixed number of columns and rows, but with variable column widths - for all device classes. The contraint system, even using Stack Views, created an impossible number of layout errors, and so it was suggested to use UICollectionViews, which appears better, but I cannot solve the following issues.Firstly, the cells in the last row of the table do not align perfectly with the cells above. Each cell is fractionally less width, making the final cell quite clearly unaligned. This issue, while minor in the example project, can appear larger depending on cell contents or device sizes.Secondly, while I can manage device orientation changes on most devices tested in the simulator, this not true for iPad Air devices. While the table layout is correct when I first run the project on iPad Air in any orientation, and is correct when re-orientated from landscape to horizontal; the layout breaks if I run the project on a iPad Air in portrait o
Topic: UI Frameworks SubTopic: UIKit Tags:
6
0
4.8k
Aug ’19
Reply to SwiftUI @Published var inconsistently updating views
SquareView is called here (posted in answer as well in case it's more readable): struct BoardView: View { var body: some View { VStack(alignment: .center, spacing: 0) { ForEach(SizeRange.reversed(), id: .self) { row in HStack(spacing: 0) { ForEach(SizeRange, id: .self) { column in SquareView(column: column, row: row) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’22
Reply to Texture Pixel layout in Metal
Yes, you are correct that the C array is in row major order. It's important to note that not all languages address them equally. Some languages like Fortran, use column major order when storing the data, but use the same style (row, column) addressing. But in many shading languages, like Metal Shading Language, the first subscript is the column, and the second subscript is the row because for linear algebra reasons, vectors are treated like columns.
Topic: Graphics & Games SubTopic: General Tags:
Jun ’21
Reply to image name for pointer in custom instrument
That's actually not that bad. It comes up with the naked address and the image name which is sufficient for my needs.Code for folks reading this in the future:<ktrace-interval-schema> <id>com-google-dyld-objc-init-schema</id> <title>dyld ObjC Init</title> <start-pattern> <class>31</class> <subclass>7</subclass> <code>8</code> <function>1</function> <thread>?thread</thread> <arg2>?initializer</arg2> </start-pattern> <end-pattern> <class>31</class> <subclass>7</subclass> <code>8</code> <function>2</function> </end-pattern> <start-column> <mnemonic>start</mnemonic> <title>Start</title> <type>start-time</type> </start-column> <duration-column> <mnemonic>duration</mnemonic> <title>Duration</title> <type>duration</type> </dura
Jan ’19
Reply to Unable to install app on 9.2.1
If you plug the device in to your Mac and view the console output in Xcode while installing, what errors do you see? (In Xcode, Window > Devices, choose device on left column, look at the bottom part of the right column. You may need to click the upward pointing triangle in the bottom left corner of the right hand column to show the console output.)
Replies
Boosts
Views
Activity
Feb ’16
Reply to vLookup In App?
Additionally, how does the array formatting go?Why would row 1, column 2 be 6? Are columns horizontal, and rows vertical here? Also, is there a 3-number limit per row of code? If I add a 4th number to each row, it still returns 6.SO confused regarding the order. It makes zero sense why the rows/columns aren't logically ordered.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’16
how to change NSOutlineView or NSTableView column header font?
is it really impossible to do this?I tried changing it form the xib designer view and it just reverted back to System font size 11so I tried overriding the header cell, and put my custom font directly to theclass MyTableHeaderCell: NSTableHeaderCell { let customFont: NSFont = NSFont.systemFont(ofSize: 13) // setting the custom font to use on the header cell override func drawInterior(withFrame cellFrame: NSRect, in controlView: NSView) { var mutable = NSMutableAttributedString(attributedString: attributedStringValue) mutable.removeAttribute(.font, range: NSRange(location: 0, length: mutable.length)) mutable.addAttribute(.font, value: customFont, range: NSRange(location: 0, length: mutable.length)) attributedStringValue = mutable super.drawInterior(withFrame: cellFrame, in: controlView) }}this would work most of the time, but sometimes when I move/resize the columns around I would get a crash due to the font's _sharedFontInstanceInfo being nil. _sharedFontInstanceInfo is a private property of NSFontI
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
2
Boosts
0
Views
1.4k
Activity
Oct ’18
Reply to SwiftUI charts, how do I align these X axis labels correctly?
Look at your image and imagine there's a blue column immediately to the right of every red column. Now, the x-axis labels look like they're in the centre of the two columns. So, is your chart supposed to have two columns for each value? If not, in this line: AxisMarks(position: .automatic, values: shownXValues) { val in can position: .automatic be changed to something else? Also, is .useAppFont() a SwiftUI thing, or something you've written yourself? I've never seen it before.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to NavigationSplitView
For column one I setup an enum enum Nav: String, Hashable, CaseIterable and the cases are the different Entity names. And then use a list to display them. For column two I'd need a way to show the ListView() for whatever Entity name was selected from column one. And then the third column you show the DetailView() of the selected ListView() item. I guess is my sudo way of thinking about how it should work. But maybe that's not a great way of how you'd go about it?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to Illegal NSTableViewDataSource
It is normal delegate is not called when 0 row. But as soon as at least 1, should be called.Your code is wrong:extension RegistrationReportsViewController: NSTableViewDelegate{ func configureCell(cell: NSTableCellView, row: Int, column: Int){ let registration = fetchedResultsController.fetchedObjects! [row] print (Start NSTableView Delegate) switch column { case 0: cell.textField?.stringValue = registration.lastName ?? case 1: cell.textField?.stringValue = registration.firstName ?? case 2: cell.textField?.stringValue = registration.middleName ?? default: break } func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView?{ let cell = tableView.makeView(withIdentifier: (tableColumn!.identifier), owner: self) as? NSTableCellView let column = tableView.tableColumns.firstIndex(of: tableColumn!)! configureCell(cell: cell!, row: row, column: column) return cell } } }Look, viewFor is defined inside configureCell.So it is not vis
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jan ’20
Table column cannot show value with function tableView:aTableView objectValueForTableColumn:aTableColumn row:rowIndex
I hope the table column show the values after I pressed the button. The following is the IBAction Button. - (IBAction)buttonTapped:(id)sender { //Filling the arrays Test_name = [NSArray arrayWithObjects:@test_item_a,@b,@c,@Current,nil]; Min = [NSArray arrayWithObjects:@0.5,@0.7,@0.8,@100,nil]; Max = [NSArray arrayWithObjects:@5,@5,@9,@140,nil]; uint16 index = 0; NSInteger i = 0; //Show_Datagrid this function move the above values to another 3 arrays table_item, //table_min, table_max. And the following code is just to verify the value. [self Show_Datagrid:index]; [self showMeg:@Button Tapped!2n]; [self showMeg:[table_item objectAtIndex:0]]; [self showMeg:@n]; [self showMeg:[table_min objectAtIndex:0]]; [self showMeg:@n]; [self showMeg:Column_test_item.identifier]; //call this function to show the values in tableview. [self tableView:_tableview objectValueForTableColumn:Column_test_item row:i]; } following is the function (Column_test_item.identifier is verified correct.): -(id)tableView:(NSTableView
Replies
1
Boosts
0
Views
620
Activity
May ’22
Reply to Schema to collect event signposts
Perfect! Thanks for the pointer. I'm finally starting to grasp the documentation a bit and ended up using slice.Something like this seems to work:<list> <title>List: Writes</title> <table-ref>writes</table-ref> <slice> <column>event-type</column> <equals> <event-type>Event</event-type> </equals> </slice> <column>name</column> <column>message</column> </list>It seems like maybe there's a way to filter in create-table using the attribute element but it keeps telling me that event-type is not an attribute of the os-signpost schema (perhaps it's a column and not an attribute, not sure I fully grasp the terminology yet). I'll take a look at a custom modeler as shown in your final advanced example to better filter based on the message.I think it'd be useful to have some type of model generator (os-signpost-point-schema?) for these events where a p
Replies
Boosts
Views
Activity
Jan ’19
Create a grid table with fixed number of rows and columns of variable widths
I've tried a few approaches to create a standard table - with a fixed number of columns and rows, but with variable column widths - for all device classes. The contraint system, even using Stack Views, created an impossible number of layout errors, and so it was suggested to use UICollectionViews, which appears better, but I cannot solve the following issues.Firstly, the cells in the last row of the table do not align perfectly with the cells above. Each cell is fractionally less width, making the final cell quite clearly unaligned. This issue, while minor in the example project, can appear larger depending on cell contents or device sizes.Secondly, while I can manage device orientation changes on most devices tested in the simulator, this not true for iPad Air devices. While the table layout is correct when I first run the project on iPad Air in any orientation, and is correct when re-orientated from landscape to horizontal; the layout breaks if I run the project on a iPad Air in portrait o
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
6
Boosts
0
Views
4.8k
Activity
Aug ’19
Reply to SwiftUI @Published var inconsistently updating views
SquareView is called here (posted in answer as well in case it's more readable): struct BoardView: View { var body: some View { VStack(alignment: .center, spacing: 0) { ForEach(SizeRange.reversed(), id: .self) { row in HStack(spacing: 0) { ForEach(SizeRange, id: .self) { column in SquareView(column: column, row: row) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22
Reply to Texture Pixel layout in Metal
Yes, you are correct that the C array is in row major order. It's important to note that not all languages address them equally. Some languages like Fortran, use column major order when storing the data, but use the same style (row, column) addressing. But in many shading languages, like Metal Shading Language, the first subscript is the column, and the second subscript is the row because for linear algebra reasons, vectors are treated like columns.
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to In UISplitViewController, can I use same viewController as a primary and compact column?
@Claude31 Yes, I know. Though it's discouraged, I'm trying to wrap it in a UIViewController to use as a primary column. Other than that, can I use a view controller for both primary and compact column?
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to SwiftUI: .fullscreenCover doesn't show .navigationTitle
NavigationView was deprecated but was replaced by two new views: NavigationStack (single column) and NavigationSplitView (multiple columns). In your case, you should just use a NavigationStack where you would have otherwise used a NavigationView.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to image name for pointer in custom instrument
That's actually not that bad. It comes up with the naked address and the image name which is sufficient for my needs.Code for folks reading this in the future:<ktrace-interval-schema> <id>com-google-dyld-objc-init-schema</id> <title>dyld ObjC Init</title> <start-pattern> <class>31</class> <subclass>7</subclass> <code>8</code> <function>1</function> <thread>?thread</thread> <arg2>?initializer</arg2> </start-pattern> <end-pattern> <class>31</class> <subclass>7</subclass> <code>8</code> <function>2</function> </end-pattern> <start-column> <mnemonic>start</mnemonic> <title>Start</title> <type>start-time</type> </start-column> <duration-column> <mnemonic>duration</mnemonic> <title>Duration</title> <type>duration</type> </dura
Replies
Boosts
Views
Activity
Jan ’19
Reply to SwiftUI @Published var inconsistently updating views
SquareView is called here: // SizeRange is 1...8 struct BoardView: View { var body: some View { VStack(alignment: .center, spacing: 0) { ForEach(SizeRange.reversed(), id: .self) { row in HStack(spacing: 0) { ForEach(SizeRange, id: .self) { column in SquareView(column: column, row: row) } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’22