new Tips: struggling with error

5 views
Skip to first unread message

mmjaeger

unread,
Nov 7, 2009, 7:11:15 PM11/7/09
to MooTools Users
Hello,
I'm getting the following error when hovering over my elements:
b.getParent is not a function
[Break on this error] this.timer=this.hide.delay(this.options....f(!b)
{return;}parentNode=b.getParent();\n

this is the code I use:
setTips: function() {
var els = $$('.ellipsis a');
if (els.length < 1) return false;

new Tips(els, {
text: function(item) {
var str = item.get('href');
str = str.substring(str.lastIndexOf('/')+12);
return str.replace('_',' ');
}
});
}

Hope somebody discovers what I'm missing

Thank you for your help.

Aaron Newton

unread,
Nov 7, 2009, 7:15:33 PM11/7/09
to mootool...@googlegroups.com
this is a bug that was fixed for 1.2.4.2 but I accidentally reverted it. It's back on -trunk now, so you can download the fix from github. Expect 1.2.4.3 maybe next week.

mmjaeger

unread,
Nov 7, 2009, 7:26:09 PM11/7/09
to MooTools Users
Thanks Aaron
Sorry for sounding stupid - but how would I go about downloading it
from github - as I'm using the compressed more file, I guess it's not
just copy/paste the new Tips code?

mmjaeger

unread,
Nov 7, 2009, 7:54:52 PM11/7/09
to MooTools Users
Something else I don't understand but maybe that's related to the bug:
when I hovering over the links, the first time the tip shows the title
or href of that link - afterwards, the tip is not updated anymore and
always shows the first text?!

On Nov 7, 4:15 pm, Aaron Newton <aa...@iminta.com> wrote:

Aaron Newton

unread,
Nov 7, 2009, 9:07:19 PM11/7/09
to mootool...@googlegroups.com
the default text is the 'rel' attribute and if that's not defined, the 'href' attribute (else, if neither present, empty). the caption comes from the 'title'

note that it removes the title attribute in the process to prevent the default browser-based tip from showing.

I don't know about your issues. can you make a mooshell that demonstrates the problem?

To download and use the one in trunk, go to github and browse to the file and save the "raw" version of it. Then just include it after your built mootools library. this is temporary; just until we release the fix officially.

mmjaeger

unread,
Nov 7, 2009, 10:13:16 PM11/7/09
to MooTools Users
actually the script works in Safari the way it is - just fails in
Firefox, but I'm sure you already know that.

by the way, did you see my other post regarding the table sorting
still no luck with it - no error - nothing

this is the function I'm using:

setTableSort: function() {
var el = $('tblDownload');
if ($defined(el)) return false;
var table = new HtmlTable(el, {
sortIndex: 0,
parsers: ['string', 'string', 'numberLax', 'date'],
classHeadSort: 'expand',
classHeadSortRev: 'collapse',
sortable: true,
onSort: function() {
console.log('done sorting');
}
});
table.sort(2);
},


once again, thank you so much for your help and patience!!!!!!

Steve Onnis

unread,
Nov 7, 2009, 11:45:06 PM11/7/09
to mootool...@googlegroups.com
Should it be

if (!$defined(el)) return false;

mmjaeger

unread,
Nov 7, 2009, 11:54:55 PM11/7/09
to MooTools Users
you spotted one I guess - however, I'm still getting no action to the
script:

var el = $('tblDownload');

var table = new HtmlTable(el, {
sortIndex: 0,
parsers: ['string', 'string', 'numberLax', 'date'],
classHeadSort: 'expand',
classHeadSortRev: 'collapse',
sortable: true,
onSort: function() {
console.log('done sorting');
}
});
table.sort(2);

mmjaeger

unread,
Nov 8, 2009, 2:26:22 AM11/8/09
to MooTools Users

I'm still struggling with the Tips - updated the latest source from
github - one thing that's confusing is the documentation: the title
options is supposed to be used for the title - however, hover over my
links shows the content or the rel tag - if I change it to text, I get
the correct text, at least in Safari - Firefox still fails - I get the
tip text of the first link and then it just keeps that text - it's not
updated.

Here again is my code:

setTips: function() {
var els = $$('.ellipsis a');
if (els.length == 0) return false;
var trim = 1;
new Tips(els, {
text: function(item) {
var str = item.get('title');
var reg = /_/g;
str = str.substring(str.lastIndexOf('/')+trim);
return str.replace(reg,' ').toUpperCase();
}
});
}

I must be missing something?

tross

unread,
Dec 3, 2009, 8:51:29 AM12/3/09
to mootool...@googlegroups.com

I'm having trouble with the tips also, any news on a release date for 1.2.4.3
yet?

cheers
--
View this message in context: http://n2.nabble.com/Moo-new-Tips-struggling-with-error-tp3966281p4106135.html
Sent from the MooTools Users mailing list archive at Nabble.com.

Aaron Newton

unread,
Dec 3, 2009, 10:06:38 AM12/3/09
to mootool...@googlegroups.com
hi guys.

Sorry that 1.2.4.3 has been held up. I've been ill for the last 4 or 5 days and now I'm at this Rich Web Experience conference (note: transcontinental travel is not a good cold remedy). If I get some time tonight I'll try and work on it. Maybe this week. We'll see. Depends on how much spare time I have here and how well this cold lets me focus on things for more than a few moments.

This forum, however, is not the best place to file bugs. I can't remember every thread. That's what lighthouse is for.

So please, go to lighthouse, open a ticket for your issues, if at all possible, please, please create a mooshell that demonstrates the problem and, if you have time, see if you can't figure out the nature of the bug and a fix for. Finding the bug itself and fixing it is beyond the call of duty, but it does help us out a lot.

Aaron
Reply all
Reply to author
Forward
0 new messages