[Gambas-user] set of questions

Dima Malkov dima.malkov.russia at ...626...
Sat Oct 24 10:41:56 CEST 2009


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.




More information about the User mailing list