Re: [Gambas-user] Mystery with file.load and regexp

2017-07-04 Thread bb

On 05/07/17 11:58, Fernando Cabral wrote:

I have found and worked around the problem. When you do the following:

*Dim Expressions as string[] =
Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"),
"\n") *

The last item pushed into *Expressions* is an empty string ("") even though
it DOES NOT exist
in the file. So, the expressions are compiled one after the other til the
last one, that is empty. Then the program crashes.

So it seems there is a bug in the *load.file()*. Bug that I was able to
compensate for by adding the option *True* in the call to the functions
*split()*.





I think you might find that the last character of indesejaveis.txt is a 
\n (as is the case for many, many files) so in actual fact your original 
split did exactly what it was supposed to do.


And your work around is correct. Although it is not actually a work 
around it is a very common construct when dealing with text files.


So, I very much doubt there is a bug in File.Load()

b

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Mystery with file.load and regexp

2017-07-04 Thread Tony Morehen
File.Load is working fine.  It is just loading a file that has a 
trailing "\n".  Split then adds an empty string as the last entry in the 
array.  This is Split's documented behaviour.  Adding the True option 
suppresses empty entries.  Note that Split will also add an empty entry 
for any blank lines ie "\n\n".  The True option will also suppress those 
empty entries.


A word of caution:  the True option will not suppress lines that are 
comprised entirely of spaces.  I'd test to see if those kind of lines 
also cause problems.



On 2017-07-04 10:28 PM, Fernando Cabral wrote:

I have found and worked around the problem. When you do the following:

*Dim Expressions as string[] =
Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"),
"\n") *

The last item pushed into *Expressions* is an empty string ("") even though
it DOES NOT exist
in the file. So, the expressions are compiled one after the other til the
last one, that is empty. Then the program crashes.

So it seems there is a bug in the *load.file()*. Bug that I was able to
compensate for by adding the option *True* in the call to the functions
*split()*.

2017-07-04 22:29 GMT-03:00 Fernando Cabral :


Concerning RegExp I have another mysterious thing to understand

If I do something like:








*Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The
same")For Each searchedfor In searchfor   re.Compile(searchedfor,
re.utf8)Next*
The expression gest compiled. No error.
Neverthelesse, if I the same words from a file, using this expression:

*Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")*

re.Compile will not work. It will display an error message saying there is
nothing to compile. Now, if I do:


*print "@" & Searchfor[n] &"@\n"*
in both cases I will see precisely the same output. I can't distinguish
one from the other. So, why it compiles in the first case, but does not in
the second?

This is the mystery I must solve with a little help from a good soul out
there.

- fernando



--
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.








--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] [Gambas Bug Tracker] Bug #1113: ODBC driver problem: driver connects but does not exec query

2017-07-04 Thread bugtracker
http://gambaswiki.org/bugtracker/edit?object=BUG.1113=L21haW4-

Comment #14 by PICCORO LENZ MCKAY:

hi, how its the progress on this?, gambas 3.10 i think could be released soon i 
guess/suspect i'm very interesting that of all the reported issues of odbc this 
about inmediate query could be resolved for next release...



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Mystery with file.load and regexp

2017-07-04 Thread Fernando Cabral
I have found and worked around the problem. When you do the following:

*Dim Expressions as string[] =
Split(File.Load("/home/fernando/.config/libreoffice/4/user/basic/indesejaveis.txt"),
"\n") *

The last item pushed into *Expressions* is an empty string ("") even though
it DOES NOT exist
in the file. So, the expressions are compiled one after the other til the
last one, that is empty. Then the program crashes.

So it seems there is a bug in the *load.file()*. Bug that I was able to
compensate for by adding the option *True* in the call to the functions
*split()*.

2017-07-04 22:29 GMT-03:00 Fernando Cabral :

