Home > database >  User object defined in the instance structure array error! Consult ace!
User object defined in the instance structure array error! Consult ace!

Time:09-29

$PBExportHeader $pmc_param_n. Sru
$PBExportComments $user object to pass parameters
Forward
Global type pmc_param_n from nonvisualobject
End type
End forward

Type struct_param from structure
String paramname
Any paramvalue
End type

Global type pmc_param_n from nonvisualobject autoinstantiate
End type

The type variables
Public:
Struct_param is_params []
End the variables

On pmc_param_n. The create
TriggerEvent (this, "constructor")
End on

On pmc_param_n. Destroy
TriggerEvent (this, "destructor")
End on

This from someone else's program saw drops of a user object,
Structures much better than PB itself,
But a compiler error, and I can only guide to the application, so you create could not finish,
In the instance variables times:
The Instance Variables
(0003) : Warning C0190: the Instance variables of the local structure type (' struct_param) will be implicitly private in the next release.

Which help to solve the trouble,

CodePudding user response:

Look for, the estimate is to first define struct_param structure.

CodePudding user response:

Have defined the ah,

Type struct_param from structure
String paramname
Any paramvalue
End type

CodePudding user response:

Try using private statement.

CodePudding user response:

In that case,
I will not be able to call in other places in the user object structure array,

CodePudding user response:

That didn't know, I don't know what object defined in the structure can also define the public?

CodePudding user response:

To define a public, estimated struct_param first defined as a global structure.

CodePudding user response:

The Instance variables of the local structure type (' struct_param) will be implicitly private in the next release.

That it is I'm afraid of this structure will be implied into private interpretation.

CodePudding user response:

I the SRU lead directly to the program, it is convenient to use,
The error is to compile the newspaper,

CodePudding user response:

The Warning (Warning), is not an error.

CodePudding user response:

When I create also have such a warning,
Just don't let me through,
Don't save,
Do not have what good method,

CodePudding user response:

refer to 6th floor wag_enu response:
should be defined into public, estimated struct_param first defined as a global structure.


I have to think of it.

CodePudding user response:

In the user object defined structure, define variables is to use private, this I have been doing,
Other places to use this variable, must write the similar set and get methods, cannot directly access the variable
reference wag_enu reply: 3/f
with private try statement.

CodePudding user response:

The
refer to 12 floor xys_777 reply:
in the user object defined structure, define variables is to use private, this I ever do,
Other places to use this variable, must write the similar set and get methods, cannot directly access the variable
Reference 3 floor wag_enu reply:
Try to use private statement.


correct

CodePudding user response:

The current version is not so trouble, but don't know whether later as a warning of written implicitly converted into private.
But while no coercion (or type checking), currently under the painter directly like you want to declare to the private is not allowed, you can put this structure declaration into private, save, and then edit soource, the statement of 'private' to the public, is ok,

CodePudding user response:

Statement structure inside to like, feel the support of pb is not very good, often a problem, so I don't usually is the

CodePudding user response:

The
refer to the original poster jztbawvf response:
$PBExportHeader $pmc_param_n. Sru
$PBExportComments $user object to pass parameters
Forward
Global type pmc_param_n from nonvisualobject
End type
End forward

Type struct_param from structure
String paramname
Any paramvalue
End type

Global type pmc_param_n from nonvisualobject autoinstantiate
End type

The type variables
Public:
Struct_param is_params []
End the variables

On pmc_param_n. The create
TriggerEvent (this, "constructor")
End on

On pmc_param_n. Destroy
TriggerEvent (this, "destructor")
End on

This from someone else's program saw drops of a user object,
Structures much better than PB itself,
But a compiler error, and I can only guide to the application, so you create could not finish,
In the instance variables times:
The Instance Variables
(0003) : Warning C0190: the Instance variables of the local structure type (' struct_param) will be implicitly private in the next release.

Which help to solve the trouble,


This is not a mistake, you're USEROBJECT (or WINDIW category), defines the structure (structure) of the user object level, PB statement to you, later, no longer support such way of grammar (later I will be no matter, use need not by you!!! ), it has nothing to do.


If you look at is not pleasing to the eye, struct_param can be defined as a global structure.

CodePudding user response:

Struct_param should should define a problem
  • Related