Search results for

column

2,050 results found

Post

Replies

Boosts

Views

Activity

NSTableView binding, column Header Title is readonly, workaround or alternative?
I am currently working on a MacOS project (Swift 4, Xcode 9) to shows different sets of data in one NSTableView, users can add, delete, and move around their created data sets, and everything is bound to core data through two array controllers via the NSTableView's bindings inspector sections (one to many between the column data entity and title/presets entity)Unfortunately, the Header Title binding seems to be in the Column -> Binding inspector -> Parameter section, and is read only (based on Apple documentation).https://developer.apple.com/library/content/documentation/Cocoa/Reference/CocoaBindingsRef/BindingsText/NSTableColumn.html#//apple_ref/doc/uid/NSTableColumn-SW48As I've also implemented a custom TableHeaderCell class that allows the editing of the column's Header titles (field editor call in the NSTableView double click method), even if the cell is updated via the custom class, the header title binding will not update the array controller or core data.Custom NSTableH
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
1.1k
Oct ’17
tableView cell width does not adjust automatically
That's an OSX app, XCode 9.2.I've created a tableview in a window.I've completely defined the tableView and its cell (standard) in nib. The NSTableCellView has an identifier (NameCell)The scrollView of the table is constrained to the leading and trailing (full window width minus 64)When an instance of the window and tableView is created, I adapt width for some of them.Problem is that the view redraws correctly but cellView.textField does not adapt its width (and so text is truncated even if there seems to be a lot of room available in the cell)I could correct it with something that looks like a patch : func tableView(_ tableView: NSTableView, viewFor tableColumn: NSTableColumn?, row: Int) -> NSView? { if row < maxCount { let p = dataSource[row] if let cellView = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: NameCell), owner: self) { (cellView as! NSTableCellView).textField?.stringValue = p.name // This the patch I had to add to make it work (cellView as! NSTableCellView).tex
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
6.0k
Nov ’17
Reply to upload negative keywords failed
Two possible things.The negative CSV file format uses different column headers. It uses:Action,Keyword ID,Negative Keyword,Match Type,Campaign ID,Ad Group IDAs compared to when creating normal keywords:Action,Keyword ID,Keyword,Match Type,Status,Bid,Campaign ID,Ad Group IDSo you can't just send positive keywords straight across, without first editing the structure of the file. So use Negative Keyword instead of Keyword, and columns like Status and Bid don't make sense for negative keywords so are dropped in this file.Also make sure you save the file in a UTF-8 encoding. I get this every time I download and edit keywords - so I guess either the file sent down isn't in the right format, or it's something in the act of downloading, or maybe it's the editor I'm using. Once you have a file saved in UTF-8 it's fine, but I seem to have to do this every time you freshly download a CSV file from Search Ads before uploading again.
Topic: App & System Services SubTopic: General Tags:
Nov ’17
Nested UITableView Cells collapses to 0.5 when scrolling
Hi, in my app's layout I have one TableView in which I insert different types of cells, like labels or button bars or also a nested 2 column TableView with scrolling disabled.Under 11.0 it worked just fine, but now with 11.1 the cells of the nested TableView have a bug.After the view is loaded they look just fine, but when scrolling through the TableView, that contains all the different cells, the nested cells suddenly shrink to a height of 0.5 and appear empty.Does anyone have similar issues or has an idea how to fix this?Thanks!L
0
0
843
Nov ’17
Sticker sizes vs number of columns in iMessage
When I test my sticker packs in the simulator/on my phone, the automatic size of the sticker changes in regards to the number of columns I have selected in Xcode. So if I have selected 2 columns and run a test, the automatic size of my sticker when I peel and stick it is much bigger than the automatic size if I have chosen 4 columns. However, if I send the same sticker in the body of the text message, it shows up the same size (larger) regardless of whether I have used 2 columns or 4 columns. I know there user can scale the stickers when they are placing them, but is there a way for the automatic size in 4 columns to be the same as in 2 columns and in the body of the text?
0
0
647
Nov ’17
Sudo Command Unusable
I change my /private/etc permissions to eveybody can read and write, and applied this permission to all sub-folders and files. (something ****** to do)After that, when I use sudo command something went wrong:sudo: unable to stat /etc/sudoers: Permission deniedsudo: no valid sudoers sources found, quittingsudo: unable to initialize policy pluginAlso, I make a change to my sudoer file when trying to solve the problem.Here is its content:----------------------------------------------------------------------------------------------------------------------------------------# # Sample /etc/sudoers file. # # This file MUST be edited with the 'visudo' command as root. # # See the sudoers man page for the details on how to write a sudoers file. ## # Override built-in defaults ## Defaults env_reset Defaults env_keep += BLOCKSIZE Defaults env_keep += COLORFGBG COLORTERM Defaults env_keep += __CF_USER_TEXT_ENCODING Defaults env_keep += CHARSET LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE Defaults env_keep += LC_MESSAGES LC_M
1
0
1.2k
Nov ’17
initial sort of NSTableview
I have a tableview with data coming from the web. I load this data, I display my tableview and everything is good except one little thing;the initial sort position is not refledted in the corresponding column headerIf I click on a column after the table is loaded, the sort is done and the header of the column has the symbol of a sorted columnBut when the table is initially loaded, no symbol appearsof course, I tried to put some instructions like: let descriptorName = NSSortDescriptor(key: nomlocataire, ascending: true) tablesaisie.tableColumns[1].sortDescriptorPrototype = descriptorNamebut no symbol appears on the corresponding header columnWhat did I missed?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
1.3k
Nov ’17
Reply to initial sort of NSTableview
According to the documentation:https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/TableView/SortingTableViews/SortingTableViews.htmlsetting the table column's sortDescriptorPrototype property doesn't tell the table view that the data is sorted on that column. It just tells the table view what sort descriptor to use when the user clicks on that column header.To get the result you want, it looks like you also need to set the table view's sortDescriptors to an array whose first element is the column's sort descriptor. Unfortunately, the documentation isn't very clear on this point, so you may have to experiment a bit, to get your code to do what manually clicking on the column header does.
Topic: UI Frameworks SubTopic: AppKit Tags:
Nov ’17
Odd custom exposure duration value
Currently, I am working on custom camera application and I need to allow users change camera settings as exposure(bias), shutter speed(exposure duration), and iso.There is difference between exposure duration that I set viafunc setExposureModeCustom(duration: CMTime) -> Void)? = nil)and value that I get via KVO or cameraDevice.exposure durationfor example1/24 - 1/241/48 - 1/48...1/768 - 1/7681/1536 - 1/5361/3072 - 1/32051/6144 - 1/64101/12288 - 1/128211/49152 - 1/76923the left column value that I try to setthe right value that actually was setCamera FPS is 24This issue was reproduced on iPhone 6, 6s, 7sCan anyone explain what I do wrong or this is avfoundation issue?
0
0
582
Dec ’17
Reply to The solution of the chessboard problem
This does not work, it will always give Cell color black:let colorBlack = cellNumbersets colorBlack to cellNumberso when you testif cellNumber >= 1 && cellNumber <= 64 && colorBlack == cellNumbercolorBlack == cellNumber is alsways true : you just test if cellNumber >= 1 && cellNumber <= 64Your computation of cell number is wrong : for instance A2 and B1 are both cellnumber 2, but they are different cells.A correct cell number is x + (y-1)*8if the cell number is even (2, 4, 6, 8, 10, 12, 14, 16, 18…), it is a black cell, otherwise a white one (or the reverse, depending how you have set the checkboard)I suppose you test in playground ?A correct code should be: let x = 4 let y = 4 if x < 1 || x > 8 { print(wrong row) } else { if y < 1 || y > 8 { print(wrong column) } else { let cellNumber = x + (y-1)*8 if cellNumber % 2 == 0 { print(Cell color black) } else { print(Cell color white) } } }For the fun, you could ask user to enter row and colum as C3 ; in you
Dec ’17
How to reorder the way VoiceOver reads NSTextField's on a NSTableCellView?
I have a single-column NSTableView, populated with custom NSTableCellView's, very similar to the standard Mail app of macOS. Each custom NSTableCellView has a layout with four non-selectable read-only NSTextField's. VoiceOver for Accessibility reads things left to right, top to bottom. This results in a non-optimal order for VoiceOver users.How can I change the order in which VoiceOver reads the NSTextField's within each NSTableCellView?All examples and documentation I saw about re-ordering VoiceOver elements is related to iOS, but unfortunately the API in macOS is still different.
Topic: UI Frameworks SubTopic: AppKit Tags:
0
0
647
Dec ’17
Reply to how do i make a different layout for ipad landscape than ipad portrait?
I really appreciate all the answers; I never would have thought I would get so many responses in just 1 day. specifically, I have a matrix of cards:8rows x 6columns. when I rotate the ipad I want it to be 6rows x 8 columns. I can't do in just by designing in wR x hR since it applies to both orientations. all I know is that it's possible since I have since it happen on ipad apps. I don't know if I must use viewWillTransition or if there is another way
Dec ’17