bgcolor problem

View: New views
2 Messages — Rating Filter:   Alert me  

bgcolor problem

by Ryan Golhar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm using Gbrowse2, v1.9971.  I'm trying to customize the bgcolor for
one of my tracks using something like this:

bgcolor         = sub {
                     my %colors = (0 => '#000099');
                     return $colors{0};
                 }


However, this code keeps giving the error:
[error] An error occurred while evaluating the callback at
section='Castellana_AtPeptide', option='bgcolor':, referer:
http://localhost/gb2/gbrowse/arabidopsis/
[error]     => Can't find string terminator "'" anywhere before EOF at
(eval 112) line 1., referer: http://localhost/gb2/gbrowse/arabidopsis/
[error]   at
/usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Bio/Graphics/Browser.pm
line 246, referer: http://localhost/gb2/gbrowse/arabidopsis/

I've determined it has something to do with the single-tick quotes.  I
tried different ways to get around this but am constantly getting
different errors.  Is this a problem with my code, or is this something
with Gbrowse that I'm not aware of?


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse

Re: bgcolor problem

by Wes Barris :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ryan Golhar wrote:
> I'm using Gbrowse2, v1.9971.  I'm trying to customize the bgcolor for
> one of my tracks using something like this:
>
> bgcolor         = sub {
>                      my %colors = (0 => '#000099');
>                      return $colors{0};
>                  }

Hi Ryan,

The error is a result of gbrowse interpreting the '#' character as
a comment even though you are using valid perl code.  The way to
solve this is to make the '#' character using the 'chr' function:

                       my $hash = chr35);
                       my %colors = (0 => ${hash}000099");


>
> However, this code keeps giving the error:
> [error] An error occurred while evaluating the callback at
> section='Castellana_AtPeptide', option='bgcolor':, referer:
> http://localhost/gb2/gbrowse/arabidopsis/
> [error]     => Can't find string terminator "'" anywhere before EOF at
> (eval 112) line 1., referer: http://localhost/gb2/gbrowse/arabidopsis/
> [error]   at
> /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Bio/Graphics/Browser.pm
> line 246, referer: http://localhost/gb2/gbrowse/arabidopsis/
>
> I've determined it has something to do with the single-tick quotes.  I
> tried different ways to get around this but am constantly getting
> different errors.  Is this a problem with my code, or is this something
> with Gbrowse that I'm not aware of?
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Gmod-gbrowse mailing list
> Gmod-gbrowse@...
> https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse


--
Wes Barris <wes.barris@...>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Gmod-gbrowse mailing list
Gmod-gbrowse@...
https://lists.sourceforge.net/lists/listinfo/gmod-gbrowse