Re: [Gambas-user] Setting default values on a listbox

2010-02-08 Thread charlesg

Hi

I read the question differently from Werner (probably incorrectly!)

I think you want:

PUBLIC SUB Form_Open()
  DIM j AS Integer
  
  FOR j = 40 TO 50
ListBox1.Add(Str(j) & "   " & Chr(j), j)
  NEXT 
  ListBox1[5].selected = TRUE
  
END
-- 
View this message in context: 
http://old.nabble.com/Setting-default-values-on-a-listbox-tp27491841p27496787.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] printer problem

2010-02-08 Thread Charlie Reinl
Am Montag, den 08.02.2010, 08:20 +0100 schrieb Rolf-Werner Eilert:
> Am 06.02.2010 00:52, schrieb Benoît Minisini:
> >> Salut,
> >>
> >> I still haven't solved the Draw.Text tab problem, but I'v a new one (a
> >> problem).
> >>
> >> If you open the printer-setup the first time, the 'Print to printer' is
> >> chosen, and the target-file behind 'Print to file' is empty.
> >>
> >> If you check 'Print to file' and fill the target-file and then you
> >> switch back to 'Print to printer', the target-file field is disabled.
> >> (Setup Printer.png)
> >>
> >> Everything seems to be alright.
> >>
> >> But, and there is my new problem, in my code I can't see what should be
> >> done. (printing 5 times to file, makes no sense)
> >>
> >> Where is the magic pointer, which shows me the chosen device?
> >> (Printer Properties.png)
> >>
> >> Gambas2=2.19.0  Revision: 2654
> >> qt
> >>
> >
> > Just a few word to tell that the printer support has been redesigned in 
> > Gambas
> > 3, this is why I didn't touch the Gambas 2 one anymore.
> >
> > Now in Gambas 3, it should work as it should have worked since the 
> > beginning,
> > with both Qt and GTK+.
> >
> > Regards,
> >
> 
> That means, no need to print into a file anymore? Great news, Benoit!
> 
> On the other hand, after having worked with the workaround for such a 
> long time, I found some advantages in working with print files, e. g. I 
> now can store every form or letter I printed for the students so I can 
> look them up later if anything is unclear or no copy available ("what 
> the hack did I print for her then...")
> 
> Regards
> 
> Rolf

Salut Rolf,

for me, the way was the other way around. Printing works (with gambas),
and I wanted to store automatic one copy as PDF in an archive. 
And had discovered the error in the Printer.Setup.


-- 
Amicalement
Charlie


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Text problem with control chars

2010-02-08 Thread Ron_1st
On Sunday 31 January 2010, Kad Mann wrote:
> Doriano Blengino wrote:
> 
> > A tab width is normally eight spaces
> 
> Every single one of my cites say you're completely wrong.
> 
> http://en.wikipedia.org/wiki/Tab_key
> www.jwz.org/doc/tabs-vs-spaces.html
> http://stackoverflow.com/questions/268538/tab-versus-space-indentation-in-c
> http://stackoverflow.com/questions/119562/tabs-versus-spaces-in-python-programming
> http://wiki.answers.com/Q/How_many_spaces_is_a_tab
> http://wiki.answers.com/Q/When_and_how_do_you_indent_to_begin_a_paragraph
> http://srfi.schemers.org/srfi-49/mail-archive/msg0.html
> 
> Where is your single cite saying you are right?


here???
 http://en.wikipedia.org/wiki/Tab_key  :)

 ASCII and EBCDIC paragraph

Instead it was rather quickly replaced with fixed tab stops, at every multiple 
of 8 characters horizontally and every 6 lines vertically, so they simply 
became a form of data compression, since a printing program could easily add 
the necessary spaces to move to any position wanted on a form. The vertical 
size was chosen to be 1 inch. It is unclear why the 8-character horizontal size 
was chosen, as 5 characters, half inch in a typical printer at that time, was 
much more popular at that time as a paragraph indentation.

the 5 characters has to do with the 10 characters/inch teletype character set 
in the matrix impact printers at that time (around 1982) (i.e. Epson 
mx80/fx80/fx100 use it)


> 
> I have 824,000+ more references to fall back on, but I'm sure you'll get the 
> idea. 
> 
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

Just possible info.
Like your discus with oponent :)

Best regards,

Ron_1st

-- 
 

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Draw.Text problem with control chars

