resizing table view programmatically

2009-06-25 Thread Daniel Child
I would like to resize a table view programmatically. I will be resizing based on the number of rows (which I know in advance), given a fixed row height which I set myself. I tried resizing the window's contentView and that did not work. I know that a window, a scroll view, and a clip view

popup in table column

2009-07-19 Thread Daniel Child
I am confused by what seem to be two possible approaches to placing popup button cells into a table. If I understand the documentation, one can: a) set the popup button cell as the data cell of the (subclassed) column OR b) return the popup button cell in the table datasource method: - (id)

"intelligent" flexible popup

2009-07-19 Thread Daniel Child
As a follow-up to the previous question on popups in a table, I am wondering what APIs you can use to implement the kind of "intelligent" popups one finds, for example, when filling out the State field in forms needing an address. You start typing "Ma" and Maine or Maryland come up. But you

Re: "intelligent" flexible popup

2009-07-20 Thread Daniel Child
I seem to have fallen into the pitfall you described below. I can get the table view to display values in a combo box from a data source, which takes those values from an array in the model. I also have autocomplete working. But I can't seem to get the values I choose to "stick" (remain d

NSWindow reference remains null after window did load

2009-07-27 Thread Daniel Child
I have a master controller loading a window controller subclass, but for some reason, I cannot get a pointer to the window loaded in the XIB file. I've looked at every connection, and I've also tested the order by of method calls. In the window controller's init: [self window] yields nothin

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
d the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? On Jul 27, 2009, at 10:57 PM, Graham Cox wrote: On 28/07/2009, at 12:39 PM, Daniel Child wrote: I have a master controller l

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
That would have been a good guess, but that's not it. Visible at launch is checked (ON). On Jul 28, 2009, at 3:13 AM, cocoa-dev-requ...@lists.apple.com wrote: This came up in another chat I had today. In that case, the window was not set to be visible at launch, so the system deferred actual

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
arrigan wrote: On Jul 28, 2009, at 8:31 AM, Daniel Child wrote: Which brings up another question: do I need the "object" (blue cube) at all in the nib if the file's owner is of the same class and presumably represents the same object. Are they redundant? They are complete

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Thanks for confirming this. On Jul 28, 2009, at 11:43 AM, Graham Cox wrote: Not only are they redundant, this is almost certainly your bug. Objects in a nib are real objects. Therefore you have two of them, both of the same class. Normally File's Owner is the window controller and this is

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
Actually, once I have init'd the window controller and set up the model data, I call showWindow on the controller. Unchecking visible at launch doesn't seem to make any difference. On Jul 28, 2009, at 11:47 AM, Graham Cox wrote: Visible at launch is checked (ON) Which is almost never wha

Re: NSWindow reference remains null after window did load

2009-07-28 Thread Daniel Child
The correct number, a value obtained from the model. On Jul 28, 2009, at 3:02 PM, cocoa-dev-requ...@lists.apple.com wrote: The only datasource method to get called is numberOfRowsInTableView. What number is it returning? --Andy ___ Cocoa-dev mai

Re: NSWindow reference remains null after window did load (SOLVED)

2009-07-29 Thread Daniel Child
No, the syntax was right. The problem mysteriously disappeared when I altered the timing of the method to redraw the table, including the time data is loaded. Thanks for your suggestions. On Jul 28, 2009, at 8:38 PM, Andy Lee wrote: Just to be sure -- your method is numberOfRowsInTableView:,

converting unicode text representation to unichar

2009-08-11 Thread Daniel Child
Unihan.txt provides text files showing characters in the format U+. If I scan these in, naturally I can obtain the NSString representation . But I need to convert this text to genuine unichars OR NSStrings (the actual characters represented). Two questions: 1. I didn't see any relev

Re: converting unicode text representation to unichar

2009-08-11 Thread Daniel Child
g stringWithFormat: @"%c", &value]; NSLog(@"strc is %...@\n", strc); NSString *strC = [NSString stringWithFormat: @"%C", &value]; NSLog(@"strC is %...@\n", strC); } else { NSLog( @"Hex reading failed." ); } Seems like a lot o

