• 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
handleGetURLEvent:withReplyEvent:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

handleGetURLEvent:withReplyEvent:


  • Subject: handleGetURLEvent:withReplyEvent:
  • From: Yvon Thoraval <email@hidden>
  • Date: Tue, 7 Mar 2006 14:43:22 +0100

Hey all,

first i have to say i'm a newbie in RubyCocoa, i did some examples in Obj-C-Cocoa just a bit more than the famous "helloWorld!"...

however i'm able to translate from Obj-C to Ruby.

now my question.

i've started an app which make use of Apple Event Maneger get URL.

am i on the correct mailing list for that kind of trick ?

for the time being my app is able to get frontmost if the correct protocol ("bmkm:" standing for BookMarks Manger) is entered in the URL field of both Safari and Firefox.

the app is able also to find the paramter passed with the URL (as for example Sogudi does with man:plutil)

then, i'm able to find back "bmkm:command_passed_to_the_app" within handleGetURLEvent:withReplyEvent:

now, i need to build the replyEvent which will send to the browser an url in the form of : "file://blahblah" or "http://blahblah";

i've a first of reading Apple Event Manger and related documentation, however i'm not sure at all this it is a first class understanding.

let me tell what i understood :

because, in my case the replyEvent will address to the same app that the one which send the incoming event message, i don't have very much to do in order to build a replyEvent.

in short i've only to change the string "bmkm:command_passed_to_the_app" (input) to "http://blahblah"; (ourput).

in order to get "bmkm:command_passed_to_the_app" i do, whithin "handleGetURLEvent:withReplyEvent:" :

    keyDirectObject = "----"
    url = event.paramDescriptorForKeyword(keyDirectObject).stringValue

and i get it.

(i've suppressed the ruby dialect of that)

now, i want to build a replyEvent which is, basically, the "same" as the incoming one except i have to setParamDescriptorForKeyword, i would say, something like :

replyEvent=event.setParamDescriptor:forKeyword: (again may be i'm totally wrong)

that's where my prob comes.

setParamDescriptor:forKeyword: has to args, the first being an NSAppleEventDescriptor the second an
AEKeyword .


if the above is true, i found no way to assign a string value for this keyWord while, when reading, i had the method #stringValue to get it.

that's my question : how to assign a particular string for this paramDescriptor and this keyWord ???

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: Help in Text Disaplaying
  • Next by Date: Re: Help in Text Disaplaying
  • Previous by thread: Re: Help in Text Disaplaying
  • Next by thread: Add and Edit a table row
  • Index(es):
    • Date
    • Thread