Window position updates on demand?

2015-12-17 Thread Cem Karan
ocoa and not GLFW. I tried polling the position of the window, but that doesn't work (the polling is happening, but it prints the same position continuously until dragging stops). So, how do I get the window to update where it actually, truly

Re: Referencing struct fields in C

2011-05-30 Thread Cem Karan
our performance, you're probably better off looking into -fprofile-generate and -fprofile-use (in gcc) than what you're suggesting. Hand tweaking WITHOUT adequate profiling as you're suggesting is the absolute bane of programming; you'll be spending a lot of time 'optimi

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 5:37 PM, Greg Parker wrote: > On Aug 17, 2010, at 2:32 PM, Cem Karan wrote: >> Mmm, my question is, what about Apple's code? I'll be the first to admit, I >> don't know enough about what goes on under the hood, so what I'm about to >

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 5:20 PM, Stuart Rogers wrote: > On 17 Aug 2010, at 21:36, Cem Karan wrote: >> On Aug 17, 2010, at 4:05 PM, Stuart Rogers wrote: >>> >>> NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; >>> ... >>> [pool release];

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
On Aug 17, 2010, at 4:05 PM, Stuart Rogers wrote: > On 17 Aug 2010, at 18:07, Ken Ferry wrote: >> On Tue, Aug 17, 2010 at 9:53 AM, Cem Karan wrote: >> >>> One dumb question; I see where you're putting images into an autorelease >>> pool, but I don'

Re: Losing my memory - a caching problem?

2010-08-17 Thread Cem Karan
*sig = [[[ImageSignature alloc] initWithSize:[bmpImgRep > size]] autorelease]; >float *buffer = [sig allItems]; > >// Signature creation snipped - it's a simple mapping of pixels to a float > array > >return sig; > }

Re: Coding with VM limitation on the iPhone?

2009-08-18 Thread Cem Karan
ight be able to help you with different strategies. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.

RE: Help with SHA class

2009-06-04 Thread Karan, Cem (Civ, ARL/CISD)
sy to implement from that, unlike AES. Also look at http://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html and the testing page at http://csrc.nist.gov/groups/STM/cavp/index.html#03 for a complete list of testvectors. Good luck, Cem Karan ___ Co

