Xojo Conferences
XDCMay2019MiamiUSA

Re: [MBS] AXObserverMBS not working (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] RegisterScreenVDIG
Next thread: [MBS] [ANN] MonkeyBread Software updates tutorial movies


Re: [MBS] AXObserverMBS not working   -   Pencil
  Re: [MBS] AXObserverMBS not working   -   Christian Schmitz
   [MBS] Re: AXObserverMBS not working   -   Pencil
    Re: [MBS] Re: AXObserverMBS not working   -   Christian Schmitz
     Re: [MBS] Re: AXObserverMBS not working   -   Pencil
      Re: [MBS] Re: AXObserverMBS not working   -   Christian Schmitz

Re: [MBS] AXObserverMBS not working
Date: 16.04.08 09:00 (Wed, 16 Apr 2008 17:00:19 +0900)
From: Pencil
Hi, Christian.
I'm also very interested in AXObserverMBS class and I found these
articles.
I found a Observer Test.rbp modified on Feb 20 2008 in new examples
and I tried it.
But it still returns -1 in AddNotification function in Switched event
and the Action event of MyObserver class never fires.

Are there any problems?

Tried it on Leopard, Intel Mac
----------------------
Hazime Gushi
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] AXObserverMBS not working
Date: 16.04.08 14:50 (Wed, 16 Apr 2008 15:50:17 +0200)
From: Christian Schmitz
Pencil <<email address removed>> wrote:

> Hi, Christian.
> I'm also very interested in AXObserverMBS class and I found these
> articles.
> I found a Observer Test.rbp modified on Feb 20 2008 in new examples
> and I tried it.
> But it still returns -1 in AddNotification function in Switched event
> and the Action event of MyObserver class never fires.
>
> Are there any problems?

AddNotification returns -1 if any only if one of the following
conditions is true:

- not a carbon target
- AXUIElement reference is nil
- CFString reference is nil
- AXObserver reference is nil (that's the object iself)
- The OS function is not available

So you need to pass in a valid AXUIElementMBS object, a valud
CFStringMBS object and you need to Call Create before.

Gruß
Christian

-

[MBS] Re: AXObserverMBS not working
Date: 28.04.08 08:48 (Mon, 28 Apr 2008 16:48:19 +0900)
From: Pencil
Christian, you may overlooked my previous post. So I repost it.

Christian, now I know the problem. You mean that these functions work
on Carbon PEF. Not Carbon Mach-O!When I build the example project with
Rb2007r3 for Mac OS X and Mac OS 9 which means Carbon PEF build, it
works perfect.
But Mach-O App is more modern. As you know, Latest version of Rb
can't make Carbon PEF.So, can you make AXObserverMBS class possible
to work on Carbon Mach-O?

a supplement; I found an explanation on the Plugin Documantation that
AXObserverMBS works on only Carbon PEF.
--------------------
Hazime Gushi

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Re: AXObserverMBS not working
Date: 28.04.08 08:55 (Mon, 28 Apr 2008 09:55:11 +0200)
From: Christian Schmitz
Pencil <<email address removed>> wrote:

> a supplement; I found an explanation on the Plugin Documantation that
> AXObserverMBS works on only Carbon PEF.

A bug in the documentation. It should work fine on Mac OS X.

Gruß
Christian

-

Re: [MBS] Re: AXObserverMBS not working
Date: 28.04.08 23:46 (Tue, 29 Apr 2008 07:46:58 +0900)
From: Pencil
Strange...
FYI, Switched method in the Observer Test.rb, there are following two
lines.
o=new MyObserver
error=o.Create(pid)

When I build this example as Carbon PEF with Rb2007r3,
error returns 0 and this example works.
When I build it as Carbon MachO,
error returns -25201 and it doesn' t work.

I got same result on both my Intel Mac and PPC Mac.

Any suggestions are appreciated.

Thank you very much.
-------------------------
Hazime Gushi

On 2008/04/28, at 16:55, Christian Schmitz wrote:

> Pencil <<email address removed>> wrote:
>
>> a supplement; I found an explanation on the Plugin Documantation that
>> AXObserverMBS works on only Carbon PEF.
>
> A bug in the documentation. It should work fine on Mac OS X.
>
> Gruß
> Christian
>
> --
> Over 1000 classes with 20000 functions in one REALbasic plug-in.
> The Monkeybread Software Realbasic Plugin v8.2.
>
> <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
http://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] Re: AXObserverMBS not working
Date: 28.04.08 23:52 (Tue, 29 Apr 2008 00:52:04 +0200)
From: Christian Schmitz
Pencil <<email address removed>> wrote:

> Strange...
> FYI, Switched method in the Observer Test.rb, there are following two
> lines.
> o=new MyObserver
> error=o.Create(pid)
>
> When I build this example as Carbon PEF with Rb2007r3,
> error returns 0 and this example works.
> When I build it as Carbon MachO,
> error returns -25201 and it doesn' t work.
>
> I got same result on both my Intel Mac and PPC Mac.
>
> Any suggestions are appreciated.

Here you have the list of error codes:

kAXErrorSuccess = 0,
kAXErrorFailure = -25200,
kAXErrorIllegalArgument = -25201,
kAXErrorInvalidUIElement = -25202,
kAXErrorInvalidUIElementObserver = -25203,
kAXErrorCannotComplete = -25204,
kAXErrorAttributeUnsupported = -25205,
kAXErrorActionUnsupported = -25206,
kAXErrorNotificationUnsupported = -25207,
kAXErrorNotImplemented = -25208,
kAXErrorNotificationAlreadyRegistered = -25209,
kAXErrorNotificationNotRegistered = -25210,
kAXErrorAPIDisabled = -25211,
kAXErrorNoValue = -25212,
kAXErrorParameterizedAttributeUnsupported = -25213,
kAXErrorNotEnoughPrecision = -25214

So is the PID valid? Permissions maybe?

Gruß
Christian

-