Oh, I thought the string was "name .odt", so it's "name " & ".odt".
Jussi
On Thu, Apr 4, 2013 at 12:15 AM, rocko wrote:
> I discovered the Trim$ function. :)
> So far so good.
>
>
> On 04/03/2013 02:01 PM, rocko wrote:
> > Thanks for all you help.
> >
> > I figured out why it saves as .zip ins
See documentation of:
String.InStr()
String.Left()
String.Right()
Jussi
On Thu, Apr 4, 2013 at 12:01 AM, rocko wrote:
> Thanks for all you help.
>
> I figured out why it saves as .zip instead of .odt.
> Apparently there a spaces at the end of the names in the database I'm
> using.
> So it lo
I discovered the Trim$ function. :)
So far so good.
On 04/03/2013 02:01 PM, rocko wrote:
> Thanks for all you help.
>
> I figured out why it saves as .zip instead of .odt.
> Apparently there a spaces at the end of the names in the database I'm
> using.
> So it looks like this to the Shell:
> na
Thanks for all you help.
I figured out why it saves as .zip instead of .odt.
Apparently there a spaces at the end of the names in the database I'm using.
So it looks like this to the Shell:
name .odt
with a space before the .odt
So my next question is can I remove the spaces??
On 04/03/2013
On Wed, 2013-04-03 at 19:36 +0200, Willy Raets wrote:
> On Wed, 2013-04-03 at 10:13 -0700, rocko wrote:
> > Ok thanks for suggestions.
> >
> > I'm now having problems with zipping the files.
> > I "m naming the files dynamically with the first name of the
> > person from my database.
> >
> > But
On Wed, 2013-04-03 at 10:13 -0700, rocko wrote:
> Ok thanks for suggestions.
>
> I'm now having problems with zipping the files.
> I "m naming the files dynamically with the first name of the
> person from my database.
>
> But the zip command sometimes saves the file as a zip not .odt.
> Why it d
Ok thanks for suggestions.
I'm now having problems with zipping the files.
I "m naming the files dynamically with the first name of the
person from my database.
But the zip command sometimes saves the file as a zip not .odt.
Why it does this I don't know, actually it does this a lot/
I'm using t
On Wed, 2013-04-03 at 09:18 -0700, rocko wrote:
> Ok I got that to work, but the code is kinda long and ugly
> as I have to save the file after doing a /Replace/.
>
> I have 6 fields I have to replace, so thats 6 Replace statements with 6
> File.Save,
> I can put in a Function and just call the f
Of course you don't need to do that, there are multiple different options.
One of them would be nested calls.
Example:
File.Save(sPathToFileWhereDataBelongs, Replace(Replace(Replace(File.Load(
sFileName), "$(Name)", sName), "$(Something)", sSomething), "$(moresomething)",
sYetSomethingElse))
Or th
Ok I got that to work, but the code is kinda long and ugly
as I have to save the file after doing a /Replace/.
I have 6 fields I have to replace, so thats 6 Replace statements with 6
File.Save,
I can put in a Function and just call the function when I need it, but
still I would
think the Replace
On Wed, 2013-04-03 at 08:39 -0700, Rocko wrote:
> so each value needs it's own the replace statement?
YES
> On Apr 3, 2013 8:28 AM, "Fabien Bodard" wrote:
>
> > Ok so it's one call by entry.
> >
> > Unzip odt
> > Load the file in a string
> > Replace as many as need
> > Save the string in the f
so each value needs it's own the replace statement?
On Apr 3, 2013 8:28 AM, "Fabien Bodard" wrote:
> Ok so it's one call by entry.
>
> Unzip odt
> Load the file in a string
> Replace as many as need
> Save the string in the file
> Zip the directory
>
> Simple!
> Le 3 avr. 2013 17:20, "Rocko" a é
Ok so it's one call by entry.
Unzip odt
Load the file in a string
Replace as many as need
Save the string in the file
Zip the directory
Simple!
Le 3 avr. 2013 17:20, "Rocko" a écrit :
> I don't think you understanf, I want to replace different fields with
> different values not all the same val
I don't think you understanf, I want to replace different fields with
different values not all the same value
On Apr 3, 2013 1:41 AM, "Fabien Bodard" wrote:
> Replace,
> Replace all the words that match the pattern
> Read the doc!
> Le 3 avr. 2013 01:10, "rocko" a écrit :
>
> > Is it possible to
> Did you compile Gambas with debugging information enabled?
Yes, the debug option was checked. Just to verify I recompiled again
and here are the complete output...
root@raspi-dev:/home/cj/Gambas 3/Projekt/libwiringPi_irq# gdb gbx3
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Softwa
Le 03/04/2013 10:42, CJ a écrit :
> Thanks for the reply Benoît, below are the output from gdb...
>
>...
>(gdb) bt
>#0 THROW (code=0) at gb_error.c:463
>#1 0x0004a42c in THROW_STACK () at gb_error.c:477
>#2 0x0004a42c in THROW_STACK () at gb_error.c:477
>Backtrace stopped
Thanks for the reply Benoît, below are the output from gdb...
...
(gdb) bt
#0 THROW (code=0) at gb_error.c:463
#1 0x0004a42c in THROW_STACK () at gb_error.c:477
#2 0x0004a42c in THROW_STACK () at gb_error.c:477
Backtrace stopped: previous frame identical to this frame (corrupt stack
Replace,
Replace all the words that match the pattern
Read the doc!
Le 3 avr. 2013 01:10, "rocko" a écrit :
> Is it possible to do multiple replacing with/Replace/
>
> I have several fields that I want to change in an .odt file
> do I have to do multiple Replace statements or can I
> put them all
I have often missed in Gambas the ability to search through strings
using a regular expression and
provide a function to create replacements
Gambas doesn't have procedural pointers or closures, so it's
impossible to do it like in ruby/python/etc, but I've found the same
can be achieved using an ite
19 matches
Mail list logo