[Gambas-user] HTML in Text Label

2009-03-10 Thread Jason Hackney
I'm trying to insert some basic HTML  into a text label and from the docs,
div align=center should work, but it displays the text div
align=center. Meanwhile b/b, i/i, etc. seems to work well. Also,
TextLabel1.alignment = 3 has the result I want. Am I missing something?

Jason
--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Global Error Handing

2009-03-10 Thread nando
Benoit, I was thinking about the same thing.
What is there was a method: _error (the brother to _new)
If present in a class, a class error falls into it as a default handler
Any error here most-liekly will implement Try/Catch by the programmer but
_error will not catch itself: an internal flag set the first time
_error runs, if it attempted to catch itself would notice
the flag set, return, and the immediately notice it returned
with an error, thus returning, exiting the class.
-Nando


-- Original Message ---
From: Benoît Minisini gam...@users.sourceforge.net
To: richard terry rte...@pacific.net.au, mailing list for gambas users
gambas-user@lists.sourceforge.net
Sent: Mon, 9 Mar 2009 16:15:14 +0100
Subject: Re: [Gambas-user] Global Error Handing

  Question:
 
  Does gambas have any mechanism for global error handling -e.g error rigging
  an entire project including all subroutines with a master error handler,
  which would catch all un-handled fatal errors, and do something like pop up
  a dialog box with options for user to type in what they were doing, write
  to log file, email the developer?
 
  If not, how are other people handling this - I know there is the CATCH
  statement.
 
  If not, are there any plans to do this.
 
  Regards
 
  Richard
 
 
 The mechanism exist internally - i.e. you can write a global error handler 
 for 
 uncatched errors in a C/C++ component.
 
 But you cannot do that in Gambas.
 
 Apparently it could be a good feature to implement, but I'm not sure there is 
 no logical problems. For example, what to do if there is an error during the 
 global error event handler?
 
 -- 
 Benoît
 
 --
 Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
 -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
 -Strategies to boost innovation and cut costs with open source participation
 -Receive a $600 discount off the registration fee with the source code: SFAD
 http://p.sf.net/sfu/XcvMzF8H
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
--- End of Original Message ---


--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Help using gb.pcre

2009-03-10 Thread David Villalobos Cambronero

Hi, I need to match some regular expresions, I think I can use Gambas to do it, 
in the documentation says somethig like this:


(?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b


But how can I use it, any idea? 

Any help need thanks.
Regards


--
David



  

--
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] How to write a multilingual application

2009-03-10 Thread M. Cs.
Dear Benoit,
unfortunatelly that doesn't work with the created package! During the
development and test-run I could retrieve the list of translations with
Dir(.lang), but not with the installed program. I need another method to
enable forced language switching with the installed package. Could you help
me? In theory I would like to have an installed program, which would know
the list of available languages, and let the user choose between them.
Thanks!
--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help using gb.pcre

