[Gambas-user] Constant order to process in component creation

Jorge Carrión shordi at ...626...
Thu Oct 2 22:56:29 CEST 2014


Excuse my poor English. What I mean with "processing properties" is the
execution of triggered methods _read and _write of the propertie.
What I mean is  somenthing like that:

Export

Inherits TableView

Public Const _Properties As String = "*,conexion,sqlstring"

Property conexion As Connection
Property sqlstring As String

Private $conexion As Connection
Private $sqlstring As String

Public Sub fill_the_grid()

  $conexion.Exec($sqlstring)
  ...
  etc.
  ....

End

Public Function conexion_read() As Connection

  Return $conexion

End
Public Sub conexion_Write(Value As Connection)

  $conexion = Value

End

Public Function sqlstring_read() As String

   Return $sqlstring

End
Public Sub sqlstring_write(value As String)

   $sqlstring = value
   fill_the_grid()

End


Both properties, conexion and sqlstring, are filled with its values in the
IDE in design time.
When run the program, somtimes the sqlstring_write sub is launched before
conexion_write() sub. And then, obviously there are a error in
$conexion.Exec($sqlstring) line...
Some times If I change the size of the form or if I add som controls more
to the form, it works fine.

There is a way to force the conexion property to be filled before de
sqlstring property?

Hope this time I've been more clear.

Regards

2014-10-02 21:05 GMT+02:00 Tobias Boege <taboege at ...626...>:

> On Thu, 02 Oct 2014, Jorge Carri??n wrote:
> > I'm creating a new component that appears fine in the IDE.
> > But I have a problem:
> >
> > There is a property who triggers a method when is implemented but it
> needs
> > another property for work and this property is processed after the first
> > one by the IDE
> > The properties appears in the IDE in alphabetical order, but I don't know
> > what marks the order of processing in execution time.
> >
> > There is a form to say the compilator that should process (I mean to
> > trigger the write() method of the property) a property before another?
> >
>
> I don't understand. Can you show some code or draw a diagram to tell us
> what
> you want?
>
> Specifically: what do you mean by "processing" properties (what has the IDE
> to do with it?) and their "order of processing in execution time"?
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
>
> ------------------------------------------------------------------------------
> Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
> Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
> Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
> Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
>
> http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list