CSS & Web Design Forum  

Welcome to the CSS & Web Design Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
WM Media Banner

Supporters
Pos Software - POS hardware and Software to track, control and manage your inventory.
Web Templates - BoxedArt is the most reliable source for unlimited template downloads.

Directory Submission
WL Marketing - Your #1 source for building links

Go Back   CSS & Web Design Forum > Web Design > AJAX, Javascript & DOM
Reply
 
Thread Tools Search this Thread Display Modes
(#1)
Old
Richard Maher
Guest
 
Default Re: Daniel Pitts on JSObject and FireFox - 04-27-2009, 04:19 AM

I wrote about: -
http://groups.google.com/group/comp....8f34311e797e79
> > Daniel's post shows up as 25/9/2008 so there's every chance that it's

state
> > of the art. Does anyone have any better/other/more-integrated ideas?


Daniel Pitts wrote: -
> It was state-of-the-art when I posted it. Since then, I've also run into
> what appears to be threading issues causing firefox to crash :-( It's
> unfortunate because every other aspect of our tool was targeting firefox.


In case it helps anyone, an alternative to Daniel's method of bypassing the
FF bug with JSObjects is simply to pass the JSObject into a Javascript
function and return it straight back as in: -

Tier3Client.launder =
function(jsobject) {
return jsobject;
}

8<-------------------

public int sendMessage (JSObject msgBuf,
String msgIn,
int windowSlotId)
throws IOException,
Tier3ClientException
{
System.out.println("In Session sendmessage");

WindowSlot windowSlot = getWindowSlot(windowSlotId);

rinseArgs[0] = msgBuf;
try {
cleanBuf = (JSObject)windowSlot.namespace.call("launder",
rinseArgs);
}
catch (Exception e) {
throw new Tier3ClientException("Unable to launder Message
Buffer", e);
}

Even though Internet Explorer doesn't suffer from the same bug as FireFox,
the work around is valid for both so, in this case, I haven't bothered to
conditionalize the code. IIRC Daniel's example didn't work on IE?

Obviously you could create the "launder" function on the fly with a unique
name via eval() rather than use a predefined static function.

At least one other thing about FF that I find annoying is that when
JSObject.call() fails it does so silently. I'm toying with the idea of
CALLing another static "dispatch" function and have Javascript to the
apply()/call(). Anyone suffering from conviction one way or the other?

Regards Richard Maher



Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump



Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Hosting at Triple.com
vBulletin Skin developed by: vBStyles.com

Printing Company  Link Building Services