[Moo] new Tips: struggling with error

9 messages Options
Embed this post
Permalink
mmjaeger

[Moo] new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink

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.
anutron

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink
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.

On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:

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.

The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com
mmjaeger

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink

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?

On Nov 7, 4:15 pm, Aaron Newton <[hidden email]> wrote:

> 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.
>
>
>
> On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > 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.
mmjaeger

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink
In reply to this post by anutron

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 <[hidden email]> wrote:

> 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.
>
>
>
> On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > 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.
anutron

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink
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.

On Sat, Nov 7, 2009 at 4:54 PM, mmjaeger <[hidden email]> wrote:

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 <[hidden email]> wrote:
> 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.
>
>
>
> On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > 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.

The MooTools Tutorial: www.mootorial.com Clientcide: www.clientcide.com
mmjaeger

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink

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!!!!!!
On Nov 7, 6:07 pm, Aaron Newton <[hidden email]> wrote:

> 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.
>
>
>
> On Sat, Nov 7, 2009 at 4:54 PM, mmjaeger <[hidden email]> wrote:
>
> > 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 <[hidden email]> wrote:
> > > 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.
>
> > > On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > > > 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.
Steve Onnis

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink

Should it be

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

-----Original Message-----
From: mmjaeger [mailto:[hidden email]]
Sent: Sunday, 8 November 2009 2:13 PM
To: MooTools Users
Subject: [Moo] Re: new Tips: struggling with error


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!!!!!!
On Nov 7, 6:07 pm, Aaron Newton <[hidden email]> wrote:

> 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.
>
>
>
> On Sat, Nov 7, 2009 at 4:54 PM, mmjaeger <[hidden email]> wrote:
>
> > 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 <[hidden email]> wrote:
> > > 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.
>
> > > On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > > > 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.

mmjaeger

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink

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);

On Nov 7, 8:45 pm, "Steve Onnis" <[hidden email]> wrote:

> Should it be
>
> if (!$defined(el)) return false;
>
>
>
> -----Original Message-----
> From: mmjaeger [mailto:[hidden email]]
> Sent: Sunday, 8 November 2009 2:13 PM
> To: MooTools Users
> Subject: [Moo] Re: new Tips: struggling with error
>
> 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!!!!!!
> On Nov 7, 6:07 pm, Aaron Newton <[hidden email]> wrote:
> > 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.
>
> > On Sat, Nov 7, 2009 at 4:54 PM, mmjaeger <[hidden email]> wrote:
>
> > > 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 <[hidden email]> wrote:
> > > > 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.
>
> > > > On Sat, Nov 7, 2009 at 4:11 PM, mmjaeger <[hidden email]> wrote:
>
> > > > > 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.
mmjaeger

[Moo] Re: new Tips: struggling with error

Reply Threaded More More options
Print post
Permalink


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?