Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Perl on OSX > Re: CamelBones....
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1031 of 1056
Post > Topic >>

Re: CamelBones...

by sherm.pendley@[EMAIL PROTECTED] (Sherm Pendley) Jan 10, 2008 at 02:52 PM

------=_Part_31306_21246753.1199994733656
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Simplest thing would be to start with the "Document based Perl app"
template. There are several ways you can get at the file's contents - as
an
NSURL, an NSString local file path, an NSFileWrapper, or an NSData object.
All you do is get info on the target in Xcode, set up the extension
(.whatever) and set the document's UTI.

The UTI is a backwards-domain string similar to Java's package naming
scheme. So you'd probably use com.nytimes.dneville.ProjectName or
something
similar. Once you've assigned the file type info, you'll have sup****t for
the standard File menu, recent documents, and drag-n-drop sup****t for
document files - it's all standard stuff, already built into Cocoa's
NSDocument architecture.

If you'd prefer not to use document-based apps, you can register as the
shared NSApplication's delegate, and handle the dropped files by
responding
to the -application:openFile: and/or -application:openFiles: delegate
messages.

You can also configure your app to read and/or edit standard types like
txt
or jpg, by using specific Apple UTIs, instead of UTIs based on your own
domain. For details about UTIs:

    <
http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_intro/chapter_1_section_1.html
>

sherm--

On Jan 10, 2008 9:31 AM, Dan Neville <dneville@[EMAIL PROTECTED]
> wrote:

> Hi,
> I am writing an application in Perl and compiling it in CamelBones.
> I want to make it a Drag&Drop.  I can't get the pasteboard to pass
> the file or folder information to the script.  Does anyone have an
> example I could use as a template?
>
> Am I correct in thinking that the link is in the pList?  I can't find
> this in any documentation.
>
> Thanks...
> Dan
> --
>
>
>

------=_Part_31306_21246753.1199994733656--
 




 1 Posts in Topic:
Re: CamelBones...
sherm.pendley@[EMAIL PROT  2008-01-10 14:52:13 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sun Jul 6 9:45:28 CDT 2008.