Re: [Gambas-user] keep forms into a form

2009-11-24 Thread Jorge Carrión
Perhaps you can create your forms an store then in a array of variant[] in
the Tag property of the main form.
I can't see why it doesn't work... by I've do not try it.
Regards

2009/11/24 nospam.nospam.nos...@gmail.com

 Jean-Yves F. Barbier wrote:
  Hi,
 
  Is there a manner to keep my forms into my main form?
  other than using a workspace that apparently force children
  to appear as tabs.
  And to have them as icons (or anything else) into this main
  form when minimized?

 Rob wrote one for Gambas 1x some years ago as an add-on. I have no idea if
 it's been maintained so you'll have to wait for him to comment on that bit.

 Gambas, and rightly so IMO, chose to stay away from the traditional MDI
 interface, probably because they feel the same way about MDI as I do. My
 opinion is [CENSORED].




 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread Fabien Bodard
2009/11/24  nospam.nospam.nos...@gmail.com:
 Jean-Yves F. Barbier wrote:
 Hi,

 Is there a manner to keep my forms into my main form?
 other than using a workspace that apparently force children
 to appear as tabs.
 And to have them as icons (or anything else) into this main
 form when minimized?

 Rob wrote one for Gambas 1x some years ago as an add-on. I have no idea if
 it's been maintained so you'll have to wait for him to comment on that bit.

 Gambas, and rightly so IMO, chose to stay away from the traditional MDI
 interface, probably because they feel the same way about MDI as I do. My
 opinion is [CENSORED].

Right !

in the gb1 version, the workspace component was like the windows one
... with child windows.. in a working area...

But it was too hardly linked to qt ... and not really used in Linux
common interfaces... So Benoit and many of us, after a long long
exchange of mail, have take the decision to use a tabbed MDI
interface... Like you can see in the gambas ide, gedit, kate, quanta,
web broswers, etc

So, i think you can try to construct your interface around this idea





 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread Fabien Bodard
the google team idea seem to be the same ... cloud systems ... that's
why gambas need to be a server side language that have some componants
to design java/css2 widgets... for broswer interfaces... That's the
idea of Benoit too i think...

2009/11/24 Steven revimmo ste...@revimmo.com:
 Hi,

 I think it would be the best thing ever.
 I did a lot of gambas development for one of my companies.
 The problem came with installation. We have sites all over France and
 all kinds of systems
 (Linux, Max, Windoze, ... whatever)

 I just could not maintain all that, it was to much work, to much
 traveling.

 So, I switched to eyeOS ( http://www.eyeos.org ). A cloud system that
 works very nice.
 It's true, the only thing really in common on all the user systems is a
 browser, and I think
 IE and Firefox are compatible enough to make things running smoothly.

 In eyeOS, the server-side is completely done in PHP, which is a nice
 language.
 It would, however be great to be able to use gambas there.

 This means that the widgets they made (eyeOS team) should communicate
 with gambas in
 stead of php. That would not be very hard to do, I think.
 However, the widgets they have now, do not have to do much with the
 quality of f.i. Qt widgets.
 As an example : The combo box only allows a list of items to choose
 from, not to enter
 new items. The grid-control is really really extremely basic.

 But it should be possible to improve that easy (if you know javascript /
 ecma ) well.
 F.i. the widgets of http://www.tecnick.com are a LOT better, I don't
 know there policy, but
 if one could use them, writing the gambas part would be a piece of
 cake !

 So, for me it boils down to a question of widgets, a surmountable
 problem, that would give us
 an excellent platform with gambas to make cloud applications !

 Steven
 ps: and you would not need any 'plugins' for Firefox, Ie or any other
 browser.



 Le mardi 24 novembre 2009 à 17:37 +1100, nospam.nospam.nos...@gmail.com
 a écrit :

 Rob wrote:
  On Monday 23 November 2009 10:14 pm, nospam.nospam.nos...@gmail.com
  wrote:
   I do that, some people infer angry emotions that aren't there.
 
  Just because you're denying them doesn't mean they're not there.  I
  wish
  you the best of luck with your healing process, at such time as you
  choose to embark upon it.

 lol

 cue tune to Twilight Zone

 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Pesky Minimize Button on TitleBar

2009-11-24 Thread Fabien Bodard
gambas version ?

2009/11/24  nospam.nospam.nos...@gmail.com:
 I can't find an answer to this problem, except for an old post on this list
 in French. My French is rustier than the wreck of the Titanic but I got the
 impression that the building of window title bars is under the control of
 the WM.

 Anyway, I have a window and I need to remove the Minimise button. The
 maximise button I have dealt with. Oddly, in the gambas design environment
 the window shows with only the close box, which will do, but as soon as I
 run the application, there's the pesky Minimise button again.

 Does anyone care to shed some light on this, please?


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread nospam.nospam.nospam
Jorge Carrión wrote:
 Perhaps you can create your forms an store then in a array of
 variant[] in the Tag property of the main form.

Perhaps he can, but is that going to give him what he wants?

 I can't see why it doesn't work... by I've do not try it.

[CENSORED] 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Pesky Minimize Button on TitleBar

2009-11-24 Thread nospam.nospam.nospam
Fabien Bodard wrote:
 gambas version ?

The latest, of course. 2.17.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread nospam.nospam.nospam
Fabien Bodard wrote:
 2009/11/24  nospam.nospam.nos...@gmail.com:
 Jean-Yves F. Barbier wrote:
 Hi,

 Is there a manner to keep my forms into my main form?
 other than using a workspace that apparently force children
 to appear as tabs.
 And to have them as icons (or anything else) into this main
 form when minimized?

 Rob wrote one for Gambas 1x some years ago as an add-on. I have no
 idea if it's been maintained so you'll have to wait for him to
 comment on that bit.

 Gambas, and rightly so IMO, chose to stay away from the traditional
 MDI interface, probably because they feel the same way about MDI as
 I do. My opinion is [CENSORED].

 Right !

:)

 in the gb1 version, the workspace component was like the windows one
 ... with child windows.. in a working area...

 But it was too hardly linked to qt ... and not really used in Linux
 common interfaces... So Benoit and many of us, after a long long
 exchange of mail, have take the decision to use a tabbed MDI
 interface... Like you can see in the gambas ide, gedit, kate, quanta,
 web broswers, etc

