Design question: View with hell lot of drawing

2009-03-10 Thread rajesh
Hi All, I need to display huge number of elements in NSView (1000-2000). These elements are generally made of high resolution image files with some fancy drawing around them. These elements may vary from size 300 X 270 to 4280 X 3500. First I made use of NSView's for elements, I abandoned

Re: Design question: View with hell lot of drawing

2009-03-10 Thread Graham Cox
On 10/03/2009, at 7:39 PM, rajesh wrote: Is there any other way of approach, or should I be making use of one of the ways I mentioned ? Of course - just define a custom object that contains or manages each piece of content and draw them in one view. This is the classic approach and is

Re: [ANN] InspectorKit (framework/IB-plugin)

2009-03-10 Thread Mike Abdullah
Hi Steven, this looks very interesting thanks. Could I ask you to describe how it differs from OmniInspector, other than having an IB Plugin? Mike. On 10 Mar 2009, at 05:05, Steven Degutis wrote: Hi all! I've just released a piece of open-source software (BSD license) as both a framework

Re: persisting user credentials -- how?

2009-03-10 Thread Mike Abdullah
There's also NSURLCredentialStorage which is more specialised than the keychain services, but for a web service may be ideal. On 9 Mar 2009, at 21:32, Stefan Wolfrum wrote: Hi, I have a little app that needs a username password to log into some web service. These user credentials should

Problem in save and open on Core Data Document Based application

2009-03-10 Thread haresh vavdiya
Hello, I am learning mac development from Aaron Hillegas 3rd Edition. i have created two Example CarLot and Departments based on Core -Data document based application. When i created CarLot example that time it can save and open data without writing single line. Then

Re: Problem in save and open on Core Data Document Based application

2009-03-10 Thread Volker in Lists
Hi, the message says that the data model in the file you try to open is different than the one you have in your app. As far as I can follow you, both apps use the same file type and the former is always trying to open the others file. Of ocurse, then it complains about the different

Understanding how to display a context menu

2009-03-10 Thread Jacob Rhoden
Hey guys, I'm trying to understand the Apple docs for adding a context menu to an NSOutlineView: http://developer.apple.com/documentation/Cocoa/Conceptual/MenuList/Articles/DisplayContextMenu.html#//apple_ref/doc/uid/TP40004968 I am a bit stuck at how do you make it truly context sensitive, ie

Re: [ANN] InspectorKit (framework/IB-plugin)

2009-03-10 Thread Steven Degutis
Sure. Basically, InspectorKit is designed to be a little more simple in usage and aesthetics. For example, it does not provide a specialized titlebar, and every pane is collapsible. It also uses Core Animation to animate its panels, and is thus only Leopard+ compatible. And as you mentioned, this

launching IPhone App Via terminal in IPhone Simulator

2009-03-10 Thread Anshul jain
Hi, I was writing an automation tool from which i need to build and launch IPhone App.I am able to build it. but when i try to launch the application it crashes. Can any body help me. Regards, Anshul jain ___ Cocoa-dev mailing list

Re: User In-Activity hook? And a request

2009-03-10 Thread Scott Ribe
For anybody who cares, the following predates CGSecondsSinceLastInputEvent, and uses only public APIs. It's probably just personal preference as to which is less vile ;-) - (float) getSystemIdleSeconds { static mach_port_t masterPort = 0; static io_iterator_t iter; static

KVO Bindings: Proxy object change notifications

2009-03-10 Thread Dave Keck
Hey list, I'm having some issues with KVO and updating UI elements via bindings; I'd greatly appreciate some clarification on the KVO-compliant way to do what I'm attempting: I have a preferences controller object (let's call it PrefCtrl) that's modeled after NSUserDefaultsController (for

Control in NSWindow top-right

2009-03-10 Thread Mozketo
Hi All, Could anyone point me towards documentation/blog on how to add a control to the top-right of a Window, or tell me if it's even possible? I'd like to add an NSButton up there, perhaps a Register now button for example. To further clarify what I'm talking about here a link

