Quantcast

Component Creation

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Component Creation

Leon Davis
Gambas v3.9.2 GTK+3

I am trying to create a component using gambas. Is there a way to test the
component during development? or is it necessary to complete the component
and install it to test? You help is appreciated.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Component Creation

Benoît Minisini
Le 26/04/2017 à 18:16, Leon Davis a écrit :
> Gambas v3.9.2 GTK+3
>
> I am trying to create a component using gambas. Is there a way to test the
> component during development? or is it necessary to complete the component
> and install it to test? You help is appreciated.

I usually test the component by running it as a project, with a startup
class only used for testing.

But then it depends on what kind of component you are writing. If you
are writing a GUI component, it can be tricky. You may have to reload
your project, or restart the IDE when you create new controls.

--
Benoît Minisini

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Component Creation

Tobias Boege-2
In reply to this post by Leon Davis
On Wed, 26 Apr 2017, Leon Davis wrote:
> Gambas v3.9.2 GTK+3
>
> I am trying to create a component using gambas. Is there a way to test the
> component during development? or is it necessary to complete the component
> and install it to test? You help is appreciated.

You can run your component like a normal Gambas application to test it.
Give your component project a startup class/module/form and write your
test code in there. Instead of setting a startup class, you can also use
the "Run this class" right-click menu item to execute any one of your
test classes.

Many of the official Gambas components do this. You can have a look at
gb.form, for example, which has a whole subdirectory "Test" of various
forms, which can be used to test the component during development.

Actually, in this regard a component is no different from a Gambas
application. Try *executing* the gb.form component:

  $ /usr/lib/gambas3/gb.form.gambas

Since a startup form is defined for it, the component is run like any
other Gambas application, currently showing a SliderBox test.

Regards,
Tobi

--
"There's an old saying: Don't change anything... ever!" -- Mr. Monk

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Component Creation

Leon Davis
Got it... Excellent and thank you for the help.

On Wed, Apr 26, 2017 at 11:36 AM, Tobias Boege <[hidden email]> wrote:

> On Wed, 26 Apr 2017, Leon Davis wrote:
> > Gambas v3.9.2 GTK+3
> >
> > I am trying to create a component using gambas. Is there a way to test
> the
> > component during development? or is it necessary to complete the
> component
> > and install it to test? You help is appreciated.
>
> You can run your component like a normal Gambas application to test it.
> Give your component project a startup class/module/form and write your
> test code in there. Instead of setting a startup class, you can also use
> the "Run this class" right-click menu item to execute any one of your
> test classes.
>
> Many of the official Gambas components do this. You can have a look at
> gb.form, for example, which has a whole subdirectory "Test" of various
> forms, which can be used to test the component during development.
>
> Actually, in this regard a component is no different from a Gambas
> application. Try *executing* the gb.form component:
>
>   $ /usr/lib/gambas3/gb.form.gambas
>
> Since a startup form is defined for it, the component is run like any
> other Gambas application, currently showing a SliderBox test.
>
> Regards,
> Tobi
>
> --
> "There's an old saying: Don't change anything... ever!" -- Mr. Monk
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Gambas-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gambas-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gambas-user
Loading...