Look, I cut my teeth on DOS before Windows was even dreamt of. The win3 MDI 
interface was the best anyone could come up with two full decades ago. Even 
Microsoft dropped it in SP2 (IIRC) of XP. If you knew the right call in SP1, 
your whole XP looked like win3, but its use was so rare that even MS had to 
kill it, several years ago.

PS: I am a reformed windows developer of many decades experience. I had a 
hold of win3 when it was at 1.1. Back then, it was an advancement. Not now, 
it's just a few strides back.

 So, i think you can try to construct your interface around this idea

Oh, good grief! I would never do such a thing!

:)

About this:
 and not really used in Linux
 common interfaces

IMO, there far too many attempts to make linux UIs look like Windows, KDE 
being one of them. After 30+ years in IT, and 25 years or so experience with 
Windows before it became well-known, Gnome is a Godsend.

And it was a smart, pre-emptive move.

Oh. I used to work for Ashton-Tate, now Borland. That's how I got my hands 
on Windows before anyone else.

LONG LIVE LINUX! LONG LIVE GAMBAS!

Even if Rob Kudla does think I'm an angry so and so. 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Gambas script execution

2009-11-24 Thread Matteo Lisi


Hi !

Finally I crosscompiled the gambas for ARM, and I have on my arm system 
the gbc2 file

I tried to execute the following script:

/**/
#!/usr/bin/ gbs2

' This script returns the memory really used by the system, the cache 
and swap being excluded.

FUNCTION GetUsedMemory() AS Integer

  DIM sRes AS String
  DIM aRes AS String[]
  DIM cVal AS NEW Collection
  DIM sVal AS String

  EXEC [cat, /proc/meminfo] TO sRes

  FOR EACH sVal IN Split(sRes, \n, , TRUE)
aRes = Split(sVal,  , , TRUE)
cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
  NEXT

  RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached + 
cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached

END

PRINT Subst(Used memory: 1 bytes, GetUsedMemory())
/**/

but the gbc2 return me:

gbc: project file not found: /gambas_prove/.project

Where I made mistake ?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread nospam.nospam.nospam
Steven revimmo wrote:

 So, for me it boils down to a question of widgets, a surmountable
 problem,

You don't read much of what Benoit has to say? Nor do you know much about 
Microsoft?

They are questions, not assertions.

 that would give us
 an excellent platform with gambas to make cloud applications !

The cloud is a buzzword for storing your very private super sekrit stuff, 
such as pictures of your nekkid lover where your wife can't find them, on a 
server that offers no guarantee of any privacy whatosever, let alone any 
availability. Perhaps you are recently new to the world of computing?

 Steven
 ps: and you would not need any 'plugins' for Firefox, Ie or any other
 browser.

You assume that MS would convert windows to widgets?

And kill their own monoply by their own free choice.

Are you aware that even such a lowly entity as a label is a window in 
Windows?

Perhaps not. 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread Doriano Blengino
nospam.nospam.nos...@gmail.com ha scritto:
 Fabien Bodard wrote:
   
 2009/11/24  nospam.nospam.nos...@gmail.com:
 
 Jean-Yves F. Barbier wrote:
   
 Hi,

 Is there a manner to keep my forms into my main form?
 other than using a workspace that apparently force children
 to appear as tabs.
 And to have them as icons (or anything else) into this main
 form when minimized?
 
 So, i think you can try to construct your interface around this idea
 

 Oh, good grief! I would never do such a thing!
   
I think he would mean construct your interface around this new idea, 
i.e. tabs, not old MDI.

It seems to me that this MDI interface is too much criticized. The 
classic workspace has its limits too; perhaps something in the middle 
should be the best. Think at your desktop: isn't it an MDI interface? 
Win32, gnome, kde, all are MDI interfaces. How would you feel with a 
desktop made up as a gambas workspace?

If an app has something in common with a desktop (ie, many windows, of 
many types, and drag and drop between them), then an MDI interface is 
not so bad.

Just trying to see the other face of the coin - if all the people say 
MDI is bad, why one should join without thinking a little more?

Regards,
Doriano

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread nospam.nospam.nospam
Matteo Lisi wrote:
 Hi !
 
 Finally I crosscompiled the gambas for ARM, and I have on my arm
 system 
 the gbc2 file
 
 I tried to execute the following script:
 
 /**/
 #!/usr/bin/ gbs2
 
 ' This script returns the memory really used by the system, the cache
 and swap being excluded.
 
 FUNCTION GetUsedMemory() AS Integer
 
  DIM sRes AS String
  DIM aRes AS String[]
  DIM cVal AS NEW Collection
  DIM sVal AS String
 
  EXEC [cat, /proc/meminfo] TO sRes
 
  FOR EACH sVal IN Split(sRes, \n, , TRUE)
aRes = Split(sVal,  , , TRUE)
cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
  NEXT
 
  RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached +
 cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached
 
 END
 
 PRINT Subst(Used memory: 1 bytes, GetUsedMemory())
 /**/
 
 but the gbc2 return me:
 
 gbc: project file not found: /gambas_prove/.project
 
 Where I made mistake ?

What do you see in /gambas_prove/.project when you show hidden files?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread Matteo Lisi

   Hi !
   thanks for your reply
   I create an empty  .project file on the directory , and the execution of
   script  give  me an OK, but if I create a lock loop in my script the
   execution still return me OK ...
   I think that the gbc2 didn't process the file like a script...
   Regards
   [1]nospam.nospam.nos...@gmail.com ha scritto:

Matteo Lisi wrote:


Hi !

Finally I crosscompiled the gambas for ARM, and I have on my arm
system
the gbc2 file

I tried to execute the following script:

