No, private is really private.
You call a public sub which changed the private data ;)
I suggest you read the documentation at
http://gambasdoc.org/help/cat/objectmodel?v3
2012/1/7 Dmitrij Malkov
>
> I add a new class, child to CUnit. I named It "CUnitChild". It's code:
> ---
I add a new class, child to CUnit. I named It "CUnitChild". It's code:
--
' Gambas class file
Inherits CUnit
--
And I add creation on object of this class in the middle of MMain:
---
Now I have modified the code. In CUnits:
---
' Gambas class file
Static Private NumberOfUnits As Integer = 0
Static Private CountOfCreations As Integer = 0
Private Id As Integer 'Identity number
'constructor
Public Sub _new()
NumberOfUnits +
Caveat wrote:
>
>
>> works correct without any DIM at all?
>
> Because HowManyUnits is a static function so you don't need to create
> any instances of CUnit to be able to call that function.
>
>
Yes.
All my problem was in my messing up "DIM" and real creation of an object.
Code that sati
> works correct without any DIM at all?
Because HowManyUnits is a static function so you don't need to create
any instances of CUnit to be able to call that function.
Regards,
Caveat
On Fri, 2012-01-06 at 08:04 -0800, Dmitrij Malkov wrote:
>
> works correct without any DIM at all?
Willy Raets wrote:
>
> On vr, 2012-01-06 at 07:33 -0800, Dmitrij Malkov wrote:
>
>> I wondered that the code
>> ---
>> Public Sub Main()
>>CUnit.HowManyUnits()
>> End
>> ---
>> works, but the code
>> --
On vr, 2012-01-06 at 07:33 -0800, Dmitrij Malkov wrote:
> I wondered that the code
> ---
> Public Sub Main()
>CUnit.HowManyUnits()
> End
> ---
> works, but the code
> ---
> P
bbb888 wrote:
>
>> ? And why I can't create objects of class CUnits after calling
>> CUnit.HowManyUnits()?
>
> A) Because gambas syntax doesn't allow it.
> B) What in the great scheme of things has this got to do with Static?
>
About "B".
I'm not an englishman, so, as I understood you, you a
> ? And why I can't create objects of class CUnits after calling
> CUnit.HowManyUnits()?
A) Because gambas syntax doesn't allow it.
B) What in the great scheme of things has this got to do with Static?
--
Ridiculously ea
"Static" means:
- For a variable, that the variable is stored in the class, not in any
object. So there is only one such variable. Its value does not depend on
the object.
- For a method (or a property), that the method cannot use any
non-static symbol (ME is NULL).
- For a constant, nothing, a
Just to add to caveat and Benoit's answers.
Static, when applied to variables, refers to the "storage class" (or
more properly "storage mode") of the variable. Whereas "public" and
"private" refer to the scope or accessibility of the variable. It is
important not to confuse these aspects.
Thank you!
2012/1/5, Benoît Minisini :
> Le 05/01/2012 12:35, M. Cs. a écrit :
>> Hi,
>> in G2 we had a file opening dialog which was identical as KDE's native
>> one. It seems to be removed, or am I wrong? I would like to have that
>> old one. It's more convenient with the system-wide bookmarks e
Le 05/01/2012 12:35, M. Cs. a écrit :
> Hi,
> in G2 we had a file opening dialog which was identical as KDE's native
> one. It seems to be removed, or am I wrong? I would like to have that
> old one. It's more convenient with the system-wide bookmarks etc.
I'm not sure. But when you call Dialog.Op
Yes, it was caused by porting. I've fixed it.
2012/1/5, M. Cs. :
> Unfortunately the built-in file opening dialog just doesn't work for
> me. The project has been ported from G2 to G3. I have a filter added
> for the .tar.gz filetype but although it shows the correct files, I
> cannot open them. T
Unfortunately the built-in file opening dialog just doesn't work for
me. The project has been ported from G2 to G3. I have a filter added
for the .tar.gz filetype but although it shows the correct files, I
cannot open them. The OK button simply doesn't work. It's maybe up to
the porting. I'll check
Part one
I never really looked into how GTK-alike the FileChooser was, but it
didn't seem to 'fit' on my regular forms, so I just made a small Form
which handles file choosing/opening and raises the appropriate events.
To answer part two...
As I understand it, static variables exist only once fo
Hi,
in G2 we had a file opening dialog which was identical as KDE's native
one. It seems to be removed, or am I wrong? I would like to have that
old one. It's more convenient with the system-wide bookmarks etc.
And the question: I don't understand the STATIC word's meaning. Is it
given to define a
17 matches
Mail list logo