« first day (491 days earlier)      last day (1665 days later) » 

04:03
@Abizern Yes I have tried autoreleasepool too
 
2 hours later…
06:05
back
how to override orderfrontstandardaboutpanel and open custom about window for osx app
@Laddu thanks for the great help you gave yesterday :)
I just need one more thing now I want to access the contacts of a single category for example friends....
How do I go about that ?
Prepare a fetch request with predicate as category_name == friends
Then access it's contactsinfo NSSet
@Retro Sorry, I don't know about OSX, may be you could ask on the stack overflow web?
sure thanks
@Abizern can you help me on override orderfrontstandardaboutpanel and open custom about window for osx app
06:36
@Laddu pastie.org/8595630 ... I made the predicate but now how do I use it for the contacts table ?
Now start fetching
Ask the context to fetch
SJS
SJS
Hello All :)
fetch from ?
the contacts table ?
performFetch: something like that there is a method
See I have got the name of the category now I perform fetch from ?
06:47
[context performFetch: theFetchRequest];
CategoryContactsArray = [[appDelegate.managedObjectContext executeFetchRequest:request error:nil]mutableCopy];
this gives me the name of the category
Who said it gives name of category?
i did it wrong ... ContactsTable *eventContacts = [[appDelegate.managedObjectContext executeFetchRequest:request error:nil] objectAtIndex:0];
[CategoryContactsArray addObject:eventContacts.contacts_name];
Do you know what will executeFetchRequest:error: return?
06:53
Take a look at that method's documentation and tell me what it will return
method to fetch objects from the persistent stores into the context
so this helps to perform the fetch like you said right ?
Yes, and what are you trying to fetch?
Categories with a particular name, isn't it?
the names of the contacts from the contacts table
of a particular category
no
What fetch request did you create?
If you were to describe the fetch request in simple english, what would it be?
from the contacts table im getting all names
I would want it to GET all the contacts from the contacts table for the category = friends
in plain english
but then I would have to add a predicate right ?
06:59
@IronManGill do you have idea about osx programming?
@Retro sorry im a bit busy right now :(
Sure, np
no, the fetch request you create doesn't know anything about contacts
Where is even contacts name present in the fetch request?
NSFetchRequest *request = [NSFetchRequest fetchRequestWithEntityName:@"ContactsTable"];
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"contacts_categories.category_name == %@",[CategoryArray objectAtIndex:CategoryValue]];
[request setPredicate:predicate];
@Laddu
where contatcs_categories is the object of the Category table
But you showed me a different code earlier - pastie.org/8595630
07:03
I modified after you explained to me
is this alright ?
yes
after this I ContactsTable *eventContacts = [[appDelegate.managedObjectContext executeFetchRequest:request error:nil] objectAtIndex:0]; do this
That method will return you an array
Yes
But there might be more contacts in the array. You are only considering the first one, at index 0.
ok so I do it like CategoryContactsArray = [[appDelegate.managedObjectContext executeFetchRequest:request error:nil]mutableCopy];
You will get the contacts array. Now it's up to you what to do with that
That array will have instances of contacts table.
07:11
if i remove the objectAtIndex 0 ... im still not gettting all the names
ContactsTable *eventContacts = [[appDelegate.managedObjectContext executeFetchRequest:request error:nil] objectAtIndex:0]; [CategoryContactsArray addObject:eventContacts.contacts_name];
@Laddu
here im getting only one name
you will get contacts only whose category name is what you specified in the predicate
you mean to say that when i add more contacts into the friend category then theyll automatically come with the code i have written ?
@Laddu hello sup?
no re, you have created fetch request that says - give me all contacts whose category name is "ABC". So you won't get contacts with category other than ABC
you need to perform the fetch again to get updated results.
@dark Hi
So il get all contacts whose category name is "friends" right
07:16
what going on laddu ?
yes, in short - whatever you have provided in the %@
@dark Nothing, just counting my last few days in the company :-)
good so you are going to US ?
first week of Feb
@Laddu i added another row in the contacts table but when i use this code the issue is that it gives me the previous name 2 times that is the count has increased but the name is the same for the as the first name
What?
07:22
Like I have added kate bell using the code i showed u ...
then i add another name anna haro to the friends category
anna haro has been added to the contacts table
but when i fetch im getting kate bell 2 times
@Laddu
instead of kate bell and anna haro because when i fetch using the objectAtIndex:0 im getting
Printing description of eventContacts:
<ContactsTable: 0x10b93eb20> (entity: ContactsTable; id: 0xd000000000040002 <x-coredata://A2A29DD8-3D09-49E3-AE6C-537800A36709/ContactsTable/p1> ; data: {
"contact_email" = "<relationship fault: 0x10bc19bc0 'contact_email'>";
"contact_phone" = "<relationship fault: 0x10bc9b670 'contact_phone'>";
"contacts_address" = "165 Davis Street Hillsborough CA 94010";
"contacts_categories" = "0xd000000000040000 <x-coredata://A2A29DD8-3D09-49E3-AE6C-537800A36709/CategoryT
Is contactsTable an instance variable?
No, Is CategoryContactsArray an instance variable?
its an nsmutablearray
I didn't ask that. I asked if it's an instance variable?
I think it's an instance variable and you are keeping on adding objects in it while performing multiple fetch requests.
So it has objects from multiple fetch request.
eventContacts is the object of the contacts table
My question is - Is CategoryContactsArray an instance variable?
Do you know what is an instance variable?
07:33
i dont think so because it is fetching just one value from the table
Why aren't you answering to my question?
@Laddu yes
So when you perform 2nd fetch and add it's results in that array, do you clear the array? Because it might have objects in it belonging to the previous fetch
Probably that might be giving you an impression why there are redundant objects on the array
No no the array is allocated again
Ill show you the code once again
@Laddu
on printing the array i have
<__NSArrayM 0x10bb3a230>(
Kate Bell,
Kate Bell
)
Then kate bell might be present in the store twice
07:37
No in the Contacts table kate is present only one time
How do you know?
Remember I can't see images, they are blocked.
cahn u see images on imgur ?
no, only mails
send me mail
07:39
mailing now
Do one thing, delete the app from the device/simulator, then insert kate bell just once and then fetch. You can do this to confirm.
Then add anna and fetch again
pls check @Laddu
ok
ok, show me the updated code you're using
@Laddu
The data is coming in the results array of both anna and kate
Which array did you print?
Show me the NSLog statement for printing the array
07:52
so the issue is when i do the

for (NSManagedObject *obj in results)
{
[CategoryContactsArray addObject:eventContacts.contacts_name];
}
this is not right as it gives me kate bell 2 times
@Laddu
How many objects are there in results?
It's very easy to debug. Do one thing, modify the fetch request to fetch contacts with name kate bell.
And see how many objects it returns
But i want both anna and kate
That you are doing to verify if kate bell is present how many times
07:57
in the link i showed you now you can see that the result array has 2 objects rite ?
according to the print of the result array kate bell is present only 1 time
yes, it's apparent, but make one more query and verify that
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"contacts_name == %@",@"Kate Bell"];
Put kate bell as it is in the DB
or use LIKE
i think i have to get the data from obj right ?
the nsmanged object
What data?
the contact details
yes
08:03
i think i need to change the loop
lol
You are iterating into results array but adding objects from different array
how stupid of you and of me too to have overseen it
08:18
lunch break
wait wait pls
so wat do I do
@Laddu
08:31
Thanks @Laddu did it finally :)
08:47
what did you do?
09:02
NSArray *results = [appDelegate.managedObjectContext executeFetchRequest:request error:nil];
for(int i=0; i<[results count]; i++)
{
[CategoryContactsArray addObject:[[results objectAtIndex:i] valueForKey:@"contacts_name"]];
}
@Laddu
ok
so now im getting the records but is this the right approach ?
yes
thanks for all the help :)
All the best for the US :D
thanks :-)
09:45
@Laddu you there ?
yes
@chandrika You've write access, Please read the house rules and follow them.
@Laddu I have an issue that I have to make sub categories of the categories also ... so how do i manage that now ... do i create a variable in the Category table like categorytype and add a specific identifier for the parent category ?
10:04
category will have sub categories of same type?
like friends -> school friends, college friends like that
@Laddu
yes, you can keep integer attribute in category and keep an enum in your code corresponding to each
havent worked with enums can u give me an example as to how
@Laddu
first you read about it
if you have any doubts then ask
ok but any other way to do this besides using enums ? If can assign a category Id in the category table then make it unique somehow .
?
10:21
yes I also said the same thing
Regading enums, I was saying that in code, instead of dealing with numbers (the category id as 1, 2, 3 etc) use enums.
hmm thanks il read about them now ....
Now a days, borrrden is not coming here right @Laddu ?
@pratikpatel.p Rejected, your profile, rep and answers doesn't match anywhere to the context of this room.
@Charan he has gone to New York for christmas and new year vacation
Ah! Fair enough.
10:51
Mike is back
I hope my gifts are also back
has Charan agreed to buy you snow shoes and a fur parka yet?
no
I want from you
yeah? well he has a respectable job
and can afford to give you snow shoes and a fur parka
I want not so expensive gifts. Just one hand gloves and a simple shoe
it will cost you around $50 only
And I should ask for gifts from @IronManGill as well
for explaning core data
@Laddu name your gift and it will be given :D
11:02
are you sure?
I want one winter boot, it will cost you around $35 - $40
you can hold onto the other boot.
she only wants one.
@Laddu where do I send it ...
:D
I will give you my address
hehe fine you give the other one @MichaelDautermann :D ... it would be appropriate
you need to order online
ok, @IronManGill will give me winter boot and @MichaelDautermann a canvas shoes
11:06
winter boot to where :P .. i dont think the boot could send you till the United States of America :P... A hit like that would require immense power LOL
send it to my india address
I am going to US in Feb
I dont have your address ... how lucky am I :P
ok no guidance to Iron Man on core data from now :P
So Mike will give me winter boot
post your address and I'll see what I can do.
give me your email
11:09
what's your e-mail?
What will you send?
okay! you can delete that.
I thought I was sending one shoe.
here is the shoe I would like to get
Images are blocked, I can't see them
11:11
are you STILL working at that stupid image blocking company?
Post it's URL if it's there
yeah last few days left though
lol
I don't want that one
those long boots are weird. I never used them in India
Ankle lenght flat boots are nice
flat and nice boot vahhh
11:27
@Laddu oho .... I was just joking :P ... i still dont have your address
you have her e-mail, don't you?
you can e-mail her and get it
what kind of selfish beast are you, Gil?
:D
omg .... selfish beast ... dont you think thats a bit harsh :P
she generously gave of her precious time to impart detailed and thoughtful knowledge of CoreData to you.
Exactly ... so thats why im asking for the address to send the boot to her
only one :P
lol
11:38
I can smell some creepy things in here, Whats just happened mike?
Ok, So i will send @IronManGill my address and URL of a winter boot which he will buy me.
And Mike will send me a test mail so that I can reply to him with my address and a canvas shoes link.
Do you think you can manage in boston's climate with a canvas shoe ?
It will be useful in summer
Even then, i won't suggest a canvas shoe for summer.
I would wear a floater.
I like canvas shoes. But yes, things there would be different
@MichaelDautermann You are fine with canvas shoes or a floater, right?
11:44
what's a floater?
Even I dunno
it's like sandals
kitto
I will decide the winter boot in 5-10 minutes
12:05
I found 4
This‌​, This, This and This
@IronManGill @MichaelDautermann which is nice?
lol
Lady Gaga should buy that one
I like first and third in my list.
Now for @MichaelDautermann, I will search canvas shoes
This for @MichaelDautermann
@Hector gave me a canvas shoes days ago. Happy new year to him.
well this sucks... Jabong only allows me to sign up with an India phone number and India address, which I don't have for myself.
is that necessary to check out?
@Hector registration is necessary to buy from jabong?
@MichaelDautermann send me email I will reply with that info
12:23
@Laddu no
I think we can continue as guest
@Reefaq Happy new year. You can also send me gifts like my other good friends are doing
is Charan your good friend?
yes
no
see, whoever gives me gifts are my good friends
@Laddu i give gifts to my very close friends....
:D
ya fine, I am not expecting new year gifts from you
12:27
:P ... who says im not giving to you ...
sometimes we have to deal with NSExceptions :P
I hope you send me the gifts and hope my message isn't sent to nil object
oh, you don't like nil either?
:P ... hehe ... thanks though for all the help.. appreciate it
@MichaelDautermann hehe bingo :D
so who is sending me gifts?
12:30
Mike, when she is asking you for gifts. What is the need of this question?
5 mins ago, by Michael Dautermann
is Charan your good friend?
'cos you work at Apple and can give me gifts as well
yes an iphone , ipad ,ipod, iMac , Mac mini ... everythng :P
you forgot to ask for a Mac Pro
lol, I don't get any apple discounts.
Oh that i have :P
@Charan whose asking you for discounts... :P you just have to give them to @Laddu
:D
12:34
Why should i give her?
yes, he can even give me without discounts.
as a new year gift
Send me your gift first and then i think one for you.
@Charan really
:D
charan isn't my good friend
ohhhh snap !! :D
12:37
Oh! Thank you and Now leave me.
hahaha :D
in peace ... like Master Shifu :D
Gifts?? for what?
She wants for new year it seems.
yes and since I am going to US, it will help with my shopping
12:42
what you need?
winter shoes
use pastebin or gist if list is long :P
I posted my wish list above
thats it
Yes. I am generous to ask for fewer gifts
12:45
search for a message called this, this, this and this.
38 mins ago, by Laddu
This‌​, This, This and This
^
Anyway, I'm coming to india in a week. I will buy a gift for you when i come there.
yes it is, but I want one from my list
ok charan is a good friend
Ankle shoes are good.
Mail me your address and i don't send you a sample mail as you know both my gmail and my apple id.
I liked Tan Boots
COD is available in Jabong right? :P
Yes address
Do you need it in Gift Wrap?
12:53
lol
Reefaq is quick. Others need to learn from him :P
@Charan sure
I applied a voucher and got 600 off
So winter shoes by Charan and Canvas by Reefaq. And what about @MichaelDautermann ?
But I need a return gift too
oh?
hey, that's a GREAT idea!
how generous is Laddu?
12:56
At this time I'm poor, need to collect money for my US trip and do lots of shopping
I will send after I get my salary in US
Even a box of chocolates will do. I don't have any list
ok fine, I will send.
I want a Leap Controller but thats ok
box of chocolates is fine
dairy milk
Who want my address for sending gifts, let me know. I will be leaving in 30 minutes.
U listed names above
13:08
what?
14 mins ago, by Laddu
So winter shoes by Charan and Canvas by Reefaq. And what about @MichaelDautermann ?
ok I will send you both the address for delivery
@MichaelDautermann what about you?
I'll get your address
lol
what?
I will give my office address, as thats where I am during the shipping day times
nobody wants to give me gifts
13:24
I thought you are getting gifts from everyone
except Charan
Gautham I've given you write access.
whoever wants to give me gift will send me email, as I don't know who actually intends to send.
You have 5 minutes to read the rules, which are linked in the upper right hand corner of this screen.
And when you are done reading them, let me know that you did.
13:40
revoked access for @Gautham, who didn't acknowledge or read the rules
If i live in chicago for 2 more months, then no gift for Laddu. But if my manager permit me to go to india, then i will buy a gift for her for sure.
what happens after two months?
then you go to Cupertino?
Nope, I'll go to LA.
a new contract for Apple?
yep
13:47
you're getting closer!
contract after this coming one, you'll be on main campus for sure.
May be, but i'm shifting to LA for a reason actually.
no snow there
and you prefer crazy traffic instead.
I've many childhood friends over there.
and I want to live in beverley hills :)
and i want Las vegas to be reachable in couple of hours.
13:50
you're a gambler, eh?
lol, nope. I like las vegas because of the type of drinks available over there.
I'm not a gambler, i'm a drinker precisely.
oh my... you will have many... MANY fine drinking choices & establishments in L.A.
May be, but most of the antique drinks like 200 years old wine are not available there while they are available in Vegas.
Now i've a 90 year old Johnnie Walker with me :p
1 hour ago, by Charan
Mail me your address and i don't send you a sample mail as you know both my gmail and my apple id.
Anyway, I need to go to office. Later...
14:18
90 year old Johnnie Walker. I wonder if Johnnie is paralyzed or has dementia?
 
2 hours later…
16:26
back
 
3 hours later…
18:57
@Laddu look on myntra.
 
3 hours later…
21:35
@nil, look at today's xkcd
:P

« first day (491 days earlier)      last day (1665 days later) »