/**/
#!/usr/bin/ gbs2

' This script returns the memory really used by the system, the cache
and swap being excluded.

FUNCTION GetUsedMemory() AS Integer

 DIM sRes AS String
 DIM aRes AS String[]
 DIM cVal AS NEW Collection
 DIM sVal AS String

 EXEC [cat, /proc/meminfo] TO sRes

 FOR EACH sVal IN Split(sRes, \n, , TRUE)
   aRes = Split(sVal,  , , TRUE)
   cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
 NEXT

 RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached +
cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached

END

PRINT Subst(Used memory: 1 bytes, GetUsedMemory())
/**/

but the gbc2 return me:

gbc: project file not found: /gambas_prove/.project

Where I made mistake ?


What do you see in /gambas_prove/.project when you show hidden files?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  [2]http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
[3]gambas-u...@lists.sourceforge.net
[4]https://lists.sourceforge.net/lists/listinfo/gambas-user

References

   1. mailto:nospam.nospam.nos...@gmail.com
   2. http://p.sf.net/sfu/bobj-july
   3. mailto:Gambas-user@lists.sourceforge.net
   4. https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread nospam.nospam.nospam
Doriano Blengino wrote:
 nospam.nospam.nos...@gmail.com ha scritto:
 Fabien Bodard wrote:

 2009/11/24  nospam.nospam.nos...@gmail.com:

 Jean-Yves F. Barbier wrote:

 Hi,

 Is there a manner to keep my forms into my main form?
 other than using a workspace that apparently force children
 to appear as tabs.
 And to have them as icons (or anything else) into this main
 form when minimized?

 So, i think you can try to construct your interface around this idea


 Oh, good grief! I would never do such a thing!

 I think he would mean construct your interface around this new idea,
 i.e. tabs, not old MDI.

Yes, but the problem is I was being funny, but since I have to explain it, 
it's no longer funny.

 It seems to me that this MDI interface is too much criticized.

I would say that Microsoft dropping it in XP SP2 would be more than 
sufficient for everyone else to bury it. 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread Charlie Reinl
Am Dienstag, den 24.11.2009, 11:54 +0100 schrieb Matteo Lisi:
 
 Hi !
 
 Finally I crosscompiled the gambas for ARM, and I have on my arm system 
 the gbc2 file
 
 I tried to execute the following script:
 
 /**/
 #!/usr/bin/ gbs2
 
 ' This script returns the memory really used by the system, the cache 
 and swap being excluded.
 
 FUNCTION GetUsedMemory() AS Integer
 
   DIM sRes AS String
   DIM aRes AS String[]
   DIM cVal AS NEW Collection
   DIM sVal AS String
 
   EXEC [cat, /proc/meminfo] TO sRes
 
   FOR EACH sVal IN Split(sRes, \n, , TRUE)
 aRes = Split(sVal,  , , TRUE)
 cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
   NEXT
 
   RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached + 
 cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached
 
 END
 
 PRINT Subst(Used memory: 1 bytes, GetUsedMemory())
 /**/
 
 but the gbc2 return me:
 
 gbc: project file not found: /gambas_prove/.project
 
 Where I made mistake ?
 
Salut Matteo, 

correct me if I'm wrong, I'v never dit anything with gambas-script.
You have a gbc2 file, but your file-header says #!/usr/bin/ gbs2
( why that space )

That's what I'v remarked!
-- 
Amicalement
Charlie


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread nospam.nospam.nospam
Matteo Lisi wrote:
   Hi !
   thanks for your reply
   I create an empty  .project file on the directory , and the
   execution of script  give  me an OK, but if I create a lock loop
   in my script the execution still return me OK ...

 RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached +
 cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached

What happens if you use early binding instead of late binding?


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread nospam.nospam.nospam
Charlie Reinl wrote:
 Am Dienstag, den 24.11.2009, 11:54 +0100 schrieb Matteo Lisi:

 Hi !

 Finally I crosscompiled the gambas for ARM, and I have on my arm
 system the gbc2 file

 I tried to execute the following script:

 /**/
 #!/usr/bin/ gbs2

 correct me if I'm wrong, I'v never dit anything with gambas-script.
 You have a gbc2 file, but your file-header says #!/usr/bin/ gbs2
 ( why that space )

 That's what I'v remarked!

Crikey. Eagle eyes, and then some. I'm sure you don't want to know what the 
Aussie vernacular for that is :)

Great pick that. 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread Matteo Lisi

   Hi !

   The first line:
#!/usr/bin/ gbs2

   it's a typing error
   the right line is:
#!/usr/bin/gbs2

   Thanks Charlie , but the problem , unfortunatly is not the space !
   Charlie Reinl ha scritto:

Am Dienstag, den 24.11.2009, 11:54 +0100 schrieb Matteo Lisi:
  

Hi !

Finally I crosscompiled the gambas for ARM, and I have on my arm system 
the gbc2 file

I tried to execute the following script:

/**/
#!/usr/bin/ gbs2

' This script returns the memory really used by the system, the cache 
and swap being excluded.

FUNCTION GetUsedMemory() AS Integer

  DIM sRes AS String
  DIM aRes AS String[]
  DIM cVal AS NEW Collection
  DIM sVal AS String

  EXEC [cat, /proc/meminfo] TO sRes

  FOR EACH sVal IN Split(sRes, \n, , TRUE)
aRes = Split(sVal,  , , TRUE)
cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
  NEXT

  RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached + 
cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached

END

PRINT Subst(Used memory: 1 bytes, GetUsedMemory())
/**/

but the gbc2 return me:

gbc: project file not found: /gambas_prove/.project

Where I made mistake ?



Salut Matteo, 

correct me if I'm wrong, I'v never dit anything with gambas-script.
You have a gbc2 file, but your file-header says #!/usr/bin/ gbs2
( why that space )

That's what I'v remarked!
  
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread nospam.nospam.nospam
Matteo Lisi wrote:
   Hi !
 
   The first line:
 #!/usr/bin/ gbs2
 
   it's a typing error
   the right line is:
 #!/usr/bin/gbs2
 
   Thanks Charlie , but the problem , unfortunatly is not the space !

