cocoa

NSOutlineView with Drag and Drop

心不动则不痛 提交于 2020-01-17 03:22:26
问题 I read the other post here on Outlineviews and DND, but I can't get my program to work. At the bottom of this post is a link to a zip of my project. Its very basic with only an outlineview and button. I want it to receive text files being dropped on it, but something is wrong with my code or connections. I tried following Apple's example code of their NSOutline Drag and Drop, but I'm missing something. 1 difference is my program is a document based program and their example isn't. I set the

Twitter integration in iOS app

眉间皱痕 提交于 2020-01-17 03:17:08
问题 In my ios app I'm trying to integrate twitter with fabric and i followed all the docs provided by fabric https://docs.fabric.io/ios I have a problem when i build my app then some error 1.TwitterCore.framework/Headers/TwitterCore.h:20:9: 'Cocoa/Cocoa.h' file not found 2.TwitterKit.framework/Headers/TwitterKit.h:12:9: Could not build module 'TwitterCore' 3.AppDelegate.m:14:9: Could not build module 'TwitterKit' so i am unable to build app. 回答1: I had the exact same issue, the Cocoa/Cocoa.h

How to Utilize Fetched Record Attributes with CloudKit?

瘦欲@ 提交于 2020-01-17 03:06:25
问题 so I'm trying to query my public database for a single record using CloudKit, and save an attribute value from the record to an external array(foodArrayLunch). I'm using the property RecordFetchedBlock in a closure to process my record. However, when the closure executes successfully, I find that my array failed to save the attribute value that was queried from the database, and it can be accessed and managed only from inside the closure. So my question is: How can I save this attribute value

NSOutlineView row indexes changes when expanding item

孤街浪徒 提交于 2020-01-17 02:15:12
问题 Say I have a NSTableView (for example, a ) and a NSOutlineView (for example, b ). In the datasource of a I'm trying to get the parent item of all the selected items of b . In the row no. rowIndex of a I would like to have the rowIndex th selected item of b and I would like to concatenate this string to the name of the parent of this item. For example, a : 1 and 1.1 2 And b : 1 1.1 (selected) 2 (selected) 3 This is - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:

Memory Access Crash ONLY in Archived Cocoa Application (EXC_BAD_ACCESS/EXC_I386_GPFLT)

送分小仙女□ 提交于 2020-01-17 01:45:12
问题 I created my first Cocoa App for OS X and was happy to finally submit it to iTunes connect. Just to get not approved because the application is crashing. I had a hard time to figure out all things until here and now I'm finally stuck and don't know how to solve the following issue: First of all, the application works perfectly fine when simply built and run. The mysterious crash will only happen when the app is archived. That's why I did not notice the cash before and submitted the not

How to gradually retrieve data from NSTask?

本小妞迷上赌 提交于 2020-01-16 20:36:43
问题 I am working on a GUI (Cocoa) for a command-line tool to make it more accessible to people. Despite it being a GUI, I would like to display the output to an NSTextView. The problem is that the output is large and the analysis the tool carries out can take hours/days. Normally, when working with NSTask and NSPipe, the output is displayed only after the task is completely finished (which can take a long time). What I want to do is split the output up and display it gradually (updating every

Why can a weak member be nulled in an instance method before the method is finished?

只愿长相守 提交于 2020-01-16 19:15:34
问题 And why can it vary between Debug/Release/Simulator/Device combinations? (Sample code below.) I inherited some code that "works" in the simulator and on devices in Debug, but not on a device in Release (used to with last LLVM). It's related to ARC and a weak property (which should have been strong), but I don't understand fully what's happening and am hoping someone can explain it to me and why it varies between Debug/Release/Device/Simulator. I created a simple sample project that

Nesting arrays into NSDictionary object (Objective-C)

三世轮回 提交于 2020-01-16 18:59:24
问题 I would like to define tasks using NSDictionary, which I'd like to save in a plist file (I didn't have much luck with Core Data so far), but got stuck at two points: -- When using initWithObjectsAndKeys: I can change the data type to number or boolean, using NSDate's numberWithInt: and numberWithBool: methods, respectively. I can't seem to find the method to change the type to date though. I couldn't find anything like that in the documentation. -- The second problem I ran into was with the

Nesting arrays into NSDictionary object (Objective-C)

醉酒当歌 提交于 2020-01-16 18:58:09
问题 I would like to define tasks using NSDictionary, which I'd like to save in a plist file (I didn't have much luck with Core Data so far), but got stuck at two points: -- When using initWithObjectsAndKeys: I can change the data type to number or boolean, using NSDate's numberWithInt: and numberWithBool: methods, respectively. I can't seem to find the method to change the type to date though. I couldn't find anything like that in the documentation. -- The second problem I ran into was with the

Debug/Run in Xcode stopped working. Executable settings are wrong and can't be fixed too

匆匆过客 提交于 2020-01-16 18:06:59
问题 I've just had a strange problem show up with my XCode project. The project is one that I've been working on for 4+ years. Just today, when try to start debugging, the debugging view opens and the console says "[Session started at 2010-10-03 14:04:35 -0600.]" but nothing else happens. It seems that the executable is screwed up. If I open up the executable's (I've only got one in the project) settings window, in the General tab, the drop down for "Use whatever for standard input/output" says