> Concerning RegExp I have another mysterious thing to understand
>
> If I do something like:
>
>
>
>
>
>
>
>
> *Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The
> same")For Each searchedfor In searchfor   re.Compile(searchedfor,
> re.utf8)Next*
> The expression gest compiled. No error.
> Neverthelesse, if I the same words from a file, using this expression:
>
> *Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")*
>
> re.Compile will not work. It will display an error message saying there is
> nothing to compile. Now, if I do:
>
>
> *print "@" & Searchfor[n] &"@\n"*
> in both cases I will see precisely the same output. I can't distinguish
> one from the other. So, why it compiles in the first case, but does not in
> the second?
>
> This is the mystery I must solve with a little help from a good soul out
> there.
>
> - fernando
>
>
>
> --
> Fernando Cabral
> Blogue: http://fernandocabral.org
> Twitter: http://twitter.com/fjcabral
> e-mail: fernandojosecab...@gmail.com
> Facebook: f...@fcabral.com.br
> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
> Wickr ID: fernandocabral
> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
> Skype:  fernandojosecabral
> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
>
> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> nenhum político ou cientista poderá se gabar de nada.
>
>


-- 
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Mystery with file.load and regexp

2017-07-04 Thread Fernando Cabral
Concerning RegExp I have another mysterious thing to understand

If I do something like:








*Searchfor.Push("Word")Searchfor.Push("Power")Searchfor.Push("The same")For
Each searchedfor In searchfor   re.Compile(searchedfor, re.utf8)Next*
The expression gest compiled. No error.
Neverthelesse, if I the same words from a file, using this expression:

*Dim Searchfor As New String[] = Split(File.Load("Strings"), "\n")*

re.Compile will not work. It will display an error message saying there is
nothing to compile. Now, if I do:


*print "@" & Searchfor[n] &"@\n"*
in both cases I will see precisely the same output. I can't distinguish one
from the other. So, why it compiles in the first case, but does not in the
second?

This is the mystery I must solve with a little help from a good soul out
there.

- fernando



-- 
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Isn't bracket regular expression compatible with UTF8?

2017-07-04 Thread Fernando Cabral
I have been trying something like *poder[^[:alpha:]*  so I  could find the
word "poder " ("poder" followed by an space) but not "poderão" ("ã" being
an alpha character in Portuguese.)

In English it could be like finding "power" but not "powerless".

Problem is that it seems [^[alpha]] includes accented characters like "á",
"é", "ã".

That is, accented characters are not understood as alpha, but not alpha.

Please, note that I have compiled it with the UTF8 flag:
*   re.Compile(poder[^[:alpha]], RegExp.utf8)*

Any hints?

- fernando
-- 
Fernando Cabral


Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gambas for MAC OS ppc/intel ?

2017-07-04 Thread PICCORO McKAY Lenz
i can see that there a FreeBSD install/compile how to in wiki:
http://gambaswiki.org/wiki/install/freebsd

since MacOS / ppc flavor are based lossely on FreeBSD, there's a MacOS
version of Gambas ?

and also a MacOS /intel version of gambas at least?

Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] who to detect if are running inside IDE

2017-07-04 Thread PICCORO McKAY Lenz
so in short investigations i have

  Public Sub Main()
print "running"
  #If Exec
print "in ide"
  #Endif
  End

so testing by normal steps to compile produce a exec (either a cgi or not)
so works for cgi:

  $ gbc3 -ga
  $ gba3
  $ ./test.gambas
running

but for other cases i see tha if gambas archiver for executables are not
run for distribute, it fails:

  $ gbx3 /tmp/testexec
running

in the reference mail it fails, but for production detection are good..
 due its only for set paths, vars and environment

this due, another way its detecting the gambas runtime environment.. seem
gambas create a lof of files in /proc, based on Application.Id.. and also
in "/tmp" ...

i'm very curious about how gambas made this in cygwin installations, and or
in macos/freebsd flavors (if any)

2017-07-03 18:44 GMT-04:00 PICCORO McKAY Lenz :

> 2017-07-03 14:40 GMT-04:00 Tobias Boege :
>
>> Exact same question here: https://sourceforge.net/p/gamb
>> as/mailman/message/34204796/
>
> its does work for scripts, gambas.cgi or normal excecutables?
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Is it possible to read a file directly into an array?

2017-07-04 Thread Fernando Cabral
Well, I found a very easy way to do it:


