Search results for

“column”

2,085 results found

Post

Replies

Boosts

Views

Activity

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 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
Reply to Xcode 14.3 - Multiple commands produce swiftsourceinfo
Here's how I fixed it... Select your Extension target and go to Build Settings Search for module and look for Packaging -> Product Module Name. You'll probably see that the Resolved column is showing the same name as your main target. Type a unique name in the middle column (the column is titled WidgetsExtension or whatever your extension target is called) You should see that the Resolved column now shows the unique name you entered. It should hopefully build now.
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’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
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 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 Testflight metrics - installs and 7 days
In the Status column, view the status of a build. In the other columns, view the number of invited testers, number of installations on devices, and the total number of sessions in the last seven days across all testers. In the Crashes column, view the number of times the build crashed on tester devices. In the Feedback column, for iOS builds, view the number of feedback submissions you received from your testers. https://help.apple.com/app-store-connect/#/dev78d0a8f87 > View build status and metrics
Oct ’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
618
May ’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
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 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
Reply to Xcode 14.3 - Multiple commands produce swiftsourceinfo
Here's how I fixed it... Select your Extension target and go to Build Settings Search for module and look for Packaging -> Product Module Name. You'll probably see that the Resolved column is showing the same name as your main target. Type a unique name in the middle column (the column is titled WidgetsExtension or whatever your extension target is called) You should see that the Resolved column now shows the unique name you entered. It should hopefully build now.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’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
If the first column of NSOutlineView is set to hidden, drag row data to apply crash
After testing, NSOutLineView's outlineTableColumn property defaults to the first column, and when it is set to hidden, dragging data causes a crash. This is supposed to be a bug inside NSOutLineView. Hope apple engineers can help check it out crash报告.txt
Replies
0
Boosts
0
Views
810
Activity
Jan ’23
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 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 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
Reply to Testflight metrics - installs and 7 days
In the Status column, view the status of a build. In the other columns, view the number of invited testers, number of installations on devices, and the total number of sessions in the last seven days across all testers. In the Crashes column, view the number of times the build crashed on tester devices. In the Feedback column, for iOS builds, view the number of feedback submissions you received from your testers. https://help.apple.com/app-store-connect/#/dev78d0a8f87 > View build status and metrics
Replies
Boosts
Views
Activity
Oct ’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
618
Activity
May ’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