Subclass NSURLProtocol, and file /Developer/Examples/WebKit/PictureBrowser/

2010-10-28 Thread Wayne Shao
Hi, I tried to find an example of subclassing NSURLProtocol. Some web forums points to /Developer/Examples/WebKit/PictureBrowser/, which is not on my system. How do I install that? Or is there another similar example? -- W. Shao ___ Cocoa-dev mailing

Handle drop to WebView: WebDragDestinationActionDHTML

2010-10-27 Thread Wayne Shao
I would like to handle drop to WebView to not load the dropped object, but to perform some customized action. However, I ran into similar issues as described here: http://lists.apple.com/archives/webkitsdk-dev/2005/May/msg00046.html Basically, for these two callbacks in WebUIDelegate, - A. –

how to stack two views vertically (and resize properly)

2010-10-21 Thread Wayne Shao
Hi, I have this layout: A container view C, with two sub-views in vertical order: a Box B on the top, and a WebView W at the bottom. Box B --- WebView W In IB, I set the following resize property: B: fixed top edge and fix height, take whole width of the parent W: fixed botto

how to include pure C++ header in obj-C in Xcode

2010-08-09 Thread Wayne Shao
Hi, I have a C++ util class (note: pure C++, it does not use obj-c objects in the C++ files). When I added the C++ classes to Cocoa project, it compiles fine. But when I add C++ include from the ObjC class, it gives all kinds of errors. (Note: this is different from what the guide describes here

Re: override hyperlink handler for WebView

2010-08-03 Thread Wayne Shao
/Perl/Python/Ruby. > > > On Aug 3, 2010, at 12:17 AM, Wayne Shao wrote: > >> Hi, >> >> I'd like to present some HTML content in WebView. >> >> The HTML content is from a local file, with references to some local images >> and a few hyperlinks. >

override hyperlink handler for WebView

2010-08-03 Thread Wayne Shao
Hi, I'd like to present some HTML content in WebView. The HTML content is from a local file, with references to some local images and a few hyperlinks. However, I want to override the click of all hyperlinks in the page so that I open it within my application. When the user clicks on a hyperli

Re: how to deploy the sqlite file in my Cocoa application installation

2010-07-17 Thread Wayne Shao
, wrote: > > On Jul 16, 2010, at 5:23 AM, Mike Abdullah wrote: > > > SQLite is not part of Cocoa, so this is the wrong list. You should > either: > > > > 1) Find the SQLite docs/list > > 2) Use Core Data instead > > > > On 16 Jul 2010, at 02:39, Way

how to deploy the sqlite file in my Cocoa application installation

2010-07-15 Thread Wayne Shao
Hi, I am using sqlite in my cocoa application (for regular mac desktop/laptop). 1. How do I initialize the sqlite (e.g, make sure empty tables with the correct schema is put at the right path) as part of the application installation? 2. Any documentation on the install/packaging of my applicatio

Finder view in an application

2010-07-06 Thread Wayne Shao
Hi, Is it possible to display a standard Finder view inside my cocoa application? I need to display the info about a given directory managed by the application. Note: I do not want to launch Finder from my app. Thanks, Wayne -- W. Shao ___ Cocoa-dev

newbie questions on NSString* as a class attribute

2009-04-21 Thread Wayne Shao
Let's say that I have a member variable NSString* logFilePath, I do init in the initWith method as logFilePath = [[some_other_path stringByAppendingPathComponent:@"log.txt"] copy]; The question is, if I do not call copy, is it true that logFilePath could be subject to be GC'ed? Anothe

imap client library?

2009-04-21 Thread Wayne Shao
Hi, Is there any built-in or other imap client library for Xcode projects? I just need to perform read-only operations such as go to fetch all messages in a folder. Same question for the related MIME parsing library. Thanks, -- Wayne ___ Cocoa-dev mail

programatically quit a program

2008-08-28 Thread Wayne Shao
] teminate:??]; But the terminate function takes an id for sender. What shall I use? Thanks, -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: remove elements during the iteration on NSMutableDictionary

2008-08-06 Thread Wayne Shao
On Wed, Aug 6, 2008 at 7:41 AM, Negm-Awad Amin <[EMAIL PROTECTED]>wrote: > > Am Mi,06.08.2008 um 16:27 schrieb Wayne Shao: > > Hi > > Please see the question in the comments of the following code. > > NSMutableDictionary* aDictionary = (initialized with some

remove elements during the iteration on NSMutableDictionary

2008-08-06 Thread Wayne Shao
removal break or corrupt the loop of enumerating the elements? [anObject someMessage]; } in java, Iterators allow the caller to remove elements from the underlying collection during the iteration. is there similar semantics in objective-c? -- Wayne Shao

Re: image type of the AdressBook image data

