|IRC Nick||Time (GMT-7)||Message|
I have a question
|Guest37764||04:09||How I can pass MyPLuginAPI pointer to another object?
basicly access to API methods from other objects
gotta look that up ;)
it depends what you're going to do
shared_from_this() creates a JSAPIImplPtr
for use in c++ you could use boost::shared_ptr<MyPLuginAPI>
could/should/usually want to
|Guest37764||04:09||ok i try...
Ok seems that works correctly
Now I can call JS API
Problem, I try to use js->Invoke an I have an error
|reichi||05:09||what's the error? ;)|
|Guest37764||05:09||In browser Error: Error calling method on NPObject, when i call method that do something an calls other agin jsapi|
|Guest37764||05:09||and in terminal: shared_ptr.hpp:418: T* boost::shared_ptr<T>::operator->() const [with T = FB::JSAPI]: The declaration `px != 0' not met|
for your case
|Guest37764||05:09||using shared_from_this(), the plugin crash
using boost::share_ptr ... is OK, but I can use nothing?
|reichi||05:09||what i wrote above is only a typedef
shared_from_this() should not crash
iirc you can't use that in the constructor
don't call it from the constructor
what i did is give ma API class a "onPluginReady"
and in the Plugin class (the one derived from PluginCore) do: (FB::ptr_cast<MyPluginAPI>(getRootJSAPI()))->onPluginReady();
in it's onPluginReady Method
because if you do it in the constructor of your API class, the Plugin itself has not finished initializing
which supposedly causes the crash
The problem is constructor
what i described above is how i did it
|Guest37764||05:09||All the time I was passing this in contructor|
|reichi||05:09||and it hink it's ok :)|
|Guest37764||05:09||Wow I am very stupid
I think that it is documented
|reichi||05:09||I'm not sure it's documented
if you add some debug you'll see why that has to fail ;)
(or if you know how things are being initialized)
I think that I have similar problem creating two JSAPIAuto objects
|reichi||06:09||never do that in the constructor ;)
for JSAPIAuto Objects
|Guest37764||06:09||But in this case i need registerMethods
|reichi||06:09||just pass "this"
registerMethod("createApplication", make_method(this, &OipfApplication::createApplication));
But when i try do something with this objects i cant registermethods or use FB_EVENT
and i use similar templeta that come with FB
|reichi||06:09||reigsterProperty/Method has to be done in the Constructor
I'm not sure about that
but it definitely works fine :)
|Guest37764||07:09||I'm trying to trigger js events with an object but it is impossible. Compile, and then crash|
|reichi||07:09||well that's no information to work with|
|taxilian||09:09||Guest37764 we need a bit more details on what you're doing
you're trying to fire an event; you using the firebreath event macro? then how are you calling it?
|Greenlove||19:09||woops, prep scripts are doesn't detect installed wix toolset...|
|Greenlove||19:09||is anybody there?
|GreenLove||20:09||did you know update for WIX?|
|taxilian||20:09||where did you install WiX?|
|GreenLove||20:09||i downloaded from codeplex?
i re-running prep script after install WIX.
but, script doesn't detect wix.
|taxilian||20:09||where did you install WiX
where on your hard drive
|taxilian||20:09||WHERE did you install Wix?
I figured it was probably on your hard drive
that isn't very helpful
|GreenLove||20:09||c:\program files\wix toolset v3.6|
|taxilian||20:09||let me check
ok; they've changed the install path
|GreenLove||20:09||oh so how to fix this problem?|
|taxilian||20:09||try setting a system env variable WIX=c:\program files\wix toolset v3.6|