On Dec 13, 2008, at 5:27 PM, aaron smith wrote:
Does anyone know if this is still a valid sample?
(http://developer.apple.com/samplecode/SampleCMPlugIn/index.html)
It's from 06, so it would seem old.
It's still valid.
-eric
___
Cocoa-dev mailing
While drag-and-drop of an object (possibly from another window or
application) is in progress, I'd like to provide some visual cues and
control over the drop destination. In particular, I'd like to be able
to scroll the drop target view in response to the scroll wheel event
and also respond to
Thanks Eric.
On Sun, Dec 14, 2008 at 12:01 AM, Eric Schlegel eri...@apple.com wrote:
On Dec 13, 2008, at 5:27 PM, aaron smith wrote:
Does anyone know if this is still a valid sample?
(http://developer.apple.com/samplecode/SampleCMPlugIn/index.html)
It's from 06, so it would seem old.
It's
Hello, yes in fact, that was what I did, I set up a NSImage instance
variable so once dragged to the other View I just used the info of the
NSImage to recreate the layer.
Thanks for your help
On 14.12.2008, at 0:06, Michael Ash wrote:
On Sat, Dec 13, 2008 at 5:02 AM, Gustavo Pizano
I was thinking if I should have different images facing north, south,
east and west, and once the layer is rotated I should assign the new
image to the layer contents.??
I came up to this conclusion because, last night while trying to
sleep, that due that the contents of the layer is a
On Dec 14, 2008, at 6:35 AM, John Love wrote:
BOOL ExcelActive = NO;
NSWorkspace *workSpace;
NSArray *runningAppDictionaries;
NSDictionary *aDictionary;
workSpace = [NSWorkspace sharedWorkspace];
runningAppDictionaries =
Hi all,
I need to create an array of values of a specific type, and I'd prefer
to have it as a set of values rather than pointer to values (mostly
performance reasons), so not an NSMutableArray. I couldn't find
anything in Cocoa to do this, am I missing something or is it just not
a
I have an NSToolbar which has NSToolbarItems with [toolbarItem view] =
NSButton.
When [toolbar displayMode] = NSToolbarDisplayModeLabelOnly and I press
the label [toolbarItem menuFormRepresentation] shows its submenu.
Otherwise (Icon visible) [toolbarItem label] gets shown, which does
Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit :
Hi all,
I need to create an array of values of a specific type, and I'd
prefer to have it as a set of values rather than pointer to values
(mostly performance reasons), so not an NSMutableArray. I couldn't
find anything in Cocoa to do
On Dec 14, 2008, at 13:45 , Jean-Daniel Dupas wrote:
Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit :
Hi all,
I need to create an array of values of a specific type, and I'd
prefer to have it as a set of values rather than pointer to values
(mostly performance reasons), so not an
On Dec 14, 2008, at 13:52 , jonat...@mugginsoft.com wrote:
You can of course use straight ahead C but if it's a Cocoa app then
it's most effective to use the standard classes.
NSValue can used to wrap data types of constant length.
That was my first thought but I still have an array of
On Dec 14, 2008, at 7:26 AM, Chunk 1978 wrote:
do you mean:
-=-=-=-=-
- (BOOL)hidesOnDeactivate
{
[self setHidden:YES];
return NO;
}
-=-=-=-=-
?
That wouldn't work, because setHidden: is an NSView method and
presumably you're overriding hidesOnDeactivate in an
On Dec 13, 08, at 12:21 PM, Jean-Daniel Dupas wrote:
Because operator overriding does not exists in Obj-C and so, == is a
pointer comparaison and not a string comparaison.
use the isEqual: method to compare two object.
Thanks to everyone who chimed in .. and here are my changes:
do you mean:
-=-=-=-=-
- (BOOL)hidesOnDeactivate
{
[self setHidden:YES];
return NO;
}
-=-=-=-=-
?
sure, that might work, but what i meant is that my hidesOnDeactivate
method isn't being called at all. my original post with NSBeep() was
just a test...
On Sun, Dec 14,
On Dec 14, 2008, at 14:05 , Ken Thomases wrote:
It's not the Cocoa way of doing things, for a whole raft of reasons.
However, if you use Objective-C++, you can just go ahead and use
std::vector.
Thanks, I'll first try the Cocoa way, and go C++ if I really have to.
--
Guillaume
On Dec 14, 2008, at 6:34 AM, Guillaume Laurent wrote:
I need to create an array of values of a specific type, and I'd
prefer to have it as a set of values rather than pointer to values
(mostly performance reasons), so not an NSMutableArray. I couldn't
find anything in Cocoa to do this, am
Le 14 déc. 08 à 14:42, Guillaume Laurent a écrit :
On Dec 14, 2008, at 13:45 , Jean-Daniel Dupas wrote:
Le 14 déc. 08 à 13:34, Guillaume Laurent a écrit :
Hi all,
I need to create an array of values of a specific type, and I'd
prefer to have it as a set of values rather than pointer
is this possible? what method do i override when the window is
ordered back, or has resigned as key window... i'm attempting to set
some actions into play when a window is ordered back or no longer key:
-=-=-=-
- (void)orderBack
{
NSString *updateWindowNotification =
On Dec 14, 2008, at 8:50 AM, Chunk 1978 wrote:
is this possible? what method do i override when the window is
ordered back, or has resigned as key window... i'm attempting to set
some actions into play when a window is ordered back or no longer key:
-=-=-=-
- (void)orderBack
{
I was surprised to learn that a hierarchy of NSDictionary objects can
be queried with valueForKeyPath:
NSDictionary *dict0 = [NSDictionary dictionaryWithObjectsAndKeys:@got
me!, @2, nil];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:dict0,
@1, nil];
NSLog([dict
honest to god, i have zero idea why this isn't working... i've simply
added this to my window's class and declared it in the header, but
when the window resigns key by switching to another app, i see the
window being ordered back, but NSLog does not output the message
-=-=-=-
-
i've set the window class to be it's own delegate:
- (id)init
{
if (self = [super init])
{
[self setDelegate:self];
}
return self;
}
so shouldn't writing this method in the window's class work?
-
On Dec 14, 2008, at 9:21 AM, jonat...@mugginsoft.com wrote:
I was surprised to learn that a hierarchy of NSDictionary objects
can be queried with valueForKeyPath:
NSDictionary *dict0 = [NSDictionary
dictionaryWithObjectsAndKeys:@got me!, @2, nil];
NSDictionary *dict = [NSDictionary
NSWindow has no instance method named windowDidResignKey:. Michael
referred you to a *delegate* method with that name, and an *instance*
method named resignKeyWindow.
It might help to slow down and read these emails and the docs they
refer to a little more carefully. :)
--Andy
On Dec
On 14 Dec 2008, at 16:06, Ken Thomases wrote:
I was surprised to learn that a hierarchy of NSDictionary objects
can be queried with valueForKeyPath:
NSDictionary *dict0 = [NSDictionary
dictionaryWithObjectsAndKeys:@got me!, @2, nil];
NSDictionary *dict = [NSDictionary
oh... woops! ha... this coffee hasn't kicked in yet... sorry about that... :)
On Sun, Dec 14, 2008 at 11:08 AM, Andy Lee ag...@mac.com wrote:
NSWindow has no instance method named windowDidResignKey:. Michael referred
you to a *delegate* method with that name, and an *instance* method named
Chunk 1978 mailto:chunk1...@gmail.com wrote (Sunday, December 14, 2008 8:28
AM -0500):
honest to god, i have zero idea why this isn't working...
- (void)windowDidResignKey:(NSNotification *)notification
{
NSLog(@window resigned key);
}
Probably because it's resignKeyWindow: not
Hello I just wanted to know if there is any person (Company) who
develops in Cocoa in Bratislava (Slovakia).
Thanks
Gustavo
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the
ok... so here's a strange issue:
resigning the key window works fine
-=-=-=-
- (void)resignKeyWindow
{
NSLog (@Out);
}
-=-=-=-
but if i also include the following method, resignKeyWindow no longer
works, and i only receive logs for becomeKeyWindow:
-=-=-=-
-
ok... so here's a strange issue:
resigning the key window works fine
-=-=-=-
- (void)resignKeyWindow
{
NSLog (@Out);
}
-=-=-=-
but if i also include the following method, resignKeyWindow no longer
works, and i only receive logs for becomeKeyWindow:
-=-=-=-
-
On Dec 13, 2008, at 11:56 PM, aaron smith wrote:
Ah, yeah that was it. And I had the release when closed box checked
in IB, which was causing it to crash. Unchecked that and we're all
good.
Sort of.
How many times will the user display the about panel in an average
session of working with
Hi,
I tried that, passed NULL at the callback.
But it didn't works MouseMove event. All other
cases of mouse its works good.
Thanks In Advance,
Sheen
--- On Sun, 12/14/08, Jean-Daniel Dupas devli...@shadowlab.org wrote:
From: Jean-Daniel Dupas devli...@shadowlab.org
Subject: Re:
On Sat, Dec 13, 2008 at 5:28 PM, Iceberg-Dev dev.iceb...@gmail.com wrote:
On Dec 13, 2008, at 12:46 PM, Kyle Sluder wrote:
3) Why all this trouble of launching executables? There's a reason
Launch Services is a public framework; use that. Don't use
-[NSWorkspace openFile:], because that's
That's an easy one. -Easy for me, because I had much trouble with it
earlier. =)
Remember to retain your timer:
- (void)timerStop
{
if(timer)
{
[timer invalidate];
[timer release];
timer = NULL;
}
}
-
On Dec 11, 2008, at 5:41 PM, Andy Lee wrote:
Release notes to come later -- gotta run to CocoaHeads...
Release notes are now posted:
http://homepage.mac.com/aglee/downloads/release-notes.html
--Andy
http://homepage.mac.com/aglee/downloads/AppKiDo-0.982.tgz
On Sun, Dec 14, 2008 at 2:03 PM, Michael Ash michael@gmail.com wrote:
Although it's only about ten more seconds of typing to use
-openFile:withApplication: instead and simply avoid the possibility
altogether.
If you're using this method, make sure to use -[NSWorkspace
On Dec 14, 2008, at 11:52 AM, Jens Bauer wrote:
because the timer is autoreleased.
This is not the case -- see http://developer.apple.com/documentation/Cocoa/Conceptual/Timers/Articles/usingTimers.html
(Memory Management).
mmalc
___
Cocoa-dev
Hello,
I am trying to enable dropping dragged iCal events onto my Cocoa
application's icon, e.g. in the Dock.
While it was fairly straightforward to support ICS files that are
dragged from the Finder (setting NSFilenamesPboardType with extension
ics in the target's document types, and
Hi,
I am seeing some unexpected behaviour and was hoping someone might be able
to shed some light on this.
I have a basic Counter class. The relevant methods for the problem are:
-init
{
if (self = [super init]) {
//counter = [[NSNumber alloc] init];
counter = [NSNumber numberWithInt:0]; //
I am fairly new to Cocoa (but not programming). I have a data model
containing an entity with a String attribute representing a path to a
folder. I am trying to use IB to bind an NSPathControl widget to the
attribute in the window controller. I assume I need a value
transformer to convert
On Dec 14, 2008, at 10:55 AM, Krishna Kotecha wrote:
As the comment say, I would expect an error to occur due the fact
Counter:dealloc: is releasing an autorelease object. However the
application
exits cleanly.
Shouldn't this code be causing an error at some point? And if not,
why not?
I think I have found the answer to your question; when executing the
following code, I get a few strange results...
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSNumber *n0 = [NSNumber numberWithInt:1];
NSLog(@n0: %d, [n0 retainCount]);
[n0 release];
NSLog(@n0: %d, [n0
On Dec 14, 2008, at 09:59, Keith Lander wrote:
I am fairly new to Cocoa (but not programming). I have a data model
containing an entity with a String attribute representing a path to
a folder. I am trying to use IB to bind an NSPathControl widget to
the attribute in the window controller.
On Dec 14, 2008, at 10:55 AM, Krishna Kotecha wrote:
-(void) dealloc
{
[counter release];
[super dealloc];
}
Guess what I overlooked? My apologies; Flip is probably correct.
Nick Zitzmann
http://www.chronosnet.com/
___
Cocoa-dev mailing list
Le 14 déc. 08 à 22:36, Filip van der Meeren a écrit :
I think I have found the answer to your question; when executing the
following code, I get a few strange results...
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSNumber *n0 = [NSNumber numberWithInt:1];
NSLog(@n0: %d,
Thank you, I was just replying to your mail ;-)
Filip van der Meeren
fi...@code2develop.com
http://www.sourceforge.net/projects/perlmanager
http://www.sourceforge.net/projects/xlinterpreter
On 14 Dec 2008, at 22:49, Nick Zitzmann wrote:
On Dec 14, 2008, at 10:55 AM, Krishna Kotecha wrote:
If you allocate the object yourself, like the following:
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSNumber *n = nil;
NSInteger wh = 0;
srand(time(NULL));
for(int i = 0; i 100 * 1000; ++i)
{
n = [[NSNumber alloc] initWithInt:rand()];
if([n retainCount])
On Dec 14, 2008, at 4:01 PM, Filip van der Meeren wrote:
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSNumber *n = nil;
NSInteger wh = 0;
srand(time(NULL));
for(int i = 0; i 100 * 1000; ++i)
{
n = [[NSNumber alloc] initWithInt:rand()];
if([n retainCount])
On Dec 13, 2008, at 11:50 PM, John Nairn wrote:
My application frequently recreates a window which involves deleting
all the subviews and adding new ones (while keeping the window
open). It used to work, but now when it reloads, it fails to accept
the one view I designate to the be the
I suggest you run my code, on your system.
Do not start up leaks, start up Activity Monitor and watch your memory
closely.
If your system doesn't crash/hangs before you can stop it, then you
will see that the app is consuming memory like the Americans are
consuming oil.
And according to me,
On Dec 14, 2008, at 4:17 PM, Filip van der Meeren wrote:
If your system doesn't crash/hangs before you can stop it, then you
will see that the app is consuming memory like the Americans are
consuming oil.
And according to me, my program respects the Memory Management
rules. So I say there
On 14 Dec 2008, at 23:27, Ken Thomases wrote:
On Dec 14, 2008, at 4:17 PM, Filip van der Meeren wrote:
If your system doesn't crash/hangs before you can stop it, then you
will see that the app is consuming memory like the Americans are
consuming oil.
And according to me, my program
On 14 Dec 2008, at 23:27, Ken Thomases wrote:
On Dec 14, 2008, at 4:17 PM, Filip van der Meeren wrote:
If your system doesn't crash/hangs before you can stop it, then you
will see that the app is consuming memory like the Americans are
consuming oil.
And according to me, my program
On Dec 14, 2008, at 4:38 PM, Filip van der Meeren wrote:
[...] NSNumber is the basic foundation of our OS, I know dozens of
ways to create the object without autoreleasing it inside somewhere.
Really? Since you're invoking closed-source framework code, it's hard
to imagine how you can
Hi,
Just wanted to thank everyone who responded to my question.
I'm trying to get the memory management stuff down cold, hence I was
breaking the memory management rules in my Counter class and was perplexed
by the results I got.
The explanations here have certainly helped increase my
On 14 Dec 2008, at 23:57, Ken Thomases wrote:
On Dec 14, 2008, at 4:38 PM, Filip van der Meeren wrote:
[...] NSNumber is the basic foundation of our OS, I know dozens of
ways to create the object without autoreleasing it inside somewhere.
Really? Since you're invoking closed-source
On Sun, Dec 14, 2008 at 12:55 PM, Krishna Kotecha
krishna.kote...@gmail.com wrote:
Shouldn't this code be causing an error at some point? And if not, why not?
Any insights or explanations any one has on this would be appreciated.
All C programmers (and therefore all Objective-C programmers)
On Dec 13, 2008, at 5:51 PM, James W. Walker wrote:
I'm using NSTask to run Mercurial, which internally uses ssh to
communicate with a server. It works when there is no pass phrase on
the private key, but what if there is one? I've heard that Leopard
has a built-in ssh-agent that
On Sun, Dec 14, 2008 at 5:38 PM, Filip van der Meeren
fi...@code2develop.com wrote:
On 14 Dec 2008, at 23:27, Ken Thomases wrote:
On Dec 14, 2008, at 4:17 PM, Filip van der Meeren wrote:
If your system doesn't crash/hangs before you can stop it, then you will
see that the app is consuming
On 15 Dec 2008, at 00:09, Michael Ash wrote:
On Sun, Dec 14, 2008 at 12:55 PM, Krishna Kotecha
krishna.kote...@gmail.com wrote:
Shouldn't this code be causing an error at some point? And if not,
why not?
Any insights or explanations any one has on this would be
appreciated.
All C
Is there any way to call a method each time the text of a UITextField
changes?
controlTextDidChange does not seem to exist for UITextField's
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
It turns out the window can in fact be accessed as
[[UIApplication sharedApplication] keyWindow] // readonly property
On Sat, Dec 13, 2008 at 7:45 PM, Luke Hiesterman luket...@apple.com wrote:
Generally speaking you will do well for yourself to follow Apple's example
over Erica's. I haven't
On Sun, Dec 14, 2008 at 2:52 PM, Jens Bauer jensba...@christian.net wrote:
You probably experience your crash, because the timer is autoreleased. If
you retain it, it'll live. However, you'll have to remember the timer
object, so you can stop it later, so add NSTimer *timer; as a member
On Sun, Dec 14, 2008 at 5:07 AM, Gustavo Pizano
gustavxcodepic...@gmail.com wrote:
I was thinking if I should have different images facing north, south, east
and west, and once the layer is rotated I should assign the new image to the
layer contents.??
I came up to this conclusion because,
I have a QTMovie (that is valid), and it has a text track. I am
wondering if there is any easy way to get the contents of the text
track into an NSString.
Thanks,
Joe
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
Hi Joe,
Since you didn't define easy or tell me what you'd tried, then I'll
have to make some assumptions about what you know. I will assume that
you have read the documentation on QT media samples.
The basic steps:
Get the text track.
Get the track media.
loop thru the
Yeah, I should have defined easy!
This helps a lot :)
Thanks!
Joe
On Dec 14, 2008, at 7:03 PM, douglas welton wrote:
Hi Joe,
Since you didn't define easy or tell me what you'd tried, then
I'll have to make some assumptions about what you know. I will
assume that you have read the
I'm at a loss when it comes to releasing CALayers. Since you can only
create a layer with [CALayer layer] (docs advise not to use [[CALayer
alloc] init]), I would assume that the instance is automatically
qutoreleased. However, after looking through apple's sample code on a
menu built with
On Dec 15, 2008, at 12:15 AM, Debajit Adhikary wrote:
Is there any way to call a method each time the text of a UITextField
changes?
controlTextDidChange does not seem to exist for UITextField's
___
I can find no class UITextField in the
Okay, so I did what you said, but yet, it still won't show me the
track names. Here is my code:
Media media = [movieView movie] tracksOfMediaType:QTMediaTypeText]
objectAtIndex:0] media] quickTimeMedia];
TimeValue64 timeValue = 0;
TimeValue64 duration = 0;
On Sun, Dec 14, 2008 at 5:26 PM, Tommy Nordgren tommy.nordg...@comhem.sewrote:
On Dec 15, 2008, at 12:15 AM, Debajit Adhikary wrote:
Is there any way to call a method each time the text of a UITextField
changes?
controlTextDidChange does not seem to exist for UITextField's
I am using transient attributes as a nice and efficient way to display
formatted data (with line breaks) in an NSTableView, and am running
into trouble in my awakeFromFetch: method for a subclass of
NSManagedObject.
This works fine in the awakeFromFetch: when building a transient
when you say it won't show you the track names do you mean:
a) your NSLog() function is failing and nothing is printed
b) NSLog() prints something, but the value of string appears to be
either nil or empty (which one?)
c) you really want the name of the track (i.e., the thing displayed
in
Take a look at the stack trace again. It's happening within the call
to +[NSTimer scheduledTimerWithInterval:target:selector:userInfo:repeats:].
The problem can't be that he hasn't retained a timer he hasn't
created yet.
The problem is that he's corrupted the heap, which could have happened
Finder.app can show in its Sidebar an image of a computer.
I want to create a button with this same (or similar) image.
I can use [ sharedWorkspace iconForFile: fullPath ] to get an image of
a home folder, or of a disk partition.
But I cannot find a computer image. Also looked at Icon
On Sun, Dec 14, 2008 at 8:53 PM, Gerriet M. Denkmann
gerr...@mdenkmann.de wrote:
Finder.app can show in its Sidebar an image of a computer.
I want to create a button with this same (or similar) image.
I can use [ sharedWorkspace iconForFile: fullPath ] to get an image of a
home folder, or of
Toolbar Programming Topics for Cocoa - Setting a Toolbar Item’s Size
says about view items:
The minSize and maxSize toolbar must not be left unset (or the view
will not display), and unless you are implementing intelligent
stretching behavior in a view item, both theminSize and maxSize
77 matches
Mail list logo