2008-08-05 Thread Wayne Shao
Heinrich, Ken, Thank you both for the information. Wayne On Tue, Aug 5, 2008 at 2:51 AM, Heinrich Giesen <[EMAIL PROTECTED]> wrote: > > On 05.08.2008, at 10:03, Wayne Shao wrote: > >> The imageData method returns NSData*. Is there anyway to know the >> image type (

image type of the AdressBook image data

2008-08-05 Thread Wayne Shao
Hello, from "Address Book Objective-C Framework Reference" http://developer.apple.com/documentation/UserExperience/Reference/AddressBook/Classes/ABPerson_Class/Reference/Reference.html#//apple_ref/occ/instm/ABPerson/imageData The imageData method returns NSData*. Is there anyway to know the ima

pointers in objective-c?

2008-08-01 Thread Wayne Shao
It seems that every object is a pointer in the sample code I have seen. Is there any distinction between an object and its pointer? In C++, C* c; would be an uninitialized pointer. But the following line will creates an object with the constructor C(). C c; It seems that there is no such equiv

name and email address parsing

2008-07-22 Thread Wayne Shao
Hi, Does cocoe libraries support regex for common string parsing? I want to parse our the user's name from email address such as "Joe Smith" <[EMAIL PROTECTED]> Joe M. Smith <[EMAIL PROTECTED]> Joe M. Smith (joejoe) <[EMAIL PROTECTED]> joejoe would be nickname here. I n

CALayer contents and image aspect ratio

2008-07-01 Thread Wayne Shao
Hi, I provide a CGImageRef as the layer content. When the bounds of layer is changed, the image seems to be scaled to fit the bounds. Is there an option to keep the image aspect ratio? what possible key-value can I set for the layer's style property? Thanks, -- Wayne

Re: Save animation to QuickTime movie?

2008-06-22 Thread Wayne Shao
Hi, So if I have N images, do I need to create N-1 transition tracks using the API? -- Wayne Shao On Sat, Jun 21, 2008 at 2:48 PM, douglas a. welton <[EMAIL PROTECTED]> wrote: > I would suggest that you take a look at the sample code for CocoaMovieCreate > and MakeEffectMovie. I

does NSTextField always use UTF8 encoding

2008-06-17 Thread Wayne Shao
Hi, In my UI, a user may type in any string into a NSTextField, e.g. Chinese characters. Do I assume the return value from NSString * value = [textField stringValue] is always encoded with UTF8? I need to convert this to a properly url encoded value as a GET parameter. Thanks, -- Wayne Shao

question on layer setup in Covertflow sample code

2008-06-17 Thread Wayne Shao
that a sublayer is not geometrically constraint to be inside the bounds of its superlayer? 2) In Line A noted above, the content of layer is set. What is the impact of this to its sublayers? Later, the sublayer's content is also set. Thanks for any insights on this. --

Handle mouse event (click) in CALayer sublayers

2008-06-09 Thread Wayne Shao
If a CALayer has many sublayers, what is the best way to find out the layer that should receive mouse click event? Is there a good example of handling mouse event for layer-based NSView? Thanks, -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev

async NSOperation and NSOperationQueue

2008-06-08 Thread Wayne Shao
hat exactly I should do in the start() method?? If I create a thread, does the operation queue still enforce maxConcurrentOperationCount or I need to worry about that in my implementation? -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

simple text compression in Cocoa

2008-06-08 Thread Wayne Shao
of the data is static text. - ok with ObjC or C/C++ Thanks, -- Wayne Shao ___ 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

set up multiple columns in NSTableView

2008-06-03 Thread Wayne Shao
ableColumn. I wonder if that is the only way to setup column names for multi-column table view. Thanks, -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: Cover Flow in Cocoa?

2008-05-23 Thread Wayne Shao
On Fri, May 23, 2008 at 2:40 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On May 23, 2008, at 3:39 PM, Wayne Shao wrote: > > I never tried this on non-touch based devices. Not sure on the >> scrolling/selection experience. Any standard Apple apps with this interf

Re: Cover Flow in Cocoa?

2008-05-23 Thread Wayne Shao
Thanks, On Fri, May 23, 2008 at 2:37 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On May 23, 2008, at 3:33 PM, Wayne Shao wrote: > > I am thinking to use Cover Flow in cocoa app. >> >> - Is this a good idea for a desktop/laptop app? >> > > Why no

how to override image cell display in IKImageBroserView?

2008-05-23 Thread Wayne Shao
each cell? Thanks -- Wayne Shao ___ 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

Cover Flow in Cocoa?

2008-05-23 Thread Wayne Shao
I am thinking to use Cover Flow in cocoa app. - Is this a good idea for a desktop/laptop app? - What APIs are available? Thanks, -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: create a directory (UTF8 string) in cocoa

2008-05-21 Thread Wayne Shao
Thanks all for the responses! On Wed, May 21, 2008 at 6:14 PM, Michael Ash <[EMAIL PROTECTED]> wrote: > On Thu, May 22, 2008 at 8:12 AM, Wayne Shao <[EMAIL PROTECTED]> wrote: > > I could only fine mkdir() in C. Is there anything in Cocoa? I don't > think > >

any data on Mac OS X 10.5 install base?

2008-05-21 Thread Wayne Shao
make any meaningful commercial software Thanks -- Wayne Shao ___ 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

create a directory (UTF8 string) in cocoa

2008-05-21 Thread Wayne Shao
Cocoa? I don't think mkdir() can handle NSString. I need to include Chinese characters in my directory name. Thanks, -- Wayne Shao ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: load a Resource file template and search/replace a file

2008-05-19 Thread Wayne Shao
Thanks all for the responses! Wayne On Mon, May 19, 2008 at 9:47 AM, Nathan Kinsinger <[EMAIL PROTECTED]> wrote: > > On May 19, 2008, at 8:31 AM, Jens Alfke wrote: > > >> On 19 May '08, at 4:49 AM, Kyle Sluder wrote: >> >> - load the template from resource file >>> >>> Read the documentatio

load a Resource file template and search/replace a file

2008-05-19 Thread Wayne Shao
. OUT_DIR . Thanks, -- Wayne Shao ___ 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

iPhone SDK and IB plug-in link error

2008-05-09 Thread Wayne Shao
dependency for "MainMenu.xib". Recover Suggestion: Locate the com.apple.QTKitIBPlugin Interface Builder plug-in to continue opening this document But the plugin is included when I check the preference pane from the Interface Builder. Any ideas? --