*Dim Wordlist as string []*

*Wordlist = Split(File.Load("strings.txt"), "\n")*
It seems it can't be easier, can it?




2017-07-04 12:06 GMT-03:00 Fernando Cabral :

> Is there a straightforward way to read a file directly into an array?
> Say I have a file with several lines (lines ended with "\n").
> I want to read each line and push its content as an item of an array.
>
> Lets say the file contents are "a\nb\nc\n" and what I need is:
>
> word[0] = "a"
> word[1] = "b"
> word[2] = "c"
>
> Yes, I know I can LINE INPUT each line and copy it into the array.
> But I have seen that Gambas has so many shortcuts that perhaps there is
> one for this operation too.
>
> Any hints?
>
> Regards
>
> - fernando
>
>
> --
> Fernando Cabral
> Blogue: http://fernandocabral.org
> Twitter: http://twitter.com/fjcabral
> e-mail: fernandojosecab...@gmail.com
> Facebook: f...@fcabral.com.br
> Telegram: +55 (37) 99988-8868 <(37)%2099988-8868>
> Wickr ID: fernandocabral
> WhatsApp: +55 (37) 99988-8868 <(37)%2099988-8868>
> Skype:  fernandojosecabral
> Telefone fixo: +55 (37) 3521-2183 <(37)%203521-2183>
> Telefone celular: +55 (37) 99988-8868 <(37)%2099988-8868>
>
> Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
> nenhum político ou cientista poderá se gabar de nada.
>
>


-- 
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Is it possible to read a file directly into an array?

2017-07-04 Thread Fernando Cabral
Is there a straightforward way to read a file directly into an array?
Say I have a file with several lines (lines ended with "\n").
I want to read each line and push its content as an item of an array.

Lets say the file contents are "a\nb\nc\n" and what I need is:

word[0] = "a"
word[1] = "b"
word[2] = "c"

Yes, I know I can LINE INPUT each line and copy it into the array.
But I have seen that Gambas has so many shortcuts that perhaps there is one
for this operation too.

Any hints?

Regards

- fernando


-- 
Fernando Cabral
Blogue: http://fernandocabral.org
Twitter: http://twitter.com/fjcabral
e-mail: fernandojosecab...@gmail.com
Facebook: f...@fcabral.com.br
Telegram: +55 (37) 99988-8868
Wickr ID: fernandocabral
WhatsApp: +55 (37) 99988-8868
Skype:  fernandojosecabral
Telefone fixo: +55 (37) 3521-2183
Telefone celular: +55 (37) 99988-8868

Enquanto houver no mundo uma só pessoa sem casa ou sem alimentos,
nenhum político ou cientista poderá se gabar de nada.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Fwd: Problem to be examined by those who must use UTF8 with Gambas

2017-07-04 Thread Benoît Minisini via Gambas-user

Le 02/07/2017 à 01:12, Fernando Cabral a écrit :

-- Forwarded message --
From: Fernando Cabral 
Date: 2017-07-01 17:34 GMT-03:00
Subject: Re: [Gambas-user] Problem to be examined by those who must use
UTF8 with Gambas
To: Jussi Lahtinen 


2017-07-01 16:15 GMT-03:00 Jussi Lahtinen :


I don't quite get your description of the problem. It seems self
contradictory. I mean this part:

Perhaps It should sound contradictory. That's because if I write directly

to a TextArea.text from
inside the program, it will show "À" correctly. Nevertheless, if I read the
same string from a file read into a variable and then try to display it...
it does not work.


Are you using ascii functions for UTF-8 at some point?


I only use ascii functions where there are no UTF-8 functions. For
instance, split().


I think we need to see your code to understand the issue.


I have attached a text file (ODT) as well as the code itself. Note that, in
order to run the code you will have to have unoconv installed.

If you comment the two lines bellow, the code will not work.



* RawText = RegExp.Replace(RawText, "À", "à") RawText =
RegExp.Replace(RawText, "Ó", "ó")*

This happens because for some mysterious reason, the QT library seems to
get confused
with *À* and *Ó*. But not always!

Jussi



