On 24/05/2008, at 2:20 PM, Andreas Mayer wrote:
Am 24.05.2008 um 08:07 Uhr schrieb Sebastian Nowicki:
The library requires me to call a function which allocates memory
to that global variable, and afterwards call a function which
deallocates that memory. My singleton class calls the funct
On 23 May 2008, at 23:30, [EMAIL PROTECTED] wrote:
From what I have read quickly since Sean McBride sent his comment,
UTIs are
not yet implemented to the point where I could get the UTI of
every file on
my computer.
Sure you can. Use LSCopyItemAttributes() with kLSItemContentType.
How
On 23 May 2008, at 23:18, Shawn Erickson wrote:
On Fri, May 23, 2008 at 9:19 AM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
So I
- entered "disc recording" into Xcode -> Help -> Documentation -
nothing at
all
...talking about Xcode 2.5 in the following...
Try changing Xcode to searc
Am 24.05.2008 um 09:28 Uhr schrieb Sebastian Nowicki:
I can't be certain that the cleanup function won't do other things
in the future, such as removing files (locks).
If, for some other reason, you need to act when the application
quits, you can register for the
NSApplicationWillTermina
On May 23, 2008, at 2:51 PM, [EMAIL PROTECTED] wrote:
How do I set my document based application to omit the filename
reference at
the top of each opened document window?
Kyle Sluder's explanation is quite informative, but it may also be
more complicated than you need. If you really just w
I am launching my app through applet. So passing arguments as command
line is only current solution for me.
Thanks,
Palav
On 5/24/08, Andreas Mayer <[EMAIL PROTECTED]> wrote:
>
> Am 24.05.2008 um 08:08 Uhr schrieb Andrew Farmer:
>
>> GUI applications generally do not take arguments - opened files
Sorry for my last email. That comment was incorrect(I was thinking
something else). Sorry again.
I will try with launchAppWithBundleIdentifier API & will let u know the output.
Thanks,
Palav
On 5/24/08, parag vibhute <[EMAIL PROTECTED]> wrote:
> I am launching my app through applet. So passing a
On 24/05/2008, at 3:48 PM, Andreas Mayer wrote:
In case you use the notification, there is no need to expose
anything. You just register a method of your singleton to receive
the NSApplicationWillTerminateNotification and do your cleanup there.
On Apple's developer website there are severa
Hi all,
I have a core data object graph using an SQLite store where several
entities have an attribute containing a date (eg, birthDate). This is
stored as a date type.
I am currently implementing an NSPredicateEditor for building smart
groups. Each smart group simply saves this predicate
Somewhere I have read (if my memory is not faulty) that it is
possible to lauch an app with some arguments (or environment
variables?) changing the preference order of languages.
E.g. my preferred language is English, but I want to test the German
localization of some app.
Xcode allows me
You're welcome, but I'd replace this:
const CGFloat LargeNumberForText = 1.0e7;
[[textView textContainer]
setContainerSize:NSMakeSize(LargeNumberForText, LargeNumberForText)];
with
[[textView textContainer] setContainerSize:NSMakeSize(FLT_MAX,
FLT_MAX)];
hey presto 1 less line of cod
On 24 May 2008, at 05:39, Andreas Mayer wrote:
I thought, maybe a picture would help:
http://www.harmless.de/images/other/files_owner.png
Exactly the picture I was about to draw.
Johnny Lundy wrote:
Saying it connects the nib to an object outside the nib sounds good,
but what object is th
On Fri, May 23, 2008 at 5:11 PM, Sherm Pendley <[EMAIL PROTECTED]> wrote:
> On Fri, May 23, 2008 at 4:45 AM, Michael Ash <[EMAIL PROTECTED]> wrote:
>>
>> On Fri, May 23, 2008 at 4:30 PM, Sherm Pendley <[EMAIL PROTECTED]>
>> wrote:
>>
>> > Does this sound similar? Objective-C obviously already has a
On Sat, May 24, 2008 at 6:49 AM, Paul Sargent <[EMAIL PROTECTED]> wrote:
>
> On 24 May 2008, at 05:39, Andreas Mayer wrote:
>
>>
>> I thought, maybe a picture would help:
>>
>> http://www.harmless.de/images/other/files_owner.png
>>
>
> Exactly the picture I was about to draw.
>
> Johnny Lundy wrot
Just for the archives, I found the solution to this on CocoaDev (which I had
missed in my original search). Unfortunately it uses private methods, but I
wrote an NSColorPanel category to access the swatch colours that should fail
safely if the private methods are changed. I've added the category
On Sat, May 24, 2008 at 2:11 AM, Mike <[EMAIL PROTECTED]> wrote:
> Why does [ NSURLConnection canHandleRequest: ] return YES even if I turn
> off all my network connections? I thought this method was supposed to be
> used for preflighting connection requests?
>From what I gather, the "preflight"
On Sat, May 24, 2008 at 1:21 AM, Johnny Lundy <[EMAIL PROTECTED]> wrote:
> I have used it to set my class as its delegate so that I could implement the
> delegate method applicationWillTerminate:, and that was great. Easy to
> understand, it calls respondsToSelector: and then calls my delegate met
Thanks I am using this
iTunesIsOpen = NO;
[iTunesLMenu setTitle: NSLocalizedString(@"Launch iTunes",@"")];
NSArray *lApplications = [[NSWorkspace sharedWorkspace]
launchedApplications];
int a;
for (a=0; a<[lApplications count]; a++) {
NSDictionary *applicationD = [lApplications objectAtIndex
How would I quit iTunes. There is a way to launch it with NSWorkspace
but how about quit?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-
On 24 maj 2008, at 17.49, Mr. Gecko wrote:
How would I quit iTunes. There is a way to launch it with
NSWorkspace but how about quit?
___
Send a quit AppleEvent
--
"Home is not where you ar
How would I do that?
I have been looking for a while and I found aevtquit but I can't find
out how to send.
On May 24, 2008, at 11:13 AM, Tommy Nordgren wrote:
On 24 maj 2008, at 17.49, Mr. Gecko wrote:
How would I quit iTunes. There is a way to launch it with
NSWorkspace but how about qu
On May 24, 2008, at 12:33 PM, Mr. Gecko wrote:
How would I do that?
I have been looking for a while and I found aevtquit but I can't
find out how to send.
Read the documentation:
http://developer.apple.com/documentation/AppleScript/Conceptual/AppleEvents/intro_aepg/chapter_1_section_1.htm
You can pass this argument:
-AppleLanguages '(de)'
AppleLanguages is the UserDefauts key (from the NSGlobalDomain domain)
that control this behavior.
Le 24 mai 08 à 11:09, Gerriet M. Denkmann a écrit :
Somewhere I have read (if my memory is not faulty) that it is
possible to lauch an ap
Would something like this work better? It should deal with
localization or if the user renames iTunes for some reason.
iTunesIsOpen = NO;
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
NSString* iTunesPath = [workspace
absolutePathForAppBundleWithIdentifier:@"com.apple.iTunes"];
NSA
Hi all,
I've been playing with CA and I tried to set up one my objects as the
delegate for the frame change animation for an NSWindow by using the
following code:
CABasicAnimation* anim = [window animationForKey:@"frame"];
anim.delegate = self;
[[window animator] setFrame:NSMakeRect(400, 50
On 24 maj 2008, at 18.33, Mr. Gecko wrote:
How would I do that?
NSAppleScript * script = [[[NSAppleScript alloc]
initWithSource:@"tell application \"iTunes\" \n quit \nend tell"]
autoRelease];
[script executeAndReturnError: nil];
I have been looking for a while and I found a
Mr. Gecko wrote:
How would I quit iTunes. There is a way to launch it with
NSWorkspace but how about quit?
Send a quit AppleEvent
How would I do that?
I have been looking for a while and I found aevtquit but I can't find
out how to send.
Example:
#include
OSStatus QuitApplication(char
That is slow because it has to compile. but if I can't get this apple
event to work than I might do that
On May 24, 2008, at 2:23 PM, Tommy Nordgren wrote:
On 24 maj 2008, at 18.33, Mr. Gecko wrote:
How would I do that?
NSAppleScript * script = [[[NSAppleScript alloc]
initWithSource:@"
Thank you so much it works.
On May 24, 2008, at 2:38 PM, has wrote:
Mr. Gecko wrote:
How would I quit iTunes. There is a way to launch it with
NSWorkspace but how about quit?
Send a quit AppleEvent
How would I do that?
I have been looking for a while and I found aevtquit but I can't find
On 24.05.2008, at 21:05, Steve Christensen wrote:
Would something like this work better? It should deal with
localization or if the user renames iTunes for some reason.
For third party software you'd be right - Apple does not localize the
names of iTunes / iPhoto / iDVD (browse through th
At 2:56 AM -0700 5/24/08, [EMAIL PROTECTED] wrote:
I have a core data object graph using an SQLite store where several
entities have an attribute containing a date (eg, birthDate). This is
stored as a date type.
I am currently implementing an NSPredicateEditor for building smart
groups. Each
NSAppleScript * script = [[[NSAppleScript alloc]
initWithSource:@"tell application \"iTunes\" \n quit \nend tell"]
autoRelease];
[script executeAndReturnError: nil];
That is slow because it has to compile. but if I can't get this
apple event to work than I might do that
I would hope that
On 24 May '08, at 12:05 PM, Steve Christensen wrote:
Would something like this work better? It should deal with
localization or if the user renames iTunes for some reason.
...
if ([[applicationD objectForKey:@"NSApplicationPath"]
isEqualToString:iTunesPath])
It would be simpler just to
My version wasn't about using the path for something else; it was
only about providing a method that doesn't care what the iTunes
application is called. For example, if someone were to rename it
"iTunes 7.6.2", then your version would stop working.
However, as Thomas Engelmeier pointed out
On May 24, 2008, at 2:11 PM, Jens Alfke wrote:
On 24 May '08, at 12:05 PM, Steve Christensen wrote:
Would something like this work better? It should deal with
localization or if the user renames iTunes for some reason.
...
if ([[applicationD objectForKey:@"NSApplicationPath"]
isEqualToSt
On 23 May '08, at 11:11 PM, Mike wrote:
Why does [ NSURLConnection canHandleRequest: ] return YES even if I
turn off all my network connections? I thought this method was
supposed to be used for preflighting connection requests?
No, it just tells you whether there's support for that URL sc
I dunno. Your book seems to be one of the few, if not the only, that
is not on my bookshelf.
If you email me your page on File's Owner, I can give feedback.
On May 23, 2008, at 9:59 PM, [EMAIL PROTECTED] wrote:
I despair that I am unable to adequately explain the concept and
utility of File'
Steve Christensen wrote:
Would something like this work better? It should deal with
localization or if the user renames iTunes for some reason.
iTunesIsOpen = NO;
NSWorkspace* workspace = [NSWorkspace sharedWorkspace];
NSString* iTunesPath = [workspace
absolutePathForAppBundleWithIdentifier
I agree that the bundle identifier is more reliable thanks for the
tip. I am going to be using it
On May 24, 2008, at 4:11 PM, Jens Alfke wrote:
On 24 May '08, at 12:05 PM, Steve Christensen wrote:
Would something like this work better? It should deal with
localization or if the user renam
On 23 May '08, at 9:12 AM, Torsten Curdt wrote:
Hm ...somehow missed that response. But got it working myself. It's
actually much simpler:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
int documentCount = [[[NSDocumentController
sharedDocumentController] docume
Mr. Gecko wrote:
That is slow because it has to compile. but if I can't get this apple
event to work than I might do that
It's not Cocoa, but it is efficient...
To find out if an app with a given bundle ID is running:
#include "ProcessIsRunningWithBundleID.h"
#include
int ProcessIsRunningW
(fyi) I am coming from the non Mac C++ land and I am trying to grok
Obj-C and the Cocoa framework.
1) Create a simple Cocoa application
2) Open IB and drag a Custom View over to the Window
3) Drag an Object to MainMenu.nib
4) Name the Custom View and Object to the same class name
5) Write the c
On May 24, 2008, at 6:09 PM, Graham Reitz wrote:
Awesome! Thanks Nathan. That makes a lot more sense to me.
Just set the class of the Custom View.
What do you specifically mean by 'set the class'?
In IB select the view then select the Identity Inspector (cmd-6 or the
icon with the "i"
On 23 May '08, at 2:37 PM, Wayne Shao wrote:
I want to overlay a small icon at the corner of each images in my
browser
view. The purpose of this is to provide a visual indicator of
different
properties in my images, which is better than putting some text in
title/or
subtitle.
Is it possi
Awesome! Thanks Nathan. That makes a lot more sense to me.
Just set the class of the Custom View.
What do you specifically mean by 'set the class'?
graham
On May 24, 2008, at 7:01 PM, Nathan Kinsinger wrote:
On May 24, 2008, at 5:43 PM, Graham Reitz wrote:
(fyi) I am coming from the n
What is the preferred method to halt a cocoa application on a runtime
error occurring in the initWithFrame method?
thanks,
graham
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the l
I am endeavoring to learn openGL gui development on the Mac.
Any comments on the follow code would be greatly appreciated, i.e.
what's wrong, pathological and etc...
thanks,
graham
Code---
// simple.h
#import
@interface simple : NSView
{
@private
NSOpenGLContext *m_con
On May 24, 2008, at 5:43 PM, Graham Reitz wrote:
(fyi) I am coming from the non Mac C++ land and I am trying to grok
Obj-C and the Cocoa framework.
1) Create a simple Cocoa application
2) Open IB and drag a Custom View over to the Window
3) Drag an Object to MainMenu.nib
You don't need to
On May 24, 2008, at 6:12 PM, Graham Reitz wrote:
What is the preferred method to halt a cocoa application on a
runtime error occurring in the initWithFrame method?
thanks,
graham
I would normally try to alert the user that something went wrong and
then terminate if that is the only optio
hi,
since I set the second column as outLineTableColumn in IB,
I'm getting this tooltip "outLineTableColumn", anywhere in outline
view, even when hovering on other columns.
And it goes away when I move the mouse pointer to near the text, then
the real tooltip occurs.
How can I remove this too
On May 24, 2008, at 12:36 AM, Gerriet M. Denkmann wrote:
On Fri, May 23, 2008 at 9:19 AM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
So I
- entered "disc recording" into Xcode -> Help -> Documentation -
nothing at
all
...answering about Xcode Version 2.4:
I did try both modes (Full-T
Try this search
http://developer.apple.com/cgi-bin/search.pl?q=NSOpenGLView&num=10&site=(samplecode)
Take insight from the samples. Start with NSOpenGLView unless you
have some strong reason to poll your own.
___
Cocoa-dev mailing list (Cocoa-de
1) Create a simple Cocoa application
2) Open IB and drag a Custom View over to the Window
3) Name the Custom View class
4) Write the class files and add them to the project
5) Derive a class from NSView and implement the keyDown method.
- (void)keyDown:(NSEvent *)theEvent;
6) Run the prog
Add the method -(BOOL)acceptsFirstResponder { return YES; } in the
custom and it will work as desired. By default, just clicking on an
custom NSView *doesn't* make it the first responder, and keyboard
events are sent to the first responder and then up the responder
chain, unlike mouse even
On May 23, 2008, at 7:21 PM, Johnny Lundy wrote:
My NSArrayControllers can be bound to model objects without anything
going through File's Owner.
Really? That implies that your model is contained within the nib,
which is not how MVC is supposed to work. The nib should contain the
V (Vie
I have an NSTextField in an NSCollectionView. If I type in a change
to the NSTextField, then without hitting tab or clicking elsewhere in
the NSCollectionView I click on a popup menu in the window, the
NSTextField aborts the edit and loses the information without any kind
of notice being g
Excellent! Thanks Pete!
-graham
On May 24, 2008, at 9:56 PM, Peter Burtis wrote:
Add the method -(BOOL)acceptsFirstResponder { return YES; } in the
custom and it will work as desired. By default, just clicking on an
custom NSView *doesn't* make it the first responder, and keyboard
eve
I'm no core animation expert, but.
This...
// self is an NSWindow instance
CAAnimation *anim = [CABasicAnimation animation];
[anim setDelegate:self];
[self setAnimations:[NSDictionary dictionaryWithObject:anim
forKey:@"frame"]];
[[self animator] setFra
On Sat, May 24, 2008 at 5:12 PM, Graham Reitz <[EMAIL PROTECTED]> wrote:
> What is the preferred method to halt a cocoa application on a runtime error
> occurring in the initWithFrame method?
For programming errors, like "you called me with inconsistent
arguments!", Cocoa typically uses exceptions
I just rewired my app to try it your way, and can confirm that, when
using [window animationForKey:@"frame"] to get the CAAnimation, it
doesn't call the delegates for me either. But animationForKey also
doesn't return nil, so my first theory is out.
Weird.
But yes, creating a new CAAnimat
Hi,
How can I launch the default browser supplying it a URL with the click
of a button?
Please help.
WIshes,
Nick
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
NSURL *url = [NSURL URLWithString:@"http://www.google.com";];
[[NSWorkspace sharedWorkspace] openURL:url];
-Pete
On May 25, 2008, at 12:55 AM, Nick Rogers wrote:
Hi,
How can I launch the default browser supplying it a URL with the
click of a button?
Please help.
WIshes,
Nick
_
I am coming from the c++ world and I feel I don't understand how
objects are scoped in obj-c.
What is the scope of m_controller (a c++ class) below? The debugger
shows m_controller as {...} with no other information. Other than that
it seems to run fine.
Can I think of an @interface a
On Sun, May 25, 2008 at 12:29 AM, Graham Reitz <[EMAIL PROTECTED]> wrote:
> Can I think of an @interface as something similar to a c++ class?
A class in Obj-C consists of an interface and an implementation (you
forgot the @implementation/@end in your example). Just like a class in
C++ (usually) co
Sorry, assume the @implementation/@end are there. It's not an example
meant to compile.
It sounds like what I listed can be considered synonymous with a c++
class?
thanks,
-graham
On May 25, 2008, at 12:36 AM, stephen joseph butler wrote:
On Sun, May 25, 2008 at 12:29 AM, Graham Reitz <
Trying to squeeze a bit more speed out of certain bottlenecks in my
code. Here's one of them:
NSBitmapImageRep* bits = [self pathBitmapInRect:ir];
// if any pixels in this bitmap are set, we have a hit.
On May 25, 2008, at 12:29 AM, Graham Reitz wrote:
Also, is there some reading for people familiar with c++ trying to
grok obj-c other than the apple dev docs? (something quick and
dirty)
A bit of googling turned up this:
http://ktd.club.fr/programmation/fichiers/cpp-objc-en.pdf
Cheers,
On May 25, 2008, at 12:55 AM, Graham Cox wrote:
Trying to squeeze a bit more speed out of certain bottlenecks in my
code. Here's one of them:
NSBitmapImageRep* bits = [self pathBitmapInRect:ir];
// if any pixels in this
Hello,
This is hard to google for because they are such common words:
how do I delay, wait, pause for a tenth of a second?
I don't want to use NSTimer because I just want to resume where
I left off. I don't want to be in a tight loop because I need
the system to finish something. I just wan
On 25 May 2008, at 03:00, Ken Thomases wrote:
On May 24, 2008, at 12:36 AM, Gerriet M. Denkmann wrote:
On Fri, May 23, 2008 at 9:19 AM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
So I
- entered "disc recording" into Xcode -> Help -> Documentation -
nothing at
all
...answering abou
Hi,
I'm running into an odd issue with Spaces. If a user browses to a
different Space while a sheet is dropped in my application and then
clicks my app's Dock icon, the sheet will appear behind the main
window. Clicking it will bring it to the forefront. Pressing the
escape key will also clos
NSThread has a sleepUntilDate: class method.
In the example below, 0.1 = 1/10th of a second.
NSDate *future = [NSDate dateWithTimeIntervalSinceNow: 0.1 ];
[NSThread sleepUntilDate:future];
-Pete
On May 25, 2008, at 2:45 AM, Steve Steinitz wrote:
Hello,
This is hard to googl
72 matches
Mail list logo