Re: converting unicode text representation to unichar

2009-08-11 Thread Daniel Child
SOLVED! My stupid error: passing address of value instead of just value. Thanks very much for your help. Character displays correctly. On Aug 11, 2009, at 1:30 PM, Daniel Child wrote: Thank you. I think I'm almost there, though I'm getting incorrect values. I tried both %c and

basic bindings question

2008-05-14 Thread Daniel Child
Hi All, I'm trying to get my feet wet with bindings and want to try something simpler than the mail example provided online. All I'm trying to do is to replace the target-action-outlet approach with bindings in the simplest case I can think of: a text field whose value would correspond to

Re: basic bindings question

2008-05-14 Thread Daniel Child
I think I understood the first half of what you said, and can now see why making number the receiver of addObserver was totally wrong. But I seem to have a problem. If I want to observe the property of an object, and in my case, it turns out that the M and C are collapsed into a model-contro

window controller's [self window] not working

2008-05-14 Thread Daniel Child
I have a window controller that I initialize using initWithWindowNibName. To improve readability later in the code, I try to cache the window outlet to another variable. [self window] returns no value, however. This exact same code used to work in previous incarnations of the program, and

Re: basic bindings question

2008-05-14 Thread Daniel Child
On May 15, 2008, at 12:09 AM, Ken Thomases wrote: Can you be more specific about why you want your controller to observe its own number property? What are you trying to accomplish? I suspect there's another way to accomplish what you're interested in. I'm simply trying to reduce bindings

Re: window controller's [self window] not working

2008-05-15 Thread Daniel Child
I had already checked the outlets, but rebuilding the nib from scratch fixed the problem. It must have become corrupted somehow. Thanks. On May 15, 2008, at 12:35 AM, Ken Thomases wrote: On May 14, 2008, at 11:23 PM, Daniel Child wrote: I am just getting used to IB3 but don't see what o

Re: basic bindings question

2008-05-15 Thread Daniel Child
You were right, it accidentally switched to user defaults. Removing that and setting it back to controller still leads to a runtime exception. 2008-05-15 22:30:53.718 StringBinding[290:10b] An uncaught exception was raised 2008-05-15 22:30:53.719 StringBinding[290:10b] [0x119650> valueForUn

bindings tutorial doesn't work

2008-05-19 Thread Daniel Child
After reading a host of theoretical explanations on bindings, I tried the bindings-based currency converter tutorial to try to get some basic feel for bindings in practice. The example is written for an earlier version of OSX, but I think I reproduced it correctly for XCode 3. However, I ge

Re: bindings tutorial doesn't work

2008-05-20 Thread Daniel Child
THANK YOU! On May 20, 2008, at 9:33 AM, Michael Babin wrote: On May 19, 2008, at 11:41 PM, Daniel Child wrote: After reading a host of theoretical explanations on bindings, I tried the bindings-based currency converter tutorial to try to get some basic feel for bindings in practice. The

totally confused by bindings settings

2008-06-03 Thread Daniel Child
I worked out a super basic bindings case where table columns display the ivars of a Word class via bindings. Words have three ivars with standard accessors. An ArrayController manages a table of these words, with appropriate bindings between the columns and ivars. It works as expected. So f

Re: totally confused by bindings

2008-06-05 Thread Daniel Child
First off, thanks very much for the lengthy response. My initial response to your post was rejected for length, so I am trying to abbreviate here, pinpointing areas of confusion. Hmm. An NSArrayController doesn't manage tables, it manages an array (as its name implies). So, do you have an

Re: totally confused by bindings settings

2008-06-08 Thread Daniel Child
You could also establish the bindings through File's Owner.delegate.. It amounts to the same thing for this nib. In other nibs, the application delegate won't actually be in that same nib, and so the ability to refer to it via a key path from either the File's Owner or the Application sta

counting managed objects of a certain type

2008-07-08 Thread Daniel Child
How do you determine how many managed objects of a certain entity type exist in the managed object context? Apple's sample code gives this example for finding managed objects. NSManagedObjectContext *moc = [self managedObjectContext]; NSEntityDescription *entityDescription = [NSEntityDescripti

Re: counting managed objects of a certain type

2008-07-09 Thread Daniel Child
Somehow I thought a predicate was mandatory. Simply setting the entity works. Thank you. On Jul 9, 2008, at 2:34 AM, mmalc crawford wrote: On Jul 8, 2008, at 11:16 PM, Daniel Child wrote: NSManagedObjectContext *moc = [self managedObjectContext]; NSEntityDescription *entityDescription

fetch button in IB

2008-08-28 Thread Daniel Child
Hi All, I'm learning Core Data to work out how the fetch button in IB can be set to a particular fetch request. I have set up three fetch requests with predicates for one of my entities. And when I go to IB, I see that the fetch button has a target-action connection to the NSArrayControll

singleton managed object / obtaining mo context

2008-09-09 Thread Daniel Child
Hi All, I am trying to implement a singleton class which is a subclass of NSManagedObject, but it is not behaving as expected. The librarian singleton is supposed to keep a list of the data sources, which are added periodically. I'm trying to cache the Librarian as an instance variable o

Re: singleton managed object / obtaining mo context SOLVED

2008-09-09 Thread Daniel Child
: @"Librarian" inManagedObjectContext: moc]; // moc becomes nil here !!! etc. enables me to determine how many librarians I have (once I set up such a utility). Thanks for looking. On Sep 9, 2008, at 3:11 PM, Daniel Child wrote: Hi All, I am trying to implement a singleton class which is a subc

showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child
Hi, I'm stumped. I have a button in a master window tied to a method that simply shows another window. The method is as simple as they come. - (IBAction) showMLTableListings: (id) sender { [mLTableListingsWindow makeKeyAndOrderFront: self]; } where mLTableListingsWindow is simply the

Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child
THANK YOU! That solved it for all of the windows. On Sep 25, 2008, at 4:25 PM, Kyle Sluder wrote: On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child <[EMAIL PROTECTED]> wrote: If I press the button in question once, the window dutifully comes up. If I close the window and press the bu

window controllers and managed object contexts

2008-09-26 Thread Daniel Child
To avoid cluttering up my main AppController (which had five windows), I've started placing the individual windows into separate xib files. Pre-Core Data (for a regular cocoa app), I would simply set up a window controller, establish a reference to it in the main controller (initWithWindowN

Re: showing window causes EXC_BAD_ACCESS

2008-09-26 Thread Daniel Child
I should? Then how do I get the reference back? If windowA is a window outlet in my AppController, then first time around I don't do anything. It is automatically assigned a reference when the window loads, and I can use makeKeyAndOrderFront. But if I choose to automatically release the win

Re: window controllers and managed object contexts

2008-09-27 Thread Daniel Child
Hmm, well that seems to be the catch. I can't get the bindings to work for the MOC. First off, to set up the table displayed in the window loaded with a separate nib file, I simply dragged in an "entity" object from the Librarian. That doesn't set up an MOC binding, but, following an on- lin

Re: showing window causes EXC_BAD_ACCESS

2008-09-27 Thread Daniel Child
No. But I'm still wondering. How would you set up a reference again if you chose to have the window released on close...without reloading the entire nib, which is probably counterproductive. On Sep 26, 2008, at 3:30 PM, Charles Steinman wrote: If it's accessed via an outlet in your app contr

Re: best time to alter GUIs

2008-03-03 Thread Daniel Child
On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In particular, if it calls [self window], that forces the loading (and awakening) of the NIB in order to reconstitute the window. My bad. I should have

Re: best time to alter GUIs

2008-03-07 Thread Daniel Child
On Mar 3, 2008, at 2:05 PM, Ken Thomases wrote: On Mar 3, 2008, at 11:12 AM, Daniel Child wrote: On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In particular, if it calls [self window], that

Re: Cocoa-dev Digest, Vol 5, Issue 335

2008-03-07 Thread Daniel Child
OK, thanks. But then in Cocoa you normally use alloc and init together, and that's where the problem is, I think. initWithWindowNibName seems to result in the window being shown automatically. I am instantiating the window controller, and am trying to figure out at which point I could gai