Not mysterious: you are using UTF-8 separators with Split(), whereas 
Split() only deals with ASCII strings. Consequently, the resulting 
MatchedWords array gets incorrect UTF-8 strings.


If you have took the time to just trace your program between line #54 
and line #60 and watch the MatchedWords array, you would have seen the 
problem.


Regards,

--
Benoît Minisini

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] System.Language (gb)

2017-07-04 Thread PICCORO McKAY Lenz
2017-07-03 17:57 GMT-04:00 bb :

> Thanks Tobi,
>
> ( I looked but couldn't find it in main ???)
>
> WIki updated.
>
wiki spanish translated but..


>
> Any comment on the UTF-8 bit?

yeah? seems there's its no care of?


>
>
> b
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] IconView strange behavior.

2017-07-04 Thread Gianluigi
Hi Fabien,

I attach the rename test as required.

Regards
Gianluigi

2017-07-04 12:03 GMT+02:00 Fabien Bodard :

> can you send an example ?
>
> 2017-07-04 10:40 GMT+02:00 Gianluigi :
> > Or I did not understand how it works or ...
> >
> > If I set Editable property on true, I expect to be able to change the
> icon
> > text and receive the Rename event to complete with Move.
> >
> > This does not happen in Trunk 8113, should I report it as an error?
> >
> > Regards
> > Gianluigi
> > 
> --
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > ___
> > Gambas-user mailing list
> > Gambas-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
>
> --
> Fabien Bodard
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>


RenameTest-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Any (easy) way to render RTF or HTML with gambas?

2017-07-04 Thread Fernando Cabral
Sure, Fabien, here it is. Note that basically, I took your program and
deleted what I didn' t need.
I didn't need, for instance, a file pickup list -- That's because I know
beforehand which file I want to display.

I could put to good use some niceties like a zooming button, but I can do
without them.


























*Private $hPdf As New PdfDocumentPublic Sub Form_Open()  Me.Center  Try
$hPdf.Open("/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoHífen.pdf")
If Error Then  Message.Error("Unable to open the file : " &
"/home/fernando/.config/libreoffice/4/user/basic/EmpregoDoHifen.pdf")
ReturnEndif  DocumentView1.Count = $hPdf.Count
DocumentView1.RefreshEndPublic Sub DocumentView1_Layout(Page As Integer)
DocumentView1.Layout.Width = $hPdf[Page + 1].Width + 150
DocumentView1.Layout.Height = $hPdf[Page + 1].Height + 150EndPublic Sub
DocumentView1_Draw(Page As Integer, Width As Integer, Height As Integer)
Paint.DrawImage($hPdf[Page + 1].Image, 0, 0, Paint.Width,
Paint.Height)EndPublic Sub Button2_Click()  Me.CloseEnd*


2017-07-04 7:09 GMT-03:00 Fabien Bodard :