2010-02-08 Thread Ron_1st
On Monday 01 February 2010, Kadaitcha Man wrote:
> On 1 February 2010 23:10, Doriano Blengino
>  wrote:
> 
> > Probably we are
> > saying the same thing.
> 
> Not if a tab is eight spaces wide, we aren't :)
> 
> --
> The Planet: dedicated and managed hosting, cloud storage, colocation
> Stay online with enterprise data centers and the best network in the business
> Choose flexible plans and management services without long-term contracts
> Personal 24x7 support from experience hosting pros just a phone call away.
> http://p.sf.net/sfu/theplanet-com
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 

LOL. as say'd I like it :)

Best regards,

Ron_1st

-- 


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] use of ORDER BY in gb.Find

2010-02-08 Thread Benoît Minisini
> The follwing code works
> 
> hResult = $hConn.Find("addresses", , "ORDER BY lastname")
> 
> but result is not sorted.  Of course I could use .EXEC with full SQL string
> but
> 

The request is only in the second argument of Find() (see documentation). The 
other arguments are substituted inside the request, a bit like the Subst() 
function.

You must put your "ORDER BY" inside the second argument.

But as Find() internally adds "WHERE" to the query beginning by default, you 
must write it like that:

hResult = $hConn.Find("addresses", "WHERE True ORDER BY lastname")

Maybe Find() should be more clever, and detect ORDER BY too. I will implement 
that for Gambas 3.

Regards,

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] use of ORDER BY in gb.Find

2010-02-08 Thread Bill-Lancaster

Thank you Benoît 
-- 
View this message in context: 
http://old.nabble.com/use-of-ORDER-BY-in-gb.Find-tp27489573p27500899.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Setting default values on a listbox

2010-02-08 Thread Dag Jarle Johansen
Hi, I agree,

if I had a set of Listboxes, where each stores one option, the options
wan't be changeable, and all you have to do is to store the index of
each listbox. Where to store - what one likes, settings are surely ok.

regards
Dag



Am Montag, den 08.02.2010, 00:44 -0800 schrieb charlesg:
> Hi
> 
> I read the question differently from Werner (probably incorrectly!)
> 
> I think you want:
> 
> PUBLIC SUB Form_Open()
>   DIM j AS Integer
>   
>   FOR j = 40 TO 50
> ListBox1.Add(Str(j) & "   " & Chr(j), j)
>   NEXT 
>   ListBox1[5].selected = TRUE
>   
> END



--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] printer problem

2010-02-08 Thread Rolf-Werner Eilert
Am 08.02.2010 14:38, schrieb Benoît Minisini:
>> Am Montag, den 08.02.2010, 08:20 +0100 schrieb Rolf-Werner Eilert:
>>> Am 06.02.2010 00:52, schrieb Benoît Minisini:
> Salut,
>
> I still haven't solved the Draw.Text tab problem, but I'v a new one (a
> problem).
>
> If you open the printer-setup the first time, the 'Print to printer'
> is chosen, and the target-file behind 'Print to file' is empty.
>
> If you check 'Print to file' and fill the target-file and then you
> switch back to 'Print to printer', the target-file field is disabled.
> (Setup Printer.png)
>
> Everything seems to be alright.
>
> But, and there is my new problem, in my code I can't see what should
> be done. (printing 5 times to file, makes no sense)
>
> Where is the magic pointer, which shows me the chosen device?
> (Printer Properties.png)
>
> Gambas2=2.19.0  Revision: 2654
> qt

 Just a few word to tell that the printer support has been redesigned in
 Gambas 3, this is why I didn't touch the Gambas 2 one anymore.

 Now in Gambas 3, it should work as it should have worked since the
 beginning, with both Qt and GTK+.

 Regards,
>>>
>>> That means, no need to print into a file anymore? Great news, Benoit!
>>>
>>> On the other hand, after having worked with the workaround for such a
>>> long time, I found some advantages in working with print files, e. g. I
>>> now can store every form or letter I printed for the students so I can
>>> look them up later if anything is unclear or no copy available ("what
>>> the hack did I print for her then...")
>>>
>>> Regards
>>>
>>> Rolf
>>
>> Salut Rolf,
>>
>> for me, the way was the other way around. Printing works (with gambas),
>> and I wanted to store automatic one copy as PDF in an archive.
>> And had discovered the error in the Printer.Setup.
>>
>
> Apparently this feature is managed by CUPS: there is an option to archive all
> documents sent to printers.
>
> Regards,
>
>

Oh, that's nice! Never saw this, never knew :-) Tanks for the tipp!

But in my specific case, it is easier to have my student database 
program store the documents as per students' names. Easier to retrieve, 
I mean.

But where is this Printer Setup thing you use, is it a CUPS frontend? I 
know CUPS only from its localhost website frontend. (General setup is 
done via the Suse-wide Yast tool.)

Regards

Rolf

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] printer problem

