> > import Carbon.Scrap, AppKit, Foundation
> >
> > def clipcopy(arg):
> > Carbon.Scrap.ClearCurrentScrap()
> > scrap = Carbon.Scrap.GetCurrentScrap()
> > scrap.PutScrapFlavor('TEXT', 0, arg)
> That worked! Thanks a bunch.
> (Now I get to show what kind of a newbie I am.) Why should I
> put this into a class? Is it just better programming practice?
Well, making this into a class could allow you to simply extend the
functionality....
For example, you could store the changes in a LIST/queue and use the
class to store multiple clipboard entries....
>I suppose the
> answer may depend on what the script does and how complicated it is.
Exactly... It depends on how and what you are trying to do....
- Ben
_______________________________________________
Pythonmac-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig