Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13780

Re: JSObject.call(method, ARGS) with Safari

Path csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From "Richard Maher" <maher_rj@hotspamnotmail.com>
Newsgroups comp.lang.java.programmer, comp.lang.javascript
Subject Re: JSObject.call(method, ARGS) with Safari
Date Sun, 22 Apr 2012 12:46:11 +0800
Organization HTTP *is* The Box - Let's think outside
Lines 63
Message-ID <jn02en$5gp$1@speranza.aioe.org> (permalink)
References <jmu16i$ij2$1@speranza.aioe.org> <YOGkr.11325$DB1.340@newsfe03.iad>
NNTP-Posting-Host jOhPn0KFjrxwuMc9OPMmCw.user.speranza.aioe.org
X-Complaints-To abuse@aioe.org
X-MimeOLE Produced By Microsoft MimeOLE V6.00.2900.6157
X-RFC2646 Format=Flowed; Response
X-Notice Filtered by postfilter v. 0.8.2
X-Newsreader Microsoft Outlook Express 6.00.2900.5931
X-Priority 3
X-MSMail-Priority Normal
Xref csiph.com comp.lang.java.programmer:13780 comp.lang.javascript:13521

Cross-posted to 2 groups.

Show key headers only | View raw


"Daniel Pitts" <newsgroup.nospam@virtualinfinity.net> wrote in message 
news:YOGkr.11325$DB1.340@newsfe03.iad...
> On 4/21/12 3:12 AM, Richard Maher wrote:
>> Hi.
>>
>> Has anyone been able to pass the ARGS parameter to JSObject's "call" 
>> method
>> *and* pass arguments via the "args" parameter? An example of your
>> work-around perhaps?
>>
>> I'm having no trouble calling methods on all sorts of complex Javascript
>> objects but when it comes to passing the arguments array I keep getting
>> nullpointerexception :-(
>>
>> Firefox, IE, Chrome, and Opera are all onboard and ok.
>>
>> Cheers Richard Maher
> Not sure if this helps, but in the past I've had to do some hacky 
> work-arounds to work with JSObject.
>
> Check out: 
> <http://virtualinfinity.net/wordpress/tools/2008/10/11/javascript-and-java-applets/>
>

Hi Daniel,

Thanks as always for your replies.
>
> Hope this helps,

It certainly helped a couple of years ago (with FireFox 2.n or 3.0?) when 
you first showed me your cunning solution. That was my first (well probably 
about 5th as is happens) port of call.

You may not recall, but that's when I first introduced the JS 
"Tier3Client.launder" function that just took a JSObject a a parameter and 
returned the same JSObject which was automagically fixed/rinsed. This worked 
well back in the day but now FF, IE, Chrome, and Opera (and JSObject) all 
seemed to have moved on and the "fix" was looking redundant - until Safari 
and its insistence on the "First Generation plug-in" :-(

The problem is my solution is not working with Safari and I think Safari has 
other issues. I used to getMember("Tier3Client") on the applet window and 
then call my "launder" on that. If you look at the code I posted just before 
you'll see that I was trying to be "clever" and use an anonymous JS function 
to return a launder function. As this could well have been an issue, I 
reverted to the tried and tested method but still no joy.

Anyway, I'll give your code/solution a go shortly but I'm not hopeful given 
that I can't even get a simple appletWindow.call("topLevelFunction", args) 
to do other than return "null". Without arguments is not a problem.

So in the meantime if anyone knows of an example JSObject.call("sayHello", 
WITHargs) that works in Safari can they please provide a pointer?

> Daniel.

Cheers Richard Maher

PS. NO *NOT bloody EVAL* - call, Call, CALL()! 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

JSObject.call(method, ARGS) with Safari "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-21 18:12 +0800
  Re: JSObject.call(method, ARGS) with Safari "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-21 18:15 +0800
    Re: JSObject.call(method, ARGS) with Safari Lew <noone@lewscanon.com> - 2012-04-21 04:45 -0700
      Re: JSObject.call(method, ARGS) with Safari Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-21 09:57 -0300
        Re: JSObject.call(method, ARGS) with Safari "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-21 21:30 +0800
          Re: JSObject.call(method, ARGS) with Safari Lew <noone@lewscanon.com> - 2012-04-21 13:07 -0700
        Re: JSObject.call(method, ARGS) with Safari Lew <noone@lewscanon.com> - 2012-04-21 13:00 -0700
  Re: JSObject.call(method, ARGS) with Safari Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-04-21 15:48 -0700
    Re: JSObject.call(method, ARGS) with Safari "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-22 12:46 +0800
      Re: JSObject.call(method, ARGS) with Safari "Richard Maher" <maher_rj@hotspamnotmail.com> - 2012-04-22 15:07 +0800
        Re: JSObject.call(method, ARGS) with Safari Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-22 21:17 -0300
          Re: JSObject.call(method, ARGS) with Safari Richard Maher <maherrj@googlemail.com> - 2012-04-22 23:40 -0700
            Re: JSObject.call(method, ARGS) with Safari Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-04-23 20:40 -0300

csiph-web