[Gambas-user] Developing components

2010-01-29 Thread Dima Malkov
There is some library, written with C++. I want to use its power with
Gambas.
It's a static library.

So, using the documentation for Gambas, I have made an empty component.
But I don't know, what must be done after this.

Regards,
Dima Malkov.



--
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] set of questions

2009-10-24 Thread Dima Malkov
Benoît Minisini replied:
 I think you should have been make a thread for each question,
 because now we are lost when reading the answers!

Now I see the mistake. Sorry.


I asked:
 I want to run my gambas2-application from USB-FLASH-DISK on the
 computers, that do not have gambas2 installed.
 -8--
 Can I run my application with just some command, without copying?

Benoît Minisini replied:
 -8--
 I will tell you when I make the environmental variable change. His name will
 be something like GB_DIR, or GB_ROOT.

It would be excellent to find the answer in documentation, when the
technology will be done.


I asked:
 2) I have the GridView in my program, that displays 4 thousands of rows.
 When it updates the data (4-10 seconds), program do not reflexes.
 There is a string in the documentation:
 You should use the last method if you have thousands of rows to
 display..
 I'm sorry, I do not understand this at all.
 Could anybody explain this on a simple example?

I thank charlesg, Doriano Blengino and Benoît Minisini for excellent
practical and theoretical answers.


I asked:
 3) When I hide persistent Form, how to display it again?

Jussi Lahtinen replied:
 FromName.Show works with me..?

And Benoît Minisini replied:
 Show() ?

You want to ask me: What the problem is?.
I often need to know, if SomeForm is already opened or yet not. I
didn't find any property or method of the Form that told about it. The
fastest way for me was to write such code in SomeForm class:
---
' Gambas class file
PUBLIC VAR_FormIsShown AS Boolean

PUBLIC SUB Form_Open()
  ...
  VAR_FormIsShown = TRUE
END

PUBLIC SUB Form_Close()
  ...
  VAR_FormIsShown = FALSE
END
---

In FMain I wrote:
---
IF SomeForm.VAR_FormIsShown = FALSE THEN
  ...
  SomeForm.Show()
ENDIF
---

SomeForm had that slow GridView (from question №2). I wanted to make
it open faster. In a month I suddenly found property Persistent. I
already forgot about VAR_FormIsShown and switched it to true.
SomeForm opened only ones. I suggested, that SomeForm.Show() wasn't
antimethod for SomeForm.Hide() but only antimethod for
SomeForm.Close(). When you answered to me , I saw my mistake. I added
such code in SomeForm class:
---
PUBLIC SUB Form_Hide()
  ...
  VAR_FormIsShown = FALSE
END
---

Now it works. Some persons are worrying about 'Hijacking', so I shall
not ask: What is the best way to control if the Form is already
opened?.


I asked:
 4) On my monitor with resolution 1024x768 Forms and widgets on them
 look great. But when I come to my friends with big wide monitors, some
 widgets (Buttons) became bigger while another widgets don't or not in
 such proportions. Why does it happen?

Benoît Minisini replied:
 By default, form and control size is proportional to the height
 of the default font in pixels. If you don't want this behaviour
 on a form, just set the (Scaled) property to FALSE.

Now it works correctly. :)
There isn't (Scaled) in the list of Form's properties in
documentation. And there is only STATIC PROPERTY READ
gb.qt.Desktop.Scale AS Integer in the whole documentation. :(


I asked:
 1) May I create proprietary (not open-source) gambas2-applications and
 components for gambas2?
and:
 5) Can I easily convert my big project from the gambas2-project to the
 gambas3-project?

 6) My project uses gb.qt3, gb.qt3.ext, gb.kde, gb.kde.html components.
 Can I easily switch them to gb.qt4 and other components, when my favour
 Linux-distr Debian will be updated?
All is clear. Thanks.


Faysal Banna wrote:
 the subject of the whole was posted by Dima (My regards to her )
 about set of questions and not specific to USB !

 she asked a set of questions including USB startup and also
 including the gridview which is of my interest at the moment 

Dima is a modern citizen short equivalent for traditional Russian
male-name Dmitriy.
Russians prefer to put full name only in documents, or when somebody
informs about the famous person. In the dialogs russians usually like
when they are refered by the short equivalents. And be carefull: there
is a Russian fermale-name Dina.
You haven't hurt me.


Best regards,
--
Dima Malkov (Russia), male, 20 years old, use Gambas for 2 months,
program in Linux for 2 months, use Linux for 2 years, speak English in
practice and communicate with foreigners for 3 weeks.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference

[Gambas-user] set of questions

2009-10-21 Thread Dima Malkov
Using Gambas 2.7, Debian Lenny 32
--

Hello!

Main question.
I want to run my gambas2-application from USB-FLASH-DISK on the
computers, that do not have gambas2 installed.

There is a folder on my USB-FLASH-DISK with my application and
subfolders:
1) bin, includes files gba2, gbc2, gbi2, gbx2, soft links;
2) lib, includes files *.so.0.0.0, *.component, *.gambas, soft
links;
3) share, includes icons/*.png, info/* (strange files),
mime/*.xml.
It also includes bash-script for copying all above to system
folders /usr/bin/, /usr/lib/ and /usr/share.

Can I run my application with just some command, without copying?


Another questions:
1) May I create proprietary (not open-scource) gambas2-applications and
components for gambas2?

2) I have the GridView in my program, that displays 4 thousands of rows.
When it updates the data (4-10 seconds), program do not reflexes.
There is a string in the documentation:
You should use the last method if you have thousands of rows to
display..
I'm sorry, I do not understand this at all. 
Could anybody explain this on a simple example?

3) When I hide persistent Form, how to display it again?

4) On my monitore with resolution 1024x768 Forms and widgets on them
look great. But when I come to my friends with big wide monitors, some
widgets (Buttons) became bigger while another widgets don't or not in
such proportions. Why it happens?

5) Can I easily convert my big project from the gambas2-project to the
gambas3-project?

6) My project uses gb.qt3, gb.qt3.ext, gb.kde, gb.kde.html components.
Can I easily switch them to gb.qt4 and other components, when my favour
Linux-distr Debian will be updated?


Some suggestions:
1) In gambas2-IDE I need the insert mode of type, that replaces the
next character.

P.S.
Thanks to Benoît Minisini for help (Problem with UTF-8 in
Gambas-connection to MySQL). The --default-character-set really was
Latin1.


Regards,

--
Dima Malkov (Russia)


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


[Gambas-user] Problem with UTF-8 in Gambas-connection to MySQL

2009-09-12 Thread Dima Malkov
(I don't know English well)
Use Debian 5 Lenny -32, Gambas 2.7 from repository.

I develop an account program for russians users. It must work with cyrillic
correct.
I have made MySQL5 (default UTF8) database with direct CHARACTER SET UTF8
option, tables with direct CHARACTER SET UTF8 option. Then connected to it
from gambas, output data to GridView. All string fields were not readable.

I run example Database. It works correct with some french symbols, but
with cyrillic not. Program Database manager do the same.

I get sources of Gambas-2.8.2. Opened main.c file of MySQL driver, find
function
   static int open_database(DB_DESC *desc, DB_DATABASE *db) .
Add string
   fprintf(stderr, Character set GB[%s] mysql[%s]\n,
GB.System.Charset(), mysql_character_set_name(conn)); 
before and after string
   set_character_set(db); .
Compiled only this driver, copied it to /usr/lib/gambas2. Run my program.
Result:
   Character set GB[UTF-8] mysql[latin1]
 Character set GB[UTF-8] mysql[latin1] 
in console.

Why latin1 instead UTF-8?
--
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