I have the exact same problem as a earlier question xcode swift indexing forever
i have spotted my problem. This array:
var VragenInformatie = [[["Spelletjeskamer",""],["Keuken",""],["Garage",""],["Binnenplaats",""],["Zitkamer",""],["Slaapkamer",""],["Studeerkamer",""],["Eetkamer",""],["Badkamer",""]], [["De Wit",""],["Pimpel",""],["Blaauw van Draet",""],["Roodhart",""],["Groenewoud",""],["Van Geelen",""]], [["Loden pijp",""],["Pistool",""],["Engelse sleutel",""],["Dolk",""],["Touw",""],["Kandelaar",""]]]
I have tried: clean, deleted derived data, and even delete workspace thingy
but nothing worked. But I still need this array does anybody have an idea or suggestion how to get a work around?
UPDATE:
I gone use this array for a tableview so is there maybe an other way for tableview data source?
Thanks in regards!
I think, the problem is the type inference, which is quite hard for your 3D array. You should give more structure to this, e.g. via tuples
let VragenInformatie: [[(String, String)]] = [
[("Spelletjeskamer",""), ("Keuken",""), ("Garage",""), ("Binnenplaats",""), ("Zitkamer",""), ("Slaapkamer",""), ("Studeerkamer",""),("Eetkamer",""), ("Badkamer","")],
[("De Wit",""), ("Pimpel",""), ("Blaauw van Draet",""), ("Roodhart",""), ("Groenewoud",""), ("Van Geelen","")],
[("Loden pijp",""), ("Pistool",""), ("Engelse sleutel",""), ("Dolk",""), ("Touw",""), ("Kandelaar","")]
]
Anyway, not a neat, clean design. Think about creating a structure or class which encapsulate your data (sorry, my Dutch is not sufficient to understand what you try to provide to a table view).
Related
Couldn't come up with a good way of googling this..
I'm working on a 3d model in Maya and it's getting slow. At first I couldn't find what it was, but I'm suspecting it's all of the polyBrideEdge, pCubeShape and whatnot. Since I was duplicating one part and repeated that a couple times; there's quite a lot of them.
Here's a screenshot of what I mean: http://imgur.com/a/TQr0e
Nevermind, I found it! For anyone wondering: you select one of the nodes with the same type in your attribute editor and click 'hide'. This will group them together I suppose and name it 'polyUniteX'. It might not be the best way or the right way, but this has fixed any performance issues I had prior to doing this.
So I am not very good with computers and have to create my first app for a project. It's going fine so far - essentially I am trying to create an app that records and saves data. Right now I'm still getting the record part down, since Xcode is having periodic issues. I am using this link for setting up the code:
http://www.techotopia.com/index.php/Recording_Audio_on_iOS_7_with_AVAudioRecorder
Unfortunately, I am running into 2 types of semantic errors, two red, two yellow. They are all in RecordModelController.m - the first is like this:
return [self.pageData indexOfObject:viewController.dataObject];
Xcode claims that Property 'dataObject' isn't found in any object or forward class in 'RecordDataViewController'. That's actually my two red errors, they just sound very similar so I paraphrased them into one. The yellow error, however, repeats itself twice on the same line of code, which is:
return [self viewControllerAtIndex:index storyboard:viewController. storyboard];
The yellow issues on these lines of code (again, repeated twice) is "Incompatible pointer types returning 'RecordDataViewController *' from a function with result type 'UIViewController *'" - I genuinely tried to look in RecordDataViewController.h and couldn't make sense of this. Like I said, bad with computers, not sure why I'm having this issue, and I know that it's probably something basic.
If anyone would be willing to help me out with how to deal with issues like this, that would be great. Thanks, and sorry for my incompetence.
The red are called errors. The yellow are called warnings. I'm going to suggest you look at a few beginning Xcode/iOS programming tutorials so you understand the basic concepts of how view controllers, arrays, etc. work in objective-c. The best place to start for someone completely new as yourself is here: http://www.raywenderlich.com/tutorials
Hope this helps!
Is it possible to make a 2.5 component without using TableHelloWorld class and all that field type stuff like from here. Or is it compulsory?
http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Using_the_database
The system will function without it fairly well actually. All you actually need to get something running is a base file named after your component, a controller.php file, and the view as outlined in this section: http://docs.joomla.org/Developing_a_Model-View-Controller_Component/2.5/Adding_a_view_to_the_site_part
From that you will get something that runs and loads. And if you choose you can just make raw sql queries to the database.
That being said, the framework is there to help you, not to hinder you. I've cut a lot of corners over the years, and almost always you end up regretting it later. Feel free to play around with skipping the pieces, but just remember that there are pieces out there that can help you with all kinds of important things that you may not think you need right now. (Binding input, table row hierarchies, and check-in/check-out functionality are just a few that come to mind that I'm glad I didn't have to make myself.)
I am new to programming. Now i have been learning for a few weeks and am now making my first app. Probably not for public, just for me. At least for now. So here it goes. I want the user to be able to enter his information (for example weight or something like that) into textField and then save it, so I can later form a graph (for example of weight loss through time). Now the graph should not be that much of a problem, since there are many tutorials on that. I am more interested in how to enter information, then save it so it can be later accessed. Any help? What should I read?
Thanks!
Working with UITextFields in Objective C is pretty straightforward - you can grab the NSString from such an object using the 'text' property. Use plists for storage locally, or JSON.
Look at core data tutorials especially related to Apples' doc on “Core Data and Cocoa Bindings”
CoreData shows how to setup objects and save them to a file or simple database. Cocoa Bindings are how to make input screens pass data to object models.
You should be able to write a program to enter weights, save them and show in a table without writing any code.
OK, I'm feeling really REALLY stupid for asking this question, but I've managed to stump myself so hard that I doubt I have the proper detachment to figure out the answer for myself any more. My apologies in advance...
I have been playing around with bindings for a while now and LOVE them. That and the KVO/KVC conventions built into Objective-C 2.0 have allowed me to dramatically slim down my applications while increasing their reliability, flexibility, etc. I say this for no other reason than to illustrate that I am at least moderately comfortable with bindings in general. That being said, my problem is this:
I have an application where I'd like to store an editable set of keywords by way of the preferences controller. Easy, right? Unfortunately, for the life of me I can't figure out how to do it. I set up an array controller and point it to the shared preferences object and give it a keypath for the array. The problem is that the objects being stored in the array are NSStrings and I don't see how NSStrings can be KVC-compliant for this kind of operation due to the lack of any "stringValue/setStringValue" methods. Without those, what keypath do I use in the NSTableView I have set up to facilitate manipulation of that list?
Also, since the shared preferences object is not one that I own, I'm not sure how to go about setting up a new array to represent an unedited/newly installed state. (Registering them as defaults doesn't seem to be working for me.)
So to reiterate my questions more succinctly: How can you bind a table view to an array of NSStrings and how can you store said array in an application's preferences?
Any pointers or advice that you can offer would be VERY much appreciated. The headaches I'm getting from this are starting to get the better of me. :)
You don't. You hold an array of model objects, each with at least one property (that of the string), and you bind the table column through an array controller to this array, with the model key path set to that of the string property.
Assuming your app is not simply a list-of-strings editor, you probably have other things that you can move into this model class. You should do so.
I know this question is pretty old but I had a similar problem and landed to this page. I wanted to contribute with my solution.
What I need is not a big list of strings. In fact a table view looked very ugly for my needs. I then remembered another control, NSTokenField. It binds to an array of string out of the box and looks even better for small list of short strings :)