2010-02-08 Thread Benoît Minisini
> Am 08.02.2010 14:38, schrieb Benoît Minisini:
> >> Am Montag, den 08.02.2010, 08:20 +0100 schrieb Rolf-Werner Eilert:
> >>> Am 06.02.2010 00:52, schrieb Benoît Minisini:
> > Salut,
> >
> > I still haven't solved the Draw.Text tab problem, but I'v a new one
> > (a problem).
> >
> > If you open the printer-setup the first time, the 'Print to printer'
> > is chosen, and the target-file behind 'Print to file' is empty.
> >
> > If you check 'Print to file' and fill the target-file and then you
> > switch back to 'Print to printer', the target-file field is disabled.
> > (Setup Printer.png)
> >
> > Everything seems to be alright.
> >
> > But, and there is my new problem, in my code I can't see what should
> > be done. (printing 5 times to file, makes no sense)
> >
> > Where is the magic pointer, which shows me the chosen device?
> > (Printer Properties.png)
> >
> > Gambas2=2.19.0  Revision: 2654
> > qt
> 
>  Just a few word to tell that the printer support has been redesigned
>  in Gambas 3, this is why I didn't touch the Gambas 2 one anymore.
> 
>  Now in Gambas 3, it should work as it should have worked since the
>  beginning, with both Qt and GTK+.
> 
>  Regards,
> >>>
> >>> That means, no need to print into a file anymore? Great news, Benoit!
> >>>
> >>> On the other hand, after having worked with the workaround for such a
> >>> long time, I found some advantages in working with print files, e. g. I
> >>> now can store every form or letter I printed for the students so I can
> >>> look them up later if anything is unclear or no copy available ("what
> >>> the hack did I print for her then...")
> >>>
> >>> Regards
> >>>
> >>> Rolf
> >>
> >> Salut Rolf,
> >>
> >> for me, the way was the other way around. Printing works (with gambas),
> >> and I wanted to store automatic one copy as PDF in an archive.
> >> And had discovered the error in the Printer.Setup.
> >
> > Apparently this feature is managed by CUPS: there is an option to archive
> > all documents sent to printers.
> >
> > Regards,
> 
> Oh, that's nice! Never saw this, never knew :-) Tanks for the tipp!
> 
> But in my specific case, it is easier to have my student database
> program store the documents as per students' names. Easier to retrieve,
> I mean.
> 
> But where is this Printer Setup thing you use, is it a CUPS frontend? I
> know CUPS only from its localhost website frontend. (General setup is
> done via the Suse-wide Yast tool.)
> 
> Regards
> 
> Rolf
> 

It's "system-config-printer", made by RedHat. It is installed by default on 
Mandriva as soon as you install a printer.

Regards,

-- 
Benoît Minisini

--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] creating control group from code

2010-02-08 Thread Bill-Lancaster

I'm creating a number of textboxes on a form from code and would like to have
a single event resulting from a change to the text content of any of them.

Can't see any way to do it.
-- 
View this message in context: 
http://old.nabble.com/creating-control-group-from-code-tp27502821p27502821.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] creating control group from code

2010-02-08 Thread Charlie Reinl
Am Montag, den 08.02.2010, 08:54 -0800 schrieb Bill-Lancaster:
> I'm creating a number of textboxes on a form from code and would like to have
> a single event resulting from a change to the text content of any of them.
> 
> Can't see any way to do it.

Salut Bill,

as you write in subject 'GROUP' them.

See in doc and use LAST  http://gambasdoc.org/help/lang/last?view&en

-- 
Amicalement
Charlie


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] creating control group from code

2010-02-08 Thread Bill-Lancaster

Thanks Charlie
-- 
View this message in context: 
http://old.nabble.com/creating-control-group-from-code-tp27502821p27503718.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user