• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[NewB]How to open a titled document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NewB]How to open a titled document


  • Subject: [NewB]How to open a titled document
  • From: Yvon Thoraval <email@hidden>
  • Date: Fri, 28 Jul 2006 20:47:06 +0200

hey all,

that's the first time i'm doing a (Ruby)Cocoa Document application.

by inpecting the example "RubyRaiseMan" i'm able to open an untitled document.

however i'd like to automatically open a document on the desktop, if any, i want to give a name automatically.

i did :

          @doc_win.setTitle(f)

if i print out this title using :

p "@doc_win.title=#{@doc_win.title}"

i get the correct title (ie f) BUT the window didn't change is name even with an #oc_display (ruby equivalent to Obj C needsdisplay...)

also i'd like to have this document opening the application, as usal, when double clicking on it ?

i know i need something like :

@appleEventManager=OSX::NSAppleEventManager.sharedAppleEventManager
@appleEventManager.setEventHandler_andSelector_forEventClass_andEventID( self, 'openDocumentWithContentsOfURL:display:error:', 'TEXT'.unpack ('N')[0], 'TEXT'.unpack('N')[0])



because i was able to use getURL but here i don't know what to put as a Selector and eventClass ???


best,

Yvon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Manually pull a menu down?
  • Next by Date: CoreData unresolved keypath after save
  • Previous by thread: Re: Charting class?
  • Next by thread: CoreData unresolved keypath after save
  • Index(es):
    • Date
    • Thread