runtime error

2008-03-12 Thread Daniel Child
In the process of parsing thousands and thousands of records and placing (most of) them in a table which I want to save to disk, I get this error: LSC Data Preparation(1097,0xa000ed88) malloc: *** vm_allocate (size=1069056) failed (error code=3) LSC Data Preparation(1097,0xa000ed88) malloc:

Re: best time to alter GUIs

2008-03-12 Thread Daniel Child
On Mar 8, 2008, at 1:11 AM, Ken Thomases wrote: We can think of three stages of loading a window from a NIB and showing it: 1. Loading the NIB bundle's contents into memory 2. Unarchiving the NIB's contents and instantiating the object graph that was frozen within it 3. Showing the window

Re: runtime error

2008-03-12 Thread Daniel Child
On Mar 12, 2008, at 12:00 PM, [EMAIL PROTECTED] wrote: Some points of interest: 1. vm_allocate(size=1069056) - Is each of your 'thousands and thousands of records' this large? If so then it is no wonder that you will run out of address space after a couple of thousand (on 32-bit) No. I build

Re: Cocoa-dev Digest, Vol 5, Issue 393

2008-03-12 Thread Daniel Child
Each record is allocated and explicitly released at the end of the loop after adding it to the table. I thought autorelease might wait too long to get rid of it, so I do it explicitly. As for Instruments, unfortunately I'm doing this on Tiger. On Mar 12, 2008, at 12:00 PM, [EMAIL PROTECTED]

Re: runtime error

2008-03-12 Thread Daniel Child
f code the various blocks refer to. (Sorry if that is a newbie question. Performance tools are totally new territory for me.) On Mar 12, 2008, at 1:47 PM, John Stiles wrote: Daniel Child wrote: Each record is allocated and explicitly released at the end of the loop after adding it to the table.

Re: runtime error (-> ObjectAlloc)

2008-03-13 Thread Daniel Child
An autorelease pool got me through the parsing operation without issue. Thanks for your input. In ObjectAlloc, is there a way to figure out what exactly how each "General Block" matches up with objects in code? I can make rough guesses based on the data types and their behavior, but can the

sorting large tables

2008-03-13 Thread Daniel Child
Hi, I am using sortArrayUsingFunction: context: to sort a fairly large table (100k recs). Judging from the readout of comparisons being made the sort appears to be about 80% done when everything comes to a halt. No message, no nothing. It just stops. The exact same function works if the t

Re: sorting large tables

2008-03-13 Thread Daniel Child
That makes a lot of sense to me, and that's the situation I'm trying to get to. But right now all I have is the original (unsorted) raw data. So I need to load it into memory and sort it. Since the sorting operation hangs some kazillion compare:s into the process, I can't exactly trace my w

Re: sorting large tables

2008-03-13 Thread Daniel Child
On Mar 13, 2008, at 6:24 PM, Jens Alfke wrote: You don't necessarily need to sort all of it at once. You just need to find the first few items, to display in your table view. If the user scrolls past those, you need to find more. You can do this by streaming the data from a file, keeping on

Re: sorting large tables

2008-03-14 Thread Daniel Child
Great suggestion. Thanks. On Mar 13, 2008, at 5:00 PM, Ben Trumbull wrote: One nice thing about sorting, is that this is easy to do: merge sort. You can break up the problem as much as you want, and use any handy sort function, and then merge the pieces together. Algorithms for merging are

Re: sorting large tables

2008-03-14 Thread Daniel Child
Actually, since I've parsed the data successfully, I suppose I could store it and reopen in Core Data. Since I am new to Cocoa and have a limited programming background, I thought I should keep things basic,. Will give it a try as well (once I've tried the merge sort). But since I will have

remote debugging between ppc & intel

2008-03-31 Thread Daniel Child
I have a project that is going to require remote debugging, and I am wondering if there are any restrictions on remote debugging between a PowerPC Mac and one of the newer Intel machines. Apple's documentation makes no mention of this other than for the case of panic kernels. Can one comp

duplicate symbol error

