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
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
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
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 objects
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
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]
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. I thought
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Why? Do you have
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 be debugged
remotely
Why? Do you have
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
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,
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
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 or how
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] [NSApplication
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
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
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
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
You could also establish the bindings through File's
Owner.delegate.whatever key path. 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
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 =
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
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
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
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 subclass of
NSManagedObject
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
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 button a second
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
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
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-
line
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
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
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
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#/
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:
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 instance
The object I'm adding was obtained by using
NSManagedObject *theWord = [wordList selection]
This yields a proxy
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 wch...@hawaii.edu
wrote:
The object I'm adding was obtained by using
NSManagedObject *theWord
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:
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
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. How can I go
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,
arguments
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 run 64-bit
: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_throw().
Are you sure you
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_NAME referenced from
some method in some file.o
[MANY METHODS AND FILES LISTED]
or
objc_msgSendmsg
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
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/
app name. If you have legacy data, you'll have to export that from
an old
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_NAME
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;
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
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
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:
-
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
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
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
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 loading a window controller subclass
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
:
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 completely different things.
The blue cube
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
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
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
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
= [NSString stringWithFormat: @%C, value];
NSLog(@strC is %...@\n, strC);
} else {
NSLog( @Hex reading failed. );
}
Seems like a lot of code for a simple conversion.
On Aug 11, 2009, at 11:12 AM, Alastair Houghton wrote:
On 11 Aug 2009, at 15:40, Daniel Child wrote:
Unihan.txt
74 matches
Mail list logo