2009-03-10 Thread Rob
On Tuesday 10 March 2009 15:44, David Villalobos Cambronero wrote:
 Hi, I need to match some regular expresions, I think I can use Gambas to
 do it, in the documentation says somethig like this:
 (?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b
 But how can I use it, any idea?

That regular expression is meant to extract a valid email address.  (It may 
not be a working email address, but it should at least be legal.)

One thing I should probably make clearer in the documentation is that due 
to the way Gambas uses character constants like \n, you need to double up 
on backslashes when you're specifying a regular expression as a constant.  
So if the user is entering it or you're reading it from a file, it might 
be a\s+(b\S+) but if you're hardcoding it into your program it needs to 
be a\\s+(b\\S+).  Here is a Gambas script to demonstrate (just tried it 
in my own console and it runs in 2.9, but watch out for my email client's 
word wrap.)

USE gb.pcre

DIM myemail AS String
DIM validemail AS String
DIM re AS RegExp

myemail = f...@bar 

re = new RegExp(myemail, (?i)\\b[a-z0-9\\._%\\...@[a-z0-9._%\\-]+\\.[a-z]
{2,4}\\b)
validemail = re.Text
if not validemail then
print myemail   is not a legal email address.\n
else
print myemail  \n
end if

Rob

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help using gb.pcre

2009-03-10 Thread Jesus Guardon
Hi David

This is what I did:

PUBLIC FUNCTION chkEmail(sEmail AS String) AS Boolean

  DIM bMail AS Boolean
  DIM regx as Regexp

  IF sEmail THEN

regx =
NEW Regexp(sEmail,(?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b)

   IF regx.Text THEN
  'DEBUG regx.Text
   bMail = TRUE
   ELSE
   bMail = FALSE

   ENDIF
  ENDIF

 RETURN bMail

END

I your text matches, it will return true.

Sorry for ugly indentation due to plain text formatting email.

Jesus

David Villalobos Cambronero escribió:
 Hi, I need to match some regular expresions, I think I can use Gambas to do 
 it, in the documentation says somethig like this:
 
 
 (?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b
 
 
 But how can I use it, any idea? 
 
 Any help need thanks.
 Regards
 
 
 --
 David
 
 
 
   
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 


--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help using gb.pcre

2009-03-10 Thread David Villalobos Cambronero

Many thanks, maybe a little example in the wiki could help.

 Regards


--
David



- Original Message 
From: Rob sourceforge-raind...@kudla.org
To: gambas-user@lists.sourceforge.net
Sent: Tuesday, March 10, 2009 2:53:08 PM
Subject: Re: [Gambas-user] Help using gb.pcre

On Tuesday 10 March 2009 15:44, David Villalobos Cambronero w
 Hi, I need to match some regular expresions, I think I can use Gambas to
 do it, in the documentation says somethig like this:
 (?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b
 But how can I use it, any idea?

That regular expression is meant to extract a valid email address.  (It may 
not be a working email address, but it should at least be legal.)

One thing I should probably make clearer in the documentation is that due 
to the way Gambas uses character constants like \n, you need to double up 
on backslashes when you're specifying a regular expression as a constant.  
So if the user is entering it or you're reading it from a file, it might 
be a\s+(b\S+) but if you're hardcoding it into your program it needs to 
be a\\s+(b\\S+).  Here is a Gambas script to demonstrate (just tried it 
in my own console and it runs in 2.9, but watch out for my email client's 
word wrap.)

USE gb.pcre

DIM myemail AS String
DIM validemail AS String
DIM re AS RegExp

myemail = f...@bar 

re = new RegExp(myemail, (?i)\\b[a-z0-9\\._%\\...@[a-z0-9._%\\-]+\\.[a-z]
{2,4}\\b)
validemail = re.Text
if not validemail then
print myemail   is not a legal email address.\n
else
print myemail  \n
end if

Rob

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user



  

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Help using gb.pcre

2009-03-10 Thread David Villalobos Cambronero

Thanks Jesus I really appreciate your help.

 Regards


--
David



- Original Message 
From: Jesus Guardon jguar...@telefonica.net
To: mailing list for gambas users gambas-user@lists.sourceforge.net
Sent: Tuesday, March 10, 2009 3:10:02 PM
Subject: Re: [Gambas-user] Help using gb.pcre

Hi David

This is what I did:

PUBLIC FUNCTION chkEmail(sEmail AS String) AS Boolean

  DIM bMail AS Boolean
  DIM regx as Regexp

  IF sEmail THEN

regx =
NEW Regexp(sEmail,(?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b)

   IF regx.Text THEN
  'DEBUG regx.Text
   bMail = TRUE
   ELSE
   bMail = FALSE

   ENDIF
  ENDIF

 RETURN bMail

END

I your text matches, it will return true.

Sorry for ugly indentation due to plain text formatting email.

Jesus

David Villalobos Cambronero escribió:
 Hi, I need to match some regular expresions, I think I can use Gambas to do 
 it, in the documentation says somethig like this:
 
 
 (?i)\b[a-z0-9._%\...@[a-z0-9._%\-]+\.[a-z]{2,4}\b
 
 
 But how can I use it, any idea? 
 
 Any help need thanks.
 Regards
 
 
 --
 David
 
 
 
  
 
 --
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 


--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user



  

--
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user