I use class UIDocumentInteractionController for two cases.
1. I want iOS to show the Open-In panel which lists *ALL* apps
supporting open-in with a JPEG/PNG files.
2. I want iOS to show the Open-In panel which only has an Instagram icon
in it.
For the first case, I use the following
I wonder whether you want to do this in the first place. I had tried the
same thing on Windows, that is, checking write permission upfront. I ended
up with just writing and letting it fail if the permission was not granted.
Windows permission rules are very complicated and API is quite unfriendly.
There once was a document Text System Overview, which seems to have
been removed from Cocoa document. Its title still appears in
references to class NSTextView, etc, but the link is broken.
What's the replacement to this document? I found one Cocoa Text
Architecture Guide, is it? Why is there
Hi all,
I tried to understand how NSTextView works with NSScrollView,
especially when wrapping disabled. My understanding is that NSTextView
automatically grow its height (by default) and its width (need some
tweak) according to users adding new line and adding new characters.
So I did an
The document says:
When re-creating each window, Cocoa passes the window’s unique identifier
string to the restoration class. You are responsible for assigning
identifier strings to your windows prior to preserving the window state.
Your restoration class can use these identifiers to determine
Thank you very much! - Dong
2011/12/18 Fritz Anderson fri...@manoverboard.org
On 18 Dec 2011, at 7:42 AM, Dong Feng wrote:
But what's the API to assign a unique ID to a window?
NSWindow conforms to NSUserInterfaceItemIdentification, whose only
method is:
@property (copy) NSString
For it's a fallback, I think you'd better just try the ScriptingBridge and
fallback whenever it fails. It's better than to check the Sandbox presence
all beforehand. Does that make sense?
Dong
2011/12/15 Eric Wing ewmail...@gmail.com
For a Mac app, is there a way to determine if sandboxing
I think Qiang's problem has nothing to do with the Lion's new asynchronous
opening mechanism. Qiang's problem is about whether or not
openDocumentWithContentsOfURL... is invoked or not, regardless synch or
asynched version. In 10.6, it is not invoked and in Lion it is invoked (and
happen to be the
: message.
Your Method 1 corresponds to the a case. Your Method 2 corresponds to the
b case.
--Andy
On Oct 5, 2011, at 1:32 AM, Dong Feng wrote:
I have a subclass of NSOpenGLView which named POpenGLView. I tried two
ways
to use it in IB:
Method 1:
To create an OpenGL view in IB
I have a subclass of NSOpenGLView which named POpenGLView. I tried two ways
to use it in IB:
Method 1:
To create an OpenGL view in IB directly, and set its class type
POpenGLView.
Method 2:
To create a NSView in IB, and set its class type POpenGLView.
The most significant difference between the
I encountered a wired behavior of NSTextView. I tried to use the following
statement to scroll to top:
[[_scrollView documentView] scrollPoint:NSMakePoint(0, 0)];
where the *documentView* is a NSTextView. But it seems when the window is in
certain size, the scroll-to-top behavior does not take
Thanks for all your replies, Martin and Paul.
Martin, I tried the [NSTextView scrollRangeToVisible:] with
NSMakeRange(0,0) , but it is the same as to use [scrollPoint:] solely. Only
with [glyphRangeForTextContainer:] in prior the scroll-to-top works. I don't
think it is the problem of coordinate
There is a option on IB to specify if an NSTextField Sent Action on
Enter Only or Sent Action on Editing. How to set the option
programmatically?
Thanks,
Dong
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
Hi Sean,
It is a superb answer to my initial question that ease my decision to
the next step work.
Thank you for the answer and for sharing your project. A great work!
Dong.
2009/6/16 Sean Murphy co...@seanmurph.com:
On Jun 14, 2009, at 5:01 AM, Dong Feng wrote:
I want to implement
I want to implement a pulldown list like what FireFox does with its
address bar (or its Google search bar). I think it involves to open a
borderless window and draw items through Cocoa drawing APIs.
But when I saw Safari 4, its pulldown list's appearance just like a
context-menu, I began thinking
Is there a way to make a framework not loaded until the first
invocation to one of its functions?
I know there is a way, that is, to not link the framework to the
executable, but use CFURLCreateWithFileSystemPath(). However, this
way, you have to resolve all functions you are going to use one by
I tried to launch without this flag, or with this flag set to 0.
Either way, it seems the function with __attribute__((constructor)) is
always invoked at launch time, that is, no delay load.
2009/6/13 Kyle Sluder kyle.slu...@gmail.com:
dyld (the OS X dynamic linker) already does this. You
When using an non-English input method, such as Japanese or Chinese,
the entered characters are first in a pending status (i.e. with an
underscore). Pressing the space key make those pending text converted
to the actual non-English characters. Pressing the Enter key make the
underscore beneath the
?
2009/5/20 Michael Ash michael@gmail.com:
On Tue, May 19, 2009 at 9:48 AM, Dong Feng middle.fengd...@gmail.com wrote:
When using an non-English input method, such as Japanese or Chinese,
the entered characters are first in a pending status (i.e. with an
underscore). Pressing the space
I think, for the modaless, you need simply invoke [NSWindow
makeKeyAndOrderFront:]. On Mac OS X, SystemModal and AppModal are the
same and it should work with runModalForWindow.
I'm not sure the behavior of kWindowModalityWindowModal.
2009/1/8 Russ matchmo...@yahoo.com:
I'm still looking for
How shall we handle the NSError object returned directly or indirectly
(through out parameter)? Shall it be released after use? I checked
the example code in Apple document but never see a returned NSError
object get released.
___
Cocoa-dev mailing
Thank you all for the answers.
2009/1/6 Dong Feng middle.fengd...@gmail.com:
How shall we handle the NSError object returned directly or indirectly
(through out parameter)? Shall it be released after use? I checked
the example code in Apple document but never see a returned NSError
object
If there are more than one items, with the same NSDocumentClass, in
the CFBundleDocumentTypes array of the Info.plist, I see the Save
As... save panel will be automatically augmented with an accessor
view containing a format pop-up. Meanwhile, the open panel of Open
File... does not have an
I have a concern that the direct use of a pointer as a memory address
may have a problem in the case of GC. In Java, object reference is not
a simple memory address because objects may be moved by GC. Does Cocoa
has a GC implementation avoid it?
2008/12/19 Carter R. Harrison
Seems a lot Apple documents say that a key-bindings dictionary should
be located either 1)
/System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict,
or 2) ~/Library/KeyBindings/StandardKeyBinding.dict.
However, the dictionary used by Xcode has different filename for case
2,
25 matches
Mail list logo