« first day (558 days earlier)      last day (1598 days later) » 

2:00 AM
But the fact of the matter is, no one here is going to know better than the docs. Don't get frustrated with someone in here because you spent two days trying to implement something they suggested and THEN you checked the docs to find out they happened to be wrong.
 
user457812
You seem to remember things that didn't happen
 
I'm reading the docs on Restoration State, and it SEEMS like it's saying that it's not actually encoding the view, but it's getting a whole bunch of data from the view on it's state and current properties, and storing those. THen, when it launches, it requests an object from the app, and then attempts to apply all that data back to the view.
Can someone correct me on that?
 
Isn't that essentially what encoding is...?
 
God
it does ^
 
user457812
I'm pretty sure that's what it would do based on my understanding of sane programming
 
user457812
2:01 AM
Everyone should use my NSObject switch method.
 
user457812
It's beautiful.
 
My dog be needy, yo.
LAPDOG!
 
user457812
Sounds like the way my 22lb lapcat does things
 
God
Wonder how apple does Safari saving:[ for some reason you can't store a NSArray of view controllers. I have to save each view controller as its own key?
 
You can have an NSArray of view controllers.
See UITabBarController
 
2:11 AM
That's what it looks like in the examples.
 
tabBarController.viewControllers <-- an array of view controllers.
 
@nil
 
God
? what Nhgrif? I can't have a array of view controllers but then show me an example of a array of view controllers?
 
@nil, I have a corgi / mini Australian Shepherd mix. She's about 28lb of furious puppy-like glare and ceaseless whining. :D
 
Also, why would Safari use an array of view controllers?
It doesn't need a separate view controller for each tab...
 
user457812
2:14 AM
Corgis are the best dogs
 
user457812
Well, corgis and german shepherds.
 
Agreed, @nil. I have one mix and one pure breed corgi. They are really sweet, except to each other. We made the mistake of getting two females, and they constantly fight for dominance.
 
God
? Yes they do NHGrif
each one is a new view controller
and i know i can have a NSArray of view controllers, but for some reason i encode it, the objects are there in the encoded array but when i get it back, its empty
 
How do you even know that?
 
God
Reveal
 
2:20 AM
Once again Max, that only tells you about the view heirarchy and nothing about the actual code structure.
And once again, there's a difference between a view and a view controller.
 
God
so each one is only a UIView? why?
So once again they break what you guys have told me?
 
What do you mean, why?
Max...
I don't KNOW what Apple does.
 
God
You guys told me don't have all that in a view. You guys told me to make my class a view controller!
So i did
 
I can speculate as to what they do. And I can tell you that your "Reveal" tells you nothing about code, only the view heirarchy.
And please quit pinning everything this chat has said on me. I have no idea what you're even talking about.
 
God
wow. hmm. doesnt seem to decode my single tab view controller ether-_- WTH
 
2:22 AM
I don't even know what you're talking about.
 
God
I didnt pin it on you
I said someone here told me. I know nil told me this one
 
Some views may need their own view controllers. Some views may not.
 
God
to use a view controller instead because i was doing each one as a view. now its a child view because i was not doing the MVC or whatnot correctly
 
Because each tab in Safari is just a web view basically, I don't see any good reason for each tab to be its own view controller. I see good reason for this not to be the case (memory usage)
Each one what Max?
I don't have any clue what you're talking about.
 
God
each of my tab views
 
2:23 AM
For Flow?
 
God
each tab in Flow was a UIView, now its a View controller because of here
 
These are the browser tabs, right?
 
God
yes
 
I recommended using a tabbarcontroller for something else, but not for the browser tabs.
 
God
blah. i can't use that
will mess up all code and make it impossible to upgrade it. its already impossible now that i may have to write a new app now-_-
nothing is working and i read the docs
view has resonation identifier, I'm encoding it. when i decode, everything is gone
 
2:26 AM
Max, you're going to have to swallow the fact that it might be necessary to start over from scratch.
Not the entire app necessarily, but potentially parts of it.
 
God
no, i just won't have new APIs. will be sad but I'm not working on this app for another year
rather just abandon it
I have already rewritten the main view a ton XD
gahhh! again null
 
It's just part of programming.
 
God
7 hours wasted of this
I hate programming-_-
 
You always need to think about future maintainability when writing any code. This is WHY we tell you the things that aggravate you about how you should be doing things.
 
7 Hours of knowing what doesn't work! Edison would be proud. :)
3
 
God
2:28 AM
Im about to quit and go make coffee for the rest of my life. so much simpler than this random stuff
I know NOTHING works
I have tried every way possible to google and apple docs
everything gives null
 
@God Just came to star this.
Bye!
 
But even the best programmers who are really good about coding for future maintainability have probably rewritten plenty of things from scratch.
 
God
ok
 
Also, he said "god just came"
 
Believe it or not, 7 hours is not that long of a time to spend on a problem
4
 
2:30 AM
So true.
 
God
for me it is. you get to sit at work and do this, then go home and relax
THIS IS MY RELAX TIME
 
Lol apparently not, since you hate it
 
user457812
gist.github.com/nilium/9440566 ⇐ And now you can use arbitrary blocks as cases.
 
God
I haven't even started homework and in 2 hours I'm going to best buy to get Titanfall with people
 
Max, programming clearly isn't relaxing for you, and I suggest a new hobby.
 
God
2:30 AM
so i have 2 hours to finish this issue and homework
 
user457812
It's like a really flexible switch without the benefit of jump tables.
 
God
well its frustrating when it gives null every time
9
Q: iOS state preservation and container views

David BeckI have a view controller in a storyboard that is using a container view. Both have restoration identifiers set. The parent is being saved and restored just fine. The child however is not. Neither -encodeRestorableStateWithCoder: or -decodeRestorableStateWithCoder: are being called on the child vi...

Apple showed the code
this link shows the code, for me Xcode says "nope, fuck you!"
[coder encodeObject:tabViewController forKey:@"Tab"];
to NSLog(@"%@",[coder decodeObjectForKey:@"Tab"]);
nil
🔫
 
How about NSLog(@"%@",tabViewController); before encoding it?
That'd be a good starting point.
 
user457812
Everyone should use my switch thing. Go do that.
 
user457812
Find a way to just cram it in there.
 
God
2:33 AM
I have nhgrif, its there
I'm now trying to encode a string to see if nothing is encoding
 
Did you do the call to super?
 
God
yes
my string encoded correctly. just the view controllers will not encode right
I will try again and log the view controller to see though Nhgrif
else something in my child view controller is interferring
"<TabViewController: 0x155e15fe0>"
 
[super decodeRestorableStateWithCoder:coder];
 
nhgrif is a very patient guy.
@nil NO I WILL NOT USE IT!
 
user457812
Why not? It's like Scala's match/case.
 
God
2:44 AM
yes nhgrif they are in there
I will gist it
 
I'm not going to look at it for both our sakes.
 
God
I will try whatever you say! cmon. I looked all over google and docs, i can't find anything on this issue
 
user457812
I get no respect. No respect at all.
 
user457812
 
user457812
Just look at that. It's beautiful.
 
2:46 AM
Max, if I look at your code, I will mention something that needs cleaning up that's not particularly related, and you'll get mad.
I'm not playing that game.
 
God
i will change it
I will do anything to get this code working
Because it should be working. I don't see why its not
 
What percentage of your profit are you going to pay me?
 
God
Im not making profit
Im losing money
 
Oh, well that's easy then.
 
user457812
Would you strip yourself naked, paint yourself to look like a pikachu, and run through the mall screaming "PIKA-PI!" ?
 
God
2:48 AM
...-_-
 
nil, should I advertise my barcode scanner code in here?
 
user457812
So much for doing anything.
 
God
It encodes in the parent view, and in the child view. decoding the parent view its always nil. it decodes other stuff, but child view controller ALWAYS nil
 
user457812
If it's an app and you're not being obnoxious about trying to get people to buy/download it, I don't care
 
It's not an app. Just some code for making iOS7 barcode scanning easier to use.
 
user457812
2:49 AM
Then I don't care.
 
user457812
There's no rule against sharing stuff you make.
 
I was just commenting on your cry for attention about your code lol...
I haven't written the sample app to show the usage yet or provided very good documentation yet.
 
Braindead question AND answer
-1
Q: What do I need to learn for scoring system in xcode?

blancI'm designing a logo quiz type of game, and I want to create a scoring system, I'd like to know a few tutorials that can be useful, some books if they are available or any good resources that I should consider before designing the scoring system! Can you help? Thank you

 
Wow.
 
2:52 AM
@nil HAHAHAHAHAHAHAHAHAAHHAHA LOLOLOLOLOLOLOLOLOOLOLOLO
 
user457812
Ok, NSChat now has 7 rules.
 
user457812
I added one to point out that this room has what is more or less a no-flagging policy.
 
going to bed.
 
God
"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -decodeObjectForKey: only defined for abstract class. Define -[NSKeyedArchiver decodeObjectForKey:]!"?
will the encoding NSCoder also decode stuff?
 
Did someone flag something again, nil?
Can you see who flagged the messages?
 
user457812
2:55 AM
I also reworded the rule about code pastes to simply say "a reasonable amount"
 
user457812
Someone was flagging Max for using the word "asses"
 
user457812
And no, you can never see who flagged a message.
 
user457812
Just like how you can never see who upvotes or downvotes a question or answer or anything else.
 
Hmm so someone can troll and flood flag then?
 
God
Im about to flag my code for nothing working for 7 hours
 
user457812
2:57 AM
They can, but it's usually obvious who's doing the flagging.
 
user457812
i.e., the person in the room who's not a regular and may or may not have been banned from the room
 
user457812
Which is usually how it goes.
 
user457812
1 message moved to bin
 
God
GAHHH!!! I think i know the issue
and if this is it, I'm going to blow up
 
2:59 AM
That sounds exciting
 
user457812
Then blow up in a different room.
 
God
well I think the controller has to be a property-_-
could be wrong, but i think thats the reason. if so, that is the dumbest thing ever
 
What is Max doing?
 
God
and good I'm wrong
 
user457812
Nothing interesting.
 
God
3:00 AM
A test application saved and restored the view controller
 
user457812
He's trying to use an NSCoder and failing somehow.
 
Ah, as usual.
 
God
Im not failing. apple is not handling my data
correctly
 
user457812
As far as I can tell, he's trying to write an entire view controller using an NSCoder by just passing it the view controller.
 
user457812
Needless to say, this is destined to fail.
 
God
3:02 AM
Nil... STFU. Read the docs
"destined to fail"? WTF. Its the correct way to do it, in the docs
 
user457812
Oh, my university's president responded to the whole guns-being-allowed-on-campus thing
 
God
but you wouldnt know because you don't do iOS so STFU if you don't know
 
user457812
Nevermind, he just said to forward your opinions to the governor because the governor hasn't signed off on it yet
 
Dear Students,

Yippee Ki Yay, M*******F******s!

Love,
Tex Slim
 
@nil What.... Why....
 
user457812
3:05 AM
Though he will sign off on it because he's republican and they don't have rational opinions when it comes to gun control
 
nil is not allowed to speculate on why
 
Anyway, I'm not gonna worry about it.
 
user457812
My university — and every other university in my state — doesn't want this bill to pass
 
user457812
It's a small collection of vocal imbeciles that want to be able to have concealed weapons on campus
 
Herp a derp...sounds like fun
What is their reasoning?
Protection from farm animals?
 
user457812
3:07 AM
Protection from terrorists or people with guns, presumably
 
The same reason why these same people wanted to make it MANDATORY that teachers be armed.
Because they are crazy.
 
Why does @God program??? It seems like he hates it?
 
What does God needs with an iPhone?
2
 
Lol nice subtle Star Trek V reference there
 
high five
 
God
3:08 AM
because nothing is working for some reason!
I created a test application, it works!
 
On the 8th day, God created an iPhone.
 
God
I add the code into Flow, doesnt work
SO WTF IS HAPPENING
 
On the 8th day God blamed Apple
3
 
God
not even a normal UIViewController can be encoded
 
user457812
3:09 AM
Too many people take the whole right-to-bear-arms thing too far without considering the context of the right and the full text of the right
 
On the 8th day God said "THIS ISNT WORKING APPLE U SUCK"
 
God
All of you are assholes and should be banned for bullying
 
It can't be bullying if you keep coming back for more :p
 
user457812
I think it's 10% bullying and 90% exasperation that your behavior has never improved.
 
Sadism?
 
3:11 AM
Who?
 
Masochism?
 
Is help vamping considered bullying?
 
Masochism is when you enjoy pain
 
God
well now I'm going to go bug apple about this since you guys are useless. read the docs and still can't help
 
????
Tamagotchi!
 
user457812
3:13 AM
I think Max should go back and read everything he's said in here and consider whether he'd want to help someone like him
 
I love tamagotchi
 
user457812
I had a Pokemon Pikachu tamagotchi thing.
 
I have friends who mock me for playing Pokemon.
 
Summer?
 
They should burn.
 
user457812
3:14 AM
I also got one of those pokemon things that came with Diamond/Pearl
 
Those are no friends.
 
user457812
Let you transfer a pokemon to a tamagotchi thing
 
How is your app structured. In the sample, they are encoding the custom UIViewController instances in the parent controller. Then, each custom class is encoding its own data.
 
PokeWalker?
I had this weird dream where all the classes in my app were little cardboard boats tied together with string
 
God
I would help anyone but you all won't help now and keep making fun of me and its pissing me off after i wasted my day!
 
3:16 AM
Might not be a dream, Ethen.
 
And I was trying to make them comply with some kind of water API so they wouldn't sink
But it wouldn't work
 
God
You are all being paid to sit and code. I am not and i don't have this kind of time to waste in 10 lines of code that always returns nil. I read the stupid docs like you guys said, some of them are incomplete and nothing will work. tried 100 different ways and same result.
 
And I spent thousands of years in a face trying to make them waterproof
 
user457812
I'm being paid to sit and code?
 
God
you should be
maybe you stand, or squat
whatever you do, you are paid
 
3:17 AM
And then I decided that the API was stupid
 
user457812
I'm definitely not paid.
 
So I made one out of rocks
And it still didn't work
 
God
then what is your job
 
user457812
Also, Max, you're the only one who ever has these issues. Ever. It's never anyone else. There's a decent amount of reason right there that makes us all extremely suspect of your claims.
 
God
you are a slave coder? free?
 
user457812
3:18 AM
I don't have a job. I'm in Idaho. There are no jobs.
 
And then this Godzilla thing came and ate me
 
God
I didnt blame apple on this one yet! I blame them for some stuff. I know this is my issue, i just can't find it
 
You have to manually tell it all the bits you want to encode.
 
God
a test application with no code worked
 
I think it means O shouldn't program late at night
 
3:18 AM
Not just each controller, but all the data for those controllers.
 
God
but this one, no matter how i deliver the view controller it is null after. docs say to encode the view controller
 
But we don't have your code, so we can't tell you what you're doing wrong.
 
God
I posted it
then deleted it since no one looked and then deleted it all in my app
 
user457812
And every time he shares code, he deletes it five seconds later.
 
Are you using custom view controller class?
 
user457812
3:20 AM
Because apparently people not looking at it within 5 seconds means he gets angry at us for not doing something within seconds of saying something.
 
I'm going to go make rubber band bracelets and listen to podcasts so Godzilla doesn't eat me
 
user457812
And people call me weird.
 
Skinny jeans plus rubber band bracelet equals double coding speed
It's true
 
user457812
Ew, skinny jeans.
 
God
I am using a custom view controller in my app but i tried a regular view controller and it also gave nil
 
user457812
3:21 AM
Boot cut forever.
 
Hipster coders ftw
 
God
I just rewrote it and will post if it gives nill again
 
I wear nothing but rubber bands skinny jeans t-shirts and sneakers
 
-Define SuperAwesomeViewController.h/.m
-Initialize navigation controller if necessary
-Add instances of SUperAwesomeViewController to the Navigation Controller.
-Encode the individual data you want to save with keys for each.
-Encode the view controllers themselves.
-Call [super encode...] to do all the other stuff.
-Make sure you're decoding ALL of your various keys when you decode.
 
user457812
You should probably also wear socks and underwear.
 
God
3:22 AM
trying the same code in a view controller, if its not nil i will probably go nuts
ok its nil there too so it should be nil in this case
so its my custom view controller then
 
You knew the other way to interpret that statement that was what I meant nil :P
 
God
I know the issue i guess now
 
You are kinda inviting us to pick on you with a username like "God" though :p
 
God
doesnt support if its not an instance variable of the class
 
The reason I don't help is because I've decided to not discuss coding with you anymore
 
God
3:24 AM
well i can't change my name until the 15th
that answer is the only one i can think of. I can encode a string thats not an ivar, but a view controller that was not an ivar returns nil, but if its a ivar it will save
 
When I used to play FPS games, I went by the handle "Messiah".
 
God
so... no fix
Cant dynamically add ivars
 
Difference is, I was GOOD at FPS games. ;)
 