Could the problem be some other typing error?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread nospam.nospam.nospam
Matteo Lisi wrote:
   Hi !
   it's not a binding problem if I write a simple script like:
   PRINT Hi from Gambas

Correct, but what about this..

 RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached +
 cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached
 
 What happens if you use early binding instead of late binding?



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] gb.db.mysql not in .project

2009-11-24 Thread Ron

Ok, something weird.

My project uses mysql db from day one.

And today I wanted to uncheck gb.v4l because it doesn't work with v4l2, 
so i ditched it in favor of embedded mplayer, so I went to my project 
properties and noticed gb.db.mysql was not checked! Huh, it wasn't in my 
.project file either, but mysql was working, otherwise I couldn't even 
start my project.

Library=gb.qt
Library=gb.form
Library=gb.db
Library=gb.db.form
Library=gb.desktop
Library=gb.form.dialog
Library=gb.form.mdi
Library=gb.net
Library=gb.net.curl
Library=gb.net.smtp
Library=gb.qt.ext
Library=gb.settings
Library=gb.v4l
Library=gb.xml
Library=gb.xml.rpc

I checked it, and it appeared in my .project file too.
Unchecked it again and my project still runs without it...

Whats the idea behind this?
Doesn't this generate dependency problems if you create a package?

Gambas 2.18.0
gb.qt

Regards,
Ron_2nd.



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread Charlie Reinl
Am Mittwoch, den 25.11.2009, 00:27 +1100 schrieb
nospam.nospam.nos...@gmail.com:
 Matteo Lisi wrote:
Hi !
  
The first line:
  #!/usr/bin/ gbs2
  
it's a typing error
the right line is:
  #!/usr/bin/gbs2
  
Thanks Charlie , but the problem , unfortunatly is not the space !
 
 Could the problem be some other typing error?

Salut,

1.)-- full call 

:~/gambas/2/f3/scriptTest$ /usr/local/bin/gbs2 -c
~/gambas/2/f3/scriptTest/matteo.ga2script
gbs2: warning: cannot find component dbreportviewer2 required by
DBReportDesigner2
CComponent.CalcSortKey.171: #13: Null object
0: CComponent.CalcSortKey.171
1: CComponent.SortComponents.201
2: CComponent._init.123
3: MMain.MakeVirtualProject.180
4: MMain.Main.83

I'v no idea what, and why that gbs2: warning.
The component exists as User-Component, and of course it has nothing to
do with the script

2.)- my gbs2 version [rev 2429] 

:~/gambas/2/f3/scriptTest$ /usr/local/bin/gbs2  -V
2.14.0

3.)-- after a chmod +x and changing to #!/usr/local/bin/gbs2 --

:~/gambas/2/f3/scriptTest$ ./matteo.ga2script
./matteo.gbs: line 3: syntax error near unexpected token `('
./matteo.gbs: line 3: `FUNCTION GetUsedMemory() AS Integer'

perhaps Benoit or Fabien have a Idea!


-- 
Amicalement
Charlie
#!/usr/local/bin/gbs2

FUNCTION GetUsedMemory() AS Integer
 DIM sRes AS String
 DIM aRes AS String[]
 DIM cVal AS NEW Collection
 DIM sVal AS String

  EXEC [cat, /proc/meminfo] TO sRes
  
  FOR EACH sVal IN Split(sRes, \n, , TRUE)
aRes = Split(sVal,  , , TRUE)
cVal[Left$(aRes[0], -1)] = CInt(aRes[1])
  NEXT
  
 RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached +  
cVal!SwapTotal - cVal!SwapFree - cVal!SwapCached

END

PRINT Subst(Used memory: 1 bytes, GetUsedMemory())

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas script execution

2009-11-24 Thread Matteo Lisi

Could the problem be some other typing error?

   Perhaps ! A dog ate my hands and I'm typing with two little wood rod...
   I tried to replace the return line with the one who you suggest me:
RETURN cVal!MemTotal - cVal!MemFree - cVal!Buffers - cVal!Cached + cVal!SwapTot
al - cVal!SwapFree - cVal!SwapCached

   But I had the same result !
   [1]nospam.nospam.nos...@gmail.com ha scritto:

Matteo Lisi wrote:


  Hi !

  The first line:
#!/usr/bin/ gbs2

  it's a typing error
  the right line is:
#!/usr/bin/gbs2

  Thanks Charlie , but the problem , unfortunatly is not the space !


Could the problem be some other typing error?

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  [2]http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
[3]gambas-u...@lists.sourceforge.net
[4]https://lists.sourceforge.net/lists/listinfo/gambas-user

References

   1. mailto:nospam.nospam.nos...@gmail.com
   2. http://p.sf.net/sfu/bobj-july
   3. mailto:Gambas-user@lists.sourceforge.net
   4. https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.db.mysql not in .project

2009-11-24 Thread Charlie Reinl
Am Dienstag, den 24.11.2009, 14:27 +0100 schrieb Ron:
 Ok, something weird.
 
 My project uses mysql db from day one.
 
 And today I wanted to uncheck gb.v4l because it doesn't work with v4l2, 
 so i ditched it in favor of embedded mplayer, so I went to my project 
 properties and noticed gb.db.mysql was not checked! Huh, it wasn't in my 
 .project file either, but mysql was working, otherwise I couldn't even 
 start my project.
 
 Library=gb.qt
 Library=gb.form
 Library=gb.db
 Library=gb.db.form
 Library=gb.desktop
 Library=gb.form.dialog
 Library=gb.form.mdi
 Library=gb.net
 Library=gb.net.curl
 Library=gb.net.smtp
 Library=gb.qt.ext
 Library=gb.settings
 Library=gb.v4l
 Library=gb.xml
 Library=gb.xml.rpc
 
 I checked it, and it appeared in my .project file too.
 Unchecked it again and my project still runs without it...
 
 Whats the idea behind this?
 Doesn't this generate dependency problems if you create a package?
 
 Gambas 2.18.0
 gb.qt
 
 Regards,
 Ron_2nd.

