> using NSTask, or something else?
Woops, missed your subject line; NSTask, got it. But yes, I would see
if you're able to read the executable as plain data, using NSData's
dataWithContentsOfFile: to make sure the path is in fact accessible.
___
Cocoa-d
The current recommendation is to store helper executables in the MacOS
directory, rather than the Resources directory of your main bundle.
That said, I'm unaware of any enforcement of this that would actually
prevent you from executing it.
How are you sure that the path is correct? Are you able to
If you enable the -Wformat warning, the compiler will warn you if you
omit the trailing nil. Never understood why it's not enabled by
default...
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator commen
> What do I use. Normally a class static, provided that's granular enough,
> always has been for me thus far. Either just make some static thing like a
> character array and take the address of it or, as I've been doing
recently,
> use the address of the class object which I grab in a +initialize()
> It is not however clear, and I haven't found it in the guide, whether
> it's still my responsibility to call [_myProp release] in
> -(void)dealloc ?
There are varying opinions on how you go about it, but yes, you still
need to make sure _myProp is released in dealloc. I prefer
'self.myProp =
Not really a Cocoa question, and it's answered in the docs on
IOServiceAddMatchingNotification :)
"The notification is armed when the iterator is emptied by calls
to IOIteratorNext - when no more objects are returned, the
notification is armed. Note that the notification is not armed when
firs
To enable zombies and run your app:
1. Open terminal
2. export NSZombieEnabled=YES
3. /path/to/program.app/Contents/MacOS/program
... and stdout will of course go to the terminal window.
Or, if the user is more technically apt, #3 can be 'gdb ',
'run', and when it crashes, 'bt' to get a backtrac
> -[NSString boundingRectWithSize:...] might do this, especially with the
> NSStringDrawingUsesDeviceMetrics flag ("Uses image glyph bounds instead of
> typographic bounds").
Indeed. When I tried that method in the past, I got it working
half-way with italicized text (the width was correct, but th
I'm not clear on which method is giving you issues, -drawInRect: or
-drawAtPoint:? If it's -drawAtPoint: then it sounds like you may be
hitting a bug in the frameworks on Leopard:
http://developer.apple.com/mac/library/releasenotes/Cocoa/AppKit.html,
search for "NSImage: Breaking change to drawAtPo
These files are certainly meant to be there. (If you happen to look in the
bundles of any number of the standard Mac apps, these two resources are
present.) Signing your code should happen at the very last stage of
development; deleting something from your bundle after it's been signed is
wrong.
Y
>From the docs on -CGImage
"Returns an autoreleased CGImage object (an opaque type) from the
receiver’s current bitmap data."
... if you expect it to stick around, you need to retain it.
Otherwise, you needn't do anything: you shouldn't CGImageRelease() it,
because you don't own it.
_
> Also, keep in mind that character shapes may stick out of either edge by a
> few pixels, especially with italics or script fonts. It's usually safest to
> pad your bounding box by some fraction of the point-size.
I've noticed this too. If you need the absolute precise pixel-size of
some text, th
http://lists.apple.com/archives/Cocoa-dev/2001/Nov/msg01347.html
___
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-admins(at)lists.apple.com
H
> What I've done in the past is install a signal handler which tells the OS to
> ignore the signal, but also schedules a future callback on the main thread
> (via the runloop) that will then cleanly shut down the process. You probably
> want to catch the signals generated by Ctrl-C or a 'kill' comm
> However, at least in my attempts, this did not seem to change my shadow,
> regardless the value I passed in.
It only appears to affect borderless windows; I just tested with a
normal, titled window and it didn't change at all.
But with borderless windows, it seems to toggle between two shadow s
I seem to recall that the opacity of the window affects the intensity
of its shadow. Is your borderless window partially transparent?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the l
In the past I've also had some issues with NSTask, its 'isRunning'
property and NSTaskDidTerminateNotification, albeit on 10.5. Here's
two notes based on what I've experienced:
o Recently I've found myself rolling my own solutions to problems such
as yours, in order to guarantee its level of robus
http://www.cocoabuilder.com/archive/message/cocoa/2009/8/20/243101
http://lists.apple.com/archives/cocoa-dev/2009/Sep/msg00055.html
...etc
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to
For the record...
It's considered best practice to limit your drawRect: methods to
strictly drawing. Often it's handy to take advantage of drawRect: for
testing, but in production code, my original suggestion isn't a good
idea. 8)
In the past I've seen some nasty misuses of drawRect: (setting the
> Probably wherever you do the -setNeedsDisplay: for the view would be about
> right... ;-)
Unfortunately that's not a good place either - the window's shadow
needs to be invalidated after the drawing actually occurs, not just
when the dirty flag is set.
Instead of -setNeedsDisplay:, I think you
I believe you need to tell the window to invalidate its shadow. The end of
ClockView's drawRect: is a bad place to do it, but as a proof of concept:
- (void)drawRect: (NSRect)rect
{
... lots of drawing code ...
[[self window] invalidateShadow];
}
> I've tried reading and writing an XML file directly, and I can get this to
> work fine with multiple threads (via a simple NSLock), but when I attempt to
> apply an O_EXLOCK to the file to prevent one process from writing to the
> file while the other is, but it doesn't seem to be working.
How d
For the archives...
The cleanest way I've found to get around my problem is best illustrated
with some example code:
=
- (void)setHappy: (BOOL)newHappy
{
BOOL oldHappy = happy;
happy = newHappy;
if (![self save])
{ // Do the revert now
happy = o
> not the correct effect. Attempting to nest willChange/didChange is a Bad
> Idea because KVO notifications aren't nestable.)
Is that documented? I would have thought that a nested
willChange/didChange pair would have simply been ignored.
> The immediate problem here is the presence of willChange
> What led you to believe you needed to call the setter recursively? All you
> need is:
The only reason I did that was to show that the correct KVO
notifications would be invoked by reverting the happy property from
within the setter. It was a gross oversimplification, and I'm sorry.
:)
I realize
> Someone has to say it: Why?! :-)
>
> I can't imagine any possible reason why any design should make it possible
> for prefs saving to fail. Just because I can't imagine it doesn't make it
> impossible, but it sounds very, very wrong.
Well it seems my attempt to over-simplify the situation has
> i have come across this method in NSUserDefaults and it appears to be a
list of identifiers located on the current system. my question is if an app
is deleted does its identifier eventually get removed from the
persistentDomainNames list?
Not unless your app's preferences file is deleted, and t
Hey list,
I've implemented a custom bindings-compatible preferences controller object
- let's call it MyPrefsController. It's similar to NSUserDefaultsController,
but has lots of different functionality, and inherits directly from
NSObject.
As the user is changing the preferences in the UI, the p
File descriptors can be passed between processes using the sendmsg() API.
If you have further questions about that, I'd suggest taking this
question to darwin-dev.
Here's some links:
http://devworld.apple.com/qa/qa2007/qa1541.html
http://topiks.org/mac-os-x/0321278542/ch09lev1sec11.html
> P.S.: My apologies if this question is not exactly Cocoa-related...
You're probably better off taking this to darwin-dev. There was also a
discussion related to this a few weeks ago on darwin-kernel:
http://lists.apple.com/archives/darwin-kernel/2009/Jul/msg00080.html
__
Before your post, I knew that some AppKit drawing was done in
secondary threads, but it never occurred to me that this could cause
one's own NSView subclasses to be drawn in a separate thread, too.
Presumably, if one's custom drawRect: method can be called in a
separate thread due to a pulsing NSB
>
> >Now I understand that if nilling an instance variable after releasing
> >it is done in -dealloc, it is papering over other memory management
> >problems and is therefore bad programming practice. But I believe
> >that this practice is OK in -didTurnIntoFault because, particularly
> >when Undo
>
>Event taps receive key up and key down events if one of the following
> conditions is true: The current process is running as the root user. Access
> for assistive devices is enabled.
Woops, I forgot that you said you enabled access for assistive device. I
just made a quick test project an
> James is exactly right, you're releasing the Event Tap before you enable
it.
> You should not release the event tap if you want to use it, it needs to
hang
> around for as long as you need it.
It's not mentioned in the docs, but the CFRunLoopSource created by the call
to CFMachPortCreateRunLoopS
> also show that no bits in the eventMask are cleared away. Also, I do have
> 'Enable Assistive Devices' checked (or else I wouldn't even get the mouse
> events I'd imagine), so I don't think thats the problem.
I seem to remember a discrepancy between the documentation on event
taps, and what act
Works for me: http://themha.com/bfegewfvd.zip
So the obvious things to check:
1. Is myNSWindow nil, or the wrong window?
2. Is myNSWindow an NSWindow, or a subclass that might mess with this behavior?
3. Is setDocumentEdited: being called from more than one place? Break
on setDocumentEdited: and
> Is that correct?
Yes. A note though: since you're using NSMakeCollectable() (instead of
CFMakeCollectable()), the cast to (NSDictionary *) is unnecessary -
which is one of the main benefits of using the NS* version.
___
Cocoa-dev mailing list (Cocoa-d
> (active filter) and after (passive filter) they're handled by the
Sorry - that should read 'passive listener', meaning you can either
actively wait for and manipulate events as they occur, or you can
relax and wait for events to be reported after they've already been
dealt with. Of course it sou
> Will this enable me to trap "drag begin" "drag end" a window moving around
> messages ?
Event taps allow you to intercept, block, and manipulate events before
(active filter) and after (passive filter) they're handled by the
window server. My limited experience with them suggests that, yes, you
It sounds like an event tap might help:
http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html#//apple_ref/c/func/CGEventTapCreate
http://prefabsoftware.com/eventtapstestbench/
___
Cocoa-dev mailing lis
> P.S. I very rarely use the C interfaces, do I have to also run CFRelease on
> the result of the CGImageSourceCopyProperties call?
Yes, you should. See 'The Create Rule':
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/
I'm confused:
NSLog(@"%@", CFURLCreateStringByAddingPercentEscapes(nil,
CFSTR("http://www.example.com?a+b & c = d"), nil, CFSTR("+=&"),
kCFStringEncodingUTF8));
That doesn't do what you want?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Plea
Check out CFURLCreateStringByAddingPercentEscapes(), and note that
CFURL is toll-free bridged with NSURL.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
I believe you can use even taps for this. Check out:
http://developer.apple.com/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html#//apple_ref/c/func/CGEventTapCreate
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Pl
Hmm, us Americans spell it 'centimeter,' and according to the
mentioned docs, NSRulerView does too. The docs also say it supports
four different units by default (in, cm, pt, pc). Not sure what
'default' means in this case, but I'd assume it means calling
+registerUnitWithName:... is redundant for
> seems to come down. Is there some way to stop this from happening, in other
> words, is there a way to "nail" an element in place.
As Kyle suggested:
http://devworld.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/WorkingWithAViewHierarchy/WorkingWithAViewHierarchy.html
"Repositioning
First off, your object's -dealloc is never going to get called,
because NSTimers retain their targets. (If your -dealloc is getting
called, then you've got some memory management issues.) A breakpoint
or an NSLog in -dealloc will tell you if it's getting called.
> I'm not sure, if I must invalidat
>> The notifications don't cross threads; they are delivered in the thread
>> where they are posted.
>
> Yes, I understand that. There must be some quirk that allows it to work
> when doing an NSTask
Just a tidbit - I don't think there's any quirks involved. The general
idea is this: NSTask creat
The topic of creating a Cocoa app without using IB has come up many
times since I've been on this list, and the general opinion is you
should always use IB unless you've got a really good reason not to.
IB's not a toy, it doesn't make you any less of a programmer, it's not
going anywhere, and it's
Yeah, the NSURLConnection docs aren't too heavy on details when it
comes to threads, and what it does say about its threading behavior
seems purely consequential to the fact that NSURLConnection relies on
NS/CFRunLoop facilities, rather than NSUC implementing its own
thread-safe logic. So from the
The other night I spent about three hours trying to figure out why
some code I had was behaving so strangely. It got to the point where I
was convinced I found a bug in gcc - but as always, it was the pilot
at fault. It turns out I forgot to terminate several of my
variable-argument lists with a ni
You can configure this in IB. Put IB in the list-view mode (click the
center button of the 3-part button in the upper-left of the project
window). Find and select your table view in the list, and uncheck
'Reordering' and perhaps 'Column' in the inspector.
___
This code works just fine for me:
NSLog(@"%@", NSStringFromRange([[NSSpellChecker
sharedSpellChecker] checkSpellingOfString: @"hello, hwo are you
today?" startingAt: 0]));
Which prints '{7, 3}', as expected. I'll go out on a limb and guess
that you're trying to access the spell checker from a
'NutArray' must be declared as an NSMutableArray to respond to
-addObject. NSArray is immutable, and thus doesn't respond to
-addObject:.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to t
I'd imagine the easiest way to do this is using an AppleScript, which
can be embedded in your app using the NSAppleScript class.
But I've got a whole lot of PTSD towards AppleScript, so if it were
me, I would deal with the AppeEvents directly, much as it's done here:
http://developer.apple.com/do
> Don't abuse property lists; if you need a database, use a database.
Indeed. And if you can/aren't already, use a binary plist. And load
the data in a background thread, to keep the UI snappy.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Ple
The link error is pretty self-explanatory. To solve issues like this,
I'd first change the header like so:
extern NSString *const someString;
and create a SharedDefs.m:
NSString *const someString = @"halla";
This way, any object file can reference someString, but only one
object file wi
> clearly simplicity is important, but i'd like to know if there is a
> limit for the amount of arguments which a method can handle?
The C99 standard states that conforming compilers must support at
least 127 function arguments. I don't know if GCC enforces a limit
above this, but if it doesn't, t
NSOpenPanel is what you're looking for.
___
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-admins(at)lists.apple.com
Help/Unsubscribe/Update yo
In Xcode: in the left column, under the "Executables" disclosure
group, double-click your executable. Click the 'Arguments' tab at the
top, and in the bottom section of that window, you can set environment
variables for when your app is launched.
___
Coc
Personally, I've found zombies to be perfect in tracking down
over-releases. Check out 'NSZombieEnabled'.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
Your question is unclear and doesn't make much sense.
Please give lots of clarification, and consider posting your question
on a list where it's more on-topic, such as darwin-dev or launchd-dev
(over at macosforge).
David
___
Cocoa-dev mailing list (Co
Check out CGPostKeyboardEvent.
___
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-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscr
I see this error at least several times a week. Searching through this
week's logs from my work computer:
ibtool[6341]: -[NSConcreteAttributedString initWithString:] called
with nil string argument...
mdworker[422]: -[NSConcreteAttributedString initWithString:] called
with nil string argument...
> Actually, I accidently used [self class] in a class method two weeks ago,
> and it was causing a crash. I forget the circumstances, but when I caught
> that I was using [self class] and changed it to self, everything worked
> fine. So I don't know what the difference is, but there apparently is a
I'd do something that would look vaguely like this:
NSColor *color = [NSColor colorWithPatternImage: patternImage];
[[NSGraphicsContext currentContext] saveGraphicsState];
[path addClip];
[color set];
NSRectFill([self bounds]);
[[NSGraphicsContext currentContext] restoreGraphicsState];
Disclaimer
> It does? Last I checked, AEWP() used a temp file on disk to pass its
> AuthorizationRef to the child process. Pipes, anyone?
Hah. I wonder what temp directory it uses?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin re
> Right now, there is about about a 1-second delay after a click on a
> segment before its menu will appear.
>
> Is there a way to remove this delay in bringing up a menu attached to a
> segment?
This isn't typical - if you create a new project and just drop a NSSC
in a window, you'll see there's
Nice. I spent an hour or two fiddling with your test project and
eventually gave up. Good to see you solved it.
David
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact th
> 1. Non-privileged process A running as user Alice creates a file
> called /tmp/ipc.
> 2. A signals to privileged process B, running as root, that the file exists.
> 3. Malevolent process C, running as user Eve, notices the file,
> unlinks it (which it can do due to the permissions on /tmp) and
>
I use /tmp. Works great for me - I use it to save temporary files that
another privileged process then moves to a permanent location. Launchd
uses it too, along with a host of other things.
But yeah, where you put your temporary files really depends on the
context and who needs to see the them.
D
Hello,
I would try creating a subclass of NSScrollView, and figure out under
what conditions the NSScrollView feels that it needs to display the
vertical scroller. Perhaps the solution is as simple as overriding
-hasVerticalScroller to always return NO. So in your NSScrollView
subclass, I would st
> I have no idea where this is coming from, none of my classes appear to call
> any methods related to this. What issue would cause this error?
Try setting a breakpoint in CGImageSourceCreateWithData()...
___
Cocoa-dev mailing list (Cocoa-dev@lists.appl
> It would be great if we could get a reason as to why it seems to always
> return NO. My guess would be that there could be a significant performance
> overhead using the KVO mechanism for every layer's property?
That was my first thought, too. But after thinking about it, it's my
understanding t
Hello,
A few days ago I was having this same issue. The reason KVO doesn't
work out-of-the-box with CALayer subclasses, I believe, is because
CALayer overrides +automaticallyNotifiesObserversForKey: to return NO.
My solution was to override +aNOFK: in my custom subclass to return
YES for my custom
> text rects. Has anyone come up with a very fast way to estimate the size of
> some text, more importantly the vertical size given a width.
You didn't mention that you tried NSAttributedString (specifically,
its -size method.) Does it suit your needs, or is it what you consider
too slow?
David
_
While I'm not familiar with the original discussion, I will say that
the effect you're going for can easily be created using a shadow. If
it doesn't look right, the values you're using to create the shadow
probably need tweaking. For the recessed look, I use a shadow offset
of (0.0, 1.1) or (0.0, -
Check out NSAlert, specifically +alertWithMessageText:... and
-beginSheetModalForWindow:...
___
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-a
> - (void)threadMethod:(id)anObject
> {
> NSAutoreleasePool* outterPool = [[NSAutoreleasePool alloc] init];
>
> NSDictionary* userDefaults = [NSUserDefaults standardUserDefaults]
> importantValue = [[userDefaults objectForKey:@"myKey"] boolValue];
+standardUserDefaults don't return no dic
> It's not Cocoa, but CFUserNotificiation is probably the closest in spirit to
> NMInstall. I don't know if the notification dialog persists if your process
> exits.
It does.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post ad
> Where does this go as it is drawing the image, not the text? The image is
> drawn with a RectFill call??
Ah, sorry. I meant to say:
NSRectFillUsingOperation(rect, NSCompositeSourceOver);
Note that point here is that however the image is finally drawn, you
have to make sure you're drawing it us
> Makes the text transparent, but I can't seem to make the background of the
> NSImage transparent. I want to end up with white text on a transparent
> background, but [[NSImage alloc] initWithSize:[theString size]] seems to set
> the background to solid white.
This is because you're drawing the i
There are several ways to accomplish this.
(I'll note that you can get the size of an attributed string using its
-size method.)
Option 1: Create an NSImage with the size returned from the attributed
string. Draw the attributed string into the image. Create an NSColor
pattern from the image, usin
I don't have an answer for you, but I'd like to mention that I've also
experienced some strange issues with the ObjectAlloc tool. Last night
I was seeing an NSWindow that was released to the point that it would
have a retain count of -10 and I'm not sure how thats possible. It
seems, to me at least
- (void)setAllowedFileTypes:(NSArray *)types
___
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-admins(at)lists.apple.com
Help/Unsubscribe/Upda
Hey,
The first thing that comes to mind is throwing an exception, catching
it, then accessing the NSException's -callStackReturnAddresses. From
there, you'll need to turn the addresses into symbol names. I googled
it a little bit and found these references:
http://developer.apple.com/documentatio
Hey list,
Earlier today I spent awhile trying to re-find some sample code that I
discovered awhile ago. I eventually found it, and thought I would
mention it here in hopes that it'll help someone in the future.
It allows you to handle signals safely within your app's runloop,
rather than trying t
> Is it all right to init an object just to dealloc it in the next line (or
> create an autorelease object using a convenience method for that matter)? I
> mean, if i made it non-static, i would have something like this in the class
> that uses it:
>
> DatabaseCreator *dbc = [DatabaseCreator creato
You might be compiling for four architectures - PPC 32/64, Intel
32/64. Compiling for each of these can of course greatly increase your
app's size, since you're essentially combining four versions of your
app into one binary file. Check your release target to see what
architectures it's compiling f
Cocoa has always been lacking in the RegEx department (at least the
'built-in' Cocoa classes, there's a bunch of third-party regex
frameworks), especially when compared to languages like Python. Since
your situation isn't very complex, I would just use the bread-n-butter
string APIs:
NSString *ori
> +bundleWithIdentifier: is also available if there's no obviously suitable
> class to use with +bundleForClass:.
... and according to the docs:
+bundleWithIdentifier:
This method is typically used by frameworks and plug-ins to locate
their own bundle at runtime. This method may be somewhat more
To get the path to a bundle that's loaded inside an arbitrary process,
I create a stub subclass of NSObject (let's call it MyStubClass) and
simply call [NSBundle bundleForClass: [MyStubClass class]];
This technique is the most straightforward way I know of to accomplish
what you're looking for - i
> If I do a NSBundle *thisBundle = [NSBundle bundleForClass:[self class]]; it
> won't compile.
I'm going to go out on a limb and say you're using the above line in a
plain-C function rather than an Objective-C class. Is this correct?
'self' is meaningless/undefined outside of the Objective-C clas
You probably need to set the image scaling on the segments added at
runtime. Use NSSegmentedControl's -setImageScaling: forSegment:.
The values you can use are listed in NSCell.h:
NSImageScaleProportionallyDown = 0, // Scale image down if it is
too large for destination. Preserve aspect ratio
Wow, look at that. -setShowsResizeIndicator:. And it's been there
since 10.0, dunno how I missed it.
___
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 co
I finally got clicks forwarding to another process. I made an example
project, available here: http://www.docdave.com/clicktest.zip
NOTE: You have to setup the project first - in the Globals.h file,
define 'PID' to the process that you want clicks to be forwarded to,
and 'WID' to the window ID of
> There are actually 2 NSEvent methods that aren't in my local docs here at
> work, but are in the headers and on developer.apple.com:
>
> + (NSEvent *)eventWithCGEvent:(CGEventRef)cgEvent;
> - (CGEventRef)CGEvent;
Woops :) That could be why I wasn't able to send click events to other
apps' window
> How do I enable the resize button without enabling drag-resize?
> - Do I use windowWillResize:toSize: to be notified? How am I notified of
> the user clicking clicking the button?
To satisfy both these requirements, I would first disable window
resizing for your window in IB. Then, somewhere in
> I quickly tested CGEventPostToPSN() and was able to click Safari's
> menu bar from my test app, but was not able to click inside Safari's.
Sorry, that was meant to say:
...but was not able to click inside Safari's windows.
___
Cocoa-dev mailing list
> Is it possible to send a simulated mouse click to a specific window,
> overlapped by others?
CGEventPostToPSN() is what you want - but unfortunately it looks like
a little hackery will be involved to get it working. NSEvent has a
'windowNumber' property associated with it, but it doesn't look li
201 - 300 of 324 matches
Mail list logo