> Maybe you can send me a source. So i can take an eyes.
>
> 2017-07-02 23:17 GMT+02:00 Fernando Cabral :
> > 2017-07-02 17:19 GMT-03:00 Fabien Bodard :
> >
> >> Well DocumentView is just a viewer i've done for gb.report. In fact
> >> it's abilities is to manages different Image in a paging style layout.
> >>
> >
> > Starting with you example I have been able to do what I needed. I just
> > deleted the part that allows the user
> > to select a PDF file. Instead I put a path/filename as a constant.
> >
> > Only problem is that I have not found how to change font size. Even so,
> it
> > delivers what I needed.
> >
> > Thank you.
> >
> > - fernando
> >
> >>
> >> So this tool is good for display Documents such as pdf or reports. But
> >> for those documents the libs pdf and report have a .Draw method that
> >> render the image in the given DrawingArea or image container.
> >>
> >> For you job take a look in the gambas ide in the HelpView.class. It
> >> inherit webview and give the hability to manage personnal url's. (in
> >> this case "gambas://") by cheating with the error link event.
> >>
> >> Take a look :-). Even we generate web page on the fly for the help
> >> embedded in the code source.
> >>
> >> 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz :
> >> > 2017-07-02 12:12 GMT-04:30 Fernando Cabral <
> fernandojosecab...@gmail.com
> >> >:
> >> >
> >> >> As to this, I think you still did not understand what I needed,
> which is
> >> >> to render a HTML or RTF file. This has nothing to do with HTTPD or
> HTTP.
> >> >> The RTF and HTLM file are local file. I open them and them I wanted
> do
> >> >> display them. No protocols involved.
> >> >>
> >> > jajaj Fernando.. the method i described its the same you do.. but you
> >> using
> >> > pdf instead html
> >> >
> >> > just invoked a "own" localhost running inside project, same behaviour
> are
> >> > used by the gambas IDE when you run a WEB project..
> >> >
> >> >
> >> >>
> >> >>> i prefer the firs due all the hard work to interprete the html
> markup
> >> are
> >> >>> "let to expert".. and not hadle by own.. due will be a extra work..
> >> >>>
> >> >>
> >> >> Yep. That's why  I was searching for some built in method to do it.
> >> >>
> >> > * Try $hPdf.Open("pdfFIle.pdf")*
> >> >>
> >> >>
> >> >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
> >> >>
> >> > same as for html..  but changing the open call by a httpd run process
> in
> >> > private port and send a exec to browser to open the local running
> httpd
> >> > "own" webserver
> >> >
> >> > the gambas ide do the same for web projects.. rund their own embebed
> http
> >> > web server and start a browser..
> >> >
> >> > instead use a embebed http webserver you can use the gb.httpd
> component
> >> > that does/usage are the same..
> >> >
> >> >
> >> >>
> >> >> This solves this issue for good, althou I still want to know how to
> do
> >> the
> >> >> same thing with a HTML file.
> >> >>
> >> > as i described.. if you want a example run a new web gambas project,
> and
> >> in
> >> > a console see the process with ps and its basically that i
> described...
> >> >
> >> >
> >> >>
> >> >>
> >> >>
> >> >>>
> >> 
> >>  To make it more concrete. Imagine there is a help file in html.
> When
> >> the
> >>  user clicks on the proper button, I'll read it
> >>  and display it so the user can see the document. I want a method to
> >>  display it rendered as it would be rendered in a browser.
> >> 
> >>  The editor might be able to do it. But then, I can't find
> instructions
> >>  on how to create it, load and display de text.
> >> 
> >>  I have also found two lines of code that hint on the way to do it,
> >> but I
> >>  can not learn enough from them. Says the guy:
> >> 
> >> 

Re: [Gambas-user] Any (easy) way to render RTF or HTML with gambas?

2017-07-04 Thread Fabien Bodard
Maybe you can send me a source. So i can take an eyes.

