Create new Wisej control - opentip ToolTip problems

0
0

Hi,

i’m trying to create textBox tooltip control using http://www.opentip.org/ library.

https://imgur.com/WKGrOrZ

the control is working but I’ve 2 problems.

1. i’m having problem while try rendering the tooltip value – _applyValue js method not firing.

2.in design mode i have an error  : ‘no such property wrap’

thanks for help!

project link : https://ufile.io/myrws

Orel

 

 

 

  • You must to post comments
0
0

Thanks for your help Luca.

Best,

Orel

  • You must to post comments
0
0

Yep, it’s the javascript closure that stores only the last values on the stack. Change the js class to the attached and it works.

  • You must to post comments
0
0

Hi Luca,

you right, its working when the app has been loaded for the first time , but when i’m pressing F5 and reload the app just last ToolTip appears to have a value.

I’ve add just one more TextBox to the attached sample and set different ToolTip for each TextBox.

As i mentioned, after F5 and reloading its seems not to be working..

Best

Orel

  • You must to post comments
0
0

I don’t understand the problem you mentioned. I can set the open tooltip to multiple controls.

  • You must to post comments
0
0

Hi,

any news?

 

Thanks

Orel

  • You must to post comments
0
0

HI Luca!
thanks again for your kind help.

I’ve checked your fixes and they are work just fine for one control.

There is a new problem when i’m adding more then one control.in that case just the last control that renders gets the tooltip value

Thanks for you help again

 

Orel

  • You must to post comments
0
0

Hi Orel, see attached.

Some issues:

  • The opentooltip.js class was derived from control, it’s not a control anymore, it’s an extender (or a plain javascript object) that manages properties for other widgets. See the declaration of the tooltip.js extender.
  • Opentooltips (like all jquery) operates directly on element, it cannot handle delayed dom created (or fastdom). Wisej widgets are not created in the dom until later when all properties can be rendered in one go. I added some code that checks if the dom is created, and if not it simply listens for the “appear” event.
  • You don’t need to manage the property values. When you declare a property the qooxdoo framework takes care of everything.
  • The apply methods are useful only if you need to do something on the widget/object when the property changes.
  • The alignment property will not work. You need an enumeration that matches the values used by the opentooltip librarys. The Placement enumeration in wisej has many more combinations than the ones supported in the opentooltip lib.

HTH

 

  • You must to post comments
0
0

Hi Luca!
thank you very much for your great answer!
I’ve tried your solution and its works.

I’ve used the ToolTip class that you attached and used the wisej js source code.

right now I’ve succeeded make it work only for the first app running.

when i press F5 and the app is reloading the _applyOpenTipValue method is called before the screen is done rendering and i’m getting an error..

how i can solve this problem?
Thanks you again!

Orel

  • You must to post comments
0
0

Hi Orel, here are the issues (easy to fix):

  • the missing “wrap” property is caused by Multiline=true in WebApplication1 because your OpenTip class overrides the className and sets it to “wisej.web.ext.TextBoxOpenTip” which is derived from wisej.web.TextBox. Multiline textboxes are implemented in wisej.web.TextArea since in the browser they are different things. See wisej js source code here: https://github.com/iceteagroup/wisej-qx/tree/master/wisej The TextBox class in Wisej changes the className when Multiline is true.
  • _applyValue is not called because of the wrap error which occurs at runtime too (in console).
  • You changed the appearance key making the textbox lose the theme values.

 

I would remove the IWisejControl interface from the class definition and remove the AppearanceKey change. Change the name of “_applyValue” to “_applyOpenTipValue” to avoid conflicts. Remove Multiline=true to see your extension work (it works).

Another problem is that if you want to add the opentip everywhere you can’t override all wisej controls. It should be done as an extender, so you can drop it on  the container and it works for all controls. You can find the js source code using the link above, look for wisej.web.extender.ToolTip.js.

I have attached the C# source code of the ToolTip extender implementation in Wisej that you can use as a reference.

 

 

Attachment
  • You must to post comments
Showing 9 results
Your Answer

Please first to submit.