Re: Minimal document-based app

2012-05-02 Thread Chris Hanson
On May 2, 2012, at 6:19 AM, ecir hana wrote: > As I said above, I don't want the question to be whether I should better > use NIBs, or whether Cocoa is more suitable than assembler. I somewhat know > already what the role of NIB is, that it can save time and so on. What I > would like to know is

Re: Minimal document-based app

2012-05-02 Thread Chris Hanson
On May 2, 2012, at 6:19 AM, ecir hana wrote: > - I saw that Xcode named the Info.plist differently (it prepends my project > name to it) - is it ok just to call it Info.plist? Is there any convention? Xcode is actually prepending the target name, not the project name: A project can have multipl

Re: Nested XML -> CoreData

2012-05-15 Thread Chris Hanson
On May 15, 2012, at 7:29 AM, Koen van der Drift wrote: > However, the data read with the parser needs to end up in my Core Data > model. Obviously I already created a Person entity, but how do I add the > phone numbers to it? Create a PhoneNumber entity with two attributes? That would be a reas

Re: Equation style display

2012-07-02 Thread Chris Hanson
Mathematical typesetting is actually incredibly complex, and people like Donald Knuth have dedicated significant portions of their careers to it. There's no simple way to go from a textual representation of a formula to a typeset version, not least of which because there's no universally agreed-

Re: NSInteger vs int vs int32_t

2012-07-02 Thread Chris Hanson
NSInteger and NSUInteger also have the advantage of having the same @encode() on 32-bit and 64-bit, which can be important for binary compatibility of archives and IPC between architectures, depending on how you do it. -- Chris On Jul 2, 2012, at 8:58 AM, Jens Alfke wrote: > > On Jul 2, 20

Re: Core Data Multiuser

2012-07-16 Thread Chris Hanson
On Jul 16, 2012, at 2:39 PM, Jens Alfke wrote: > (1) Client-server. The database lives on one server machine, as does the > "business logic" (I hate that term) that manages your app. This could > definitely be implemented with Core Data if you like. The client app just > focuses on the UI, and

Re: Core Data Multiuser

2012-07-17 Thread Chris Hanson
On Jul 17, 2012, at 7:05 AM, Flavio Donadio wrote: > I already took a look at NSIncrementalStore and it seems to solve one of my > problems. I am fairly good with PHP, but I could always create a web service > with Rails or something else… On the client side, it doesn’t matter what you use on

Re: KVG generic enough?

2012-07-21 Thread Chris Hanson
On Jul 18, 2012, at 4:46 PM, William Squires wrote: > For example, an effect could be called "fireball" and do 1d6 HP to a player > caught in the blast radius. My 'effect' class has an @property of type > NSMutableArray (which holds 'codons' in NSStrings) of the form: > > > > and the parser

Re: Best data source for table view in document window

2012-09-05 Thread Chris Hanson
On Sep 5, 2012, at 5:39 AM, Jerry Krinock wrote: > (2) Separate, standalone object. Fancy housekeeping is needed to avoid > retain cycles, and crashes in corner cases as the document window is closing. This is the way to go. That housekeeping doesn’t need to be so fancy; you just need to est

Re: Best data source for table view in document window

2012-09-05 Thread Chris Hanson
On Sep 5, 2012, at 11:53 AM, Seth Willits wrote: > In a complex window where there a multiple tabbed views like you have, think > of the window controller as doing nothing more than managing the view > controllers for each of the tabs, not the actual views in each tab. If your > window control

Re: Beachballing 2

2012-12-04 Thread Chris Hanson
Please don't create lots of different message threads for a single issue/discussion. Sticking to a single thread makes it much easier to follow by keeping all of the context together. Thanks. -- Chris -- cocoa-dev's other moderator ___ Cocoa-de

Re: Custom initWithFrame?

2013-01-05 Thread Chris Hanson
On Jan 3, 2013, at 5:28 PM, Eric Dolecki wrote: > I am creating a UIView-based control that I would also like to pass in > parameters at the time of creation. Is this doable? I don't want to keep > calling methods on my object if I can pass all with initwithframe somehow. This is only the case

Re: Issue with Core Data Model

2013-01-12 Thread Chris Hanson
On Jan 11, 2013, at 8:12 AM, Alex Zavatone wrote: > Back as of Xcode 4.2, many classes would not implicitly support po in the > debugger unless you wrote your own description method to return the > properties you wanted to expose. What leads you to this conclusion? Many, but not all, classes

