I managed to think myself into a corner with KVC/KVO, I was wondering
if you can automatically observe across a to-many relationship, I
can't see how you could, but cocoa often surprises me.
Simple example would be .. I have a instance, race, of a Race object
which has an array property
Hello,
Does anyone know or has good example code showing how to create a
NSOutlineView, create a datasource and information to the datasource and
display the final result.
I am trying to dispaly a NSDictionary in an oultlineview.
Thanks
Arun
___
Have a look at /Developer/Examples/Appkit/OutlineView
On 26-Sep-08, at 2:08 PM, Arun wrote:
Hello,
Does anyone know or has good example code showing how to create a
NSOutlineView, create a datasource and information to the datasource
and
display the final result.
I am trying to dispaly a
Hi, I am having a strange problem of my class declaration. I used to declare
some methods of a class in a category, Private. After I have done some
refactoring work (basically moving some classes into another framework), it
seems those methods declared in the category, Private do not belong to
It's working now, but I don't understand why. I've got two objects:
MyController and MyModel. The interesting parts of the headers look
like this:
@interface MyModel : NSObject
{
NSInteger myInteger;
}
@property(assign) NSInteger myInteger;
- (void)changeMyInteger;
@end
Since you can't use NSImage, you could try Core Image.
You can do all that with CGImage in your restricted environment. You can
use a bitmap or layer context and then later render it on whatever view
you wish.
There is a good Core Graphics Quartz tutorial at
I ran svnserve under launchd on 10.4 but found that using the built in
Apache2 and svn_dav mod on 10.5 MUCH easier and less finicky. If
anyone in interested in a crudely assembled document about how I did
it, you are more than welcome to visit
i have the following piece of code in my controller class:
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:
(NSTableColumn *)aTableColumn row:(int)rowIndex{
id object = nil;
if([tableView columnWithIdentifier:[aTableColumn identifier]] == 1){
Sorry in advance for a long-winded post, I need help debugging a
application crash caused by this unrecognized selector which requires
some explanation
I've deduced that he crash seems to be something timing related which
occurs only at application startup, and only under certain conditions
Hello List,
As I understand, when using NSAtomicStore, there is only a load
method to load the data. It looks like it is an all or nothing
operation.
However, if I want to load data from a server through some kind of
HTTP/XML/Whatever method and only receive a subset of data. How would
I
On 25 Sep 2008, at 9:18 am, Dan Birns wrote:
I must say, after 20 years of C malloc(), I find retain/release
mysterious. It's probably no better or worse than malloc/free, but
confusing to me. It seems to me that it has exactly the same
advantages/disadvantages, but it's just wildly
Sorry I didn't see your reply earlier due to digest mode...
I have confirmed with Wireshark that my test download file:
http://google-web-toolkit.googlecode.com/files/gwt-mac-1.5.2.tar.gz
includes and ETag.
Then I do this:
- (void)cancel
{
[download cancel];
resumeData = [download
if your sizeOfFile: method is returning an integer, then you should
convert it to NSNumber
like:
object = [NSNumber numberWithInt:[[files objectAtIndex:rowIndex]
sizeOfFile]];
hth,
Chaitanya
On 25-Sep-08, at 5:22 PM, Tilo Villwock wrote:
i have the following piece of code in my
Within MyController, I call:
notifyCenter = [NSNotificationCenter defaultCenter];
[notifyCenter addObserver:self
selector:@selector(mySelector:)
name:@StatusChanged
object:sentNotifyObject];
// We will be the
On 26 Sep 2008, at 10:14 pm, John Love wrote:
Shouldn't my call to -addObserver automatically monitor
StatusChanged rather than my having to -postNotificationName??
Well, no.
It's not magic - something needs to transmit so that there is
something to receive. All the NSNotificationCenter
PDFDocument has methods for saving PDF's � since Leopard,
annotations
are preserved as annotations.
I thought that, but if I load annotations into a PDFPage
programatically and then save that page's document the annotations are
not saved.
I load a document from disk, get it's first page
On 25.09.2008, at 01:18, Dan Birns wrote:
So what happened when I used [NSTimer
scheduledTimerWithTimeInterval... I was getting another timer. The
result was that my selector would get called maybe 10X more often
than intended. This didn't break anything, but impaired
performance. So
On Sep 26, 2008, at 8:14 AM, John Love wrote:
Shouldn't my call to -addObserver automatically monitor
StatusChanged rather than my having to -postNotificationName??
I wonder if you're confusing notifications with KVO or bindings.
Notifications have to be explicitly posted in order for
Hi,
I am writing an utility which needs to open a panel to browse files and
select one.
- (IBAction)browseClicked:(id)sender
{
NSOpenPanel *panel = [NSOpenPanel openPanel];
if ([panel runModal]) {
NSArray *filenames = [panel filenames];
NSString *filename = [filenames
Hi,
I'm trying to scan an image for existence of a given color. So I was
wondering what the most performing way is to achieve this goal.
Basically I want to find out which amount of the given color that
image has.
Furthermore, are there ways to find all regions of the image having
the
On Sep 24, 2008, at 4:32 PM, D.K. Johnston wrote:
- (IBAction)buttonClick:(id)sender;
@end
Both properties are synthesized in the implementation files. Here's
what buttonClick: does:
[self.model changeMyInteger];
This method is not KVO compliant
On Friday, September 26, 2008, at 09:04AM, Christian Klotz [EMAIL
PROTECTED] wrote:
I'm trying to scan an image for existence of a given color. So I was
wondering what the most performing way is to achieve this goal.
You probably want to look into direct-pixel access (there are some code
Hi there.
I am in a process of porting some C++ code to ObjC. How to port the code
bellow (operators). Thanks.
typedef struct encoding_tag
{
byte encodings[ 16 ];
ushort count;
encoding_tag() { count = 0; }
encoding_tag( encoding_tag encoding ) { *this = encoding; }
Objective-C does not support operator overloading. [1, 2]
If you're looking to compare equality, the convention is to implement
your own isEqual: method that returns a BOOL (YES or NO).
HTH,
Dave
[1]
http://borkwarellc.wordpress.com/2007/08/19/objective-c-is-stupid-but-i-still-like-it/
On Sep 26, 2008, at 10:04 AM, Christian Klotz wrote:
Hi,
I'm trying to scan an image for existence of a given color. So I was
wondering what the most performing way is to achieve this goal.
Take a look at the vImage Programming Guide and the associated
reference. vImage contains several
On 26 Sep 2008, at 17:03, Alex Finkel wrote:
Hi there.
I am in a process of porting some C++ code to ObjC. How to port the
code
bellow (operators). Thanks.
snip -
operator= is a normal assignment method that takes an NSArray as its
argument. Something like the following
That did the trick, thanks a lot. Seems like I need to review a few concepts
here.
-Ursprüngliche Nachricht-
Von: chaitanya pandit [mailto:[EMAIL PROTECTED]
Gesendet: Freitag, 26. September 2008 12:25
An: Tilo Villwock
Cc: cocoa-dev@lists.apple.com
Betreff: Re: objc_msgSend_ptr
if your
I can't think of a single reasonable use case for it
An app with many windows, many of which can display multiple instances at a
time--they should be released when closed.
I'd turn the question around--why do people assume that a single instance of
a window can be closed and then re-displayed,
Thanks, but can you point me in the right direction. The code bellow does
not build. Am I doing something wrong with the struct?
typedef struct dbnames {
short Handle;
short Version;
int Size;
intNumEntries;
char Name[ 32 ];
dbnames()
:Handle(-1),
I have a Core Data application, several fields of which are Int16s
which are bound to NSLevelIndicators and a NSLevelIndicatorCell. I
have some methods that calculate and set the values of these
properties in a subclass of NSManagedObject, using old-style accessor
methods.
I'm aware of
This is C++, not C. You need to be compiling this as Objective-C++,
not Objective-C. Easiest way is to change the extension of the file
from .m to .mm if you are using Xcode.
As an aside, you do not need the typedef in C++. Simply declaring
the struct (or class) is enough to declare the
On Sep 25, 2008, at 9:18 PM, Graham Cox wrote:
On 26 Sep 2008, at 10:24 am, Gerd Knops wrote:
I would like to use a key other than tab to advance to the next
text field, so that users can use a numeric keypad to enter
something like 11-22-33 and have 11, 22 and 33 end up in
different
This turned out to be pretty simple.
I just needed to send out either com.apple.UserWasRemovedNotification or
com.apple.UserWasAddedNotification and the switch screenname list gets
updated.
E.g.
// We need to send the standard OS notification so that the switch
screen name list will be
Hello Michael,
I have tried many things to get my plugin to load automatically in Interface
Builder but I still haven't made it. I tried many things before testing
something I assumed would work but I realized that even this wasn't enough.
I changed DYLD_FALLBACK_FRAMEWORK_PATH to add the
On Sep 25, 2008, at 10:37 PM, Ken Thomases wrote:
On Sep 25, 2008, at 9:18 PM, Graham Cox wrote:
On 26 Sep 2008, at 10:24 am, Gerd Knops wrote:
I would like to use a key other than tab to advance to the next
text field, so that users can use a numeric keypad to enter
something like
On Sep 25, 2008, at 4:01 AM, pan xuan wrote:
Hi, I am having a strange problem of my class declaration. I used to
declare some methods of a class in a category, Private. After I
have done some refactoring work (basically moving some classes into
another framework), it seems those methods
On Sep 25, 2008, at 6:22 AM, Steve Rossi wrote:
I've deduced that he crash seems to be something timing related
which occurs only at application startup, and only under certain
conditions (i.e. reproduce occassionlly by opening an NSOpenPanel
modal dialog before the application is fully
Is there a way to use a url request to open mail with all its fields
completed but most importantly, contain an image attachement?
thx
AC
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
On Fri, Sep 26, 2008 at 11:34 AM, Scott Ribe [EMAIL PROTECTED] wrote:
I can't think of a single reasonable use case for it
An app with many windows, many of which can display multiple instances at a
time--they should be released when closed.
Sure. By the objects that own them. Them's the
Howdy spartan,
Oh! A few little tips:
On Sep 26, 2008, at 3:11 AM, spartan g wrote:
Hi,
I am writing an utility which needs to open a panel to browse files
and
select one.
- (IBAction)browseClicked:(id)sender
{
NSOpenPanel *panel = [NSOpenPanel openPanel];
if ([panel runModal]) {
Graham Cox, Andy Lee, et. al:
This violates the spirit and purpose of notifications. Your receiver
shouldn't also be forcing the transmitter to transmit, as you are
doing here. Instead, the transmitter object should always send a
status changed message whenever its status changes. Then the
On Sep 26, 2008, at 10:03 AM, Alexander Cohen wrote:
Is there a way to use a url request to open mail with all its fields
completed but most importantly, contain an image attachement?
Not using the frameworks provided by Apple.
Your problem, in particular, is that you can't assume that
Hi Guys,
I have a custom view which is set in an NSMenuItem.
This view contains 9 rectangles which I would like to track for mouse-
over event.
I use the the very same method for calculating the size of the rects
for drawing and the for defining the tracking rects.
What I experience is that
Hello, all.
I think I found a bug in the valloc(). However, before reporting it to
Apple, I would like to ask if it is really a bug or if anyone also
noticed the problem.
So, I tried figuring out what mailing list is for, but couldn't
determined it.
Can it be here, Cocoa-dev, or others like
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
On Fri, Sep 26, 2008 at 2:33 PM, Daniel Child [EMAIL PROTECTED] wrote:
I tried this, but with Core Data, I'm getting a message that I need a
managed object context (moc). I know how to get the moc, but I can't figure
out who is calling for the moc in the first place. Something inside of the
On Sep 26, 2008, at 5:55 AM, Danny Greg wrote:
I load a document from disk, get it's first page (they are all 1
page docs), add the annotations by calling addAnnotation: and then
save out the document. Am I missing a stage?
No, that sounds right — assuming you are saving the PDF document
On Sep 26, 2008, at 11:17 AM, Mudi Dandan wrote:
Hi Guys,
I have a custom view which is set in an NSMenuItem.
This view contains 9 rectangles which I would like to track for
mouse-over event.
I use the the very same method for calculating the size of the rects
for drawing and the for
Just wanted to follow up on this so the list archive has a solution in
case anyone searches for anything similar in the future. The solution
is courtesy of Darin Adler over on webkitsdk-dev.
The solution is to override -[NSWindow sendEvent:] and if the window
is not main send the
I have a view that allows users to drag copies of the items it
contains. I'd like to add autoscrolling to the view, which will move
the drag's source item. However, I can find no way to change the drag
properties so that upon failure the image will slide back to where the
item *is* rather
On 27 Sep 2008, at 3:28 am, John Love wrote:
In almost all cases, whenever you call the -postNotificationName:
method of NSNotificationCenter, the object you pass is 'self'. If
it's any other, chances are you've done something weird.
So, short answer: your design is a bit whiffy. ;)
I
On Sep 26, 2008, at 4:36 PM, Steve Rossi wrote:
Yes, that is correct. A separate thread is spawned which updates the
model - consequently driving UI updates based on KVO notifications.
It is the only thread that is updating the model - the main thread
does very little except respond to
I'm doing an async NSURLConnection and am having issues. It's an http
connection, and at first it seems to work. The server sends an
authentication challenge (as it should), I respond with credentials,
the servers seems to accept the credentials. Then the server responds
with an HTTP
Alexander Cohen wrote:
Is there a way to use a url request to open mail with all its fields
completed but most importantly, contain an image attachement?
Nope. If you want to send an email in the background, you'll need to
look into a third-party framework option:
On Sat, Sep 27, 2008 at 4:11 AM, has [EMAIL PROTECTED] wrote:
Alexander Cohen wrote:
Is there a way to use a url request to open mail with all its fields
completed but most importantly, contain an image attachement?
Nope. If you want to send an email in the background, you'll need to look
On Sep 26, 2008, at 11:22 AM, j o a r wrote:
On Sep 25, 2008, at 6:22 AM, Steve Rossi wrote:
I've deduced that he crash seems to be something timing related
which occurs only at application startup, and only under certain
conditions (i.e. reproduce occassionlly by opening an NSOpenPanel
What about taking your objects and sorting them by value, and popping
the last object?
NSFetchPredicate *fr = /* lets say this is setEntity to your entity */;
NSManagedObjectContext *moc = /* your moc here */;
[fr setSortDescriptor: [[[NSSortDescriptor alloc] initWithKey:@value
Thanks Corbin,
I have used your tips in the updated code.
Besides, my aim is to save the filename selected through the panel to a
pList file timely whenever it is changed, so I am using synchronization of
defaults. I checked and found that there is no resetStandardUserDefaults
used anywhere in the
59 matches
Mail list logo