Getting Distant Object In C++

2009-03-10 Thread rajesh swarnkar
Hi All, I have two application in which I want to implement IPC using cocoa distributed object . Then I have established NSConnection between two process and I am able to get proxy for the object in the remote process in the client application . Using this proxy I want to get access to

Remote Invocation

2009-03-10 Thread rajesh swarnkar
Hi All, I have two application in cocoa . My aim is to communicate with a protocol between both the application using IPC mechanism (through NSConnection) but I am unable to achieve my goal. I want to use id MyProtocol protocol as inout parameter for two way communication. Please see my

State of performing tasks with elevated privileges

2009-03-10 Thread Sidney San Martín
I'm fairly new to Cocoa (new to real desktop programing in general, to be honest) and am building an app that's going to want occasional system-level privileges (10.4+). Actually, here's what it needs: 1. To be able to set its preferences system-wide 2. To add itself as a login item for all users

Re: Design question: View with hell lot of drawing

2009-03-10 Thread Steve Christensen
On Mar 10, 2009, at 1:39 AM, rajesh wrote: I need to display huge number of elements in NSView (1000-2000). These elements are generally made of high resolution image files with some fancy drawing around them. These elements may vary from size 300 X 270 to 4280 X 3500. First I made use

Garbage collected and non-garbage collected

2009-03-10 Thread Robert Mullen
I have an app built using garbage collection. I am begin asked to introduce a framework that is non garbage collected but the compiler will not allow this. I have set GC supported on the framework and recompiled which works but the framework causes cryptic errors once compiled in this

Re: Getting Distant Object In C++

2009-03-10 Thread Michael Ash
On Tue, Mar 10, 2009 at 7:44 AM, rajesh swarnkar amicableraj...@gmail.com wrote:      While the objective C version works peerfectly , the c++ version does not. Can you please guide me to a possible way by which I get the c++ implementation working . Please see my code below. No, we really

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Sean McBride
On 3/10/09 10:23 AM, Robert Mullen said: I have an app built using garbage collection. I am begin asked to introduce a framework that is non garbage collected but the compiler will not allow this. I have set GC supported on the framework and recompiled which works but the framework causes cryptic

Re: Getting Distant Object In C++

2009-03-10 Thread Kyle Sluder
A word of advice when posting code like this: use pastebin. http://pastebin.com It makes the code a lot easier to read. As it stands, your .cpp file is weird... it should be .mm to invoke the Objective-C++ compiler, and @implementing isn't an ObjC keyword. --Kyle Sluder

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Michael Ash
On Tue, Mar 10, 2009 at 1:23 PM, Robert Mullen robe...@autowc.com wrote: I have an app built using garbage collection. I am begin asked to introduce a framework that is non garbage collected but the compiler will not allow this. I have set GC supported on the framework and recompiled which

Re: Control in NSWindow top-right

2009-03-10 Thread Kyle Sluder
Use -[NSWindow standardWindowButton:] to get a pointer to one of the buttons in the titlebar; doesn't matter which one, but you may want to use NSWindowToolbarButton if you're putting it in the upper-right. Then use -[NSView superview] to get at the view that encloses the titlebar, and add your

Re: State of performing tasks with elevated privileges

2009-03-10 Thread Nick Zitzmann
On Mar 10, 2009, at 10:39 AM, Sidney San Martín wrote: I can make a helper tool that I call with AuthorizationExecuteWithPrivileges. I already have this working, but it's vulnerable to attack (if the helper binary is replaced) Yes, but the chances of that happening are very, very low unless

Re: Getting Distant Object In C++

2009-03-10 Thread Andrew Farmer
On 10 Mar 09, at 04:44, rajesh swarnkar wrote: I have two application in which I want to implement IPC using cocoa distributed object . Then I have established NSConnection between two process and I am able to get proxy for the object in the remote process in the client application .

Re: Garbage collected and non-garbage collected

