It seems to me that you want to also use NSTIFFPboardType/
NSPDFPboardType with the image data. Mail/iPhoto like to deal with
files (for attachments/library items), but TextEdit wants a raw image
(IIRC).
-W
On May 30, 2009, at 4:21 AM, Srinivasa Prabhu wrote:
Hi all,
I am trying to drag
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;
10.5-only, though.
On Apr 9, 2009, at 6:24 AM, Dave Keck wrote:
Is it possible to send
to one header, instead of
header + .m)
Cheers,
Memo.
On 3 Apr 2009, at 23:44, Quincey Morris wrote:
On Apr 3, 2009, at 15:15, Nate Weaver wrote:
IIRC they're optimized to point to the same memory location (I
wasn't sure, so I tested and confirmed).
I usually do:
NSString * c
IIRC they're optimized to point to the same memory location (I wasn't
sure, so I tested and confirmed).
I usually do:
NSString * const kConstantNameHere = @"foo";
That's what I've seen in Apple headers (with an extern at the
beginning and no assignment in said headers, of course).
On Apr
On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote:
- It's known that if any dialog is open in iTunes it freezes any
communication through the scriptable interface, how can I detect
that and
put all my "messages" in a queue, so that when iTunes is
responsive, I
can
send my messages?
W
Either set the attributed title of the items, or don't use the same
menu instance for your popup and context menu.
On Mar 18, 2009, at 11:38 AM, Eric Gorr wrote:
I have a popup menu whose control size is small.
To a couple of views, I have done the following:
[myView setMenu:[myPopupMenu me
Try setting the frame of the field/field editor instead (doing unit
conversions if necessary). When you change the bounds of something
explicitly, you end up changing the drawing transformation as well
(see under setBounds: and friends).
This has bitten me in the butt before (recently!).
H
Objective-C is a pretty small addition on the top of regular C. It's
the Cocoa libraries that take the time, no matter what language you use.
On Dec 31, 2008, at 2:22 AM, Achim Domma wrote:
Hi,
I develop software for a living and want to get started with cocoa
development just for fun. I'm
See the -outlineView:isGroupItem: delegate method.
On Dec 17, 2008, at 11:30 AM, Eric Gorr wrote:
This should be an easy one, but I am just not seeing it...
In the sample code found at:
http://developer.apple.com/samplecode/PhotoSearch/index.html
The background color of the rows containing t
This is the gist of it, I think. NSArray and NSDictionary should be
safe to store mutable objects, since they use an index or a key for
storage position, and not the object (the value) itself.
So (as I understand it): You *are* allowed to mutate objects in
collections, but only if the objec
You need to use NSXMLNode itself, and not NSXMLElement (since text
nodes aren't elements). [NSXMLNode textWithStringValue:someString] or -
[[NSXMLNode alloc] initWithKind:NSXMLTextKind], followed by -
setStringValue:. Then just addChild: or insertChild:atIndex: with your
new text node as norm
Addendum: I guess the format should actually be %O (unsigned long)
instead of %o (unsigned int) since it's defined as an unsigned long,
though the upper bits probably won't be filled at all.
On Aug 25, 2008, at 3:42 PM, Nate Weaver wrote:
unsigned long perms = [[file
I believe the built-in stuff (menus, sheets, etc.) uses the private
functions mentioned earlier. Honestly, if you really need this
function to work exactly the same, AFAIK the private stuff is the only
real way to do it. Simulating it via a custom NSView just seems really
hackish and error-
unsigned long perms = [[fileAttributes
objectForKey:NSFilePosixPermissions] unsignedLongValue];
NSString *permsInOctal = [NSString stringWithFormat:@"%o", perms];
HTH
On Aug 25, 2008, at 3:03 PM, Charles E. Heizer wrote:
Hello,
I have been googaling and searching but I must be missing someth
I think he wants to know when the directory contents change no matter
what changes them (i.e., not his app). I'd look into the FSEvents
framework or kqueue.
On Aug 25, 2008, at 11:16 AM, Negm-Awad Amin wrote:
Am Mo,25.08.2008 um 16:21 schrieb MAnish Billore:
Hi,
I am developing an image
Those are for URL encoding; I think he wants HTML entities. I can't
remember if there are Cocoa methods to do this, but you can use
CFXMLCreateStringByEscapingEntities() (since NSString * and
CFStringRef are toll-free bridged):
NSString *input = @"2 < 4";
NSString *output = (NSString
*)CF
- (BOOL)openURLs:(NSArray *)urls withAppBundleIdentifier:(NSString
*)bundleIdentifier options:
(NSWorkspaceLaunchOptions)optionsadditionalEventParamDescriptor:
(NSAppleEventDescriptor *)descriptor launchIdentifiers:(NSArray
**)identifiers
Long method name, but you can pass in
NSWorkspaceL
g 7, 2008 at 1:19 PM, Randall Meadows <[EMAIL PROTECTED]
pc.com> wrote:
On Aug 7, 2008, at 2:12 PM, Nate Weaver wrote:
I'd say just try the default options and see what happens. You
might also
look at -[NSWorkspace
performFileOperation:source:destination:files:tag:]
with NSWorkspa
I'd say just try the default options and see what happens. You might
also look at -[NSWorkspace
performFileOperation:source:destination:files:tag:] with
NSWorkspaceRecycleOperation as the first argument.
On Aug 7, 2008, at 2:03 PM, Randall Meadows wrote:
The description for FSMoveObjectToT
h (even it for now it works).
Le 23 juil. 08 à 20:01, Nate Weaver a écrit :
This is the route I follow. I use normal NSLog() statements for
conditions that "should never happen", and DebugLog() for debugging:
#ifdef DEBUG
#define DebugLog(s, ...) NSLog((@"%s %s:%d " s),
This is the route I follow. I use normal NSLog() statements for
conditions that "should never happen", and DebugLog() for debugging:
#ifdef DEBUG
#define DebugLog(s, ...) NSLog((@"%s %s:%d " s), __func__,
basename(__FILE__), __LINE__, ## __VA_ARGS__);
#else
#define DebugLog(s, ...)
#endif
T
FWIW, the default C dialect on OS X seems to allow a lot of C99 stuff
(I assume because it defaults to GNU extensions): variable
declarations anywhere in a block, "//" comments, and variable-length
arrays. It doesn't allow declarations in the start of a for loop,
though.
On Jun 4, 2008, a
Delegates *are* often automatically registered for their delegated
object's notifications, however. The differences between these and
"regular" delegate methods should be apparent in the documentation,
though, since the former will take a single argument of NSNotification
*.
(To help the
A delegate is simply another object that is asked for more information
or asked to do something (often optional) on behalf of the sender or
in response to something the sender does (e.g., a window resize, or a
table asking whether its selection can change).
So, if I'm correctly reading what
If you just want to let them choose a folder, use NSOpenPanel (calling
-setCanChooseFiles:NO and -setCanChooseDirectories:YES on the save
panel before displaying it).
On May 19, 2008, at 11:04 AM, Nick Rogers wrote:
Hi,
I have to let the user browse thru the filesystem and choose a
direct
If that's the case, you can simply check [yourTableView
numberOfSelectedRows] in -tableViewSelectionDidChange: and update the
bottom view based on the result.
On Apr 23, 2008, at 2:05 PM, Ewan Delanoy wrote:
Corbinn Dunn wrote
I'm not quite sure what you mean by "target" here
The
I would probably override -menuForEvent: instead of -rightMouseDown: .
Leopard also has a bit nicer contextual menu handing for table/outline
views: If you right-click a row that's not currently selected it
highlights just an outline and doesn't change the selection (you can
use -clickedRow
I think what you probably want is to not use a custom field editor,
but instead set your controller to the NSTableView's delegate (which
it probably already is) and use the @"NSFieldEditor" key of the
notification's userInfo dictionary to access the field editor.
(Hopefully NSTableView isn'
Whoops, this jogged my memory. For some reason in my last response I
thought -setAutoresizingMask specified the pinned margin and not the
expanding margin. I'm not sure why...
On Apr 2, 2008, at 11:13 AM, Cathy Shive wrote:
Hi Hendrik,
It seems that you're using the correct mask. The docum
You probably want to use NSViewMaxYMargin instead of NSViewMinYMargin
(NSViewMinYMargin is the bottom margin of the content view and not the
top).
On Apr 2, 2008, at 9:35 AM, Hendrik Holtmann wrote:
Hi,
I am creating a borderless window in source like this:
containerWindow = [[[ContainerWi
On Feb 28, 2008, at 3:18 PM, Hank Heijink wrote:
On Feb 28, 2008, at 2:56 PM, Nate Weaver wrote:
Interesting... I hadn't thought of that. Don't I have to add
another timer to the NSDefaultRunLoopMode though? If I have to
chose between having two timers on the main thread that
On Feb 28, 2008, at 1:49 PM, Hank Heijink wrote:
On Feb 28, 2008, at 1:46 PM, Nate Weaver wrote:
You could also use [[NSRunLoop mainRunLoop] addTimer:yourTimer
forMode:NSEventTrackingRunLoopMode] and avoid another thread
altogether.
Interesting... I hadn't thought of that. Do
the only reason I'm trying to draw on another thread
is that my drawing is timer-driven, and the timer gets suspended if
it's on the main thread and the user clicks on a menu or a scrollbar
or some such thing.
You could also use [[NSRunLoop mainRunLoop] addTimer:yourTimer
forMode:NSEventTracki
33 matches
Mail list logo