2008-04-02 Thread Daniel Child
I had an application that built fine on Tiger using Xcode 2.4.1. When I try building on Leopard, I get a duplicate symbol error as follows: ld: duplicate symbol _evLanguageAsString in /Users/.../build/.../Debug/LSC Data Preparation.build/Objects-normal/ ppc/DataDescription.o and /Users/.../bu

Re: Cocoa-dev Digest, Vol 5, Issue 533

2008-04-03 Thread Daniel Child
evLanguageAsString is a function defined in a file called DataTypes.h. Both DataDescription.h and Step1_SourceTypeController.h import DataTypes.h. I thought #import would take care of the possibility of duplication. Are you suggesting I need to separate the declaration of the function fro

Re: duplicate symbol error

2008-04-03 Thread Daniel Child
Thanks. Separating the header and implementation solved the linking error, and that should hopefully cure me of the sloppy habit of stuffing functions into a header. I'm not sure the differences between reported errors in Xcode 3 and 2.4 are not worth tracking down, because they are conside

app "do not enter" sign?

2008-04-28 Thread Daniel Child
I am building a sample input method and the build succeeds, but the icon on the executable has a weird circle with bar (like a European do not enter sign) over it. When I try copying it into Library/Input Methods it indeed behaves very slowly...practically useless. I can't figure out what t

Re: app "do not enter" sign?

