On Mon, Dec 29, 2008 at 9:15 PM, Scott Anguish sc...@cocoadoc.com wrote:
Does anyone have any examples of using the Scripting Bridge with iTunes?
Specifically how you get the currently selected tracks returned as an array
of iTunesTrack items.
Should be something like:
iTunesApplication
- Original Message
From: John Michael Zorko jmzo...@mac.com
To: cocoa-dev@lists.apple.com
Sent: Monday, December 15, 2008 2:54:46 PM
Subject: proper way to release a static NSMutableDictionary?
Hello, all ...
Imagine this:
static NSMutableDictionary *lookup =
It works for me. How is the string for path getting created?
Cheers,
Chuck
- Original Message
From: David Blanton [EMAIL PROTECTED]
To: Cocoa-dev List cocoa-dev@lists.apple.com
Sent: Tuesday, December 9, 2008 10:32:19 AM
Subject: Quote in path name
The following returns a nil
Can you not recreate the bug in testing or identify the code where the possibly
faulty path variable is created?
Cheers,
Chuck
- Original Message
From: David Blanton [EMAIL PROTECTED]
To: Charles Steinman [EMAIL PROTECTED]
Sent: Tuesday, December 9, 2008 11:50:26 AM
Subject: Re
- Original Message
From: [EMAIL PROTECTED] [EMAIL PROTECTED]
To: cocoa-dev@lists.apple.com
Sent: Monday, December 8, 2008 9:15:45 AM
Subject: NSDictionary mutability test
There are a number of posts detailing with the ethics of the issue of
determining an object's mutability.
- Original Message
From: Adam Leonard [EMAIL PROTECTED]
To: I. Savant [EMAIL PROTECTED]; cocoa-dev@lists.apple.com
Sent: Monday, December 8, 2008 2:15:47 PM
Subject: Re: NSDictionary mutability test
The only thing you could consider broken is if the method promises
an
- Original Message
From: Filip van der Meeren [EMAIL PROTECTED]
To: Cocoa-dev@lists.apple.com
Sent: Monday, December 8, 2008 2:21:18 PM
Subject: NSTask
I am trying to retrieve all paths that perl uses to retrieve modules.
I found the command: perl -v. I know how to parse this, but
- Original Message
From: Ken Tozier [EMAIL PROTECTED]
To: Cocoa Developers cocoa-dev@lists.apple.com
Sent: Saturday, December 6, 2008 1:07:00 PM
Subject: Cleanup inside a failed init method
Hi
I'm writing my own socket class using a bunch of BSD functions and am a
little
- Original Message
From: Jens Bauer [EMAIL PROTECTED]
Subject: Re: Cleanup inside a failed init method
On Dec 6, 2008, at 22:36, Charles Steinman wrote:
The system will only call dealloc if the object is released. Happily, the
object should be released anyway if you plan
--- On Sat, 11/29/08, Pierce Freeman [EMAIL PROTECTED] wrote:
For whatever reason, Xcode is telling me that error:
void value not ignored
as it ought to be when I try to make
badApplicationsSet a mutable set.
Take a look at the documentation for -[NSMutableSet minusSet:]. Specifically,
--- On Fri, 11/28/08, Pierce Freeman [EMAIL PROTECTED] wrote:
I am wondering the correct/recommended technique to make a
NSMutableArray
out of a NSArray. I see online that there are ways to do
this, but am not
sure what is the best way.
I'm not sure why you'd do it any other way than
Have you fixed the [mounts initWithContentsOfFile:...] bug and it still happens?
Cheers,
Chuck
- Original Message
From: Sandro Noel [EMAIL PROTECTED]
To: Scott Ribe [EMAIL PROTECTED]
Cc: cocoa-dev@lists.apple.com
Sent: Sunday, November 16, 2008 9:16:15 PM
Subject: Re: Two arrays
Are you certain that faxMsgData is valid PDF data? It sounds like it isn't
being recognized as a PDF.
Cheers,
Chuck
--- On Fri, 11/14/08, Lee, Frederick (Ric) [EMAIL PROTECTED] wrote:
From: Lee, Frederick (Ric) [EMAIL PROTECTED]
Subject: Unable to generate a PDF from textual data
To:
If you look at the QTKit documentation, it will tell you what's been available
since when. Some things have been there since 10.3, while others were added in
10.5. However, I would not recommend distributing Apple's (or anyone else's)
software with your app unless you have their permission.
That's because you're getting an object pointer back, and any object pointer
except for nil evaluates to true. Assuming you know it will only be one object
inserted at a time, you'd want to do [[change
objectForKey:NSKeyValueChangeNewKey] boolValue].
Cheers,
Chuck
- Original Message
Vine Server is open-source (GPL).
http://sourceforge.net/projects/osxvnc/
Cheers,
Chuck
- Original Message
From: David [EMAIL PROTECTED]
To: Cocoa-Dev Mail cocoa-dev@lists.apple.com
Sent: Monday, November 10, 2008 11:49:58 AM
Subject: How to write a remote control app for Mac
Google is your friend:
http://www.google.com/search?client=safarirls=enq=nsstring+wstringie=UTF-8oe=UTF-8
Cheers,
Chuck
- Original Message
From: Arun [EMAIL PROTECTED]
To: cocoa-dev@lists.apple.com
Sent: Thursday, November 6, 2008 9:34:52 AM
Subject: How to convert NSString to
--- On Thu, 11/6/08, Development [EMAIL PROTECTED] wrote:
I have been using masks and images as way to handle
selection areas in a drawing program. It works fine for
fills and other operations, but the dotted outline of a
CGPath looks better as a selection.
Andy Finnell wrote a couple of
This sounds like it might be a good case for a proxy. You could create a small
class that looks something like this:
@implementation MyClass
@synthesize targetWindow;
- (void)forwardInvocation:(NSInvocation *)invocation {
[invocation performSelectorOnMainThread:@selector(invokeWithTarget:)
--- On Mon, 11/3/08, Gordon Apple [EMAIL PROTECTED] wrote:
Is there a basic assumption that such factory methods
are implicitly
redefined for all subclasses?
It's not implicitly redefined -- just inherited. One of the advantages of
Objective-C's dynamic nature is that [[[self class]
- Original Message
From: Albert Jordan [EMAIL PROTECTED]
What is the recommended way for Object B to inform Object A that it is
done processing a request for the following scenario?
Object A has a list of phone numbers to send SMS messages
Object B implements sending an SMS
--- On Tue, 10/28/08, Colin Cornaby [EMAIL PROTECTED] wrote:
I'm writing an API to communicate with a web service,
and I was just
wondering what the thinking is on exceptions vs. functions
returning
an NSError in some way. Basically I'm wondering what
people's opinions
are on a
- Original Message
From: Jerry Krinock [EMAIL PROTECTED]
Roughly, the lesson is: Don't use message forwarding for actual
work. I was just wondering if anyone had ever found otherwise.
I don't think that's really fair. The lesson is not to use NSInvocation in
extremely tight
- Original Message
From: DKJ [EMAIL PROTECTED]
When I did this:
myLayer.frame.size.width = rootLayer.frame.size.width;
I got an illegal lvalue error. But when I do this:
CGRect r = help.frame;
r.size.width = rootLayer.frame.size.width;
the compiler says
--- On Sun, 10/26/08, DKJ [EMAIL PROTECTED] wrote:
If I do this in MyCALayer's dealloc:
self.foregroundColor = nil;
do I need to do this in init:
CGColorRef temp = CGColorCreateGenericRGB( etc. );
self.foregroundColor = temp;
CFRelease( temp );
or can
--- On Sun, 10/26/08, DKJ [EMAIL PROTECTED] wrote:
On 26 Oct, 2008, at 12:09, Clark S. Cox III wrote:
You must do both, otherwise you will leak.
I understand why I have to release the temp object, but why
does it
leak if I don't set foregroundColor to nil as well?
Because otherwise
--- On Thu, 10/23/08, Bill Janssen [EMAIL PROTECTED] wrote:
Hi. I'm trying to write a simple Cocoa program to
enumerate the
windows on the screen, across all the apps. I can see how
to use
NSWorkspace.launchedApplications() to enumerate the apps,
but I don't
see how to go from those
--- On Thu, 10/23/08, Bill Janssen [EMAIL PROTECTED] wrote:
Charles Steinman [EMAIL PROTECTED] wrote:
You can't get NSApplication instances for other
applications.
Even as root?
It has nothing to do with user permissions. There is no API for getting
NSApplication instances
--- On Wed, 10/22/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Newbie question, Is it possible to have an object property
that
increments everytime an object is instantiated?
Simplest solution: Just increment a static int and insert that into your
string. Fancy it up as appropriate to
--- On Tue, 10/21/08, Markus Amalthea Magnuson [EMAIL PROTECTED] wrote:
This half transparent red color covers the desktop, but not
the
desktop icons. So far, so good. The problem however, is
that my window
intercepts all mouse clicks, even if I click on an icon.
Does [window
--- On Tue, 10/21/08, Eric Gorr [EMAIL PROTECTED] wrote:
Is it possible to determine the size of the resize box on a
window?
I'd think it can be safely expressed as NSMakeSize([NSScroller scrollerWidth],
[NSScroller scrollerWidth]).
Cheers,
Chuck
--- On Fri, 10/17/08, Ignacio Enriquez [EMAIL PROTECTED] wrote:
Regarding former responses...
aObject.property is like using getter and
setter methods (depending
on the situation)
and just property is going directly to the
property ...
Did I get it right? if so, why using setter methods
--- On Fri, 10/17/08, Russ [EMAIL PROTECTED] wrote:
My app is drawing acceptably (for now) the first time, but
the screen isn't updating after anything happens. I am
calling setNeedsDisplay:YES on the affected NSViews and
their drawRect routines are getting called, but it seems the
results
--- On Thu, 10/16/08, Ignacio Enriquez [EMAIL PROTECTED] wrote:
@interface Lesson : NSObject {
NSString *lessonTitle;
NSDate *referDate;
NSNumber *lessonDuration;
}
@property (nonatomic, retain) NSString* lessonTitle;
@property (nonatomic, retain) NSDate *referDate;
@property (assign)
--- On Wed, 10/15/08, James Trankelson [EMAIL PROTECTED] wrote:
So, I've got the following method:
+ (void)done:(MyObj*)dObj structure:(void*)pStruct
... and when I call it with a structure
parameter, say a malloc'ed
char* at address 0x171eb070, as soon as I step into this
method, the
--- On Sat, 10/11/08, Ulf Dunkel [EMAIL PROTECTED] wrote:
I would like to show tool tips for an image which is used in
a text
ruler representation, like shown here:
http://man.icalamus.net/en/img/doc/sample_frame_convertedToText.gif
NSViews handle tooltips. See the documentation for info
--- On Wed, 10/8/08, Lee, Frederick [EMAIL PROTECTED] wrote:
Your answer got me thinking about Synthesized versus
Explicit Instance
Variables.
I've been using Synthesized-Explicit Instance
Variables.
That is, explicitly declaring iVars AND per ObjC_2, using
@property/@synthesize
--- On Wed, 10/1/08, Christopher J Kemsley [EMAIL PROTECTED] wrote:
I was not aware that I shouldn't explicitly call a
dealloc... Why not?
That isn't how memory management in Cocoa works. From TFM entry on dealloc:
You never send a dealloc message directly. Instead, an object’s dealloc
--- On Sun, 9/21/08, Eric Lee [EMAIL PROTECTED] 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
--- On Fri, 9/19/08, development2 [EMAIL PROTECTED] wrote:
// in here we need to gets the info out of the
dictioanary and into
the object
Why would you bother including your entire header file and boilerplate code and
then edit out the part where the error occurs?
--- On Fri, 9/12/08, Markus Spoettl [EMAIL PROTECTED] wrote:
I have observed the following in my application:
When the document is closed while the application keeps
running, my
document, window controller and dependent windows get
deallocated as
expected.
However, when the
--- On Fri, 9/12/08, John MacMullin [EMAIL PROTECTED] wrote:
Does the standard Windows menu manage and show all
application
windows? If so, under what conditions do windows not get
listed in
the pull down?
From the horse's mouth:
--- On Wed, 9/10/08, J. Todd Slack [EMAIL PROTECTED] wrote:
So if I have an objective C class, how can I call a .c
class? and pass
my arguments from the objective-c class?
C doesn't have classes. That's almost the entire difference between it and
Objective-C. Have you called NSLog?
--- On Wed, 9/10/08, James Walker [EMAIL PROTECTED] wrote:
I have a static text item whose value is bound to an
NSUserDefaultsController. It correctly shows the value
stored as a
default. However, if I programmatically change the text
(with
-[NSControl setStringValue:]), the new value
--- On Mon, 9/8/08, sheen mac [EMAIL PROTECTED] wrote:
In my app, I have 4 Nib files.In the MainMenu.nib have
password
asking window and menus. After the password check I loaded
another
Nib. This Nib has no menu. The MainMenu's menu still in
menu bar.
But the shortcut keys not working
--- On Thu, 9/4/08, steph thirion [EMAIL PROTECTED] wrote:
I'm working on a class that will manage transitions of
properties.
It's for a game on a slower device, so I need the less
costly solution.
I can understand your performance constraints, but have you actually profiled
your game and
--- On Sat, 8/23/08, Andrew Zahra [EMAIL PROTECTED] wrote:
I am trying to add a log window to an otherwise single
window application
and have come across a couple of basic window management
issues.
Firstly, if the log window is closed by clicking the close
button and then I
subsequently
--- On Wed, 8/20/08, Eliza Block [EMAIL PROTECTED] wrote:
In short, I want to do something like this:
Class stringClass = [NSString class];
id myNewString = [[stringClass alloc] init];
But that doesn't work.
Yes it does. I mean, it creates a static empty string and thus isn't all that
--- On Tue, 8/19/08, Sumner Trammell [EMAIL PROTECTED] wrote:
Unless I'm being completely stupid about this, he could
have done this, right?
[[[self windowControllers] objectAtIndex:0]
setShouldCascadeWindows:NO];
Or better yet, this?
[aController setShouldCascadeWindows:NO];
--- On Tue, 8/19/08, Charlie Dickman [EMAIL PROTECTED] wrote:
Now, how do I define things like 'self' and
'super' to a C program?
You mean outside of an object? You don't. What would it even mean? There's no
concept of selfness in a function. If you want there to be a self, you should
create
--- On Mon, 8/18/08, Nicolas Goles [EMAIL PROTECTED] wrote:
NSDictionary *fileAttributes = [manager
fileAttributesAtPath:fullPath traverseLink:NO];
if( fileAttributes != nil)
{
NSString *filetype = [fileAttributes
--- On Fri, 8/15/08, dct [EMAIL PROTECTED] 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
--- On Mon, 8/11/08, Todd Heberlein [EMAIL PROTECTED] wrote:
Well, you don't need the self prefix, but
you may want to look at
using setters and getters. It would
look like this
@interface MyThingy : NSObject {
...
NSString* myString;
...
};
...
@property
--- On Mon, 8/11/08, Scott Ribe [EMAIL PROTECTED] wrote:
Using dot-syntax calls getters and setters. You would
get exactly the same
behavior by calling self.myString = anotherString.
That assumes Objective-C 2.
The code in question was using properties with synthesized accessors.
--- On Thu, 8/7/08, Matt Keyes [EMAIL PROTECTED] wrote:
-(void)foo {
SomeClass *cls = [[SomeClass alloc] init];
[cls DoTheStringThing:@Here's a fun
string.];
//HERE IS THE QUESTION:
//This causes a halt in the debugging and will
sometimes give a _BAD_ADDRESS or
--- On Tue, 8/5/08, James Bucanek [EMAIL PROTECTED] wrote:
In your original code, you had
SEL closeSelector = @selector(close);
if ([SuperSocket
instancesRespondToSelector:closeSelector]) {
...
This does not, as I think you believe, test to see if an
object
of the
--- On Sat, 8/2/08, Matt R [EMAIL PROTECTED] wrote:
I have read through Apple's drawing optimization guide
and have been
searching for a way of speeding these operations up, they
are unacceptably
slow. I have several 72dpi PNG image files (about 1024x768
each) which I
need to draw
--- On Thu, 7/31/08, James Maxwell [EMAIL PROTECTED] wrote:
From: James Maxwell [EMAIL PROTECTED]
Subject: inspecting undo
To: Cocoa Dev cocoa-dev@lists.apple.com
Date: Thursday, July 31, 2008, 9:52 AM
I'm trying to figure out why a particular undo isn't
working and I'm
wondering whether
--- On Tue, 7/29/08, John Joyce [EMAIL PROTECTED] wrote:
Does anybody have a means or a tool for checking for
hackintoshes?
I really don't approve of such things and would like to
leave clever
messages on my own software if it is run on a hackintosh.
I really don't think that's a good
--- On Tue, 7/29/08, Torsten Curdt [EMAIL PROTECTED] wrote:
But wait ...this works OK for methods. But what about adding
ivars?
@interface MyClass (Private)
{
int myvar;
}
- (int) myvar;
@end
This gives a syntax error. Looking through some docs it
seems I cannot
--- On Tue, 7/29/08, Torsten Curdt [EMAIL PROTECTED] wrote:
Class A has method
- (void) something:(Someclass*)s;
Class B has method
- (BOOL) something:(Someclass*)s;
Why on earth am I getting a warning
warning: multiple methods named '-something:'
found
using...
also
--- On Mon, 7/28/08, Carter R. Harrison [EMAIL PROTECTED] wrote:
Actually now that I'm looking at this more closely,
NSDictionary is
expecting an NSString for the key when inserting a value.
Your
example uses an NSValue for the key - the compiler is
throwing a
warning for this one..
--- On Sun, 7/27/08, Randy [EMAIL PROTECTED] wrote:
@catch (NSRangeException *nSRE)
NSRangeException is declared as an NSString constant, not a class. What you
want to do is catch an NSException and check if [[exception name]
isEqualToString:NSRangeException].
Cheers,
Chuck
--- On Sun, 7/27/08, Daniel Richman [EMAIL PROTECTED] wrote:
I have a simple question: what is the best way to quit
another
application? The app's name and exact path are known. I
looked at
NSWorkspace but couldn't find anything useful.
AppleEvents/AppleScript would be the ticket.
This would be more appropriate for CoreText-Dev. It doesn't really have
anything to do with Cocoa, and that's where most of the CoreText-savvy folks
would be looking.
http://lists.apple.com/mailman/listinfo/coretext-dev
Cheers,
Chuck
--- On Tue, 7/8/08, Iain Delaney [EMAIL PROTECTED] wrote:
--- On Sat, 7/5/08, Jim Crafton [EMAIL PROTECTED] wrote:
Is it possible to use NSWorkspace to open a file and pass in
command line arguments?
I assume you mean you want to run a program with arguments. If you're trying to
run a command-line program, it would be better to use NSTask rather
--- On Mon, 6/30/08, Micha Fuhrmann [EMAIL PROTECTED] wrote:
I'm trying to registerForDraggedTypes a NSMatrix
subclass that's used
in a NSBrowser. When I override init or initWithFrame in my
Matrix
class in manner to include registerForDraggedTypes none of
the two
methods get called.
This is in fact a Cocoa vulnerability, so it seems relevant to this list. All
Cocoa applications automagically come with rudimentary AppleScript support
(including do shell script), so any Cocoa app that runs with suid is a
security risk unless you short circuit the Foundation scripting
--- On Thu, 6/19/08, Trygve Inda [EMAIL PROTECTED] wrote:
From: Trygve Inda [EMAIL PROTECTED]
Subject: NSData text representation
To: Cocoa-Dev List cocoa-dev@lists.apple.com
Date: Thursday, June 19, 2008, 11:50 AM
In my plist (xml1 format) I see something like:
data
+/YgByAMQo78MBADoA
--- Daniel Child [EMAIL PROTECTED] wrote:
2008-06-05 14:06:20.015 Table Practice[670:10b] An
uncaught exception
was raised
2008-06-05 14:06:20.016 Table Practice[670:10b]
[AppController
0x13aca0 valueForUndefinedKey:]: this class is not
key value coding-
compliant for the key
--- Memo Akten [EMAIL PROTECTED] wrote:
Is it possible to somehow just launch the quicklook
window for a
quicktime file?
The publicly available way to activate Quick Look is
to call the qlmanage command line tool. Why they
didn't make the QuickLookUI framework public is beyond
me (I spent
--- Norio [EMAIL PROTECTED] wrote:
Suppose that you have these 9
strings:0001,0002,0003,001,002,003,01,02,03.
I'd like to sort them as
0001,001,01,0002,002,02,0003,003,03 as Finder.
If you use one of the compare methods that allows you
to supply options, NSNumericSearch will do what you
--- Tim Conkling [EMAIL PROTECTED] wrote:
If a user clicks and holds on the title bar of a
window while
switching spaces in Leopard, the window will be
carried to the
switched-to space.
Is there any way to duplicate this functionality? (I
have a custom
window dragging loop, and my
73 matches
Mail list logo