Salut Ron,

Benoit split gb.db into gb.db + gb.db.database driver's, some versions
ago, have a look into ChangeLog. 
-- 
Amicalement
Charlie


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread Steven revimmo
You are a funny guy ;-)

Le mardi 24 novembre 2009 à 21:57 +1100, nospam.nospam.nos...@gmail.com
a écrit :

 Steven revimmo wrote:
 
  So, for me it boils down to a question of widgets, a surmountable
  problem,
 
 You don't read much of what Benoit has to say? Nor do you know much about 
 Microsoft?
 


I do read what Benoit has to say, it's much more interesting as your
post, but not so funny.


 They are questions, not assertions.
 
  that would give us
  an excellent platform with gambas to make cloud applications !
 
 The cloud is a buzzword for storing your very private super sekrit stuff, 
 such as pictures of your nekkid lover where your wife can't find them, on a 
 server that offers no guarantee of any privacy whatosever, let alone any 
 availability. Perhaps you are recently new to the world of computing?
 

Are you aware that there are also 'cloud' applications that don't run
with Google, you can run them
on your own server (like eyeOS) so your problem only exists if you limit
the sky to Google.  



  Steven
  ps: and you would not need any 'plugins' for Firefox, Ie or any other
  browser.
 
 You assume that MS would convert windows to widgets?
 

No, not MS, and yes... I'm aware that everything is a window in the
ms-world, so what ?
That is just a question of terminology.



 And kill their own monoply by their own free choice.
 
 Are you aware that even such a lowly entity as a label is a window in 
 Windows?
 
 Perhaps not. 
 

Perhaps I might suggest you take a look at eyeOS, learn a bit, and then
report back here.
If you don't I might be even happier.


Steven



 
 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
 trial. Simplify your report design, integration and deployment - and focus on 
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] keep forms into a form

2009-11-24 Thread Rob
On Tuesday 24 November 2009 05:23 am, nospam.nospam.nos...@gmail.com wrote:
 Look, I cut my teeth on DOS before Windows was even dreamt of. The win3
  MDI interface was the best anyone could come up with two full decades
  ago.

And the vomiting little windows all over the desktop approach was the 
best anyone could come up with two and a half decades ago on the Mac.

Rob

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread José Luis Redrejo Rodríguez
2009/11/23 Rob sourceforge-raind...@kudla.org

 On Monday 23 November 2009 05:07 pm, Vackoy wrote:
  I think is an excellent idea but i don't know if it is possible.
  Sorry my ignorance but what is an ecma-script code??

 ECMAscript is the language used in web browsers as Javascript and in
 Flash applets as Actionscript.

 I don't really think crosscompiling Gambas code to Javascript makes any
 more sense than crosscompiling Gambas code to Java.

 Rob


Hi Rob, there's a big difference, crosscompiling Gambas code to Javascript
will allow you programming in Gambas and running your applications in any
modern browser, without the overload of Java.
That's the idea behind of GWT [1] or Pyjama [2], and I can assure you that
both are good project, and GWT is very succesfully and is making me thinking
of migrate some of my gambas applications to a web interface, even if I have
to use Java (which I wouldn't say it's a language I love) to do the user
frontend.
More and more, everyday, users love the web interface, even if the
application is not  a real web interface. I.E: a small daemon running python
with the twisted framework providing the user interface in javascript in the
browser is prefered to  a real desktop application. At least in the schools
world where I spend most of my time.
Regards.
José L.

[1] http://code.google.com/webtoolkit/
[2] http://pyjs.org/
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread José Luis Redrejo
2009/11/23 Rob sourceforge-raind...@kudla.org

 On Monday 23 November 2009 05:07 pm, Vackoy wrote:
  I think is an excellent idea but i don't know if it is possible.
  Sorry my ignorance but what is an ecma-script code??

 ECMAscript is the language used in web browsers as Javascript and in
 Flash applets as Actionscript.

 I don't really think crosscompiling Gambas code to Javascript makes any
 more sense than crosscompiling Gambas code to Java.

 Rob


Hi Rob, there's a big difference: crosscompiling Gambas code to Javascript
will allow you programming in Gambas and running your applications in any
modern browser, without the overload of Java.
That's the idea behind of GWT [1] or Pyjama [2], and I can assure you that
both are good projects, and GWT is very succesfully and is making me
thinking of migrate some of my gambas applications to a web interface, even
if I have to use Java (which I wouldn't say it's a language I love) to do
the user frontend.
More and more, everyday, users love the web interface, even if the
application is not  a real web interface. I.E: a small daemon running python
with the twisted framework providing the user interface in javascript in the
browser is prefered to  a real desktop application. At least in the schools
world where I spend most of my time.
Regards.
José L.

[1] http://code.google.com/webtoolkit/
[2] http://pyjs.org/
 http://pyjs.org/
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] gb.db.mysql not in .project

2009-11-24 Thread Benoît Minisini
 Ok, something weird.
 
 My project uses mysql db from day one.
 
 And today I wanted to uncheck gb.v4l because it doesn't work with v4l2,
 so i ditched it in favor of embedded mplayer, so I went to my project
 properties and noticed gb.db.mysql was not checked! Huh, it wasn't in my
 .project file either, but mysql was working, otherwise I couldn't even
 start my project.
 
 Library=gb.qt
 Library=gb.form
 Library=gb.db
 Library=gb.db.form
 Library=gb.desktop
 Library=gb.form.dialog
 Library=gb.form.mdi
 Library=gb.net
 Library=gb.net.curl
 Library=gb.net.smtp
 Library=gb.qt.ext
 Library=gb.settings
 Library=gb.v4l
 Library=gb.xml
 Library=gb.xml.rpc
 
 I checked it, and it appeared in my .project file too.
 Unchecked it again and my project still runs without it...
 
 Whats the idea behind this?
 Doesn't this generate dependency problems if you create a package?
 