2008-04-28 Thread Daniel Child
remote debugging, but that should be OK as far as I know. On Apr 28, 2008, at 4:12 PM, Ricky Sharp wrote: On Apr 28, 2008, at 2:57 PM, Daniel Child wrote: I am building a sample input method and the build succeeds, but the icon on the executable has a weird circle with bar (like a European do

Re: app "do not enter" sign?

2008-04-28 Thread Daniel Child
If input methods were not allowed, that would mean no one could type Chinese, Japanese, Korean. I find that hard to believe. The post seems to be about Input Managers, not input methods. On Apr 28, 2008, at 4:52 PM, [EMAIL PROTECTED] wrote: Also, if this is under Leopard, aren't input manag

app depends on itself (???)

2008-04-28 Thread Daniel Child
Trying to fix the previous problem of an illegitimate app, I switched to a build configuration of Xcode 3.0 and SDK 10.5 and got the following message: File /../.../.../...xxx.app depends on itself. This target might include its own product. Googling this hasn't helped. Is this a bug? Th

Re: app depends on itself (???)

2008-04-28 Thread Daniel Child
Thanks! That took care of it. On Apr 28, 2008, at 11:20 PM, Luke Pike wrote: That error usually means the application is included as part of the target. To fix this, just find the application in the Xcode project and uncheck the target checkbox. Luke On Apr 28, 2008, at 11:10 PM, Daniel

Re: app "do not enter" sign?

2008-04-28 Thread Daniel Child
It turns out that the exact same configuration WILL build a release version but NOT a debug version. How is that even possible? On Apr 28, 2008, at 4:12 PM, Ricky Sharp wrote: On Apr 28, 2008, at 2:57 PM, Daniel Child wrote: I am building a sample input method and the build succeeds, but

trouble debugging input method remotely

2008-05-01 Thread Daniel Child
I am trying to set up remote debugging for input methods using Xcode. For starters, I'm trying to use Apple's sample, but am having a number of issues. One is that I am not sure where/how to set up the shared build location in the case of an input method. To run an input method, you need

Re: trouble debugging input method remotely

2008-05-01 Thread Daniel Child
know keyboard input is intended for Xcode or the client application (like TextEdit, which "hosts" the test). On May 1, 2008, at 1:42 PM, j o a r wrote: On May 1, 2008, at 10:39 AM, Daniel Child wrote: Input methods run in the background and need to be debugged remotely W

Re: trouble debugging input method remotely

2008-05-01 Thread Daniel Child
MOTE is a PPC Since this was Apple's sample, I'm leaving the SDK/target as is since presumably those are the settings they used??? On May 1, 2008, at 1:42 PM, j o a r wrote: On May 1, 2008, at 10:39 AM, Daniel Child wrote: Input methods run in the background and need to

handling data relations in Core Data

2009-02-15 Thread Daniel Child
Hi All, I'm working out some tests one one-to-many and many-to-many relations between entities. So far things are working well, including the bindings. But I'm puzzled by the documentation. http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/CoreData/Articles/cdRelationships.html#/ /

IMKit window not reappearing

2009-02-24 Thread Daniel Child
I have a background app (an input method) that has a window associated with MainMenu.nib. The first time the app launches when I select it from the input methods list, the window launches. But if I close the window, it seems there is no way to get it back. My current settings in IB are: -

-[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Daniel Child
Hi All, I am trying to add an object in a to-many relationship and get this error: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance The object I'm adding was obtained by using NSManagedObject *theWord = [wordList selection] This yields a proxy object instead of

Re: -[_NSControllerObjectProxy entity]: unrecognized selector sent to instance

2009-02-25 Thread Daniel Child
of the corresponding view was missing the model key. A million thanks for pointing this out. On Feb 25, 2009, at 3:05 PM, Kyle Sluder wrote: On Wed, Feb 25, 2009 at 2:43 PM, Daniel Child wrote: The object I'm adding was obtained by using NSManagedObject *theWord = [wordList selection]

Can't use in/contains operator with collection FIRST

2009-03-02 Thread Daniel Child
I have a basic parent entity with two child entities. I set up a nib file using the default "entity" interface for all three. I can add and remove data fine, but for some reason, the search fields that are automatically provided do not work, and in fact cause the following error message:

Core Data: Copying and pasting chained entities (Renaud C?roce)

2008-10-01 Thread Daniel Child
I'm not sure if I understand your question, but if FillStyle and FillColor are entities, why not simply create corresponding managed objects and set their values, making sure that all of the relations (between color and style, and between style and figure) are established. They will then be

expanding core data model sheet

2008-10-06 Thread Daniel Child
Hi All, This strikes me as something that should be absurdly easy to do, but I can't seem to find any examples with more than two or three entities, and so no one mentions it, and I don't see it in the documentation. How do you expand the Core Data model sheet??? (The part where entities

objc_exception_throw prior to launching nib file

2009-04-22 Thread Daniel Child
Hi All, I have a Core Data app that I am trying to debug. If I simply run it, the main window loads fine. If I try to run in debug mode, an exception is thrown before even loading the main nib. This problem seems to have started when I tried to put manual breakpoints in the code. Now, just

Re: objc_exception_throw prior to launching nib file

2009-04-22 Thread Daniel Child
It says Running… (gdb) po $rdi Value can't be converted to integer. (gdb) On Apr 22, 2009, at 2:56 PM, Nick Zitzmann wrote: On Apr 22, 2009, at 12:36 PM, Daniel Child wrote: Since none of the methods below are things I have written, I'm not sure where to go from here. Ho

Re: objc_exception_throw prior to launching nib file

2009-04-22 Thread Daniel Child
Nick Zitzmann wrote: On Apr 22, 2009, at 1:28 PM, Daniel Child wrote: It says Running… (gdb) po $rdi Value can't be converted to integer. (gdb) Are you sure your program is running as Intel 64? The $rdi register is only available to X86-64 applications. In 32-bit Intel apps, ar

Re: objc_exception_throw prior to launching nib file

2009-04-22 Thread Daniel Child
You're right. (gdb) po $rdi Value can't be converted to integer. (gdb) po *(int *)($ebp+8) Cannot access memory at address 0x1 (gdb) On Apr 22, 2009, at 4:16 PM, Nick Zitzmann wrote: On Apr 22, 2009, at 2:13 PM, Daniel Child wrote: Well, I think so. I thought all Core2 Duos

Re: objc_exception_throw prior to launching nib file

2009-04-22 Thread Daniel Child
n Apr 22, 2009, at 2:20 PM, Daniel Child wrote: (gdb) po *(int *)($ebp+8) Cannot access memory at address 0x1 (gdb) Something's still not right here. On Intel 32, $ebp+8 points to the first argument in a function call, which would be the NSException object passed into objc_exception_th

passing complex objects between threads

2009-04-24 Thread Daniel Child
I have a Core Data app that imports data via a separate managed object contexts. Without multithreading, the operation works fine. But since the import takes over a minute, I want to do the import in a different thread. The data consists of an archived table of data with records. This is my

errors building framework

2009-04-27 Thread Daniel Child
I am trying to create a framework out of some files that I use in a few apps. I expected this to be easy, but instead got a kazillion warnings, all of which take the form: objc_class_name_ referenced from in .o [MANY METHODS AND FILES LISTED] or objc_msgSend referenced from in .o or NSL

Re: passing complex objects between threads

2009-04-28 Thread Daniel Child
Thanks for the sugestion. I will keep the idea of passing object IDs in mind when that situation comes up. But I think I misled you. My data was not in Core Data yet, but rather in an archive I needed to unfreeze and place in Core Data. In the end, I did something similar to what you sugge

Re: Cocoa-dev Digest, Vol 6, Issue 641

2009-04-28 Thread Daniel Child
I remember having this problem while developing Core Data apps for testing purposes. It often happened while I modified the app in various ways. I think the solution was to delete the store in ApplicationSupport/ . If you have legacy data, you'll have to export that from an old version and

Re: errors building framework

2009-04-28 Thread Daniel Child
That was it. Thanks. On Apr 28, 2009, at 1:07 AM, cocoa-dev-requ...@lists.apple.com wrote: I am trying to create a framework out of some files that I use in a few apps. I expected this to be easy, but instead got a kazillion warnings, all of which take the form: objc_class_name_ referenced

catching whitespace with scanner

2009-05-06 Thread Daniel Child
I'm trying to catch whitespace between words with a scanner. For some reason, the white space is not being recognized. Am I missing something obvious or is there a bug here? Thanks. { NSMutableArray *separateWords; NSScanner *scanner; NSCharacterSet *spaceCharSet;

Re: catching whitespace with scanner

2009-05-06 Thread Daniel Child
A whole while loop reduced to one line. Very cool. Thanks also for the tip on setCharactersToBeSkipped:nil. That was driving me nuts. On May 7, 2009, at 1:13 AM, Graham Cox wrote: On 07/05/2009, at 3:05 PM, Daniel Child wrote: I'm trying to catch whitespace between words with a scanner

quirky default button coloring

2008-02-21 Thread Daniel Child
From what I read, the default (button in a view is outlined/shaded in blue and is set as the button which responds to RETURN. I have a serious of buttons (step 1, step 2, etc.), and I want the appropriate button to be highlighted as the default when it is turn to do that step. I used this c

Re: quirky default button coloring

2008-02-21 Thread Daniel Child
You were absolutely right. Thanks. A shame that push button is the only one that provides this colored behavior for default. I could see it being useful. On Feb 21, 2008, at 3:29 PM, Ken Ferry wrote: I think you're confusing the focus ring with the default button.

Re: quirky default button coloring

2008-02-21 Thread Daniel Child
You're right it turned out to be a focus issue. I was looking into FirstResponder (before posting the question but it didn't seem right), but as Ken Ferry pointed out, the issue was actually on my computer: a preference setting where focus moves to all objects, not just text fields. Plus th

programmatically placing GUIs

2008-02-27 Thread Daniel Child
I am trying to place and size segmented controls programmatically on a window controlled by a subclass of NSWindowController. What I'm getting, however, is simply the window as it was initially drawn in IB. I think the problem has to do with loading the window properly and more specifically

best time to alter GUIs

2008-02-28 Thread Daniel Child
I am trying to understand the interrelationship between various method calls made once a window controller is instantiated. I am loading a window controller from within a master controller. Data passed from the master controller to the window controller is used to programmatically alter the

Re: Cocoa-dev Digest, Vol 5, Issue 321

2008-02-29 Thread Daniel Child
Visible at launch is not checked. But are you suggesting that you cannot configure the window prior to displaying it? Or do you distinguish "load" from "display"? I'm trying to load it into memory, alter it, and then display. Judging from debug sessions, the window and other top level objec