RE: [OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-20 Thread Karan, Cem (Civ, ARL/CISD)
legal problems, which is why I was after the phone number of someone that I could contact directly in Apple's legal department. Thank you for the link though. Thanks, Cem Karan > -Original Message- > From: Kyle Sluder [mailto:kyle.slu...@gmail.com] > Sent: Tuesday, May 19,

RE: [OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-20 Thread Karan, Cem (Civ, ARL/CISD)
If I could get a real contact, then I wouldn't have done this. Thanks, Cem Karan I. Savant wrote on Tuesday, May 19, 2009 4:42 PM: > On Tue, May 19, 2009 at 4:27 PM, Karan, Cem (Civ, ARL/CISD) > wrote: > > Various people here at work have been trying to get in > contac

[OT] Anyone have the a DIRECT phone number for a real person at Apple Legal???

2009-05-19 Thread Karan, Cem (Civ, ARL/CISD)
tml I mean a person's actual number!) that I can pass on? For those that are wondering, certain parts of the Enterprise Agreement aren't applicable to the Federal Government, and our lawyers need to talk to Apple's lawyers to get it all straightened out

RE: singletons and autoreleased objects

2009-05-15 Thread Karan, Cem (Civ, ARL/CISD)
> On May 13, 2009, at 8:30 , Karan, Cem (Civ, ARL/CISD) wrote: > > > I have an object that I've turned into a singleton via the > techniques > > described at: > > > > > http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CocoaFundame

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-15 Thread Cem Karan
ink about the fact that I could mark my memory usage; I'll do that and retest. Thank you! Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: singletons and autoreleased objects (Karan, Cem (Civ, ARL/CISD))

2009-05-13 Thread Cem Karan
Answering my own question: it had nothing to do with my singleton, and everything to do with over-releasing of objects that only showed up when I had multiple threads running at the same time. Please ignore the original question. Thanks, Cem Karan

singletons and autoreleased objects

2009-05-13 Thread Karan, Cem (Civ, ARL/CISD)
discovered that I seem to be leaking memory (I'm not sure about that; I may be misreading what Instruments is telling me). It appears to be because my singleton object (and anything it holds) looks like a leak to leaks. Is this normal? Should I be worried? Th

Re: Best way to pass large objects between tasks?

2009-04-14 Thread Karan, Cem (Civ, ARL/CISD)
se swap logic to get the bytes in the right order on your machine by seeing how the known pattern was mangled when it was archived. Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: Getting the value of GUI elements from non-main threads

2009-02-04 Thread Cem Karan
On Feb 4, 2009, at 4:10 PM, Ken Thomases wrote: On Feb 4, 2009, at 2:47 PM, Cem Karan wrote: I know that we can only modify GUI elements from the main thread, but can we get the values for objects from other than the main thread? E.g., assume I have an editable NSTextField, and I have a

Getting the value of GUI elements from non-main threads

2009-02-04 Thread Cem Karan
analysis to a worker thread. The worker thread then directly queries the NSTextField via its stringValue method. Is this kosher? Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

RE: -finstrument-functions and program startup

2009-01-29 Thread Karan, Cem (Civ, ARL/CISD)
thing to syslog, and then parsing that out with a script. Thanks for the help in trying to figure this out. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

RE: -finstrument-functions and program startup

2009-01-29 Thread Karan, Cem (Civ, ARL/CISD)
Greg Parker wrote on Wednesday, January 28, 2009 4:22 PM > On Jan 28, 2009, at 10:33 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > First off, I know this question is going to the wrong list, > but I have > > NO idea which list would be best. If anyone wants to jump > in and

-finstrument-functions and program startup

2009-01-28 Thread Karan, Cem (Civ, ARL/CISD)
t calls __cyg*() before I get the chance to do the setup, I'm going to have another crash. So, is there anything called before main()? What about just before main() returns? Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

NSOperation and NSOperationQueue cancellation and ordering questions

2009-01-09 Thread Karan, Cem (Civ, ARL/CISD)
int result = // Some long running operation [self.delegateLock lock]; if ([self.delegate respondsToSelector:@selector(bar:)]) { [self.delegate bar:result]; } [self.delegateLock unlock]; } @end --- End of MyOpe

RE: Binary search on sorted NSArray in Cocoa?

2009-01-07 Thread Karan, Cem (Civ, ARL/CISD)
Ken Thomases wrote on Tuesday, January 06, 2009 11:24 PM: > On Jan 6, 2009, at 10:42 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > > I know I'm being pedantic, but just to make sure, will the > following > > code work? > > > > // mySortedArray is an NSA

RE: Binary search on sorted NSArray in Cocoa?

2009-01-06 Thread Karan, Cem (Civ, ARL/CISD)
Adam R. Maxwell wrote on Tuesday, January 06, 2009 9:59 AM: > On Jan 6, 2009, at 8:16 AM, Karan, Cem (Civ, ARL/CISD) wrote: > > > My question is, does NSArray already have a binary search method > > defined on it in a category somewhere? If it does, I'd rather use &g

Binary search on sorted NSArray in Cocoa?

2009-01-06 Thread Karan, Cem (Civ, ARL/CISD)
ct to find the string in the array, but that is slow as it seems to assume an unsorted array. My question is, does NSArray already have a binary search method defined on it in a category somewhere? If it does, I'd rather use that. Thanks,

encoding/decoding selectors?

2008-12-15 Thread Karan, Cem (Civ, ARL/CISD)
ector(self.selector) forKey:@"selector"]; } - (id) initWithCoder:(NSCoder *)aDecoder { self.selector = NSSelectorFromString([aDecoder decodeObjectForKey:@"selector"]); } Is this the correct method? Thanks, Cem Karan ___ Cocoa-de

RE: Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-10 Thread Karan, Cem (Civ, ARL/CISD)
more like the Passive View design > > pattern. Is this where Apple wants us to head? I want to plan out my > > code in a manner that plays as well as possible with Apple's chosen > > design patterns, which is why I want to know where Apple is headed. > > >

Best way to do hit testing on an image?

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
here is a built-in way, I'd rather use that. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.c

Design patterns: MVC, MVP, Passive View... where is Apple heading???

2008-12-09 Thread Karan, Cem (Civ, ARL/CISD)
ode in a manner that plays as well as possible with Apple's chosen design patterns, which is why I want to know where Apple is headed. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: NSCollectionView woes

2008-11-22 Thread Cem
Thanks, that worked! I do try to read the examples and CocoaDev, but I've found that after I've read the examples, the only way I really learn is by trying and sometimes failing. I appreciate the help and the quick response. Thanks, Cem Karan On Nov 21, 2008, at 1:55 PM, Volke

NSCollectionView woes

2008-11-21 Thread Cem
he whole thing is about 32 KB tarballed, so I can email it anywhere anyone wants it. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

RE: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
if at all possible. Can you explain what you are suggesting about the subviews some more? My only experiences with making views subviews of other views has lead me to believe that although they can be rotated and translated in 2D, they cannot be rotated or translated in 3D. Am I wrong?

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
eed to be very careful to ensure that the OpenGL surface doesn't deform the rendered output from the NSTextView too much, does this sound like a reasonable approach. Note that I'm NOT trying to make a released product here, just get a feel for an interface. Thanks, Cem Karan _

OpenGL + NSTextView/NSTextContainer?

2008-11-18 Thread Karan, Cem (Civ, ARL/CISD)
what I've described above. So, can I do it, or is it impossible? Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-

RE: Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
I like this method the best; there is (potentially) a lot of output, and this is probably the cleanest method. Thanks! Thanks, Cem Karan > -Original Message- > From: Scott Ribe [mailto:[EMAIL PROTECTED] > Sent: Friday, November 14, 2008 11:23 AM > To: Karan, Cem (Civ, ARL/

Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
of time on this library in any case, but I would like to see what the output is. The problem is that I'm creating an ordinary Cocoa application, not a command line application. So where does the output of fprintf(stdout,…) go to in a Cocoa application

RE: properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
> -Original Message- > From: Chris Hanson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 04, 2008 10:49 AM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subject: Re: properties, threads, and KVO > > On Nov 4, 2008, at 7:20 AM, Karan, C

properties, threads, and KVO

2008-11-04 Thread Karan, Cem (Civ, ARL/CISD)
pposed to default to thread-safe, and I know that as long as I don’t explicitly specify getter/setter methods, properties should be KVC/KVO compliant, but I'm not sure if the above is 100% kosher. Is there anything I should be worried about? Thanks, Cem Karan ___

Re: Compare images in Cocoa

2008-10-31 Thread Karan, Cem (Civ, ARL/CISD)
ve in your application). Good luck, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe

RE: Can we ask iPhone questions yet?

2008-10-28 Thread Karan, Cem (Civ, ARL/CISD)
> Like the subject says, can we ask iPhone questions yet? I'm > stumped and I need help. > > Thanks, > Cem Karan Thanks to everyone that replied. I put my question up at http://discussions.apple.com/thread.jspa?threadID=1769333&stqc=true so if you want to reply to it

Can we ask iPhone questions yet?

2008-10-27 Thread Karan, Cem (Civ, ARL/CISD)
Like the subject says, can we ask iPhone questions yet? I'm stumped and I need help. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

Re: Appropriate use of bindings?

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
lem as I have bits that can fit into each of the categories, and all from the same object... I guess I'll just go with notifications, they've got enough flexibility that I can change things around however I need, should I need to. Thanks, Cem Karan __

Appropriate use of bindings?

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
doing MVC here. Notifications are used anywhere you want, but require more (and more careful) work to get right. So, are bindings considered general purpose, or should they really be reserved for MVC situations (even though they can work anywhere)? Th

RE: [Disarmed] Re: NSNotificationQueue EXC_BAD_ACCESS problems

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
That was it! Thanks, I should have checked for that first. Thanks, Cem Karan > -Original Message- > From: Julien Jalon [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 07, 2008 10:39 AM > To: Karan, Cem (Civ, ARL/CISD) > Cc: cocoa-dev@lists.apple.com > Subj

NSNotificationQueue EXC_BAD_ACCESS problems

2008-10-07 Thread Karan, Cem (Civ, ARL/CISD)
e to work completely correctly, its just the other two modes that it doesn't work. Anyone have any clue what is going on? This is on a OS X 10.5.5 machine with MacFUSE 1.7 installed. The code is being compiled using Xcode 3.1.1. Thanks, Cem Karan

Re: -[NSScanner scanUpToString:stopString:NULL] - 10.3.9 Crash, due Xcode 3.1?

2008-10-02 Thread Karan, Cem (Civ, ARL/CISD)
ring intoString:stringValue] ; BOOL result = [self scanString:stopString intoString:NULL] ; return result ; } Good luck, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Cem
nly change one day. That is why I'm trying to figure out the precise meaning of coalesce when it comes to the user dictionaries. Thanks, Cem Karan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Karan, Cem (Civ, ARL/CISD)
oalescingOnName|NSNotificationCoalescingOnSender) as the options. The problem is that I want to send all the data along in the user dictionary. How is that coalesced? Note that I want ALL the data I'm putting in the dictionary, not just the last user dict. Thanks, Cem Karan __

RE: NSXMLParser bug?

2008-09-12 Thread Karan, Cem (Civ, ARL/CISD)
some kind of initialization to work right, I keep a boolean around that signals if the instance was properly initialized. My class's designated initializer knows how to set that properly, but the superclasses don't, and if you call a method without correctly initia

RE: NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
Yup, it does. I'll have to keep that in mind the future. Thanks for saving me from writing a useless bug report! Thanks, Cem Karan -Original Message- From: Graham Cox [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 9:10 AM To: Karan, Cem (Civ, ARL/CISD) Cc: coco

RE: NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
I thought that all initializers had to call through the designated initializer, which means that init should be overridden to call initWithData:. Am I wrong? Thanks, Cem Karan -Original Message- From: Graham Cox [mailto:[EMAIL PROTECTED] Sent: Thursday, September 11, 2008 8:19 AM To

NSXMLParser bug?

2008-09-11 Thread Karan, Cem (Civ, ARL/CISD)
ateMethods { NSXMLParser *dummyParser = [[NSXMLParser alloc] init]; NSAssert(dummyParser != nil, @"Problem allocating parser"); NSLog(@"Parser retain count = %u", [dummyParser retainCount]); [dummyParser release]; } Thanks, Cem Karan