PDA

View Full Version : Problems getting client-side validation tooltip



jakeext
25 Aug 2009, 1:53 PM
Hello,

I'm having trouble getting the validation error tooltip to appear when a client-side validation fails (i.e. empty textfield that is required). I've included a very simple example to show this. I'm using Ext 3.0, and I see this happening in Firefox 3.5.2 and IE6. If you click in the text field then click out, you'll see the red outline around the text field indicating an error, but if you hover over the text field, no tooltip is shown. This worked for me in Ext 2.x, but not in 3.0 for some reason. Any thoughts?



Ext.onReady(function() {
new Ext.form.FormPanel({
renderTo: document.body,
items:[
new Ext.form.FieldSet({
items:[{
xtype: 'label',
text: 'Required Field:'
},{
xtype: 'textfield',
name: 'requiredField',
blankText: 'blank text message',
allowBlank: false
}]
})
]
});
});

Animal
25 Aug 2009, 2:23 PM
Have you called Ext.QuickTips.init() ?

jakeext
26 Aug 2009, 6:23 AM
Yep, that was it. I must have forgotten about this line from when I had it working in 2.x. Thanks again Animal!

Animal
26 Aug 2009, 6:43 AM
I just revamped the API doc comments for that section. They were not quite all there.

As questions arise, I always look to see if there could have been more help in the API docs, and add some extra for the next person.

Eventually, there'll be tumbleweed on this forum because there will be no questions to ask because everyone will have learned everything from the API docs! :)) (Where's the emoticon for hollow laughter?)

jakeext
26 Aug 2009, 7:27 AM
The API docs are fantastic, so you guys are definitely doing a great job there. I'm just grateful that there's always someone here willing to help out - thanks!

Animal
26 Aug 2009, 9:39 AM
Thanks, I have worked very hard on the docs many many nights - all on a pro bono basis, I am not an Ext employee.

Perhaps you could show TheBerliner the docs you look at, and find out what he has been looking at because he's been here months, and still claims, in his sig no less that the documentation is "frugal".

I just cannot fathom it. I just don't know where he could actually be going when he sees browser links to API doc pages!

steffenk
26 Aug 2009, 9:50 AM
I know exactly what this mean, i do a simular job in TYPO3, also pro bono

The docs are really fantastic, but as all it can be enhanced :)

I thought docs are autogenerated, so you have to fix that in the phpDoc of svn?

And forget about the claiming of Berliner, he claims about JS in general, and all IDEs, and ...
The only thing i could claim is my disability sometimes finding the right way, but this is quite a normal process of learning by doing.

Animal
26 Aug 2009, 9:55 AM
Yes, it's a work in progress, and always will be. There are still dusty corners of the API docs that contain really obscure, terse stuff that Jack wrote when he originally wrote the system. I'm trying to search that out and get it up to standard.

Take a look at http://extjs.com/deploy/dev/docs/?class=Ext.CompositeElementLite for an example of a not very good class overview. "Flyweight composite class."? Huh? What is it for?

Yes, the docs are autogenerated from comments in the source code. If you look at class headers you will see comment which begin with



/**
* @class Ext.Component
* Blah blah...


They are parsed and extracted to create HTML files.

steffenk
26 Aug 2009, 10:06 AM
good example of ununderstandable thing :)

btw - i often wonder about the used examples in the docs. The same example is used at several places - ok, c&p is king, but it doesn't help. Would be great to have an example matching the exact class. But this is really hard work. We do the same, since years we're cleaning code from the origin author, an endless work. You do a great job, i hope you get enough support from the others, but as often there are 3-5 active and many non-active devs which can be frustrating for the actives to get things solved, bugs fixed and features implemented. Hope you keep your enthusiasm amd love to the great product ExtJS obvious is!

Animal
26 Aug 2009, 10:09 AM
There was a thread in Open Discussion in which I invited people to post code snippets which could be useful to illustrate examples of things in the API docs.

I did not get many offers. The thread is languishing on page 64 of the folder!

steffenk
26 Aug 2009, 10:24 AM
i will dig :)

steffenk
27 Aug 2009, 2:19 AM
Hi Animal,

i had no luck finding this thread, could you have a look?

Animal
27 Aug 2009, 2:24 AM
I've bumped it.

http://extjs.com/forum/showthread.php?t=40317&page=7