[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Multiple gsub statements in one line possible?

Kurt Euler

9/5/2003 5:27:00 AM

Joe- Good point. I guess I don't need an in-place gsub (!)

Thx!

-Kurt



Date: Thu, 4 Sep 2003 15:04:58 +0900
References: 81081 </cgi-bin/scat.rb/ruby/ruby-talk/81081>
Forgive me for stating the obvious... Do you have to do in-place gsub? Can
you get away with this?:

pkg_bug_base = pkg_bug_base.gsub(/<sp_num>/,
sp_num_string).gsub(/<rel_num>/, rel_num)

"Kurt Euler" <keuler@portal.com> wrote in message
news:C47CCC6238EFD4119C5200508B95A1000C1A5C1D@cup1ex1.portal.com...
> All-
>
> For the string called pkg_bug_base, I'm currently using the following code
to make some substitutions:
>
> pkg_bug_base.gsub!(/<sp_num>/, sp_num_string)
> pkg_bug_base.gsub!(/<rel_num>/, rel_num)
>
> Question: Is there a way to put this all on one line? I tried this, but
the code crashed here:
>
> pkg_bug_base.gsub!(/<sp_num>/, sp_num_string).gsub!(/<rel_num>/,
rel_num)
>
> Thanks.
>
> -ke






2 Answers

Klaas Deforche

8/19/2009 8:37:00 AM

0

Hi Thomas,

Looks like a problem on the client side...

Try removing the usage data (AX button -> extra - options - usage data -
reset),
or/and remove the AUC cache file from you client (located at C:\Documents
and Settings\[USERNAME]\Local Settings\Application Data for xp, or
C:\Users\USERNAME\AppData\Local for vista).

If that doesn't help, debug it like Alex suggests :).

Best regards,
Klaas
------------------
http://www.artofc...


"Axel K??hn" wrote:

> Hi,
>
> i had an similar problem some time ago.
> I got the same error message. But this was not on Windows 7.
>
> Stupidly i forgot the solution how to solve this Problem. :-(
>
> Please try to insert a breakpoint in the method add of the class info.
> In the debugger you should be able to see where the error comes from.
> --
> Sincerely yours
> Axel K??hn (visit my Dynamics AX blog at: http://blog.a...)
>
>
> "Thomaslp" wrote:
>
> > Hi,
> > I installed Windows 7 on my workstation. When I want to open the label
> > editor I get the error message:
> >
> > "The container used in Map::create must contain at least 4 elements."
> >
> > I have three Dynamics AX Applications. The label editor works on one of the
> > installations. On the other two I get the above error.
> >
> > The problem only exists on the Windows 7 workstation. If I logon to a
> > Windows XP client there are no problem accessing the editor.
> >
> > Any info about this issue is welcome :)
> >
> > /Thomas
> >
> >

Axel Kühn

8/19/2009 1:19:00 PM

0

Hi Thomas,

thanks for the infoermation about solving this problem.

--
Sincerely yours
Axel K??hn (visit my Dynamics AX blog at: http://blog.a...)


"Thomaslp" wrote:

> Hi Axel,
> thank you for your input. I nailed it :)
> A few months ago our SAN crashed. After recovery made by IBM one of the
> tables in the Dynamics AX database was corrupted and we had to repair it
> allowing data loss. The table was SysLastValue so dataloss was not that big
> an issue.
>
> Anyway I had a look at the call stack - deleted all my usage data and the
> label editor works again :)
>
> /Thomas
>
>
> "Axel K??hn" wrote:
>
> > Hi,
> >
> > i had an similar problem some time ago.
> > I got the same error message. But this was not on Windows 7.
> >
> > Stupidly i forgot the solution how to solve this Problem. :-(
> >
> > Please try to insert a breakpoint in the method add of the class info.
> > In the debugger you should be able to see where the error comes from.
> > --
> > Sincerely yours
> > Axel K??hn (visit my Dynamics AX blog at: http://blog.a...)
> >
> >
> > "Thomaslp" wrote:
> >
> > > Hi,
> > > I installed Windows 7 on my workstation. When I want to open the label
> > > editor I get the error message:
> > >
> > > "The container used in Map::create must contain at least 4 elements."
> > >
> > > I have three Dynamics AX Applications. The label editor works on one of the
> > > installations. On the other two I get the above error.
> > >
> > > The problem only exists on the Windows 7 workstation. If I logon to a
> > > Windows XP client there are no problem accessing the editor.
> > >
> > > Any info about this issue is welcome :)
> > >
> > > /Thomas
> > >
> > >