FROM : Yvon Thoraval
DATE : Fri Jul 28 20:47:06 2006
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
DATE : Fri Jul 28 20:47:06 2006
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
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

