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: Proposed Ma...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 1035 of 1056
Post > Topic >>

Re: Proposed Mac::Pasteboard

by peter@[EMAIL PROTECTED] (Peter N Lewis) Jan 29, 2008 at 11:14 AM

>  > and then write Mac::Clipboard using Mac::Pasteboard to expose only the
>>  clipboard.  In the SEE ALSO section you can reference Mac::Pasteboard
>>  and people who need the advanced functionality can find it.
>
>Interesting thought. The straightforward implementation would be to
>have Mac::Clipboard depend on Mac::Pasteboard (since there's no
>simplified clipboard interface that I have found). But it seems un-
>parsimonious to me to use namespace for maybe a dozen lines of Perl,
>since right now the "clipboard" part is on the order of

Given that Pasteboard offers a lot more functionality than just 
pbcopy/pbpaste, I would have though Clipboard would similarly offer 
all the functionality of Pasteboard, except only to the default 
standard clipboard.

So where Mac::Pasteboard might have a function that returns the list 
of flavors of the fifth item in the a specific pasteboard, 
Mac::Clipboard would have a function that returns the list of flavors 
of the fifth item, but only in the default system clipboard.

Obviously, you want some nice easy routines to extract the clipboard 
flavours as text (getting the unicode text if possible, the plain 
text if not), but you want that same functionality for all 
Pasteboards as well as for the system clipboard, so you would again 
have a function in Mac::Pasteboard that returns the text of the top 
item of a specified pasteboard and a function in Mac::Clipboard that 
returns the text of the top item in the system clipboard.

If Mac::Pasteboard is implemented in a functional manner, then you 
could use "undef" as the pasteboard parameter to specify the system 
pasteboard.

If Mac::Pasteboard is implemented in an OO manner, then 
Mac::Clipboard would be essentially identical, except instead of a 
factory function that takes a pasteboard name, it has just a factory 
function that returns the Mac::Pasteboard object for the system 
clipboard.

But regardless of the details, I think Mac::Clipboard would want to 
be far more than just an interface equivalent of pbcopy/pbpaste.

Enjoy
    Peter.

-- 
Keyboard Maestro <http://www.keyboardmaestro.com/>
Macros for your Mac
<http://www.stairways.com/>
          <http://download.stairways.com/>
 




 1 Posts in Topic:
Re: Proposed Mac::Pasteboard
peter@[EMAIL PROTECTED]   2008-01-29 11:14:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Thu Jul 24 0:44:15 CDT 2008.