Re: Issue with Core Data Model

2013-01-12 Thread Chris Hanson
On Jan 11, 2013, at 5:22 AM, Amy Gibbs wrote: > One of the issues is I called and attribute of an entity 'description'. This > didn't appear as an error in Xcode 3 which I was using, and didn't create a > problem using the app. Now in Xcode 4 the model won't even open due to this > error. I ha

Re: NSTask Explodes. Clueless.

2013-02-06 Thread Chris Hanson
On Feb 5, 2013, at 10:39 AM, Seth Willits wrote: >> Does your crash log show multiple threads? I would expect that the crash log >> shows only one thread because NSTask called fork() already. > > Hmm. Yes, there's only one thread. I didn't notice that. That explains the > crash (of the forked

Re: NSTask Explodes. Clueless.

2013-02-06 Thread Chris Hanson
On Feb 4, 2013, at 11:26 AM, Seth Willits wrote: > Looking around the open source code for exec(), it appears EINVAL (22) can be > returned if the task was exec()'d when not called from a vfork()'d process, > with the comment /* If we're not in vfork, don't permit a mutithreaded task > to exec

Re: How to read the deployment target of a .plugin?

2013-02-12 Thread Chris Hanson
On Feb 10, 2013, at 7:09 PM, Jerry Krinock wrote: > In an .app project, the Build Setting named Deployment Target in Xcode gets > compiled into the product's Info.plist as LSMinimumSystemVersion, and this is > the minimum Mac OS X version in which the product will launch. That is a convenience

Re: How to read the deployment target of a .plugin?

2013-02-12 Thread Chris Hanson
On Feb 10, 2013, at 10:40 PM, Jerry Krinock wrote: > On 2013 Feb 10, at 21:12, Charles Srstka wrote: > >> On my machine, "Compiler Default" makes it 10.8. > > Same here. Those "Compiler Default" and "Current/Latest OS X" Build Settings > values are going to kill me one of these days. Deploy

Re: Concurrent MOCs

2013-06-10 Thread Chris Hanson
On Jun 10, 2013, at 6:28 AM, Roland King wrote: > How about the objects which are then owned by the MOC, the managed objects? > Do any messages sent to them, even a property or relationship lookup, need > also to be in a performBlock: call on the MOC owning those objects? For an NSManagedObjec

MODERATOR NOTE: Re: NSOutlineViews and Mountain Lion

2013-07-10 Thread Chris Hanson
There is no supported way to disable the various controls' animations on a system-wide basis. *** Any discussion of unsupported/reverse-engineered ways to do so (or to do anything else) is against the list rules, and therefore should not take place on the list. *** Furthermore, requests for a

MODERATOR: End of Thread (was Re: Apple Developer Update)

2013-07-26 Thread Chris Hanson
Sorry, but this is off-topic for the cocoa-dev list. Please keep discussion here to technical topics related to Cocoa development. To provide feedback to Developer Support, visit the contact page at . Thanks. -- Chris, cocoa-dev co-moderator ___

MODERATOR: End of Thread (was Re: There must be a live human at Apple?)

2013-08-03 Thread Chris Hanson
Please do not continue this thread. As per the list guidelines, please keep discussion on the list to technical topics related to Cocoa development, and do not cross-post to multiple lists. -- Chris Hanson cocoa-dev co-mod ___ Cocoa-dev

Re: Is it possible to define class from interface builder?

2013-08-14 Thread Chris Hanson
On Aug 13, 2013, at 11:34 AM, Izak van Langevelde wrote: > A user interface contains several instances of a specific form, which is > easily created in Interface Builder. > Is there any way to derive a subclass of NSView from this form, so that it > can be reused? A good way to do this is to c

Re: Cocoa et al as HCI usability problem

2008-05-19 Thread Chris Hanson
On May 19, 2008, at 4:33 PM, Alex Kac wrote: 2) Many of the examples you're looking for are not so much in people's apps, but in AppKit itself meaning that AppKit would have had to be far more complex, big, and clunky if not for this feature. Don't underestimate the utility of being able to

Re: NSApp with wrong _running count

2008-05-20 Thread Chris Hanson
On May 20, 2008, at 4:51 AM, Micha Fuhrmann wrote: many thanks, now, what else can I use that's thread safe for that matter? Don't structure your code such that you would be putting up an alert from a non-main thread. If you keep to strict MVC, you can design your application such that

Re: connections and the nib lifecycle

2008-05-21 Thread Chris Hanson
On May 21, 2008, at 9:05 AM, Torsten Curdt wrote: I have a class that extends NSWindowController. - (void) test:(NSString*)string { [textField setStringValue:string]; NSLog(@"textField=%@", textField); int ret = [NSApp runModalForWindow:[self window]]; NSLog(@"textField=%@", t

Re: connections and the nib lifecycle

2008-05-21 Thread Chris Hanson
On May 21, 2008, at 11:00 AM, Vijay Malhan wrote: But the problem is still open for discussion. Is there any differences in sequence of events occurring while loading of Nib between Tiger and Leopard platforms? There really should not be, at least not like this. As I explained in my resp

Re: Cocoa Classes from C++?

2008-05-27 Thread Chris Hanson
On May 27, 2008, at 5:14 PM, Scott Ribe wrote: like C++ objects as member variables of an ObjC object This works fine if you set the right compiler options, which I think has been around since 10.3. It requires both Mac OS X 10.4 and GCC 4, actually: There is Objective-C runtime suppor

Re: Alert Sheets hard wired in Interface Builder

2008-05-28 Thread Chris Hanson
On May 27, 2008, at 9:06 PM, Jens Alfke wrote: On 27 May '08, at 1:40 PM, Kyle Sluder wrote: You're looking for +[NSApplication beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:], I'm not surprised the OP didn't find this … it's my candidate for Most Misplaced Cocoa Metho

Re: warning: 'NSEntityDescription' may not respond to

2008-05-31 Thread Chris Hanson
On May 30, 2008, at 11:16 AM, Fritz Anderson wrote: On 30 May 2008, at 4:17 AM, Steven Hamilton wrote: Also, any warnings or errors I get in xcode appear twice in the bubbles. Anyone know why that is? By default, new Xcode projects are set to the "Release" configuration (because all softw

Re: Garbage collector vs variable lifetime

2008-06-07 Thread Chris Hanson
On Jun 6, 2008, at 5:36 PM, Quincey Morris wrote: A little inner voice insists on asking, though, how we know some future version of the compiler might not optimize '[data self]' upwards before the loop, if it decides that nothing inside the loop references anything non-local: This won't

Re: Garbage collector vs variable lifetime

2008-06-08 Thread Chris Hanson
On Jun 8, 2008, at 5:39 PM, John Engelhart wrote: On Jun 7, 2008, at 7:11 PM, Chris Hanson wrote: This won't happen because each message expression -- just as with function-call expressions -- is a sequence point. The compiler can't know what side-effects [data self] might h

Re: Garbage collector vs variable lifetime

2008-06-09 Thread Chris Hanson
On Jun 8, 2008, at 10:03 PM, John Engelhart wrote: The result from [data self] is invariant, it does not matter if it is executed immediately after the object is instantiated or just before [data release], the result is always the same. There is no way in the Objective-C language as it curr

Re: Garbage collector vs variable lifetime

2008-06-09 Thread Chris Hanson
On Jun 9, 2008, at 12:56 AM, John Engelhart wrote: The semantics are preserved and identical results are calculated (the 'meaning' is the same). The semantics do not require square() to literally be called each time. Yes, that is very clear, because the compiler can have full knowledge t

Re: Garbage collector vs variable lifetime

2008-06-09 Thread Chris Hanson
On Jun 9, 2008, at 10:24 AM, John Engelhart wrote: This is not a bug. This is fundamental to how object-oriented programming works! You should always be able to pass an instance of a subclass wherever an instance of the superclass is expected. You're mistaken. You have statically typed t

Re: TDD/BDD testing methodologies?

2008-06-09 Thread Chris Hanson
On Jun 9, 2008, at 6:43 AM, Jonathan del Strother wrote: Take a look at SenTestingKit (and particularly Chris Hanson's excellent guide to setting it all up - http://chanson.livejournal.com/182472.html). Thanks for the kind words! I have a couple of additional posts on my weblog which I thin

Re: Garbage collector vs variable lifetime

2008-06-09 Thread Chris Hanson
On Jun 9, 2008, at 11:17 AM, Hamish Allan wrote: On Mon, Jun 9, 2008 at 7:02 PM, Chris Hanson <[EMAIL PROTECTED]> wrote: The reason these kinds of methods have a return type of (id) is that there is no way to say "returns an object of the receiver's class." For exa

Re: Garbage collector vs variable lifetime

2008-06-11 Thread Chris Hanson
On Jun 11, 2008, at 12:01 AM, John Engelhart wrote: This whole business about '(NSArray *) means NSArray AND any of it's subclasses' is the result of sloppy thinking and confusing 'able to' with 'as per spec'. No, you are wrong. It really is "per spec." That is an intentional capability

Re: creating and using a View xib

2008-06-11 Thread Chris Hanson
On Jun 10, 2008, at 5:00 PM, Jerry Isdale wrote: How do I get that View/Controller to show up in the application window? Do I have to programatically load the XIB and position the view within the app? Do I have to turn it into an IB library object, then drag from library to window? Use an

Re: Table View/Array Troubles

2008-06-13 Thread Chris Hanson
On Jun 12, 2008, at 10:21 PM, Kyle Sluder wrote: If you're implementing the singleton pattern, for example, you would override -init differently. In most cases, I would strongly suggest *not* doing anything differently if you are making a singleton. If you want something to be a singleton

Re: Race in Apple's NSTreeContoller/NSOutlineView

2008-06-21 Thread Chris Hanson
On Jun 19, 2008, at 7:49 PM, Godfrey van der Linden wrote: The sub-xib bindings are through the NSViewControllers representedObject, which gets set not at awakeFromNib time but later when the subview is activated. What do your bindings look like? If you have an outline view managed by an N

Re: Bindings Concept Question

2008-06-21 Thread Chris Hanson
On Jun 21, 2008, at 10:49 AM, Alex Wait wrote: I have tried to, in my init method, to do this id proxy = [controller mutableArrayValueForKey:@"arrayOfData"]; Your init method of what class? Does "controller" have an "arrayOfData" property, or does the object you're making that call from?

Re: CoreData local and on server sync

2008-06-21 Thread Chris Hanson
On Jun 21, 2008, at 3:33 AM, René v Amerongen wrote: Does someone has any experience about having a local data store which is syncing wit the server store using Coredata? We have a few 300+ laptop users and 50+ desktop users who are working in the same database. Now I have to make a simil

Re: CoreData local and on server sync

2008-06-21 Thread Chris Hanson
On Jun 21, 2008, at 3:18 PM, Jens Alfke wrote: Of course you can write your own code that takes a local CoreData store and a remote database server, and compares and syncs the data; but you're on your own in building that. You'll need a 3rd party library to even talk to the server. In thi

tag != pointer under GC (was Re: SetControlReference equivalent in NSControl?)

2008-06-25 Thread Chris Hanson
On Jun 25, 2008, at 9:39 PM, Graham Cox wrote: On 26 Jun 2008, at 6:01 am, Kevin Elliott wrote: There is no reason to subclass his control to attach an int value (or more generally to track which instance a particular control is). See NSControl tag/setTag. They allow you to do exactly wha

Re: Core data question in multiwindow doc app

2008-06-27 Thread Chris Hanson
On Jun 27, 2008, at 7:25 PM, Steven Hamilton wrote: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildSourceList) name:@"NSManagedObjectContextObjectsDidChangeNotification" object: [self.document managedObjectContext]]; Notification names should always use the

Ask for help when encountering GC issues (was Re: Garbage Collection woes...)

2008-06-28 Thread Chris Hanson
On Jun 27, 2008, at 12:31 PM, John Engelhart wrote: Lesson #1: If you have any interest in performance, you must avoid, at all costs, "writing" to a __strong pointer. If this were the case, all assignments to instance variables would be exceptionally costly under GC. They are not -- appli

Re: garbage collection and NSConnection

2008-07-04 Thread Chris Hanson
On Jul 4, 2008, at 2:25 AM, Joan Lluch (casa) wrote: First, GC makes programs go slower not because of the overhead of the garbage collection itself, which I concede that may be comparable to the retain/release calls in a non-managed environment, but for the extra memory overhead that it is

Re: garbage collection and NSConnection

2008-07-04 Thread Chris Hanson
On Jul 4, 2008, at 9:32 AM, Joan Lluch (casa) wrote: However, this is hardly possible with GC even if you trigger the GC manually in the middle of the loop. It simply will not release the memory at the rate you expect because it follows its own rules and as far as free memory is available i

Re: IB3 and custom controls: problem with actions

2008-07-05 Thread Chris Hanson
On Jul 3, 2008, at 11:19 PM, Vitaly Ovchinnikov wrote: After upgrade to XCode 3.0 I found out that now it is impossible. Old links are still alive (marked with yellow triangles), but I can't create a new one. I don't see "Sent action" group by right-clicking my controls. If I perform Ctrl+Drag f

Re: Loading a different interface

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 8:30 AM, John Joyce wrote: In my application, I would like to give my users the option to choose various interface styles. I've laid out my interface using a standard NSPanel as well as the HUD version. Both are suitable, but some users will prefer one over the other, of

Re: Bit maps from raw camera files

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 2:00 PM, James Merkel wrote: So the question is how to go about reliably getting a bit map reliably form these camera raw files? Try getting a CGImageRef using ImageIO. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 2:23 PM, Bill Cheeseman wrote: So, I guess my frameworks should declare ... __strong CGEventRef myEvent; __strong AXUIElementRef myUIElement; ... if I am going to advertise the frameworks as supporting both retain/release and garbage collection. Is that right? That's c

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 3:52 PM, Quincey Morris wrote: The other thing worth noting is that, when GC is enabled, any CF object that is documented to be *returned* already autoreleased from a frameworks function is actually returned with a reference count of 1, so you still need to call CFMakeCol

Re: Guidelines for Cocoa frameworks supporting garbage collection?

2008-07-05 Thread Chris Hanson
On Jul 5, 2008, at 11:04 PM, mmalc crawford wrote: On Jul 5, 2008, at 10:07 PM, Chris Hanson wrote: Can you give an example of a framework method that's documented to return an autoreleased CF object? NSBitmapImageRep: - (CGImageRef)CGImage Returns an autoreleased CGImage objec

Re: Why aren't my bindings firing?

2008-07-07 Thread Chris Hanson
On Jul 7, 2008, at 3:51 PM, Hamish Allan wrote: If that is the case, let me ask: is KVB unidirectional or bi- directional? Whether a binding is unidirectional or bidirectional depends upon the specific binding in question and the meaning the class providing it has decided to give it. -

Re: Removing folder from /Applications

2008-07-08 Thread Chris Hanson
On Jul 8, 2008, at 11:19 AM, Nick Zitzmann wrote: On Jul 8, 2008, at 6:20 AM, Glover,David wrote: myStatus = AuthorizationCopyRights (myAuthorizationRef, &myRights, kAuthorizationEmptyEnvironment, myFlags, NULL);

Re: Storing structured data in file - any easy way?

2008-07-10 Thread Chris Hanson
On Jul 10, 2008, at 6:09 AM, Jules Colding wrote: I'm trying to figure out how to write and read structured data to a specific file. I have a very bad feeling that the answer is Core Data, but I'm feeling totally at lost after having been reading up on Core Data for a couple of days by now.

Re: importing sqlite data into a core data "database"

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 4:54 PM, John Velman wrote: So, being new to Cocoa, XCode, objective-c, How do I get my data into my new Cocoa / core data "database"? I can think of two approaches off hand: 2) writing an import routine for my application, using NSTask (?) and sqlite3. This would lik

Re: Setting Up Socket Streams

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 5:22 PM, StaS Bandol wrote: I have a basic(for most of you) question. I´m trying to make a very simple app that will have 1 button (for example) and when its pushed the app will create a socket connection with a host and will send it a message(command). To head this off

Re: importing sqlite data into a core data "database"

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 8:33 PM, Stefan Arentz wrote: If that's OK so far, how about linking? Is Linking to the SQLite library transparent from XCode? Looks like the CoreData framework is directly linked against sqlite. That doesn't matter. If you want to use the SQLite 3 API from your app

Re: Questions about Core Data and SQLite

2008-07-14 Thread Chris Hanson
On Jul 14, 2008, at 8:12 AM, Jens Alfke wrote: Second, CoreData really isn't meant for having two clients (whether users or processes) accessing the database at once. I think it's possible to do this, but it requires extra work to get each client to detect when the other has changed the db,

Re: Questions about Core Data and SQLite

2008-07-14 Thread Chris Hanson
On Jul 14, 2008, at 9:08 PM, Jens Alfke wrote: On 14 Jul '08, at 6:05 PM, Steve Steinitz wrote: I use a little gigabit Thecus Network Drive which is just about as fast as using the internal disk. Humorously, my database currently fits in the Thecus' cache so it runs even faster. The scala

Re: [Q] Do subclasses implementing same Protocol as super class also need to include it in declaration?

2008-07-16 Thread Chris Hanson
On Jul 16, 2008, at 2:15 PM, Rick Mann wrote: I have a class D that derives from class S. S derives from NSObject. Do I need to declare D as: @interface D : S or can I leave off the for the derived classes, and still get appropriate warnings? You can leave off the for derived c

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 8:39 AM, Rick Hoge wrote: I expect this is a custom class created by Apple - does anyone know of an efficient way to replicate this type of view? One thought I had was to create a table with a single row and add the desired controls as cells. Just create a view and ad

Re: Xcode style divider with embedded popup and pulldown menus

2008-07-18 Thread Chris Hanson
On Jul 18, 2008, at 9:55 AM, Rick Hoge wrote: Thanks for the replies - seems like a custom view and possibly NSMatrix will do the job. I strongly recommend going with a view hierarchy instead of an NSMatrix. You don't need to create a custom view, either. Views nest; an instance of NSView

Re: NSThread and UI

2008-07-20 Thread Chris Hanson
On Jul 20, 2008, at 2:01 PM, Torsten Curdt wrote: So in the following naive code I would have to either wrap the calls to the progressIndicator object through a performSelectorOnMainThread or could send NSNotifications to update it on the main thread. Notifications — whether via NSNotific

Re: Sent Actions, Delegates, Outlets

2008-07-24 Thread Chris Hanson
On Jul 23, 2008, at 11:28 PM, Oleg Krupnov wrote: Notifications is another point of confusion for me. I would assume that notifications should be used when multiple observers can be connected to an "event" exposed by an object, in contrast to a simple "delegate" outlet, which can only have one c

Re: Sent Actions, Delegates, Outlets

2008-07-24 Thread Chris Hanson
On Jul 24, 2008, at 4:10 AM, Oleg Krupnov wrote: Notifications is another point of confusion for me. I would assume that notifications should be used when multiple observers can be connected to an "event" exposed by an object, in contrast to a simple "delegate" outlet, which can only have one

Re: Daemon Advice?

2008-07-24 Thread Chris Hanson
On Jul 23, 2008, at 1:09 PM, Karl Moskowski wrote: I'm working on a Foundation tool to be used as a launchd daemon. It's a Leopard-only GC app that uses FSEvents to watch for changed files. Can anyone offer any tips or guidance? Thanks. I have a couple other tips, since you're writing a

Re: XML serialization and deserialization

2008-07-25 Thread Chris Hanson
On Jul 24, 2008, at 11:16 PM, Phil wrote: On Fri, Jul 25, 2008 at 6:06 PM, Oleg Krupnov <[EMAIL PROTECTED]> wrote: I have read it now and I believe the guide suggests that i archive my object tree in a binary byte stream, not an XML. There are no implementations of NSCoder that would output XM

Re: Getting process table info from within a Cocoa app

2008-07-25 Thread Chris Hanson
On Jul 25, 2008, at 10:58 PM, Sumner Trammell wrote: Hi. A daemon process is running independently of my Cocoa app. Given a pid file of the daemon process in a known location, say /var/run/ somedaemon.pid, I would like my Cocoa app to read that file and check the process table to see if the

Re: how to release my window controller

2008-08-02 Thread Chris Hanson
On Aug 2, 2008, at 8:23 AM, Torsten Curdt wrote: Let's say in my AppController a new Non-modal window is getting opened like this - (IBAction) buttonOpen:(id)sender { MyWindowController *controller = [[MyWindowController alloc] init]; [controller showWindow:self]; } Of cours

Re: Some crash.

2008-08-02 Thread Chris Hanson
On Aug 2, 2008, at 2:07 PM, Sandro Noel wrote: when the Array is filled on application init, the data displays fine, but if I add to the array "programatically" the new data is not displayed, i've tried: [self didChangeValueForKey:@"transactions"]; and [transactionTableView reloadData];

Re: Loading a class with a specific superclass from a bundle

2008-08-05 Thread Chris Hanson
On Aug 5, 2008, at 11:19 AM, Elan Feingold wrote: I can load the principal class of a bundle with: NSBundle* bundleToLoad = [NSBundle bundleWithPath:@"..."]; Class exampleClass = [bundleToLoad principalClass]); Actually, this loads the bundle and then gets its principal class. Loading a bu

Re: autorelease CGImageRef?

2008-08-07 Thread Chris Hanson
On Aug 6, 2008, at 7:44 PM, Peter N Lewis wrote: This email sent to [EMAIL PROTECTED] 2:26 PM +0200 6/8/08, Jean-Daniel Dupas wrote: If I'm not wrong, it should be something like this: [NSMakeCollectable(aCGImageRef) autorelease]; This appears correct, except for the fact that, for reasons

Re: Core Data question

2008-08-08 Thread Chris Hanson
On Aug 6, 2008, at 12:31 PM, Sandro Noel wrote: I have entities like this. TransactionTypes Atributes : Name:String Relationships: Transaction Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String Relationships: TransactionType You should

Re: autorelease CGImageRef?

2008-08-08 Thread Chris Hanson
On Aug 7, 2008, at 7:07 PM, Peter N Lewis wrote: At 8:24 AM -0700 7/8/08, Chris Hanson wrote: If you build with the Mac OS X 10.5 SDK, you should be able to use NSMakeCollectable since it's declared as an inline function. The earliest release of Mac OS X you're targeting is a f

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 6:51 PM, Graham Perks wrote: I do this, where I have an EventImage that refers back to a main Event, "self" is the managed object for the Event, which is your Account: // create new EventImage, this would be akin to your Acco

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 8:37 PM, Graham Perks wrote: On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automati

Re: @property and @synthesize not working

2008-08-16 Thread Chris Hanson
On Aug 13, 2008, at 6:47 PM, Nathan Gilmore wrote: I am a newbie and I am having trouble getting my setter to work when I use @synthesize. Here is the code: @interface DayTaskController : NSArrayController { NSCalendarDate *searchDate; } @property(readwrite, assign) NSCalendarDat

Re: Window 'close' action fails

2008-08-16 Thread Chris Hanson
On Aug 15, 2008, at 3:28 PM, dct wrote: I don't believe that my 'close' problem is explained by an awkward init -- as I said before, all of the other U/I operations of the nib "SPlotWindow.nib" are working as expected (so somehow I've dodged a potential bullet, at least so far). Indeed; y

Re: Window 'close' action fails

2008-08-16 Thread Chris Hanson
On Aug 16, 2008, at 11:48 AM, dct wrote: I'd still like to know why "[self close]" failed in this case--but I can live with the solution without knowing why it works in some cases and not in others. I suspect you were not closing the window you thought you were closing, due to the way you

Re: Question about respondsToSelector

2008-08-18 Thread Chris Hanson
On Aug 18, 2008, at 11:17 AM, Carmen Cerino Jr. wrote: Does the id type have enough information for the respondsToSelector method to work. I have a class with an ivar of type id, and when I invoke the respondsToSelector method it fails when it should succeed. I am assuming it should work fi

Re: Best Way to Handle Properties?

2008-08-19 Thread Chris Hanson
On Aug 19, 2008, at 10:02 AM, Dave wrote: I'm new to Cocoa and a little confused about the best way to handle the following: I'm converting a C based application to Object-C/Cocoa. One of the objects is used to hold properties which are loaded from a data file. I have created an object to

Re: Accessing properties of a generic class

2008-08-21 Thread Chris Hanson
On Aug 20, 2008, at 7:54 PM, John Murphy wrote: I have a Person class with name and image properties stored in an array. When I access its properties from within the controller class like this: Person *person = [objectArray objectAtIndex:0]; [nameField setStringValue:person

Re: Creating Interface

2008-08-28 Thread Chris Hanson
On Aug 28, 2008, at 7:32 AM, Roland King wrote: I don't quite understand why protocols like NSKeyValueObserving aren't formalized and in a .h file somewhere so you could just use them in the same way you can the NSObject protocol. They're documented, why not just write the .h file. There's

Re: Simple Array of Strings Binding Question

2008-08-30 Thread Chris Hanson
On Aug 30, 2008, at 6:44 PM, Seth Willits wrote: More or less expected in hindsight. There's no value of the string to set, instead I want to replace the string object in the array. So... what do I do? Do I really need to make up a model object to contain the string, just to use bindings he

Re: CoreData and mutableArrayValueForKey:

2008-08-30 Thread Chris Hanson
On Aug 30, 2008, at 2:23 PM, Alex Duzik wrote: I'm writing an app where one Core Data entity -- Folder -- has (conceptually) a to-many relationship with another object -- Item. But I want to keep those items in a particular order, so I have a third entity, OrderedItem, which keeps a referen

Re: how to delete the current user's directory?

2008-09-01 Thread Chris Hanson
On Sep 1, 2008, at 3:46 AM, XiaoGang Li wrote: hi, list, I have an uninstaller application , which is used to delete the files installed; and also i have a file which located in the current user's directory, like the ~/Library/LaunchAgents/com..plist. and how can i delete this kind

Re: Core Data: Instantiating linked entities

2008-09-01 Thread Chris Hanson
On Sep 1, 2008, at 3:15 AM, Renaud Céroce wrote: I read somewhere in Apple's doc that an object was responsible for instantiating the other objects it depends on. It don't find it logical because I've already defined the relationships in the xcdatamodel The reason it is logical is that your

Re: Disabled NSButton

2008-09-04 Thread Chris Hanson
On Sep 4, 2008, at 12:33 PM, Ronnie B <[EMAIL PROTECTED]> wrote: I would like to have 'Ok' button disabled as long as the password field is empty. Add a -canLogIn method to the panel's controller that returns YES when the user has entered a password. Then bind your button's enabled state

Re: mailbundle info

2008-09-10 Thread Chris Hanson
On Sep 10, 2008, at 3:00 PM, Stephane Huaulme wrote: where can i find info on how to create a mailbundle? Mail does not have a public plug-in API. -- Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: NSWindowController

2008-09-15 Thread Chris Hanson
Your window might be set to release on close in IB, causing it to be deallocated instead of just ordered out when the user clicks its close button. -- Chris On Sep 15, 2008, at 6:55 PM, Chris Idou <[EMAIL PROTECTED]> wrote: Sorry if this is a bit basic, but I can't figure out why my p

Re: Core Data in a framework ?

2008-09-17 Thread Chris Hanson
On Sep 17, 2008, at 2:24 PM, dreamcat7 wrote: If use Core Data, then can my class be part of a framework ? Yes. You can use Core Data in pretty much any situation where you would use Foundation. Core Data is not restricted to applications that the user interacts with. For one example,

Re: Core data in private framework.

2008-09-19 Thread Chris Hanson
On Sep 18, 2008, at 8:41 PM, Scott Andrew wrote: I have a question. We are designing a private frame work to wrap our data handling. The framework is using Core Data with an SQL back end. However we get errors when loading data if the model file is not included in the application and is jus

Re: How to load a window

2008-09-21 Thread Chris Hanson
On Sep 21, 2008, at 1:53 PM, Eric Lee wrote: My question is simple (and probably basic from some of you experts :S). How do you load another window just by pressing a button? On CocoaDevCentral, they say to use NSBundle, but I read on the documentation that you can also use NSWindowControll

Re: design pattern for data acquisition in background thread?

2008-09-27 Thread Chris Hanson
On Sep 26, 2008, at 3:37 PM, Joe Keenan wrote: Right now, the app controller object sends a message to the device controller, requesting the value of a specified variable. The device controller does the telnet command to get it, returns it to the app controller, and the app controller sen

Re: setPrimitiveValue:forKey: and to-many relationships

2008-09-27 Thread Chris Hanson
On Sep 24, 2008, at 3:56 PM, Quincey Morris wrote: IAC, it's not clear why you need to use setPrimitiveValue: at all. Why not something like: - (void)setChildren:(NSSet*)value_ { [[self mutableSetValueForKey:@"children"] removeAllObjects]; [[sel

Re: Two questions about cocoa programming...

2008-09-29 Thread Chris Hanson
On Sep 28, 2008, at 9:44 AM, Leopard x86 wrote: Hi everyone. In the recent development, I need to solve the following two issues: In the future, if you have multiple questions, please post each one in a separate message. Furthermore, please use more descriptive subject lines. Everybody i

<    1   2   3   4   >