2009-03-10 Thread I. Savant
On Tue, Mar 10, 2009 at 1:32 PM, Sean McBride s...@rogue-research.com wrote: You'll have to do a code review and testing of the framework's code to make sure it supports both GC and RR. Unfortunately this is true. Not just for frameworks, but any plug-ins those frameworks might load. A

NSSlider changed notification

2009-03-10 Thread David Alter
Hi All, I'm sure this is something basic that I'm just missing. For some reason I can not find how to get a notification when my slider changes value. I want to be able to subscribe to receive a notification if the slider value changes. Is there a delegate method for this? What is the best way to

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Bill Bumgarner
On Mar 10, 2009, at 10:46 AM, I. Savant wrote: Unfortunately this is true. Not just for frameworks, but any plug-ins those frameworks might load. A new, small internal project started awhile back seemed like the perfect opportunity to try out GC in a production app. This app used QTKit, but

Re: NSSlider changed notification

2009-03-10 Thread Kyle Sluder
NSSlider fires its action when the value changes. If its continuous property is YES, this happens while the user drags the widget. Otherwise it only sends its action when the mouse is released. --Kyle Sluder ___ Cocoa-dev mailing list

Re: NSSlider changed notification

2009-03-10 Thread Randall Meadows
On Mar 10, 2009, at 12:03 PM, David Alter wrote: Hi All, I'm sure this is something basic that I'm just missing. For some reason I can not find how to get a notification when my slider changes value. I want to be able to subscribe to receive a notification if the slider value changes. Is

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Robert Mullen
Going non-GC is not an option for our main project so my only hope with said framework is to correct it myself. I have been able to do a little debugging but I dead end with a BAD_ACCESS which I guess is to be expected with this sort of thing. I will have to see if I can narrow the problem

NSMutableDictionary drives me mad.

2009-03-10 Thread Тимофей Даньшин
Hello. I am writing a method for searching for the longest common substring. The idea is to store the pieces of that LCS in an NSMutableDictionary with TMIntWrappers as keys and NSMutableStrings as values. Now, TMIntWrapper is the class i created for wrapping ints into objects. It stores an

Re: Garbage collected and non-garbage collected

2009-03-10 Thread I. Savant
On Tue, Mar 10, 2009 at 2:16 PM, Robert Mullen robe...@autowc.com wrote: Going non-GC is not an option for our main project If you don't mind my asking ... why? Too much work invested? -- I.S. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSMutableDictionary drives me mad.

2009-03-10 Thread Alexander Heinz
Have you tried using NSNumber instead of your custom integer wrapper? I doubt this is the problem, but see what happens if you do. HTH, Alex On Mar 10, 2009, at 2:33 PM, Тимофей Даньшин wrote: Hello. I am writing a method for searching for the longest common substring. The idea is to

Re: NSMutableDictionary drives me mad.

2009-03-10 Thread Eric Gorr
I'm not sure what your problem is, but I wanted to point out that it appears you could use NSNumber instead of TMIntWrappers to wrap an int value inside of an NSObject which can be used as a key. Perhaps there is a bug in TMIntWrappers that is preventing it from being used as a key...

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Robert Mullen
Too little resource, too little experience, too little return. The first two are because this is a skunk works type corporate project that basically has myself (an ex-.NET and general Windows coder) as it's resource so is constrained by me. The third is because I don't see sufficient gain

Re: NSMutableDictionary drives me mad.

2009-03-10 Thread Clark Cox
On Tue, Mar 10, 2009 at 11:33 AM, Тимофей Даньшин ok5.ad...@gmail.com wrote: Hello. I am writing a method for searching for the longest common substring. The idea is to store the pieces of that LCS in an NSMutableDictionary with TMIntWrappers as keys and NSMutableStrings as values. Now,

Re: Garbage collected and non-garbage collected

2009-03-10 Thread I. Savant
On Tue, Mar 10, 2009 at 2:47 PM, Robert Mullen robe...@autowc.com wrote: GC systems have become efficient enough in our modern world that I think manual memory management has become pretty specialized and out of place in 80% of desktop applications. I won't disagree there. Anybody

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Robert Mullen
I also have the option of abandoning the framework and functionality although that is not an appealing option. I am enjoying the process of determining the course to rectify GC in this framework (in a perverse sort of way) but I am not sure how long that will last. Every time I run into a