2017-07-02 23:17 GMT+02:00 Fernando Cabral :
> 2017-07-02 17:19 GMT-03:00 Fabien Bodard :
>
>> Well DocumentView is just a viewer i've done for gb.report. In fact
>> it's abilities is to manages different Image in a paging style layout.
>>
>
> Starting with you example I have been able to do what I needed. I just
> deleted the part that allows the user
> to select a PDF file. Instead I put a path/filename as a constant.
>
> Only problem is that I have not found how to change font size. Even so, it
> delivers what I needed.
>
> Thank you.
>
> - fernando
>
>>
>> So this tool is good for display Documents such as pdf or reports. But
>> for those documents the libs pdf and report have a .Draw method that
>> render the image in the given DrawingArea or image container.
>>
>> For you job take a look in the gambas ide in the HelpView.class. It
>> inherit webview and give the hability to manage personnal url's. (in
>> this case "gambas://") by cheating with the error link event.
>>
>> Take a look :-). Even we generate web page on the fly for the help
>> embedded in the code source.
>>
>> 2017-07-02 19:11 GMT+02:00 PICCORO McKAY Lenz :
>> > 2017-07-02 12:12 GMT-04:30 Fernando Cabral > >:
>> >
>> >> As to this, I think you still did not understand what I needed, which is
>> >> to render a HTML or RTF file. This has nothing to do with HTTPD or HTTP.
>> >> The RTF and HTLM file are local file. I open them and them I wanted do
>> >> display them. No protocols involved.
>> >>
>> > jajaj Fernando.. the method i described its the same you do.. but you
>> using
>> > pdf instead html
>> >
>> > just invoked a "own" localhost running inside project, same behaviour are
>> > used by the gambas IDE when you run a WEB project..
>> >
>> >
>> >>
>> >>> i prefer the firs due all the hard work to interprete the html markup
>> are
>> >>> "let to expert".. and not hadle by own.. due will be a extra work..
>> >>>
>> >>
>> >> Yep. That's why  I was searching for some built in method to do it.
>> >>
>> > * Try $hPdf.Open("pdfFIle.pdf")*
>> >>
>> >>
>> >> * DocumentView1.Count = $hPdf.Count DocumentView1.Refresh*
>> >>
>> > same as for html..  but changing the open call by a httpd run process in
>> > private port and send a exec to browser to open the local running httpd
>> > "own" webserver
>> >
>> > the gambas ide do the same for web projects.. rund their own embebed http
>> > web server and start a browser..
>> >
>> > instead use a embebed http webserver you can use the gb.httpd component
>> > that does/usage are the same..
>> >
>> >
>> >>
>> >> This solves this issue for good, althou I still want to know how to do
>> the
>> >> same thing with a HTML file.
>> >>
>> > as i described.. if you want a example run a new web gambas project, and
>> in
>> > a console see the process with ps and its basically that i described...
>> >
>> >
>> >>
>> >>
>> >>
>> >>>
>> 
>>  To make it more concrete. Imagine there is a help file in html. When
>> the
>>  user clicks on the proper button, I'll read it
>>  and display it so the user can see the document. I want a method to
>>  display it rendered as it would be rendered in a browser.
>> 
>>  The editor might be able to do it. But then, I can't find instructions
>>  on how to create it, load and display de text.
>> 
>>  I have also found two lines of code that hint on the way to do it,
>> but I
>>  can not learn enough from them. Says the guy:
>> 
>>  Then in Gambas2 I have a form with Textedit1  and I add:
>>  textedit1.text=file.load("filename.html")  in my form_open sub
>> 
>>  I would guess textedit1.text is in a form that, when displayed, will
>>  render the file correctly.
>>  But then again, I can't find the rest of the code.
>> 
>>  Thank you.
>> 
>>  - fernando
>> 
>> 
>>  2017-07-02 10:07 GMT-03:00 PICCORO McKAY Lenz > >:
>> 
>> > hi fernando,, u must read as stream.. see it:
>> >
>> > here a example minimal: http://gambaswiki.org/wiki/lang/lineinput
>> >
>> > but i think that what do you want its "understand" the file format!
>> > right?
>> >
>> > due i guess rtf files have some "rich"text inside.. something in some
>> > binary/specific non ascii/plain text ...
>> >
>> > Lenz McKAY Gerardo (PICCORO)
>> > http://qgqlochekone.blogspot.com
>> >
>> > 2017-07-02 7:31 GMT-04:30 Fernando Cabral <
>> fernandojosecab...@gmail.com
>> > >:
>> >
>> >> I've browsed the documentation but did not find what I am looking
>> for:
>> >> a
>> >> way do read a html (or rtf) file and display it using some built in
>> >> method.
>> >> Say, something simple like this:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> 

Re: [Gambas-user] IconView strange behavior.

2017-07-04 Thread Fabien Bodard
can you send an example ?

2017-07-04 10:40 GMT+02:00 Gianluigi :
> Or I did not understand how it works or ...
>
> If I set Editable property on true, I expect to be able to change the icon
> text and receive the Rename event to complete with Move.
>
> This does not happen in Trunk 8113, should I report it as an error?
>
> Regards
> Gianluigi
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user



-- 
Fabien Bodard

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] IconView strange behavior.

2017-07-04 Thread Gianluigi
Or I did not understand how it works or ...

If I set Editable property on true, I expect to be able to change the icon
text and receive the Rename event to complete with Move.

This does not happen in Trunk 8113, should I report it as an error?

Regards
Gianluigi
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user