It will. But you may write a database program that does not care on the 
database backend (for example, the database manager). The gb.db component can 
automatically loads gb.db.* driver at first use, if they are present of 
course.

But if you are sure which gb.db.* driver you need, you can check it in the 
project property dialog, so that you have the dependency.

Regards,

-- 
Benoît Minisini

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread Rob
On Tuesday 24 November 2009 11:23 am, José Luis Redrejo Rodríguez wrote:
 That's the idea behind of GWT [1] or Pyjama [2], and I can assure you
  that both are good project, and GWT is very succesfully and is making
  me thinking of migrate some of my gambas applications to a web
  interface, even if I have to use Java (which I wouldn't say it's a
  language I love) to do the user frontend.

I did write a script in 2004 to generate DHTML widgets out of Gambas 1.0 
forms (HTML + Javascript + CSS + some perl CGI code -- the term Ajax 
hadn't been coined yet), but simply taking desktop apps and throwing them 
on a web page really didn't work that well as a user interface paradigm.  
But I forgot about GWT.  I should have a look at the code it generates to 
see how awful it is, but it's still strange to me to think of a high-level
interpreted language as a compilation target.

Rob

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Hi,

How can I escape a picture in order to insert it into a BYTEA 
postgresql data field?

-- 
Cocaine: using tomorrow's energy today.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread richard terry
On Wednesday 25 November 2009 05:30:52 Jean-Yves F. Barbier wrote:
 Hi,
 
 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?
 
Having mucked around with this interminably looking at different ways, the 
solution is in the picture database sample file, but basically do something 
like this and you won't need to manually escape anything. You would use a 
different connection method like in the picture db not my function 
(modDbconnect), I've commented this for  you

Public Function Image_Save(ImagePath As String, Optional fk_Image As Integer = 
0) As Integer
  Dim newPicture As result
  Dim $Result As Result
  Dim img As Image
  Dim tempfile As String 
  Dim conn As Connection
 'get the connection to the backend
 conn = modDBConnect.Get_Connection()
'connect to the table
  newPicture = conn.Create(all_images)
'save the picture file to a tempory file
  img = Image.Load(ImagePath) 
  tempFile = Temp()  .png
  img.Save(tempFile)
'save to the database
  If Not fk_image Then
newPicture[image] = File.Load(tempFile)
newPicture.Update()
'don't worry about this I just needed the pk, perhaps there is an easier way
$Result = modDBConnect.exec_query(Select currval('all_images_pk_seq') as 
pk_image)
  End If 
  Return $Result!pk_image

End

Think that's ok, notify me if dosn't work, but follow the picture databas in 
samples line by line.

Regards

Richard

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture PS

2009-11-24 Thread richard terry
On Wednesday 25 November 2009 07:46:31 you wrote:
 On Wednesday 25 November 2009 05:30:52 Jean-Yves F. Barbier wrote:
  Hi,
 
  How can I escape a picture in order to insert it into a BYTEA
  postgresql data field?
 
 Having mucked around with this interminably looking at different ways, the
 solution is in the picture database sample file, but basically do something
 like this and you won't need to manually escape anything. You would use a
 different connection method like in the picture db not my function
 (modDbconnect), I've commented this for  you
 
 Public Function Image_Save(ImagePath As String, Optional fk_Image As
  Integer = 0) As Integer
   Dim newPicture As result
   Dim $Result As Result
   Dim img As Image
   Dim tempfile As String
   Dim conn As Connection
  'get the connection to the backend
  conn = modDBConnect.Get_Connection()
 'connect to the table
   newPicture = conn.Create(all_images)
 'save the picture file to a tempory file
   img = Image.Load(ImagePath)
   tempFile = Temp()  .png
   img.Save(tempFile)
 'save to the database
   If Not fk_image Then
 newPicture[image] = File.Load(tempFile)
 newPicture.Update()
 'don't worry about this I just needed the pk, perhaps there is an easier
  way $Result = modDBConnect.exec_query(Select currval('all_images_pk_seq')
  as pk_image)
   End If
   Return $Result!pk_image
 
 End
 
 Think that's ok, notify me if dosn't work, but follow the picture databas
  in samples line by line.
 
 Regards
 
 Richard
 

Don't forget to commit your transaction


sample table:

CREATE TABLE all_images
(
  pk serial NOT NULL,
  image bytea,
  deleted boolean,
  CONSTRAINT all_images_pkey PRIMARY KEY (pk)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE all_images OWNER TO easygp;
GRANT ALL ON TABLE all_images TO easygp;
GRANT ALL ON TABLE all_images TO staff;


Note also with gambas. I've raised this with the list/devel/benoit and had no 
replies but after much angst it seems that you can't address schema.table, ie
you cannot do this:

 newPicture = conn.Create(myschema.all_images)

I got tripped up for many many hours trying to figure out why these damn 
things wouldn't save, even when I just put a table called images into 
public, until I realised that throughout my db (of 350 odd tables scattered 
over 28 schemas, I have several image tables in different schemas so gambas 
was baulking without an error message when it got to the reference to image 
as  table. (hence the temporary name I've provided you all_images as I've 
not yet removed all the other tables due to my extensive use of views which 
I'll have to laboriously correct!

So in the end I've decided single table for all bytea data which I keep in 
public and (touch wood) seems to work quickly and easily. apparently you can 
store up to 1GIG in a bytea field but I suspect putting it in there could be 
real slow. 

You can use client side lo_creat,  and lo_import  functionsto directly write 
to blobs (different to bytea) in postgres as user (not the server side 
functions) but though easy to do on the postgres command line, I've not 
figured out how to do it in sql, and no-one on the postgresql novice list 
seemed to  know either. 

I spent probably 10 hours trawling the net to find a solution and though 
millions of references to it the 'smart $$%%^ ers' all sound really 
knowledgable by quoting the postgresl docs which in the end to idiots like 
myself mean nothing, but no-one seems to be able to offer a practicel sql 
solution. If you find out let me know.

Hope this all helps.

Regards

Richard



--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :

No Richard, I can't do that for:

* I already have a connection, and I wanna keep connection number as low 
   as possible,

* I do things as they should be done, so not any direct user permission 
   on any DB schema/table/index/sequence/etc; So I can't insert anything
   directly,

* I already have a big trigger on this table (ON INSERT) and I don't
   wanna bloat it (and this wouldn't solve the PB.)

So I *really* need to send an escaped string to my procedure.

Regards

JY

 On Wednesday 25 November 2009 05:30:52 Jean-Yves F. Barbier wrote:
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?

 Having mucked around with this interminably looking at different ways, the 
 solution is in the picture database sample file, but basically do something 
 like this and you won't need to manually escape anything. You would use a 
 different connection method like in the picture db not my function 
 (modDbconnect), I've commented this for  you
 
 Public Function Image_Save(ImagePath As String, Optional fk_Image As Integer 
 = 
 0) As Integer
   Dim newPicture As result
   Dim $Result As Result
   Dim img As Image
   Dim tempfile As String 
   Dim conn As Connection
  'get the connection to the backend
  conn = modDBConnect.Get_Connection()
 'connect to the table
   newPicture = conn.Create(all_images)
 'save the picture file to a tempory file
   img = Image.Load(ImagePath) 
   tempFile = Temp()  .png
   img.Save(tempFile)
 'save to the database
   If Not fk_image Then
 newPicture[image] = File.Load(tempFile)
 newPicture.Update()
 'don't worry about this I just needed the pk, perhaps there is an easier way
 $Result = modDBConnect.exec_query(Select currval('all_images_pk_seq') as 
 pk_image)
   End If 
   Return $Result!pk_image
 
 End
 
 Think that's ok, notify me if dosn't work, but follow the picture databas in 
 samples line by line.
-- 
A watched clock never boils.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture PS

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :
... 
 Don't forget to commit your transaction
 
 
 sample table:
 
 CREATE TABLE all_images
 (
   pk serial NOT NULL,
   image bytea,
   deleted boolean,
   CONSTRAINT all_images_pkey PRIMARY KEY (pk)
 )
 WITH (
   OIDS=FALSE
 );
 ALTER TABLE all_images OWNER TO easygp;
 GRANT ALL ON TABLE all_images TO easygp;
 GRANT ALL ON TABLE all_images TO staff;
^^^
You like to live *very* dangerously...
 
 
 Note also with gambas. I've raised this with the list/devel/benoit and had no 
 replies but after much angst it seems that you can't address schema.table, ie
 you cannot do this:
 
  newPicture = conn.Create(myschema.all_images)

This is not acceptable, nor usable!

 I got tripped up for many many hours trying to figure out why these damn 
 things wouldn't save, even when I just put a table called images into 
 public, until I realised that throughout my db (of 350 odd tables scattered 
 over 28 schemas, I have several image tables in different schemas so gambas 
 was baulking without an error message when it got to the reference to image 
 as  table. (hence the temporary name I've provided you all_images as I've 
 not yet removed all the other tables due to my extensive use of views which 
 I'll have to laboriously correct!
 
 So in the end I've decided single table for all bytea data which I keep in 
 public and (touch wood) seems to work quickly and easily. apparently you can 
 store up to 1GIG in a bytea field but I suspect putting it in there could be 
 real slow. 

I've got quite a same DB.

Once again, this is not acceptable and a large flaw in design, not to
mention the lack of security.

 You can use client side lo_creat,  and lo_import  functionsto directly write 
 to blobs (different to bytea) in postgres as user (not the server side 
 functions) but though easy to do on the postgres command line, I've not 
 figured out how to do it in sql, and no-one on the postgresql novice list 
 seemed to  know either. 

You can do that if your procedure gain the SU permissions, which, once again,
is not acceptable (at all.)

 I spent probably 10 hours trawling the net to find a solution and though 
 millions of references to it the 'smart $$%%^ ers' all sound really 
 knowledgable by quoting the postgresl docs which in the end to idiots like 
 myself mean nothing, but no-one seems to be able to offer a practicel sql 
 solution. If you find out let me know.

I'm gonna ask the Pg ML; if there's no possibility I'll leave gambas and
return to Python.

 Hope this all helps.

Unfortunately not :(

Regards
JY
-- 
X-rated movies are all alike ... the only thing they leave to the
imagination is the plot.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture PS

2009-11-24 Thread Jean-Yves F. Barbier
richard terry a écrit :
...
 Note also with gambas. I've raised this with the list/devel/benoit and had no 
 replies 

Ducking is never a good answer...

-- 
The proof of the pudding is in the eating.
-- Miguel de Cervantes

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Charlie Reinl
Am Dienstag, den 24.11.2009, 19:30 +0100 schrieb Jean-Yves F. Barbier:
 Hi,
 
 How can I escape a picture in order to insert it into a BYTEA 
 postgresql data field?
 

Salut,

no idea whats a BYTEA, I looked in the I-net, and found something in
german.

http://www.ms-office-forum.net/forum/sitemap/index.php?t-243720.html

- encode the binary file using base64 and store as TEXT
- is using ADODB.Stream (are there something like that in gambas )

Amicalement
-- 
Charlie

- growing old is mandatory, growing up is discretionary.
- vieillir est obligatoire, Grandir est discrétionnaire.  
- Altwerden ist obligatorisch, aufgewachsen ist Ermessenssache.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Benoît Minisini
 Hi,
 
 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?
 

Normally, if the postgresql field datatype is BYTEA, the gb.db component will 
see it as a blob.

Let's suppose the field name is Picture. You will do:

MyResult!Picture = File.Load(/path/to/picture/file)

Is it what you need?

-- 
Benoît Minisini

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?

 
 Normally, if the postgresql field datatype is BYTEA, the gb.db component will 
 see it as a blob.
 
 Let's suppose the field name is Picture. You will do:
 
 MyResult!Picture = File.Load(/path/to/picture/file)
 
 Is it what you need?

NO, I need the opposite:  
sqlQry = SELECT MyTable_ins(MyPicture);

where MyTable_ins(TEXT) is a stored PLPGSQL procedure that do
an indirect insert into myschema.mytable

-- 
Every journalist has a novel in him, which is an excellent place for it.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Charlie Reinl a écrit :
...
 http://www.ms-office-forum.net/forum/sitemap/index.php?t-243720.html
 
 - encode the binary file using base64 and store as TEXT
 - is using ADODB.Stream (are there something like that in gambas )

Thanks Charlie

-- 
Q:  What does it say on the bottom of Coke cans in North Dakota?
A:  Open other end.

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Benoît Minisini
 Benoît Minisini a écrit :
  Hi,
 
  How can I escape a picture in order to insert it into a BYTEA
  postgresql data field?
 
  Normally, if the postgresql field datatype is BYTEA, the gb.db component
  will see it as a blob.
 
  Let's suppose the field name is Picture. You will do:
 
  MyResult!Picture = File.Load(/path/to/picture/file)
 
  Is it what you need?
 
 NO, I need the opposite:
 sqlQry = SELECT MyTable_ins(MyPicture);
 
 where MyTable_ins(TEXT) is a stored PLPGSQL procedure that do
 an indirect insert into myschema.mytable
 

OK. So MyPicture must be a string including quoted binary data?

Alas there is no public access to the internal driver function that quotes 
binary data for a blob. Do you want me to add it in Gambas 3? Something like 
DB.QuoteBlob()?

-- 
Benoît Minisini

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] escape a picture

2009-11-24 Thread Jean-Yves F. Barbier
Benoît Minisini a écrit :
 Benoît Minisini a écrit :
 Hi,

 How can I escape a picture in order to insert it into a BYTEA
 postgresql data field?
 Normally, if the postgresql field datatype is BYTEA, the gb.db component
 will see it as a blob.

 Let's suppose the field name is Picture. You will do:

 MyResult!Picture = File.Load(/path/to/picture/file)

 Is it what you need?
 NO, I need the opposite:
 sqlQry = SELECT MyTable_ins(MyPicture);

 where MyTable_ins(TEXT) is a stored PLPGSQL procedure that do
 an indirect insert into myschema.mytable

 
 OK. So MyPicture must be a string including quoted binary data?
 
 Alas there is no public access to the internal driver function that quotes 
 binary data for a blob. Do you want me to add it in Gambas 3? Something like 
 DB.QuoteBlob()?
 
What would also be nice would be direct conversions (ie: from String
to Picture and reverse)

-- 
 Assume a virtue, if you have it not.  -William Shakespeare

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Gambas as firefox plugin !!!

2009-11-24 Thread nospam.nospam.nospam
Steven revimmo wrote:
 You are a funny guy ;-)

 I do read what Benoit has to say, it's much more interesting as your
 post, but not so funny.

I'm glad I made you smile.

 They are questions, not assertions.

 that would give us
 an excellent platform with gambas to make cloud applications !

 The cloud is a buzzword for storing your very private super sekrit
 stuff, such as pictures of your nekkid lover where your wife can't
 find them, on a server that offers no guarantee of any privacy
 whatosever, let alone any availability. Perhaps you are recently new
 to the world of computing?


 Are you aware that there are also 'cloud' applications that don't run
 with Google, you can run them
 on your own server (like eyeOS) so your problem only exists if you
 limit
 the sky to Google.

Yes.

 Steven
 ps: and you would not need any 'plugins' for Firefox, Ie or any
 other browser.

 You assume that MS would convert windows to widgets?


 No, not MS, and yes... I'm aware that everything is a window in the
 ms-world, so what ?
 That is just a question of terminology.

Being new to Linux I don't know enough about widgets to honestly answer.

 And kill their own monoply by their own free choice.

 Are you aware that even such a lowly entity as a label is a window in
 Windows?

 Perhaps not.


 Perhaps I might suggest you take a look at eyeOS, learn a bit, and
 then report back here.
 If you don't I might be even happier.

Yes, I took a look at it the other day. I don't think I'd ever be 
comfortable with the idea that the whole system lives in a web browser. 
Crikey, Internet Exploder is a web browser! 


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Frame where the first item is not Enabled - focus problem

2009-11-24 Thread bbb888



bbb888 wrote:
 
 In this form I have 
 - several misc controls
 - a textarea
 - a frame (with several checkboxes and buttons)
 - a listview
 in that order in the heirarchy.
 
 In certain conditions, the first item in the frame has it's Enabled
 property set to false.
 When this happens and I tab from the textarea to the frame (in actual fact
 it's done in code using textarea.Next.SetFocus as I have to trap TAB
 keys), the focus does not go to the first enabled item in the frame.  In
 fact, it seems to disappear* and a second tab moves the focus to the first
 control in the form, not the listview.
 * even the listview_GotFocus handler is never invoked.
 
 If the first item in the frame is enabled, the form works.
 
 Is this expected behaviour?  If not, do you think it is something in
 gambas or in the KDE style (Highcolor Classic) that I am using ?
 
 tia
 Bruce
 
 Update: I've tried changing the Frame to a Panel, but apart from losing my
 title the problem remains.
 

OK, Ive solved it with 

  IF Panel2.Children[0].Enabled THEN
Panel2.Children[0].SetFocus
  ELSE 
Panel2.Children[1].SetFocus
  ENDIF 

but I wouldn't have thought I'd need to go to thgat extreme?
-- 
View this message in context: 
http://old.nabble.com/Frame-where-the-first-item-is-not-Enabled---focus-problem-tp26507190p26507550.html
Sent from the gambas-user mailing list archive at Nabble.com.


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] base64 encoding/decoding

2009-11-24 Thread Jean-Yves F. Barbier
Hi,

I saw that gb.xml has base64 but there's no docs, does somebody 
have written encoding/decoding routines for strings?

-- 
Really??  What a coincidence, I'm shallow too!!

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user