user457812
When I play FPSs, I use my full nickname.
 
God
:[
 
user457812
3:26 AM
I used to be good. Got really bad when I stopped playing multiplayer for years.
 
God
you have to be kidding me
 
Why would you need to dynamically add iVars? IN the example, they just declare each controller. Are you adding a random or unknown number of view controllers to a page?
 
God
.... wheres the gun
 
At nil's school.
 
God
it saves correctly, but since its not an ivar it will not decode properly
I had the old code, decoded nil. When i added the view controller as an ivar the decode age me a view controller.. WTF
 
user457812
3:27 AM
Just look for the people that call Obama "Obungo" and you've found your gun-carrying loonies on campus.
 
God
so i didnt save it again, it finally decoded it? makes no sense
 
"Obummer".
 
user457812
Just make sure you're not black. They don't like black people.
 
Or they have just started to call him "Hussein".
 
user457812
They have a lot of names for Obama. Usually silly ones.
 
user457812
3:28 AM
Obungo is the closest one to being blatantly racist, I think.
 
God
@xianritchie i am working on a web browser. each tab is unknown to me
so if a user has 64, i need to save all 64 tabs
or 2 tabs, or 1.
 
user457812
So save info about the tabs. Why save view controllers?
 
God
because i am adding state restoration & preservation because UIWebView will restore back/forward history
so that is what I'm trying to do, if i cannot restore the view controller, i cannot restore the web view
so now I'm done
nothing works. life sucks
 
user457812
3:46 AM
Maybe I should lock up the room for the night.
 
Anarchy mode is quite fun though.
I now approve.
 
Where is the fun?
Did I miss it?
 

« first day (558 days earlier)      last day (1598 days later) »