AppleEventObjectSpecifier question 
Author Message
 AppleEventObjectSpecifier question

I tried to do something with appleScript:

Get control integer for window indexed integer to get the nth control of

the nth window; In RealBasic, this doen't work:

obj=w.control(event.IntegerParam("----"))
event.ReplyObjectSpecifier=obj 'Type mismatch

or

obj=w.control(event.IntegerParam("----"))
event.ReplyObjectSpecifier=AppleEventObjectSpecifier obj 'Unknown
identifer "AppleEventObjectSepecifier"

I tried for a list of control, too:

obj=w.Control(i)
event.ReplyDescList.AppendObjectSpecifier obj 'same thing

the documentation says that ReplyObjectSpecifier musst be an
AppleEventObjectSpecifier; To a received appleEvent, I understand, but I

can't see how to create an AppleEventObjectSpecifier without an
appleEvent.
Do you have any idea?



Sat, 28 Dec 2002 03:00:00 GMT  
 AppleEventObjectSpecifier question

Quote:

> I tried to do something with appleScript:

> Get control integer for window indexed integer to get the nth control of

> the nth window; In RealBasic, this doen't work:

> obj=w.control(event.IntegerParam("----"))
> event.ReplyObjectSpecifier=obj 'Type mismatch

> or

> obj=w.control(event.IntegerParam("----"))
> event.ReplyObjectSpecifier=AppleEventObjectSpecifier obj 'Unknown
> identifer "AppleEventObjectSepecifier"

> I tried for a list of control, too:

> obj=w.Control(i)
> event.ReplyDescList.AppendObjectSpecifier obj 'same thing

> the documentation says that ReplyObjectSpecifier musst be an
> AppleEventObjectSpecifier; To a received appleEvent, I understand, but I
> can't see how to create an AppleEventObjectSpecifier without an
> appleEvent.
> Do you have any idea?

You get ahold of an AppleEventObjectSpecifier with one of the
Get...ObjectDescriptor methods.

None of which matters, though, because you're looking for ReplyInteger,
since you want to return an integer. I'd guess you want:

event.ReplyInteger i

RB's terminology is a little confusing here. You can't just return a
reference to a code object or control object. You return an object as
defined in your app's object *model*. I mean, if your applescript has a
reference to, say, a popup menu on a window, what can it really do with
it? On the other hand, if you tell the script what text is selected in
the popup menu, it then has information it can use. Better still, there
wouldn't be room in the model for a popup menu, but instead the model
would have a construct like 'settings for window n.' Then you could
radically change the user interface without having to change the
scripting implementation.

HTH.

--
"A speck of dust now blows away/Epiphanies can never stay."



Sat, 28 Dec 2002 03:00:00 GMT  
 AppleEventObjectSpecifier question

Quote:


> > I tried to do something with appleScript:

> > Get control integer for window indexed integer to get the nth control of

> > the nth window; In RealBasic, this doen't work:

> > obj=w.control(event.IntegerParam("----"))
> > event.ReplyObjectSpecifier=obj 'Type mismatch

> > or

> > obj=w.control(event.IntegerParam("----"))
> > event.ReplyObjectSpecifier=AppleEventObjectSpecifier obj 'Unknown
> > identifer "AppleEventObjectSepecifier"

> > I tried for a list of control, too:

> > obj=w.Control(i)
> > event.ReplyDescList.AppendObjectSpecifier obj 'same thing

> > the documentation says that ReplyObjectSpecifier musst be an
> > AppleEventObjectSpecifier; To a received appleEvent, I understand, but I
> > can't see how to create an AppleEventObjectSpecifier without an
> > appleEvent.
> > Do you have any idea?

> You get ahold of an AppleEventObjectSpecifier with one of the
> Get...ObjectDescriptor methods.

> None of which matters, though, because you're looking for ReplyInteger,
> since you want to return an integer. I'd guess you want:

> event.ReplyInteger i

> RB's terminology is a little confusing here. You can't just return a
> reference to a code object or control object. You return an object as
> defined in your app's object *model*. I mean, if your applescript has a
> reference to, say, a popup menu on a window, what can it really do with
> it? On the other hand, if you tell the script what text is selected in
> the popup menu, it then has information it can use. Better still, there
> wouldn't be room in the model for a popup menu, but instead the model
> would have a construct like 'settings for window n.' Then you could
> radically change the user interface without having to change the
> scripting implementation.

> HTH.

Thanks; Still another question: Why, on the online help, the appleEvent
function has several informations to send appleEvents, not for receiving
them; Does another documentation, for this, exists?


Sun, 29 Dec 2002 03:00:00 GMT  
 AppleEventObjectSpecifier question

Quote:


> > I tried to do something with appleScript:

> > Get control integer for window indexed integer to get the nth control of

> > the nth window; In RealBasic, this doen't work:

> > obj=w.control(event.IntegerParam("----"))
> > event.ReplyObjectSpecifier=obj 'Type mismatch

> > or

> > obj=w.control(event.IntegerParam("----"))
> > event.ReplyObjectSpecifier=AppleEventObjectSpecifier obj 'Unknown
> > identifer "AppleEventObjectSepecifier"

> > I tried for a list of control, too:

> > obj=w.Control(i)
> > event.ReplyDescList.AppendObjectSpecifier obj 'same thing

> > the documentation says that ReplyObjectSpecifier musst be an
> > AppleEventObjectSpecifier; To a received appleEvent, I understand, but I
> > can't see how to create an AppleEventObjectSpecifier without an
> > appleEvent.
> > Do you have any idea?

> You get ahold of an AppleEventObjectSpecifier with one of the
> Get...ObjectDescriptor methods.

> None of which matters, though, because you're looking for ReplyInteger,
> since you want to return an integer. I'd guess you want:

> event.ReplyInteger i

> RB's terminology is a little confusing here. You can't just return a
> reference to a code object or control object. You return an object as
> defined in your app's object *model*. I mean, if your applescript has a
> reference to, say, a popup menu on a window, what can it really do with
> it? On the other hand, if you tell the script what text is selected in
> the popup menu, it then has information it can use. Better still, there
> wouldn't be room in the model for a popup menu, but instead the model
> would have a construct like 'settings for window n.' Then you could
> radically change the user interface without having to change the
> scripting implementation.

> HTH.

Thanks, it's true that I can't do great things for objects by scripting, but
I use a returned object to allow parameters in my AppleEvents to pass these
object instead of being required to specify a window index, or control index;
Still another question: Why, on the online help, the appleEvent
function has several informations to send appleEvents, not for receiving
them; Does another documentation, for this, exists?


Sun, 29 Dec 2002 03:00:00 GMT  
 AppleEventObjectSpecifier question

Quote:

> Still another question: Why, on the online help, the appleEvent
> function has several informations to send appleEvents, not for receiving
> them; Does another documentation, for this, exists?

Matt's book has a bunch of information, and the Developer's Guide has a
paragraph or two.

--
"A speck of dust now blows away/Epiphanies can never stay."



Mon, 30 Dec 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. AppleEventObjectSpecifier doesn't work…

2. Questions-Questions-Questions-Answers-Answers

3. Question(Questions, questions...)

4. Newbie Question: Realbasic Question

5. Questions Questions

6. Questions and more questions...

7. Browse Question / Report question

8. ***Data buffering question. Long post, lots of questions

9. questions, questions!

10. Questions, questions!

11. MicroWorlds Pro "QUESTION Set Size" question

12. OS/2 REXX Question (Object REXX Question Inside)

 

 
Powered by phpBB® Forum Software