Search results for

column

2,050 results found

Post

Replies

Boosts

Views

Activity

Reply to Sorting of isometric SKTileMapNode incorrect?
I've come across a very similar problem, did anyone ever find a solution?What appears to be happening is that all of the first tilegroup's tiles are being drawn first, and then the second tilegroup's tiles. This works fine if there are no overlaps, and allows batch texture rendering, but won't work in similar cases. I can't see any flags to change, and that problem along with some problems with hexagons means I'll have to roll my own unless anyone knows better.I think the way I'm going to do it is to have SKNodes for the map rows with z's increasing from back to front, and for each column there will be +z as the map goes to the right. I think that means that batching will be affected, so maybe performance will be a problem but first it needs to render correctly, then I can worry about possible performance issues.
Topic: Graphics & Games SubTopic: SpriteKit Tags:
Mar ’17
Compound Indexes with Entity Inheritance
Our data model uses entity inheritance where the top-level entity is abstract and includes the attributes common to all the other (sub)entities. We've trying to improve fetch performance on sub-entities by adding compound indexes but are not getting satisfaction.Examining the sqlite schema shows that there is a single table that includes all attributes from the super-entity plus all attributes form the sub-entities. A sqlite column named z_ent is added by core data and used to identify the applicable sub-entity for a sqlite record.Using sqlite explain query plan on select statements, we've discovered that compound indexes added to a sub-entity are not used, and the only index used is one for z_ent. However we've also discovered that adding the text self to the compound indexes attribute list will create compound indexes in sqlite that include z_ent as well as the other specified attributes, which results in a useful index.The problem is that the generated compound index only includes z_ent when the a
4
0
1.3k
Mar ’17
NSTableView Selected Columns Not Highlighted
All:Similar to this post, I've created a view controller scene in a macOS app to which I've added a stock NSTableView. I've changed nothing, meaning it has regular highlighting, allows column selection. Even though I can click to select a column and get that selected column index in code, the selection is never highlighted.I'm using Xcode 8.2.1 with a newly-created document-based macOS application project. I do nothing to the table view (aside from asking it to reloadData() ) in code. The standard project's setup means the root view of this view controller (the window's content view controller) is layer-backed. I've tried deleting and re-adding the table view, tried toggling highlighting and column selectability (including toggling allows multiple) in code and in IB, but nothing seems to be working. I find this ... extremely odd after years of Cocoa development (admittedly, on apps that support much older verisons of OS X).Any suggestions?
Topic: UI Frameworks SubTopic: AppKit Tags:
1
0
787
Mar ’17
Reply to Missing "Download Size" column in "App Store File Sizes" in iTunes Connect
As per the documentation: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Appendices/Properties.htmlthe App File Size information should be available once the app is approved by Apple and is available for download.However recently I've been experiencing the same issue of not being able to see the Download Size column of the app. Not sure if this functionality is broken.
Mar ’17
How do I create a tableview with a variable number of columns where the extra columns have checkboxes in them?
I am building Mac OS application using Objective C and Cocoa.I am somewhat familiar with bindings (enough to get in trouble).I can build and display tables with bindings without a problem.What I want to do is depending upon other factors, be able to add some number of columns to a tableview where the column cell content is a Check Box button.In my TableViewControlller in the viewDidLoad method I am adding columns with names and adding the binding for the column there: NSString *keyPath = [NSString stringWithFormat:@arrangedObjects.field%ld, index]; [aCol bind:@value toObject:arrayController withKeyPath:keyPath options:nil];(the fields in the array are labeled field1, field2, field3, ....)The columns and their titles do show up when the table is displayed. The rows of data for the fixed columns in the table show up. So the bindings for the fixed columns are working.- (NSView *)tableView:(NSTableView *)inTableView viewForTableColumn:(NSTableColumn *
Topic: UI Frameworks SubTopic: AppKit Tags:
3
0
2.4k
Mar ’17
Reply to How do I create a tableview with a variable number of columns where the extra columns have checkboxes in them?
1. For a view-based table view, you do not use column bindings:developer.apple.com/library/content/documentation/Cocoa/Conceptual/TableView/PopulatingViewTablesWithBindings/PopulatingView-TablesWithBindings.htmlAll you need to do is bind the table view content to (in your case as in the above document) an array controllers' arrangedObjects.2. If you bind the table content this way, you do not implement tableView:objectValueForTableColumn:row: because the objectValue for each row is found via the binding.This objectValue is set as the value of the objectValue property of the NSTableCellView for each row/column.Note that there are 3 distinct mechanisms for getting the objectValue property of the NSTableCellView set correctly:a. By binding the table view content. (In essence, the data source isn't used.)b. By not binding the table view content, but implementing the tableView:objectValueForTableColumn:row: delegate method.c. By not binding the table view content, but setting the cell's objectValue proper
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’17
Reply to How do I create a tableview with a variable number of columns where the extra columns have checkboxes in them?
Your reply was quite helpful and I quit trying to figure how to get bindings working with this. Too much behind the scenes magic wasting my time.Once I knew I was looking for a solution avoiding bindings, I found a couple gems in the TableViewPlayground sample code that I am pretty sure are not explicitly mentioned in the documentation. Below are details of what I had to do to get a tableView operating without bindings, which IMO, is far easier than bindings once you are aware of the process.VERY IMPORTANT KEYS to building View based DATASOURCE TableViews1. USE BASIC UI items (NSButton), NOT NSTableCellView2. Contrary to #1, you can use NSTableCellView for TextFields, imageViews IF... see below.3. Add your basic UI Items directly to the NSTableColumn, delete provided the NSTableCellView.4. Carefully implement tableView:inTableView viewForTableColumn:inTableColumn row:inRow.Maybe (probably) I am blind, but I trusted the default mechanisms in Interface Builder regardingbuilding tables. Well, they are probably a
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’17
Reply to How do I create a tableview with a variable number of columns where the extra columns have checkboxes in them?
A lot of what you said in that last post is kinda sorta correct, but not quite so because you haven't fully absorbed all of the documentation and behavior yet.For example, NSTableCellView is a general-purpose container for the subviews of a cell in a table view. For convenience, it comes with text and image properties that can be connected to a text field and image subview, and has built-in behavior to lay these subviews out in a standard way. In a new table view created in IB, you get cells with just a text field subview (no image), because this matches the default table view created in the old days when we used NSCell-based table views. There are also standard cells in the IB object palette, one with just a text field, and one with an image view as well.If your table cell starts out with a text field you don't need, for example when you want only a checkbox, then it's fine to just delete the text field. This is an extra step, but the cell contains a text field in the vast majority of cases, so it's a reason
Topic: UI Frameworks SubTopic: AppKit Tags:
Mar ’17
SIGABRT after updating to iOS 10.3/Xcode 8.3
After updating Xcode to 8.3 and compiling for iOS 10.3 I now get a SIGABRT on release builds on an area of code that ran fine on the previous SDK. malloc: * error for object 0x17415d0c0: Invalid pointer dequeued from free list * set a breakpoint in malloc_error_break to debug; fileprivate var cache = [UICollectionViewLayoutAttributes]() // ... if cache.isEmpty { let columnWidth = contentWidth / CGFloat(numberOfColumns()) var xOffset = [CGFloat]() for column in 0 ..< numberOfColumns() { xOffset.append(CGFloat(column) * columnWidth ) } var column = 0 var yOffset = [CGFloat](repeating: 0, count: numberOfColumns()) for item in 0 ..< collectionView!.numberOfItems(inSection: 0) { let indexPath = IndexPath(item: item, section: 0) let width = columnWidth - cellPadding.x * 2 let cellHeight = delegate.collectionView(collectionView!, heightForCellAtIndexPath: indexPath, withWidth:width) let height = cellPadding.y + cellHeight + cellPadding.y let frame = CGRect(x: xOffset[column]
12
0
2.7k
Mar ’17
Playground displays SKTileMapNode as red square
Here is my code:/ import AppKit import GameKit import PlaygroundSupport let frame = CGRect(x:0, y:0, width: 300, height: 300) let view = SKView(frame: frame) PlaygroundPage.current.liveView = view class LakeScene : SKScene { override func didMove(to view: SKView) { super.didMove(to: view) guard let tileSet = SKTileSet(named: Sample Grid Tile Set) else { fatalError(Tile Set not found) } let tileSize = CGSize(width: 128.0, height: 128.0) let tileMap = SKTileMapNode(tileSet: tileSet, columns: 1, rows: 1, tileSize: tileSize) guard let waterTileGroup = tileSet.tileGroups.first(where: {$0.name == Water}) else { fatalError(Tile Group not found)} tileMap.fill(with: waterTileGroup) addChild(tileMap) } } let scene = LakeScene() view.presentScene(scene) I am using the example Tile Set that you get when you make a SpriteKit Tile Set file. I make the file then drag it and the Assets.xcassets into my Playground's Resources folder.Here is a screenshot:http://imgur.com/a/K8ugJ
0
0
375
Mar ’17
Reply to Info.plist
The above example is from a raw plist - you can do that in Xcode, but only if needed and you understand how to edit without damaging/malforming the file and it's contents so that Xcode is kept happy. Select the plist in the navigator, then right-click and choose 'open as > source code' (vs. plist), if you must.The view you see with rows, columns and the occasional drop-down, is the 'normal' view that caters to typical edits.In that example, assuming you know the key you want to add*, use the + below, add a new row, then select the leftmost field and start typing the name - Xcode will attempt to auto-fill based on your lead (you don't have to use only known keys/strings, so you are free to create custom when they apply). If you find the key you want, commit, then move to the column on the right to indicate it's value.*note that sometimes a native key you're looking for has been updated and goes by a different name or is new and not listed - be ready to adapt.
Apr ’17
Adding relational data between two entities
Hello, I'm trying to create two classes (database tables) called Student and Course using the Parse platform. And the intention is to have a relationship between a student and the course. For instance, one student can have many courses. In this case, I'm creating the student Jeff with a course SWEN-500; then a course SWEN-500; and adding the relationship column studentCourse.However, when I try to create another course for the same student such as student[course] = SWEN-777, a different ID for the student (object ID) is created with SWEN-777 as a course. And two students with the same name but different ID's are created with the two courses. But I need to have the same student ID so then I can retrieve one specific student and all his courses he has taken.func someMethod() { let student = PFObject(className:Student) student[name] = Jeff student[course] = SWEN-500 let course = PFObject(className:Course) course[course] = SWEN-500 course[studentCourse] = student course.saveInBackground() }Any ideas? Tha
1
0
14k
May ’17
Reply to Swift: Window flickers if .reloadData is called (NSSearchField, NSTableView)
What does the whole window mean? The content area? The title bar and other chrome? Are there any parts of the window that don't flicker?Calling reloadData will cause the entire table view to be erased to its background color before the rows are re-drawn, so obviously the table view itself is going to flicker. If more of the window content is getting erased, I'd start to suspect that the table view is incorrectly sized. (You might not notice, normally, because all the columns could be visible, but the table view itself could be wider.)I'd suggest you try using Xcode's view debugger to examine the structure of your window:developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/debugging_with_xcode/chapters/special_debugging_workflows.html
Topic: UI Frameworks SubTopic: AppKit Tags:
May ’17