Re: Garbage collected and non-garbage collected

2009-03-10 Thread I. Savant
On Tue, Mar 10, 2009 at 3:07 PM, Robert Mullen robe...@autowc.com wrote: I also have the option of abandoning the framework and functionality although that is not an appealing option. I am enjoying the process of determining the course to rectify GC in this framework (in a perverse sort of

Intercepting events from a control

2009-03-10 Thread David Alter
I need to know about events destine for a specific control. Is there a way to receive these events with out subclassing the control. All I have is a reference to the control. I need events like MouseDown, MouseUp. It would also be very helpful if I knew when the control became the first responder

Re: Intercepting events from a control

2009-03-10 Thread Kyle Sluder
On Tue, Mar 10, 2009 at 3:43 PM, David Alter alterconsult...@gmail.com wrote: Is there a way to do this? Subclass the control and override -mouseDown:, -mouseUp:, -becomeFirstResponder, and -resignFirstResponder? Seems straightforward to me. --Kyle Sluder

Re: Intercepting events from a control

2009-03-10 Thread Dave DeLong
Subclassing isn't always an option (For example, NSButton is a class cluster). I've done something like this for iPhone, where I've embedded the control in a UIView, then set userInteractionEnabled to NO on the control, so that the tap events would fall through to the UIView underneath.

[MEET] LA CocoaHeads 3/12/09 at 7:30pm

2009-03-10 Thread Rob Ross
Greetings LA CocoaHeads. This Thursday we have a special guest speaker, Paul Agron, coming up all the way from San Diego to give us a presentation on a logging framework he's developed. Check out his blog here: http://www.fibrethread.com/blog/ Since he's coming from San Diego, I hope we

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Bill Bumgarner
On Mar 10, 2009, at 12:21 PM, I. Savant wrote: On Tue, Mar 10, 2009 at 3:07 PM, Robert Mullen robe...@autowc.com wrote: I also have the option of abandoning the framework and functionality although that is not an appealing option. I am enjoying the process of determining the course to

Re: Intercepting events from a control

2009-03-10 Thread I. Savant
On Tue, Mar 10, 2009 at 3:43 PM, David Alter alterconsult...@gmail.com wrote: I need to know about events destine for a specific control. Is there a way to receive these events with out subclassing the control. All I have is a reference to the control. I need events like MouseDown, MouseUp. It

[MEET] BYU CocoaHeads 12 Mar 2009

2009-03-10 Thread Dave DeLong
Hey everyone, The BYU CocoaHeads will be having their monthly meeting this Thursday from 7 to 9 pm in W310 TNRB on BYU campus in Provo, UT. Dan Reese from Mozy (http://www.mozy.com) will be coming to talk about Cocoa at Mozy, and we'll also be having a presentation on simple Bonjour

Re: Intercepting events from a control

2009-03-10 Thread Paul Sanders
NSButton is a class cluster Are you sure about that? I don't see it anywhere in the docs. Perhaps its an iPhone thing. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Intercepting events from a control

2009-03-10 Thread Dave DeLong
Ah, you're right. It is on the iPhone (from what I tell; my attempts to subclass it never worked), and I was assuming the Mac side was the same. Anyway ending thread hijack. =) Dave On Mar 10, 2009, at 2:10 PM, Paul Sanders wrote: NSButton is a class cluster Are you sure about

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Robert Mullen
The framework is open source. It is the SM2DGraphView Framework. I have posted on the Snowmint forum but not getting anything. I think that is understandable as the original author built this for his own purpose and released it to the world out of generosity. I have made some minor mods to

Re: [SOLVED] Re: NSArrayController -- will change selection?

2009-03-10 Thread Stuart Malin
On Mar 7, 2009, at 3:57 PM, Kyle Sluder wrote: On Sat, Mar 7, 2009 at 8:55 PM, Stuart Malin stu...@zhameesha.com wrote: Those are the only three means I am aware of (selection, window close, view change) that can potentially lead to loss of user data. Any others? Add and remove. You'd

Re: [SOLVED] Re: NSArrayController -- will change selection?

2009-03-10 Thread Kyle Sluder
On Tue, Mar 10, 2009 at 4:33 PM, Stuart Malin stu...@zhameesha.com wrote: Re: remove:  Why ask for a decision about pending changes if the selected item is about to be removed? Instead, I display a remove confirmation sheet. The user can cancel that, and the pending changes remain pending.

setFrame: not working in custom event loop

2009-03-10 Thread Mike Manzano
Hi, I am tracking the mouse pointer to dynamically resize a splitter as a separate drag handle is dragged. This is done in mouseDown: of the drag handle with a custom event loop. The loop looks like this: while (keepOn) { NSAutoreleasePool *pool = [[NSAutoreleasePool

Background Process?

2009-03-10 Thread Pierce Freeman
Hi everyone: I am wondering how to create a background process that will only run when the user is logged in and will run every certain minutes (a bit like Time Machine). I am also not sure in which way the action in the background process would be programmed, so any information regarding this

Re: Background Process?

2009-03-10 Thread Benjamin Dobson
On 10 Mar 2009, at 23:11:03, Pierce Freeman wrote: Hi everyone: I am wondering how to create a background process that will only run when the user is logged in and will run every certain minutes (a bit like Time Machine). I am also not sure in which way the action in the background

Why does releasing this array cause a crash?

2009-03-10 Thread James Cicenia
Hello I am confused on this one: In my method I have a local array: NSMutableArray *arraySubType = [[NSMutableArray alloc]init]; Then in a loop from the database I have: while (sqlite3_step(statement) == SQLITE_ROW) { if(![aDict objectForKey: [NSString stringWithUTF8String:(char

Re: Why does releasing this array cause a crash?

2009-03-10 Thread Randall Meadows
On Mar 10, 2009, at 4:35 PM, James Cicenia wrote: NSMutableArray *arraySubType = [[NSMutableArray alloc]init]; OK, this array, you *should* release, yes. Then in a loop from the database I have: while (sqlite3_step(statement) == SQLITE_ROW) { if(![aDict objectForKey: [NSString

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Bill Bumgarner
On Mar 10, 2009, at 1:17 PM, Robert Mullen wrote: The framework is open source. It is the SM2DGraphView Framework. I have posted on the Snowmint forum but not getting anything. I think that is understandable as the original author built this for his own purpose and released it to the world

Re: Why does releasing this array cause a crash?

2009-03-10 Thread James Cicenia
Ah... Thank you. I understand now. James On Mar 10, 2009, at 5:41 PM, Randall Meadows wrote: On Mar 10, 2009, at 4:35 PM, James Cicenia wrote: NSMutableArray *arraySubType = [[NSMutableArray alloc]init]; OK, this array, you *should* release, yes. Then in a loop from the database I

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Sean McBride
On 3/10/09 3:46 PM, Bill Bumgarner said: Also -- look through the -dealloc methods in the framework. You'll want to create a -finalize for any that do anything beyond -release of objects/[super dealloc] (Though you don't need to unregister notification observers). - free()s CFRelease()s can

What is using up so much memory here?

2009-03-10 Thread James Cicenia
Ok - Here is the offending code that sucks up about 2MB: NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; while(thisState = [statesEnum nextObject]){ UIImageView *singleStateView = [[[UIImageView alloc]initWithFrame:CGRectMake(2,0, 293, 184)]autorelease]; [singleStateView

Re: What is using up so much memory here?

2009-03-10 Thread David Duncan
On Mar 10, 2009, at 4:26 PM, James Cicenia wrote: Ok - Here is the offending code that sucks up about 2MB: NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; while(thisState = [statesEnum nextObject]){ UIImageView *singleStateView = [[[UIImageView

Re: What is using up so much memory here?

2009-03-10 Thread Dave Camp
On Mar 10, 2009, at 4:26 PM, James Cicenia wrote: Here is the offending code that sucks up about 2MB: NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; while(thisState = [statesEnum nextObject]){ UIImageView *singleStateView = [[[UIImageView alloc]initWithFrame:CGRectMake(2,0,

Re: What is using up so much memory here?

2009-03-10 Thread James Cicenia
Interesting... I didn't know that, but then it begs the question what do the cool kids do? Should I be taking a different approach here? If so, any pointers or doc chapter would be great. Thank you James Cicenia On Mar 10, 2009, at 6:33 PM, David Duncan wrote: On Mar 10, 2009, at

Re: What is using up so much memory here?

2009-03-10 Thread David Duncan
On Mar 10, 2009, at 4:41 PM, James Cicenia wrote: Interesting... I didn't know that, but then it begs the question what do the cool kids do? Should I be taking a different approach here? If so, any pointers or doc chapter would be great. All depends on what you are trying to

Re: What is using up so much memory here?

2009-03-10 Thread James Cicenia
I am just overlaying colored state images over a map of the US. I don't need performance here, just memory efficiency. I will try imageWithContetsOfFile. Thanks James On Mar 10, 2009, at 6:45 PM, David Duncan wrote: On Mar 10, 2009, at 4:41 PM, James Cicenia wrote: Interesting... I

Re: What is using up so much memory here?

2009-03-10 Thread Dave Camp
Well, since you obviously can't have all of those images on screen at the same time at full size, you should either just load what you need or resize them to a more appropriate size. Dave On Mar 10, 2009, at 4:41 PM, James Cicenia wrote: Interesting... I didn't know that, but then it begs

Re: What is using up so much memory here?

2009-03-10 Thread James Cicenia
Well... easier said then done. How would one place irregular shapes of the state over the map itself? Any combination of states with a color needs to appear. I was just overlaying the same square with just one state in the square all lined up. James On Mar 10, 2009, at 6:51 PM, Dave Camp

Re: What is using up so much memory here?

2009-03-10 Thread David Duncan
On Mar 10, 2009, at 4:50 PM, James Cicenia wrote: I am just overlaying colored state images over a map of the US. I don't need performance here, just memory efficiency. I will try imageWithContetsOfFile. And just to be clear, imageWithContentsOfFile: vs imageNamed: won't save you any

Re: What is using up so much memory here?

2009-03-10 Thread James Cicenia
Ok - I figured out what I can do. I can make a database of the x/y coordinates after chopping down each state and then read the database info to place the states. Thanks for your hints and time. James On Mar 10, 2009, at 6:51 PM, Dave Camp wrote: Well, since you obviously can't have all

Re: What is using up so much memory here?

2009-03-10 Thread Graham Cox
On 11/03/2009, at 11:00 AM, James Cicenia wrote: Well... easier said then done. How would one place irregular shapes of the state over the map itself? Any combination of states with a color needs to appear. Since you are in a much-more memory-constrained environment, you need to get

Re: setFrame: not working in custom event loop

2009-03-10 Thread Jesper Storm Bache
When you modify a window it registers itself as needing redrawing in the current run loop. If you are performing active tracking, you may have to do so yourself. Try calling [window flushWindowIfNeeded] on your window at the end of your loop (inside the loop). What is the reason for your

Re: What is using up so much memory here?

2009-03-10 Thread James Cicenia
Yes, I realized I would need a different approach. I got too used to web gif/png and just doing overlays. I have already told my designer to give me just bounded states with a spreadsheet of what he chopped off from the top and left. This will then be inputted into the spreadsheet then into

Re: Background Process?

2009-03-10 Thread Daniel Richman
Set your program as a User Agent with launchd on install (i.e., a login item). launchd will make sure your program is running when the user logs in. Then, take a look at the NSTimer docs to implement the every-so-often part of it. --Daniel Richman Pierce Freeman wrote: Hi everyone: I am

Re: setFrame: not working in custom event loop

2009-03-10 Thread Mike Manzano
Thanks, I will try that tomorrow. The code isn't mine, I'm just trying to use it with minimal change. If this doesn't fix it, I probably will just rewrite it to use the separate events. Mike On Mar 10, 2009, at 5:41 PM, Jesper Storm Bache wrote: When you modify a window it registers

Re: Background Process?

2009-03-10 Thread Kyle Sluder
On Tue, Mar 10, 2009 at 9:24 PM, Daniel Richman applemaill...@mm.danielrichman.com wrote: Set your program as a User Agent with launchd on install (i.e., a login item). launchd will make sure your program is running when the user logs in. launchd doesn't launch Login Items. It does, however,

Re: Background Process?

2009-03-10 Thread Daniel Richman
Thanks for correcting me. I have a lot to learn about this. Kyle Sluder wrote: On Tue, Mar 10, 2009 at 9:24 PM, Daniel Richman applemaill...@mm.danielrichman.com wrote: Set your program as a User Agent with launchd on install (i.e., a login item). launchd will make sure your program is

Re: Background Process?

2009-03-10 Thread Roland King
This is a bad idea. It will put unnecessary burden on the processor, and therefore reduce battery life on mobile machines, by doing nothing in the runloop until the timer fires. It's just not an appropriate use of the NSTimer functionality. launchd already has the capability of launching

Re: Background Process?

2009-03-10 Thread Kyle Sluder
On Tue, Mar 10, 2009 at 9:49 PM, Roland King r...@rols.org wrote: Could you expand on that a bit please? My mental picture of the runloop has always been more like a select() which does nothing unless there is something to do. Not that I ever quite sorted out in my own mind how an NSTimer fits

Re: What is using up so much memory here?

2009-03-10 Thread Ricky Sharp
On Mar 10, 2009, at 8:13 PM, James Cicenia wrote: Yes, I realized I would need a different approach. I got too used to web gif/png and just doing overlays. I have already told my designer to give me just bounded states with a spreadsheet of what he chopped off from the top and left. This

Odd interaction of NSTrackingArea behaviour with drag and drop

2009-03-10 Thread Luke Evans
I have tracking areas set up in an NSTableView,similar to the Cocoa PhotoSearch sample app, and these have the NSTrackingEnabledDuringMouseDrag option set. There may be various definitions of what mouse drag actually means, but the docs just indicate that this option should produce

Re: Background Process?

2009-03-10 Thread Chris Suter
Hi Kyle, On Wed, Mar 11, 2009 at 1:19 PM, Kyle Sluder kyle.slu...@gmail.com wrote: While NSTimers are not normal input sources, the frameworks are free to add any input source to the runloop that they wish.  And in order for your timer to fire, you need to keep the runloop awake, using at

Re: Background Process?

2009-03-10 Thread Darren Minifie
Can't somebody write a small app and and profile it to get a conclusive answer? I'd do it but I'm lazy. I am interested in the outcome though. On Tue, Mar 10, 2009 at 7:52 PM, Chris Suter csu...@sutes.co.uk wrote: Hi Kyle, On Wed, Mar 11, 2009 at 1:19 PM, Kyle Sluder kyle.slu...@gmail.com

Re: Background Process?

2009-03-10 Thread Chris Suter
Hi Darren, On Wed, Mar 11, 2009 at 2:28 PM, Darren Minifie minof...@gmail.com wrote: Can't somebody write a small app and and profile it to get a conclusive answer?  I'd do it but I'm lazy.  I am interested in the outcome though. Well, I did do that and ran it under Shark: zero CPU usage. I

Re: Garbage collected and non-garbage collected

2009-03-10 Thread Michael Ash
On Tue, Mar 10, 2009 at 2:47 PM, Robert Mullen robe...@autowc.com wrote: Too little resource, too little experience, too little return. The first two are because this is a skunk works type corporate project that basically has myself (an ex-.NET and general Windows coder) as it's resource so is

Re: Background Process?

2009-03-10 Thread Michael Ash
On Tue, Mar 10, 2009 at 11:28 PM, Darren Minifie minof...@gmail.com wrote: Can't somebody write a small app and and profile it to get a conclusive answer?  I'd do it but I'm lazy.  I am interested in the outcome though. Just run Activity Monitor and look at one of the numerous idling GUI apps.

Re: Odd interaction of NSTrackingArea behaviour with drag and drop

2009-03-10 Thread Luke Evans
For the curious, the test app is available at: http://idisk.mac.com/luke_e-Public/TrackingTesterDragDrop.zip (61.2 KB) On 10-Mar-09, at 7:41 PM, Luke Evans wrote: I have a test app that recreates the problem in what I consider a reasonably sterile environment..

Fwd: Problem in save and open on Core Data Document Based application

2009-03-10 Thread haresh vavdiya
-- Forwarded message -- From: haresh vavdiya vavdiyahar...@gmail.com Date: Tue, Mar 10, 2009 at 4:50 PM Subject: Re: Problem in save and open on Core Data Document Based application To: Volker in Lists volker_li...@ecoobs.de Hi Volker, Thanks Volker, Ya u r

Examples or Documentation for Non-document-based Multi-window App

2009-03-10 Thread Grant Erickson
Suppose I were writing an application, perhaps similar to the example at http://en.wikibooks.org/wiki/Programming_Mac_OS_X_with_Cocoa_for_beginners/B uilding_a_GUI (or many of the examples in /Developer/Examples/...) that had no file-based interaction whatsoever but for which I wanted to allow the

Cant figure out images

2009-03-10 Thread Etienne Gignac Bouchard
Hi guys. So I tried NSImage without much success and now I¹m trying CIImage. I have the following code: NSURL *testUrl; testUrl = [NSURL URLWithString:@/Users/Etienne/Desktop/logo.gif]; CIImage *imageTest; if(testUrl == nil) NSLog(@TEST NIL !); else

EXC_BAD_ACCESS on NSImageView::setImage

2009-03-10 Thread Dev
I have a window that contains a NSImageView that displays pictures. here is the code : =CODE= NSBitmapImageRep *rawPic = [[[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:thisFrame.width pixelsHigh:thisFrame.height

Re: Cant figure out images

2009-03-10 Thread Nick Zitzmann
On Mar 10, 2009, at 6:45 PM, Etienne Gignac Bouchard wrote: testUrl = [NSURL URLWithString:@/Users/Etienne/Desktop/logo.gif]; That's not a URL; that's a POSIX path. If you want a file URL, then use +fileURLWithPath: instead. Nick Zitzmann http://www.chronosnet.com/

Re: Background Process?

2009-03-10 Thread Kyle Sluder
On Tue, Mar 10, 2009 at 11:38 PM, Michael Ash michael@gmail.com wrote: The notion that adding a timer to a runloop would somehow cause that runloop to suck up CPU time when the runloop is idle is nonsensical. The whole point of the runloop is that it sleeps the process until some activity

Re: KVO Bindings: Proxy object change notifications

2009-03-10 Thread Ken Thomases
On Mar 10, 2009, at 4:14 AM, Dave Keck wrote: I have a preferences controller object (let's call it PrefCtrl) that's modeled after NSUserDefaultsController (for various reasons, though, it's a custom implementation.) As does NSUDC, it has a 'values' property, which mediates access to the

Re: Background Process?

2009-03-10 Thread Roland King
Kyle Sluder wrote: On Tue, Mar 10, 2009 at 11:38 PM, Michael Ash michael@gmail.com wrote: The notion that adding a timer to a runloop would somehow cause that runloop to suck up CPU time when the runloop is idle is nonsensical. The whole point of the runloop is that it sleeps the

Re: Remote Invocation

2009-03-10 Thread Ken Thomases
On Mar 10, 2009, at 9:13 AM, rajesh swarnkar wrote: I have two application in cocoa . My aim is to communicate with a protocol between both the application using IPC mechanism (through NSConnection) but I am unable to achieve my goal. I want to use id MyProtocol protocol as inout parameter