divyang4481 / firebreath

Automatically exported from code.google.com/p/firebreath
0 stars 0 forks source link

testEvent method not accessible #35

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Build plugin
2. Open <plugin_name>\gen\FBControl.htm
3. Click "set onload (ff)"
4. Click "Fire onload"

What is the expected output? What do you see instead?
Alert box with "test" should appear. Instead I get "plugin.testEvent is not 
a function" error in console.

What version of the product are you using? On what operating system?
Tried both 1.0rc3 and current state of repository.

Original issue reported on code.google.com by rch...@gmail.com on 23 Mar 2010 at 9:47

GoogleCodeExporter commented 8 years ago
Are you referring to a new generated project? I looked at it, they simply don't 
have any method testEvent - we 
have to bring the test-pages and/or the generated plugins up-to-date.

Until then take a look at the wiki how to add events and methods:
http://code.google.com/p/firebreath/wiki/classJSAPIAuto

Original comment by georg.fritzsche on 23 Mar 2010 at 10:07

GoogleCodeExporter commented 8 years ago
Side-note: As i noticed the signature of Opera QA - if you just want to test 
events you can use the FBTestPlugin 
(might need fixed html) or BasicMediaPlayer (windows only atm, includes 
test-page in 
examples/BasicMediaPlayer). 
The project file can be generated via "prepYourPlatForm examples" and is found 
in buildex/.

Original comment by georg.fritzsche on 23 Mar 2010 at 10:36

GoogleCodeExporter commented 8 years ago
Yes, I'm referring to new project generated according to 
http://code.google.com/p/
firebreath/wiki/CreatingANewPluginProject.

I have now compiled one of the examples - FBTestPlugin. This one does have 
testEvent 
method implemented.

Indeed example page had error in testEvent call (it expects one argument but 
two 
were passed). But I still can't make it work.

First did:
 plugin.addEventListener('load', function(test) { alert(test); })
then:
 plugin.testEvent('onload')
or:
 plugin.testEvent('load')

but no alert show up.

We identified one problem with scripting which manifests itself when calling 
one 
plugin method after calling another plugin method (somehow old method seems to 
be 
called) but not sure if that's the reason for original issue #27. 

Rafał Chłodnicki
Core QA, Opera Software ASA

Original comment by rch...@gmail.com on 23 Mar 2010 at 10:53

GoogleCodeExporter commented 8 years ago
Just FYI, the solution to this bug will be to remove those links; those apply
directly to the example "FBTestPlugin", and I think they work with that plugin. 
 They
should not be there on a new plugin project.

Try building the FBTestPlugin project (prep2008.cmd examples instead of just
prep2008.cmd) and try your tests on that.

Original comment by taxilian on 23 Mar 2010 at 11:02

GoogleCodeExporter commented 8 years ago
I did more or less that as I explained in my previous comment. :)

Original comment by rch...@gmail.com on 23 Mar 2010 at 11:52

GoogleCodeExporter commented 8 years ago
Actually the event is called 'onfired', somehow the test-page never got 
updated. 
I pushed an updated test-page: examples/FBTestPlugin/test.html
(Updating the fbgen parts will have to come later.)

When you see other problems, open a new issue or drop a mail on the dev-list.

Original comment by georg.fritzsche on 24 Mar 2010 at 12:04

GoogleCodeExporter commented 8 years ago
The fbgen templates are now also up-to-date.

Original comment by georg.fritzsche on 24 Mar 2010 at 1:06

GoogleCodeExporter commented 8 years ago

Original comment by georg.fritzsche on 24 Mar 2010 at 1:26