Re: [Vala] C# developer, newbie question

2018-12-18 Thread Steven Oliver via vala-list
I used Gtk.Builder + Glade in my application. It might help to see it used
in a "real application".

https://github.com/steveno/balistica/blob/master/src/BalisticaApplication.vala#L80

Steven N. Oliver


On Tue, Dec 18, 2018 at 8:39 AM Al Thomas via vala-list 
wrote:

>>On Tuesday, 18 December 2018, 13:34:17 GMT, Wolfgang Mauer <
> wolfgang.ma...@kabelmail.de> wrote:
>  > Is there a way to have a GtkTemplate inside a GtkTemplate ?
>
> It sounds like you are trying to use a widget contained within another
> widget?
> I would try that in the GtkBuilder file. So the second widget is
> references as a component within the larger widget, but is defined
> separately. The Vala code would be two separateclasses with the relevant
> GtkTemplate annotations.
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Writing objects to files

2018-03-26 Thread Steven Oliver
I want to implement "saving" in my program. The data I want to save is
a custom object. Is it possible in vala to simply write the object to
disk (in binary I assume) without having to implement a to_string
method?

It seems like such a simple concept yet i can't seem to figure out how
to do it in Vala.

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] valadoc Question

2018-03-23 Thread Steven Oliver
Thanks Al! That's what I was looking for.
Steven N. Oliver


On Fri, Mar 23, 2018 at 3:06 PM, Al Thomas <astav...@yahoo.co.uk> wrote:
>> On Friday, 23 March 2018, 19:00:09 GMT, Steven Oliver
>> <oliver.ste...@gmail.com> wrote:
>
>> How do I determine the list of icon names I can pick from? For
>> whatever reason valadoc doesn't list them. Is there somewhere else I
>> can look for the list?
>
> I think what you want is the Freedesktop.org icon naming specification:
> https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
>
> This may help a little too:
> https://stackoverflow.com/questions/36805505/gtk-stock-is-deprecated-whats-the-alternative/
>
> Regards,
>
> Al
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] valadoc Question

2018-03-23 Thread Steven Oliver
When I encounter pages like this one:
https://valadoc.org/gtk+-3.0/Gtk.Entry.set_icon_from_icon_name.html

How do I determine the list of icon names I can pick from? For
whatever reason valadoc doesn't list them. Is there somewhere else I
can look for the list?

I found that page by reviewing the example code for Gtk.Entry where
they make use of it:
https://valadoc.org/gtk+-3.0/Gtk.Entry.html

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Using databases with Vala

2018-03-08 Thread Steven Oliver
I want to begin working an application that would have a database,
specifically SQLite, as a back-end. I know that at some point sqlheavy
(https://github.com/nemequ/sqlheavy) was an option for using databases
with Vala. It doesn't appear to be maintained anymore though. Are
there other options out there? What do most people use? Are there any
good open source vala projects using SQLite I could look to as an
example? The only one I'm aware of is Geary, but ripping the database
layer out of Geary would be quite the task and probably more than I
would need.

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Application Menu

2018-01-25 Thread Steven Oliver
Nor Jaidi,
Thank you very much for the response!

I do have that attribute set as you suggested. Here is my gresources.xml file:
https://github.com/steveno/balistica/blob/master/ui/menu.ui

And here is where I create the menu using Vala (lines 69 and 117 - 125):
https://github.com/steveno/balistica/blob/master/src/BalisticaApplication.vala
Steven N. Oliver


On Sun, Jan 21, 2018 at 9:17 PM, Nor Jaidi Tuah
 wrote:
>
>>  var menu = builder.get_object ("appmenu") as MenuModel ;
>>  set_app_menu (menu) ;
>
> Have you set the scope as in
>
>   "app.quit"
>
> Nice day
> Nor Jaidi Tuah
>
> ps. Sorry for the previous empty message. Don't know
> what went wrong.
>
>
>
>
> PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you 
> are neither the addressee (intended recipient) nor an authorised recipient of 
> the addressee, and have received this message in error, please destroy this 
> message (including attachments) and notify the sender immediately. STRICT 
> PROHIBITION: This message, whether in part or in whole, should not be 
> reviewed, retained, copied, reused, disclosed, distributed or used for any 
> purpose whatsoever. Such unauthorised use may be unlawful and may contain 
> material protected by the Official Secrets Act (Cap 153) of the Laws of 
> Brunei Darussalam. DISCLAIMER: We/This Department/The Government of Brunei 
> Darussalam, accept[s] no responsibility for loss or damage arising from the 
> use of this message in any manner whatsoever. Our messages are checked for 
> viruses but we do not accept liability for any viruses which may be 
> transmitted in or with this message.
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Application Menu

2018-01-20 Thread Steven Oliver
I want convert my application to use the Gnome 3 style menu instead of
having a menubar. Gnome 3 has been out forever, so it's about time.

Anyway, I can't seem to get it to work. Here's what I've got so far.

I have this code as a class level variable:

private const ActionEntry[] action_entries =
  {
 { "view_log", view_log_cb },
 { "help", help_cb },
 { "about", about_cb },
 { "quit", quit_cb },
  } ;

During startup, I call this:

add_action_entries (action_entries, this) ;

Followed by this:

var builder = new Gtk.Builder () ;
 try {
builder.add_from_resource ("/org/gnome/balistica/menu.ui") ;
 } catch ( Error e ){
logger.publish (new LogMsg (e.message)) ;
 }

 var menu = builder.get_object ("appmenu") as MenuModel ;
 set_app_menu (menu) ;

Finally, I have my menu.ui file in my resources.xml file. I know that
my resources.xml is working otherwise because that's where my glade
files are listed and the GUI comes up otherwise. Does anyone have any
idea what I'm missing?

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Gnome Gitlab

2017-12-27 Thread Steven Oliver
Dr. Lauer,
While I might ordinarily agree with you, in this case I was
referencing Gnome's new instance of Gitlab.

https://gitlab.gnome.org/
Steven N. Oliver


On Wed, Dec 27, 2017 at 6:18 AM, Dr. Michael Lauer  wrote:
> My vote would be GitHub. Although non-free, the visibility (which is very 
> much necessary
> for such a niche project like Vala) is an order of a magnitude higher.
>
> Best regards,
>
> :M:
>
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Seg Fault when using printf function

2017-12-26 Thread Steven Oliver
I apologize for the delay, but the bug has been submitted.

https://bugzilla.gnome.org/show_bug.cgi?id=791973
Steven N. Oliver


On Mon, Dec 11, 2017 at 7:13 AM, Daniel Espinosa <eso...@gmail.com> wrote:
> Could you file a bug report in bugzilla in order to trace it up to fix it?
>
> El 27/11/2017 1:25 a.m., "Steven Oliver" <oliver.ste...@gmail.com> escribió:
>>
>> Hello,
>> I recently upgraded my OS to Ubuntu 17.10 from 16.04 and I think I've
>> discovered a bug in Vala.
>>
>> This commit is now causing my application to crash:
>>
>> https://github.com/steveno/balistica/commit/061a28e98f3c4468b4465e580ada78f11eec4461?diff=unified
>>
>> I don't understand what changed in that commit that breaks the
>> application with my version of Vala versus the one I had on 16.04, but
>> I managed to trace it down to two lines (511 & 513) in
>> src/balistica_application.vala (which aren't changed in the diff !!).
>> If you comment out those two lines it will compile and produce the
>> drag calculation as expected.
>>
>> I also figured out that if you change those two lines so that the
>> printf functions don't format more than two entries, it will also
>> compile and produce the expected output. With a third entry, though,
>> it seg faults trying to print the calculation results.
>>
>> Will Seg Fault:
>> txtViewDragResults.buffer.text += ("Initial Velocity: %.2f ft/s Zero
>> Range: %.2f yards Shooting Angle: %.2f degrees\n").printf (lsln.getMv
>> (), lsln.getZerorange (), lsln.getAngle ()) ;
>>
>> Will print as expected:
>> txtViewDragResults.buffer.text += ("Initial Velocity: %.2f ft/s Zero
>> Range: %.2f yards\n").printf (lsln.getMv (), lsln.getZerorange ()) ;
>>
>> I have attached the C code that is generated.
>>
>> Hopefully that wasn't to confusing. Anyone have any thoughts? Suggestions?
>>
>> Steven N. Oliver
>>
>> ___
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Gnome Gitlab

2017-12-26 Thread Steven Oliver
Will Vala be moving to Gitlab? I think it would make contributing to
the project a lot easier!

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Help with pub-sub class

2017-11-01 Thread Steven Oliver
I've made some progress on this if anyone wants some answers for posterity.

* Instead of using a struct I created a new class and I now pass an full
object. This let's me have default values.

The following are still eluding me:
* The signal "publish" seems unable to take two parameters. (I don't
understand this, though it's no longer an issue for me.)
* I can't figure out a way to get the method which writes to the log inside
the logging class because I keep needing access to instance members from a
static function. (https://github.com/steveno/balistica/blob/master/src/
BalisticaApplication.vala#L284)

Steven N. Oliver

On Sat, Oct 28, 2017 at 1:46 PM, Steven Oliver <oliver.ste...@gmail.com>
wrote:

> With the help of other developers here on the list I managed to get my
> logging class setup and working (thanks!). Now, that it's there, though, I
> want to continue adding to it. The first big thing I want to do is come up
> with default values for incoming messages (e.g. a default log level of
> ERROR for new messages).
>
> I've been trying to figure this out on my own and I keep hitting walls.
>
> Here is my class:
> https://github.com/steveno/balistica/blob/master/src/Logging.vala
>
> Issues I've encountered:
> * The signal "publish" seems unable to take two parameters.
> * You apparently can't add a default value to a member of a struct.
> * I can't figure out a way to get the method which writes to the log
> inside the logging class because I keep needing access to instance members
> from a static function. (https://github.com/steveno/
> balistica/blob/master/src/BalisticaApplication.vala#L284)
>
> If anyone has any help or suggestions I'm all ears!
>
> Steven N. Oliver
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Class vs struct with signal

2017-11-01 Thread Steven Oliver
I finally figured this out, though I don't understand why what I did works.

I changed the signal connection to use a non-existent variable named msg.

 Logging.get_default ().publish.connect ((msg) => {

this.log (msg) ;

 }) ;

Can anyone explain why doing that lets me use my new LogMsg object with my
Logger class' signal??


Steven N. Oliver

On Sun, Oct 29, 2017 at 8:43 PM, Steven Oliver <oliver.ste...@gmail.com>
wrote:

> I was using a struct when connecting to my signal, but now I'm using a
> class. This code now longer compiles, does anyone know what I'm doing wrong?
>
>  Logging.get_default ().publish.connect ((LogMsg) => {
>
> this.log (LogMsg) ;
>
>  }) ;
>
> I get the following error message:
>
> BalisticaApplication.c: In function ‘__lambda12_’:
> BalisticaApplication.c:311:10: error: ‘_tmp0_’ undeclared (first use in
> this function)
>   LogMsg* _tmp0_ = NULL;
>   ^
> BalisticaApplication.c:311:10: note: each undeclared identifier is
> reported only once for each function it appears in
> src/CMakeFiles/balistica.dir/build.make:178: recipe for target
> 'src/CMakeFiles/balistica.dir/BalisticaApplication.c.o' failed
>
> Steven N. Oliver
>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Class vs struct with signal

2017-10-29 Thread Steven Oliver
I was using a struct when connecting to my signal, but now I'm using a
class. This code now longer compiles, does anyone know what I'm doing wrong?

 Logging.get_default ().publish.connect ((LogMsg) => {

this.log (LogMsg) ;

 }) ;

I get the following error message:

BalisticaApplication.c: In function ‘__lambda12_’:
BalisticaApplication.c:311:10: error: ‘_tmp0_’ undeclared (first use in
this function)
  LogMsg* _tmp0_ = NULL;
  ^
BalisticaApplication.c:311:10: note: each undeclared identifier is reported
only once for each function it appears in
src/CMakeFiles/balistica.dir/build.make:178: recipe for target
'src/CMakeFiles/balistica.dir/BalisticaApplication.c.o' failed

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Help with pub-sub class

2017-10-28 Thread Steven Oliver
With the help of other developers here on the list I managed to get my
logging class setup and working (thanks!). Now, that it's there, though, I
want to continue adding to it. The first big thing I want to do is come up
with default values for incoming messages (e.g. a default log level of
ERROR for new messages).

I've been trying to figure this out on my own and I keep hitting walls.

Here is my class:
https://github.com/steveno/balistica/blob/master/src/Logging.vala

Issues I've encountered:
* The signal "publish" seems unable to take two parameters.
* You apparently can't add a default value to a member of a struct.
* I can't figure out a way to get the method which writes to the log inside
the logging class because I keep needing access to instance members from a
static function. (
https://github.com/steveno/balistica/blob/master/src/BalisticaApplication.vala#L284
)

If anyone has any help or suggestions I'm all ears!

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Help with dialogs

2017-08-23 Thread Steven Oliver
Man, now I feel stupid.

Thank you everyone for your replies. You were of course right. It now works
exactly as I wanted.

Steven N. Oliver

On Wed, Aug 23, 2017 at 6:25 PM, Ben <iofel...@gmail.com> wrote:

> In the glade file you have
>
> Balis*i*ticaPbrDialog
>
> Just a typo
>
> On August 23, 2017 4:53:48 PM EDT, Steven Oliver <oliver.ste...@gmail.com>
> wrote:
>
>> Hello,
>> I've been trying to create a dialog in my application, and it only seems to
>> half work for me (at best).
>>
>> At this point in my code:
>> https://github.com/steveno/balistica/blob/master/src/DragBox.vala#L153
>>
>> I attempt to create a new dialog box using a custom glade file.
>>
>> Vala: https://github.com/steveno/balistica/blob/master/src/PbrDialog.vala
>> Glade: https://github.com/steveno/balistica/blob/master/ui/pbr.glade
>>
>> It all compiles fine and even runs without crashing. I do however get the
>> following messages and my dialog always comes up completely empty.
>>
>> (balistica:11354): Gtk-CRITICAL **: Error building template class
>> 'BalisticaPbrDialog' for an instance of type 'BalisticaPbrDialog': .:32:1
>> Parsed template definition for type 'BalisiticaPbrDialog', expected type
>> 'BalisticaPbrDialog'
>>
>> Gtk-Message: GtkDialog mapped without a transient parent. This is
>> discouraged.
>>
>> Can anyone help me figure out what I'm doing wrong?
>>
>> Steven N. Oliver
>> --
>>
>> vala-list mailing list
>> vala-list@gnome.org
>> https://mail.gnome.org/mailman/listinfo/vala-list
>>
>>
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Help with dialogs

2017-08-23 Thread Steven Oliver
Hello,
I've been trying to create a dialog in my application, and it only seems to
half work for me (at best).

At this point in my code:
https://github.com/steveno/balistica/blob/master/src/DragBox.vala#L153

I attempt to create a new dialog box using a custom glade file.

Vala: https://github.com/steveno/balistica/blob/master/src/PbrDialog.vala
Glade: https://github.com/steveno/balistica/blob/master/ui/pbr.glade

It all compiles fine and even runs without crashing. I do however get the
following messages and my dialog always comes up completely empty.

(balistica:11354): Gtk-CRITICAL **: Error building template class
'BalisticaPbrDialog' for an instance of type 'BalisticaPbrDialog': .:32:1
Parsed template definition for type 'BalisiticaPbrDialog', expected type
'BalisticaPbrDialog'

Gtk-Message: GtkDialog mapped without a transient parent. This is
discouraged.

Can anyone help me figure out what I'm doing wrong?

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Best way to handle errors in a GUI application?

2017-06-28 Thread Steven Oliver
After getting some great help after my last post, I have run into another
issue I'm not sure how to solve. How do people recommend you handle errors
when making a GUI application? I planned on taking the obvious approach of
a pop-up message dialog that tells the user what they've done wrong, or
what went wrong, but that has turned out to not be quite so easy. My code
is architected such that the Application class creates the Main Window
object which in turn creates a Gtk.Box object. So if the error occurs in
the Box object, how do I create a message dialog tied to the main window?
Do I have to pass the main window object around? Or is there a better way
to do this that I'm missing?

My code is here if my explanation didn't make sense:
https://github.com/steveno/balistica

Again thanks for all the help!

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] (no subject)

2016-04-03 Thread Steven Oliver
When running my program, I get three error messages that all look exactly
like this with a different number:

(balistica:2718): GLib-GIO-CRITICAL **: g_file_has_prefix: assertion
'G_IS_FILE (file)' failed

I have a pretty good idea what's causing the error but I'm more concerned
about where exactly "balistica:2718" is. I assume that's a line number it's
referencing, correct?

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] [OT] Vala -> C#

2016-03-26 Thread Steven Oliver
If having an IDE is high on your list check out builder. It's support for Vala 
is getting better every release. They are also really good about taking new 
contributors. 

Thank you,
Steven N. Oliver 



On Thu, Mar 24, 2016 at 7:49 PM -0700, "Edwin De La Cruz" 
 wrote:










Dear. I'm using valac for quite some time, although work has been left
aside, I'm starting to use c #, I find it more productive but I refuse
to use it and recognize it, but it is.

Among the ideas that came to my mind, including _mono_, I thought ...
because someone does not develop something similar to c # but Vala,
who has the same name functions, classes, methods, etc so if I have
one codigo.cs simply change it by codigo.vala and compile directly.

I know it's an idea a little crazy and not all libraries can be
imported, but whether it would be much easier and productive to have
such a code.

I program in C # using their mimas classes, but at the time of
compiling all transforms Vala.

It would be great as well.

I have made the task of doing that only with the most basic functions,
just to prove, as a hobby.

In the years that I go with Vala language seems very much potential,
but lacks an IDE, MonoDevelop no longer supports it, also lacks more
documentation, easier to use libraries as well as in c #.

Sorry for the extension of this message and perhaps not relevant but
needed to relieve the sadness of having to change Vala by c #.

See you soon.


Mis proyectos de software libre en:
Github - edwinspire
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list





___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Formatting printf output

2016-03-07 Thread Steven Oliver
When converting C code to Vala there are a lot of times I want to convert
printf formatting. It doesn't appear to just cleanly convert though.

This C for example:

sprintf(str, "@b%s", "Name");

sprintf(str,"Example number: %.3f", 31.30233);

When try just passing the equivalent formatting to vala I just @ signs
beside my strings and "3f"s littered throughout my code. Any one have any
experience with this?

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using TestCase class: assert (this is Object) fails in method, but not in constructor

2016-02-04 Thread Steven Oliver
I'm in the process of implementing the gee test suite into my project. So far 
so good. The test suite was easy to figure out. So far my biggest problem has 
been trying to figure out how to setup CMake for it all to work. 

Thank you,
Steven N. Oliver 





On Thu, Feb 4, 2016 at 3:07 PM -0800, "Chris Daley"  
wrote:










You may also find the Gee.TestCase class suits your needs - it certainly
makes the tests easier to read and is more xUnit like in its approach than
the 'naked' GLib Test classes.

https://esite.ch/2012/06/writing-tests-for-vala/

Gives a good overview - and if I recall the GXml tests that Daniel
mentioned uses it as well.

Cheers
Chris D

2016-02-04 14:09 GMT-08:00 Daniel Espinosa :

> GXml have a test suite may you want to check. I has more than 50 tests
> cases.
> El feb. 4, 2016 3:04 PM, "Al Thomas"  escribió:
>
> >
> >
> > - Original Message -
> > > From: Felipe Lavratti 
> > > Sent: Thursday, 4 February 2016, 20:18
> > > Subject: [Vala] Using TestCase class: assert (this is Object) fails in
> > method, but not in constructor
> > >
> > > Have a look at this code:
> > >
> > > public class Tests : Object {
> > >
> > > public Tests () {
> > > assert (this is Object); // THIS ASSERTION PASSES
> > > ts = new TestSuite ("dot_cap_dimmer") ;
> > > ts.add (new TestCase ("construction", (TestFixtureFunc)
> > > setup, (TestFixtureFunc) test_construction, (TestFixtureFunc)
> > > teardown)) ;
> > > TestSuite.get_root ().add_suite (ts) ;
> > > }
> > >
> > > void setup(void * fixture) {
> > > assert (this is Object);  // THIS ASSERTION FAILS
> > > this.cut = new DotCapDimmer () ;
> > > this.cut.on_change.connect (slot) ;
> > > this.called = false ;
> > > }
> > > ...
> > >  }
> > >
> > > Would anyone know what happens to the `this` variable when called
> > > from the TestCase ? How came it is no longer an Object anymore ?
> >
> >
> > You need to instantiate your fixture so it has `this` to act upon.
> > Your fixture should be a separate object to the test.
> > As an outline;
> >
> >
> > void main( string[] args ) {
> >
> >   Test.init(ref args);
> >   TestSuite suite = new TestSuite( "DotCapDimmer" );
> >   TestSuite.get_root ().add_suite (suite);
> >
> >   MyTestFixture fixture = new MyTestFixture();
> >   suite.add( new TestCase ( "MyFirstTestCase", fixture.set_up,
> > (TestFixtureFunc)test_my_first_test, fixture.tear_down ));
> >   Test.run();
> > }
> >
> > void test_my_first_test( MyTestFixture fixture ) {
> > // do testing
> >
> > }
> >
> >
> >
> > I put the test in a namespace like
> > UnitTest.ModuleDirectory.FilenameOfClassToBeTested
> >
> > There is also g_test_add_data_func_full () instead, but I haven't used
> > that yet.
> >
> > Al
> > ___
> > vala-list mailing list
> > vala-list@gnome.org
> > https://mail.gnome.org/mailman/listinfo/vala-list
> >
> ___
> vala-list mailing list
> vala-list@gnome.org
> https://mail.gnome.org/mailman/listinfo/vala-list
>



-- 
Chris Daley
Pacific Northwest

e: chebiza...@gmail.com
w: http://chrisdaley.biz
m: +1601 980 1249
s: chebizarro
tw: chebizarro
tz: PDT
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list





___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Testing framework

2016-02-01 Thread Steven Oliver
Hey, I just wanted to drop in and see if any progress had been made on this?
I for one am very excited about the possibility. 

Thank you,
Steven N. Oliver



On Fri, Jan 8, 2016 at 2:55 PM -0800, "Chris Daley"  
wrote:










Hi Al,

Thanks for the input, this is very much appreciated and incredibly useful!
I had in fact just written a post on my blog asking for exactly this sort
of feedback - you can read it here -
http://chrisdaley.biz/test-driven-development-in-vala-pt-1.html

I've got some time to work on this over the next few weeks and hope to have
a usable release out for testing not long after, so now's the time for
anyone else interested in a testing framework to hit me up with your ideas!

Have a good weekend,
Cheers
Chris D


2016-01-08 14:29 GMT-08:00 Al Thomas :

> > From: Chris Daley 
>
> > Sent: Tuesday, 5 January 2016, 1:16
> > Subject: Re: [Vala] Testing framework
> >
> > I've done some thinking about this over the last couple of months and
> used
> > the holiday period to finish off a few things, namely a port of Gherkin
> to
> > Vala. You can grab it from here if you want to check it out:
> > https://github.com/chebizarro/gherkin-vala
> >
> > I'm going to be sketching out what I think is a reasonable
> > roadmap over the next week or so with a view to an alpha release around
> the
> > end of February. If anyone is interested in contributing, or has any
> > specific ideas about what sort of features they would find the most
> useful,
>
> > please get in touch
>
>
> Hi,
>
> Great work on porting Gherkin 3 to Vala.
>
> I wanted to put forward a few ideas that I have been slowly
> researching over the past year or so in the hope they are
>
> insightful to any developments of testing tools for Vala.
>
> Gherkin
> ---
> Gherkin is a language for structuring human language in a
> way that allows business analysts, developers and testers to define
> features of an application.
>
> Some computer languages have tools available to developers to convert
>
> Gherkin to an outline of a computer program. The following meaningless
>
> example shows the structure. This uses PHP's Behat to convert Gherkin
>
> to PHP:
>
> Feature: test
>
> Background: given this is a test # features/test.feature:3
>
> Scenario: testing of app # features/test.feature:5
> When i run something
> Then it passes
>
> 1 scenario (1 undefined)
> 2 steps (2 undefined)
> 0m0.17s (9.41Mb)
>
> --- FeatureContext has missing steps. Define them with these snippets:
>
> /**
> * @When i run something
> */
> public function iRunSomething()
> {
> throw new PendingException();
> }
>
> /**
> * @Then it passes
> */
> public function itPasses()
> {
> throw new PendingException();
> }
>
> It is the feature context that forms the basis of generating
> automated acceptance tests from the features specified in
>
> Gherkin. The developer then fills in the gaps with code that
> drives the tests. In PHP web development this is a tool like
> Mink that can drive various headless web browsers.
>
> Automatic code generation for Vala
> --
> I can think of two approaches to generation code. I have
> tried neither.
>
> The first is to use libvala to generate a Vala AST then output
> the AST. Potentially libvala could be modified to generate a
>
> Genie version of the AST. This appeals to me.
>
> The other approach would be similar to Valadoc:
>
> https://git.gnome.org/browse/valadoc/tree/src/libvaladoc/api/formalparameter.vala#n131
>
> Code generation could also be useful for anyone wanting to
>
> develop a tool similar to RSpec. So a common approach using libvala
> may be helpful. I think Anjuta CTags also uses libvala for
>
> autosuggestion of function names etc. See:
>
> https://github.com/GNOME/anjuta/blob/master/plugins/symbol-db/anjuta-tags/ctags-visitor.vala
>
> Acceptance Testing Drivers
> --
> This is probably the hardest part given the wide range of
> interfaces available.
>
> Gherkin is from Cucumber written in Ruby with web application
> development in mind. So I think most tools there use web
>
> interfaces. In the Vala world this could be done with libsoup
> for a text analysis of the web interface, but also embedding
> Webkit or Gecko which also allows Javascript to be tested.
>
> Vala is often used for desktop GUI development. So Linux
> Desktop Testing Project ( http://ldtp.freedesktop.org/wiki/ )
> using Assistive Technology Service Provider Interface (
>
>
> https://en.wikipedia.org/wiki/Assistive_Technology_Service_Provider_Interface
>  ) may be relevant.
>
> Of course software is also developed for technical users. So
> there are potentially command line interfaces, D-Bus interfaces, shared
> library interfaces and so on to cater for.
>
> For command line interfaces I'm starting to think GLib's
> trap_subprocess may be useful:
>
> http://valadoc.org/#!api=glib-2.0/GLib.Test.trap_subprocess
> I'm trying to write functional tests for Genie, but some
>
> 

Re: [Vala] Bindings wiki pages, was Re: libserialport binding

2015-06-23 Thread Steven Oliver
Al,
If you haven't already I'd just go ahead and move it. Make sure you make
the existing page a redirect or something though.

Steven N. Oliver

On Mon, Jun 22, 2015 at 6:23 PM, Al Thomas astav...@yahoo.co.uk wrote:




 Thanks for the appreciation for the nav bar idea. I was just about to
 update the other pageswhen I came across a fifth page about bindings:
 https://wiki.gnome.org/Projects/Vala/BindingsStatus There have been no
 text changes to it since March 2011. I'm tempted to move the content of
 this to
 https://wiki.gnome.org/Projects/Vala/ExternalBindings and make a single
 list following a consistent
 set of columns: VAPI, Upstream project, Description and Documentation
 links. This would, however,lose the creator and maintainer information. I
 would then set up a redirect to the single list.
 Any objections?
 Al






   From: Luca Bruno lethalma...@gmail.com
  Sent: Saturday, 20 June 2015, 13:45
  Subject: Re: [Vala] Bindings wiki pages, was Re: libserialport binding

 That's very nice, indeed. Thanks.
 On Sat, Jun 20, 2015 at 2:42 PM, Steven Oliver oliver.ste...@gmail.com
 wrote:

 I love the bar. We should have put that there along time ago.

 On Sat, Jun 20, 2015 at 8:23 AM, Al Thomas astav...@yahoo.co.uk wrote:
  From: Evan Nemerson e...@coeus-group.com
  Sent: Friday, 19 June 2015, 19:47
  Subject: Re: [Vala] libserialport binding
 
  On Fri, 2015-06-19 at 19:18 +0200, Daniel Brendle wrote:
   On 06/19/2015 05:52 AM, ?? wrote:
   https://github.com/nemequ/vala-extra-vapis
 
   This is the place where many people look for bindings first.
 
  Or adding them to the External Bindings page on the wiki, which *should
  be* the first place people look (it includes bindings from vala-extra
  -vapis as well as many others):
 
  https://wiki.gnome.org/Projects/Vala/ExternalBindings
  There appear to be four pages on the wiki relating to bindings.
  I have added a navigation bar to the top the ExternalBindings page
  to make these pages easier to find.
  If there are no other relevant pages and the wording I have used
  makes sense then I will copy the navigation bar to the other three
  pages to make a suite of relevant pages.
  I hope that's useful,
  Al
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list


 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list




 --
 NixOS Linux





 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Bindings wiki pages, was Re: libserialport binding

2015-06-20 Thread Steven Oliver
I love the bar. We should have put that there along time ago. 









—
Sent from Mailbox

On Sat, Jun 20, 2015 at 8:23 AM, Al Thomas astav...@yahoo.co.uk wrote:

 From: Evan Nemerson e...@coeus-group.com
 Sent: Friday, 19 June 2015, 19:47
 Subject: Re: [Vala] libserialport binding
 
 On Fri, 2015-06-19 at 19:18 +0200, Daniel Brendle wrote:
  On 06/19/2015 05:52 AM, ?? wrote:
  https://github.com/nemequ/vala-extra-vapis
 
  This is the place where many people look for bindings first.
 
 Or adding them to the External Bindings page on the wiki, which *should
 be* the first place people look (it includes bindings from vala-extra
 -vapis as well as many others):
 
 https://wiki.gnome.org/Projects/Vala/ExternalBindings
 There appear to be four pages on the wiki relating to bindings.
 I have added a navigation bar to the top the ExternalBindings page
 to make these pages easier to find.
 If there are no other relevant pages and the wording I have used
 makes sense then I will copy the navigation bar to the other three
 pages to make a suite of relevant pages.
 I hope that's useful,
 Al
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Debugging Vala w/ CMake

2015-02-05 Thread Steven Oliver
I want to start debugging my Vala code so a simple good turned up some
pretty easy directions, the only problem is I can't seem to integrate those
directions with CMake.

The instructions I found on the Vala webiste actually work very well for
the example given [1]. My problem is when combining those with the CMake
files from Jakob Westhoff [2] that are so popular these days, I always get
the error that you can't combine the valac option -C with --save-temps.

Does anyone know a way to do both without breaking my existing CMake setup?


[1] https://wiki.gnome.org/Projects/Vala/Tutorial#Debugging
[2] https://github.com/steveno/balistica/tree/master/cmake

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Problem using Mysql in Vala (Fedora 21): /usr/bin/ld: cannot find -lmysqlclient

2014-12-12 Thread Steven Oliver
This kind of stuff can be a pain. I've found that I sometimes have to
update my c_include_path to include the new shared libraries. Something
like this:

export C_INCLUDE_PATH=/usr/include/libev

Steven N. Oliver

On Fri, Dec 12, 2014 at 10:41 AM, Tarnyko tarn...@tarnyko.net wrote:

 Hi AxP,
 What the message is really telling you, is that you miss the
 libmysqlclient.so file.
 This file is typically in a separate package, depending on the
 distribution you are using ; in OpenSUSE for instance, it's in
 libmysqlclient-devel (http://rpmfind.net/linux/
 rpm2html/search.php?query=libmysqlclient-devel)
 Hope this helps.
 Regards,
 Tarnyko
 AxP writes:

 Hello,
 I tried to use MySQL today with Vala but ran into some Problems. I
 searched for some solutions but couldn't fix the issue. I saw a few threads
 on the list with a similar problem but it didn't help me.
 First I was trying to get http://www.fromdual.com/mysql-
 vala-program-example working, now it's only this short snippet:

 using Mysql;
 static int main(string[] args) {
 Database mysql = new Mysql.Database();
 return 0;
 }


 Problem is that I get this message in return:

 valac main.vala --pkg mysql -X -lmysqlclient (im Verzeichnis:
 /home/axp/Dokumente/Workspaces/10 Vala/MailServer/src)
 main.vala:5.14-5.41: warning: local variable `mysql' declared but never
 used
 Database mysql = new Mysql.Database();
  
 /usr/bin/ld: cannot find -lmysqlclient
 collect2: Fehler: ld gab 1 als Ende-Status zurück
 error: cc exited with status 256
 Compilation failed: 1 error(s), 1 warning(s)
 Kompilierung fehlgeschlagen.


 I think that there could be problem with my setup. I've done:

 yum install mysql-server
 yum install mysql-devel

 So the libraries and headers are installed and new.
 Compilation with valac -c %f --pkg mysql -X -lmysqlclient is working.
 But really creating the little program with valac %f --pkg mysql -X
 -lmysqlclient fails.
 I thought this could be a nice opportunity to try the mailing list. I
 hope the problem is not too trivial and I'm the only one who doesn't know
 the solution :B
 Thank you in advance!
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Problem using Mysql in Vala (Fedora 21): /usr/bin/ld: cannot find -lmysqlclient

2014-12-12 Thread Steven Oliver
Steven N. Oliver

On Fri, Dec 12, 2014 at 11:59 AM, AxP der_...@t-online.de wrote:

  Thanks for the answers!

 @ Steven Oliver: Am I correct when I say that this solution helps to find
 missing header files? I think that they are already correctly found and the
 problem lies with the .so file which is not found.


Yes. My bad.
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using monodevelop for developing VALA?

2014-11-21 Thread Steven Oliver
Marek, do you plan to eventually open source your plugin for IntelliJ?

Steven N. Oliver

On Fri, Nov 21, 2014 at 9:58 AM, Marek Gibek gib...@gmail.com wrote:

 Hi!

 I updated mono vala plugin for MonoDevelop 5. Yannick Inizan created
 nice PPA for it here:
 https://launchpad.net/~inizan-yannick/+archive/ubuntu/mono

 Source code is here:
 https://mail.gnome.org/archives/vala-list/2014-August/msg00049.html

 Please note that:
 - I rewrote the references part (fixed, references and configurations)
 so it will not open old projects correctly (you have to recreate
 solution and project files)
 - I do not maintain it (I'm working on plugin for IntelliJ, but this
 is not open source for now)

 Best Regards,
 Marek

 On 11/21/14, Gonzalo Aguilar Delgado gagui...@aguilardelgado.com wrote:
  Hi,
 
  Someone is using monodevelop 4 or 5 to develop on vala? Because I cannot
  get it recognize vala projects. It can compile old ones but I cannot
  create new projects.
 
  Monodevelop is still working for vala?
 
  Best regards,
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Adding unitary test support to Autovala

2014-11-17 Thread Steven Oliver
I would suggest one test per file. That seems to be the most common use
case in my opinion.

I also don't see why you couldn't in theory do both. All files in the top
directory are one test per file. Anything in a sub directory is treated as
all files are compiled to a test.
On Mon, Nov 17, 2014 at 6:06 PM Craig webe...@gmail.com wrote:

 Not exactly sure what you mean, but a very common pattern is one unit test
 file for each class (unit) you want to test. This has worked fine for me in
 every language I've worked with.
 On Nov 17, 2014 4:07 PM, rastersoft ras...@rastersoft.com wrote:

  Hi all:
 
  I'm working on adding unitary test support to autovala, but have some
  doubts that I want to comment here, to ensure that the implementation is
  right.
 
  The first one is how to define each unitary test; my original idea was:
  one file, one test, so inside a folder called unitests will be as
 many
  .vala files as unitary tests (even in subfolders). But then I considered
  that, maybe, some tests are so big that needs several files, in which
 case
  the way to go would be one folder, one test, and all the .vala files
  inside should belong to the same test. Which one is the best approach?
 
  The second one is if I should always compile the tests, or do it only if
  the user sets an specific flag when calling cmake (thus, people just
  downloading the source and compiling at home wouldn't need to compile
  everything).
 
  Thanks.
 
  --
  Nos leemos
   RASTER(Linux user #228804)
  ras...@rastersoft.com  http://www.rastersoft.com
 
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] backwards compatibility

2014-10-27 Thread Steven Oliver
Luca's answer is obviously the correct one and the one I feel like we have
to say to you.

With that in mind, though, depending on how complex your code is it's very
possible/likely it will still compile with a version of Vala that's quite
old. The one program I work on in my spare time, last I checked, still
compiled with Vala 0.15. I'm not sure of the usefulness of knowing that. I
most certainly wouldn't recommend you use that version of Vala if a newer
one is available to you.

Steven N. Oliver

On Mon, Oct 27, 2014 at 8:00 AM, Patrick Welche pr...@cam.ac.uk wrote:

 On Mon, Oct 27, 2014 at 09:31:07AM +0100, Luca Bruno wrote:
  On 27/10/2014 09:08, Patrick Welche wrote:
   I'm new to vala and am wondering what compatibility between versions is
   like, e.g., should I expect to be able to use a recent 0.26.1 compiler
   to compile code from the days of 0.12?
  You must expect every new stable release to be incompatible with the
  previous. Either because of a compiler change, or because of bindings
  breakage. That said, it's not that we break at every new stable release,
  only when we feel it's best to break instead of keeping old obsolete
 things.

 Do you have a rule of thumb on how likely a breakage is / what to look
 for in NEWS?

 If a package, rather than testing for features (what are the sort of
 features one could test for in vala?), feeds e.g., vala= 0.20 to
 pkg_check_modules, then one has to keep a copy of vala-0.20 around,
 and so on for all the various vala using packages?

 Yet a single glib and a single copy of gcc will do for other packages?

 I hope I am misunderstanding...

 Cheers,

 Patrick
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] A brand new build system

2014-05-16 Thread Steven Oliver
I'd never heard of bake either till now.

The only reference I could find to any kind of documentation was here:

https://answers.launchpad.net/bake/+faq/2172

Steven N. Oliver


On Fri, May 16, 2014 at 12:54 PM, geovanisouz...@gmail.com 
geovanisouz...@gmail.com wrote:

 @Rastersoft, Thanks for joining the thread. Is great to know about the
 plugin. Any plan to support Sublime Text too?

 Mario, I don't found docs or samples? It is exists somewhere to read?
 Thanks.


 2014-05-16 13:40 GMT-03:00 Mario Daniel Ruiz Saavedra 
 desideran...@rocketmail.com:

  No love for Bake? https://launchpad.net/bake
 
 
  ___
  Mario Daniel Ruiz Saavedra
  Estudiante Ing. Sistemas - Uninorte
  mru...@uninorte.edu.co - identi.ca/desiderantes
 
 
 
   El Viernes, 16 de mayo, 2014 11:29:42, rastersoft 
 ras...@rastersoft.com
  escribió:
Hi:
  
   I'm the author of autovala. Currently it is a command-line only tool,
   but I'm working on a gedit plugin that will integrate autovala inside,
   allowing for a much better workflow.
  
   Anyway, about being it much powerful, remember that nearly all is
   done
   automagically by autovala, and, usually, you don't need to manually
 edit
   the .avprj files. Just run autovala update and build your project.
   Autovala will search automatically for source files, resources and
 more.
  
   On 16/05/14 17:46, geovanisouz...@gmail.com wrote:
Guys, thanks for replies.
  
Calvin, I don`t intend to create whole build from sctrach. I was
  thinking
in a kind of frontend, easy to understand, with nice syntax,
   that
dispatch commands and scripts to autotools, make, cmake and all this
stabilished and reliable software. I know that doesn't need to
 reinvent
   the
wheel, but, just let it more soft... :)
  
When I started this thread, I don't knew autovala. I don't use it
   in deep,
but seems much powerful to me. I understood that it make a kind of
proprocessing, generating the make files.
  
My idea is similar, but I want to hide the complexicity of generated
  make
files, putting it in a build/ or /tmp/ folder, starting other tools
 to
  make
it happen. This way, existing Makefile's, ./configure's and others
   can be
used too, preserving the work projects, but adding more management,
  like a
public online package repository, bundling, deploying, and
 whatever...
  
What you think about it?
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list
  
  
   --
   Nos leemos
RASTER(Linux user #228804)
   ras...@rastersoft.com  http://www.rastersoft.com
  
  
   ___
   vala-list mailing list
   vala-list@gnome.org
   https://mail.gnome.org/mailman/listinfo/vala-list
  
  ___
  vala-list mailing list
  vala-list@gnome.org
  https://mail.gnome.org/mailman/listinfo/vala-list
 



 --
 @geovanisouza92 - Geovani de Souza
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] About method overloading, constructor overloading and extension methods

2014-05-15 Thread Steven Oliver
That is a good question actually. I mean yannick's answer works in this
overly-simplified case, but overall, is there a technical reason it doesn't
work this way?

Steven N. Oliver


On Thu, May 15, 2014 at 2:06 PM, geovanisouz...@gmail.com 
geovanisouz...@gmail.com wrote:

 Sorry for my mistake. I used the same variable result. Declaring:

 var result = add(2, 3);
 var result2 = add(1.2, 3.4);
 ​
 Worked fine. Thank you Yannick.

 But the discussion can continue.
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Planet Vala

2014-03-21 Thread Steven Oliver
Yes. I do mine the same way.

https://github.com/nemequ/planet-vala/pull/1

Steven N. Oliver


On Fri, Mar 21, 2014 at 2:20 PM, Jim Nelson j...@yorba.org wrote:

 I tag all my Vala blog posts with a vala keyword.  Can Planet Vala pull
 from a particular tag feed?

 -- Jim


 On Fri, Mar 21, 2014 at 12:21 AM, Evan Nemerson e...@coeus-group.com
 wrote:

 I've gone ahead and launched a blog aggregator for Vala at
 http://planet.vala-project.org (thanks to Jürg for letting me use the
 subdomain), as discussed here a few days ago.

 Currently there are only a few blogs included, but I would really like
 to add more soon, especially (though not exclusively) of people who
 aren't already on planet.gnome.org.  The content doesn't have to be
 completely, or even mostly, about Vala.

 I've put the Venus configuration information on GitHub
 (https://github.com/nemequ/planet-vala), so please feel free to file
 issues or pull requests for whatever you would like to see.


 -Evan
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] array memory leak?

2014-03-05 Thread Steven Oliver
What version libgee are you using?

—
Sent from Mailbox for iPhone

On Wed, Mar 5, 2014 at 1:17 PM, Ulink ul...@gmx.at wrote:

 Consider the following (dummy) functions which shows memory leaks here
 (valac 0.20.1 on ubuntu saucy 64Bit). It seems the problem exists with
 Gee.ArrayList too. May someone confirm this?
 //memory leak if len120 (nfill ist NOT the problem)
 //NO memory leak if len=120
 void Dummy1(int len)
 {
   const int LOOPS=100;
   string[] dummy = new string[LOOPS];
   for(var xx=0; xxLOOPS; xx++)
   dummy[xx]=string.nfill(len, 'x');
 }
 //memory leak if len24 (nfill ist NOT the problem)
 //NO memory leak if len =24
 void Dummy2(int len)
 {
   const int LOOPS=100;
   string[] dummy={};
   for(var xx=0; xxLOOPS; xx++)
   dummy+=string.nfill(len, 'x');
 }
 class CDummy : GLib.Object
 {
   private int member;
   public CDummy(int param) { member=param; }
 }
 void Dummy3() //memory leak
 {
   const int LOOPS=100;
   CDummy[] dummy = new CDummy[LOOPS];
   for(var xx=0; xxLOOPS; xx++)
   dummy[xx] = new CDummy(xx);
 }
 -- 
 Bernhard
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Question about some wiki content

2014-01-15 Thread Steven Oliver
I'm looking at
https://wiki.gnome.org/Projects/Vala/ReferenceHandling

In the section titled Memory management for compact classes with reference
counting the custom up function, as expected, increments the reference
count. The custom down function though does not. I would think it should.

Should it? I'll update the wiki if I get confirmation.

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Question about some wiki content

2014-01-15 Thread Steven Oliver
The decrement inside the IF is permanent? Even if the IF statement
evaluates to false?

public void down () {
if (--ref_count == 0) {
delete (void*) this;
}
}

Steven N. Oliver


On Wed, Jan 15, 2014 at 12:28 PM, Luca Bruno lethalma...@gmail.com wrote:

 On 15/01/2014 17:50, Steven Oliver wrote:

 I'm looking at
 https://wiki.gnome.org/Projects/Vala/ReferenceHandling

 In the section titled Memory management for compact classes with
 reference
 counting the custom up function, as expected, increments the reference
 count. The custom down function though does not. I would think it
 should.

 It does decrease the ref_count.
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Debugging the compiler command generated by valac

2013-12-27 Thread Steven Oliver
Joe, 

Valac doesn't generate the compiler command. That along with all the include 
directories are figured out by the Cmake files in the case of Shotwell.

—
Sent from Mailbox for iPhone

On Thu, Dec 26, 2013 at 11:58 AM, Joe Sapp nixpho...@gmail.com wrote:

 I'm having an issue with the C compiler command generated by valac.
 Specifically, an include directory is being included unexpectedly (see
 [1]).  Is there any way to figure out what causes this to happen, or
 which package or file is at fault?  I can't seem to find any way to
 get intermediate information between the `valac` call and the `cc`
 call.
 --
 Thanks,
 Joe Sapp
 [1] https://bugs.gentoo.org/show_bug.cgi?id=492480#c5
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] VAPI tutorial

2013-12-27 Thread Steven Oliver
There's a short section on VAPIs in the tutorial if I remember correctly. Would 
probably be helpful to link to this from there if you haven't already. 

—
Sent from Mailbox for iPhone

On Fri, Dec 27, 2013 at 6:43 PM, rastersoft ras...@rastersoft.com wrote:

 Hi all:
 I wrote a little VAPI writing tutorial to help people to start writing 
 VAPI files for libraries. I put it at
 https://wiki.gnome.org/Projects/Vala/WrittingVAPIs
 Of course it is incomplete, and is possible that it has mistakes, so I 
 accept all kind of suggestions and fixes.
 -- 
 Nos leemos
RASTER(Linux user #228804)
 ras...@rastersoft.com  http://www.rastersoft.com
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Program doesn't quit

2013-12-03 Thread Steven Oliver
For the past year or so off and on I've been working on a pet project.
Between the time spent rewriting various parts of it over and over, and
trying to learn Vala/GTK, it's taking me a lot longer than I hoped it would.

Anyway, here is my project on Github:
https://github.com/steveno/balistica

While I'm sure there are plenty of improvements that can be made (patches
welcome!) I have one problem that's been driving me crazy for a while now
and I'm desperate for help now to solve it. I assume the problem has to be
in src/BalisticaApplication.vala or src/MainWindow.vala.

If anyone is willing to offer any suggestions I'd greatly appreciate it!

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Program doesn't quit

2013-12-03 Thread Steven Oliver
Evan,
My apologies for apparently not clearly stating the issue. Here's try
number 2:
1) Run the program.
2) Close the GUI that pops up
3) The GUI goes away as expected but the process is still running in my
terminal

As for you suggestion, I already have that line in my code. Line 54 of
MainWindow.vala.

Andrea,
Good guess! I hadn't actually tried that one. That didn't fix it though :(
I'm now left with the process still there but now with the following error
message:

(balistica:2473): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops !=
NULL' failed




Steven N. Oliver


On Tue, Dec 3, 2013 at 2:22 PM, Evan Nemerson e...@coeus-group.com wrote:

 On Tue, 2013-12-03 at 13:31 -0500, Steven Oliver wrote:
  For the past year or so off and on I've been working on a pet project.
  Between the time spent rewriting various parts of it over and over, and
  trying to learn Vala/GTK, it's taking me a lot longer than I hoped it
 would.
 
  Anyway, here is my project on Github:
  https://github.com/steveno/balistica
 
  While I'm sure there are plenty of improvements that can be made (patches
  welcome!) I have one problem that's been driving me crazy for a while now
  and I'm desperate for help now to solve it. I assume the problem has to
 be
  in src/BalisticaApplication.vala or src/MainWindow.vala.
 
  If anyone is willing to offer any suggestions I'd greatly appreciate it!

 You didn't really describe the symptoms (in fact, you didn't even
 mention what the problem was in the body of your e-mail), but it's
 probably a safe guess that you're not calling Gtk.main_quit().

 https://wiki.gnome.org/Projects/Vala/GTKSample has some examples.  For
 the simple cases, people generally just connect it to the main window's
 destroy signal:

 window.destroy.connect (Gtk.main_quit);

 Once you invoke Gtk.main_quit(), your program will resume execution by
 returning from the Gtk.main() call.


 -Evan

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Program doesn't quit

2013-12-03 Thread Steven Oliver
I figured out my own issue. Well, sort of anyway. In order to fix it I
removed the MainWindow class that overrode Gtk.Window. I moved the code
that would have been there back to my BalisticaApplication class. Now it
works.

https://github.com/steveno/balistica/commit/0a11c5e1610acce2a7294b2865ec115caac31261

Steven N. Oliver


On Tue, Dec 3, 2013 at 5:31 PM, Andrew Benton andrew.benton...@gmail.comwrote:

 As  a quick fix, you could replace the gtk_main_quit function with another
 function that has the same signature, but contains the exit method, which
 will be sure to bump you out of the program.  Just be sure to declare the
 exit method in your file.

 extern void exit(int exit_code);

 void quit()
 {
 exit(0);

 }

 On 12/3/2013 5:24 PM, Steven Oliver wrote:

 Evan,
 My apologies for apparently not clearly stating the issue. Here's try
 number 2:
 1) Run the program.
 2) Close the GUI that pops up
 3) The GUI goes away as expected but the process is still running in my
 terminal

 As for you suggestion, I already have that line in my code. Line 54 of
 MainWindow.vala.

 Andrea,
 Good guess! I hadn't actually tried that one. That didn't fix it though :(
 I'm now left with the process still there but now with the following error
 message:

 (balistica:2473): Gtk-CRITICAL **: gtk_main_quit: assertion `main_loops !=
 NULL' failed




 Steven N. Oliver


 On Tue, Dec 3, 2013 at 2:22 PM, Evan Nemerson e...@coeus-group.com
 wrote:

  On Tue, 2013-12-03 at 13:31 -0500, Steven Oliver wrote:

 For the past year or so off and on I've been working on a pet project.
 Between the time spent rewriting various parts of it over and over, and
 trying to learn Vala/GTK, it's taking me a lot longer than I hoped it

 would.

 Anyway, here is my project on Github:
 https://github.com/steveno/balistica

 While I'm sure there are plenty of improvements that can be made
 (patches
 welcome!) I have one problem that's been driving me crazy for a while
 now
 and I'm desperate for help now to solve it. I assume the problem has to

 be

 in src/BalisticaApplication.vala or src/MainWindow.vala.

 If anyone is willing to offer any suggestions I'd greatly appreciate it!

 You didn't really describe the symptoms (in fact, you didn't even
 mention what the problem was in the body of your e-mail), but it's
 probably a safe guess that you're not calling Gtk.main_quit().

 https://wiki.gnome.org/Projects/Vala/GTKSample has some examples.  For
 the simple cases, people generally just connect it to the main window's
 destroy signal:

  window.destroy.connect (Gtk.main_quit);

 Once you invoke Gtk.main_quit(), your program will resume execution by
 returning from the Gtk.main() call.


 -Evan

  ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Bindings for GLESv2 and GLFW3

2013-10-09 Thread Steven Oliver
Have you considered a pull request to this guy:

https://github.com/nemequ/vala-extra-vapis

Steven N. Oliver


On Wed, Oct 9, 2013 at 6:58 AM, Aleksandr Palamar void...@gmail.com wrote:

 Hi, Vala developers and users. The more I'm trying to use Vala then
 more I like it. Currently, I'm working on some project that needs
 GLESv2 on desktop/mobile OSes, and decided to use Vala. Unfortunately
 I've not found any kind of bindings for GLES and GLFW3, so I wrote
 some.

 Here is the link for anyone who would like to use bindings for GLESv2
 and GLFW3: https://github.com/void-995/vala-vapi

 Any kind of participation is appreciated.

 Thank you for your time, and keep Vala moving.
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Fw: Extra documentation for vapis on Valadoc

2013-09-25 Thread Steven Oliver
Wow I've never actually looked through the Valadoc source code repository
before. There are actually a lot of really good examples there.

Given that, though, can anyone explain how get extra documentation onto
Valadoc.org?

Steven N. Oliver


On Tue, Sep 24, 2013 at 4:05 PM, Al Thomas astav...@yahoo.co.uk wrote:



 From: Steven Oliver oliver.ste...@gmail.com
 To: vala-list vala-list@gnome.org
 Sent: Tuesday, 24 September 2013, 19:15
 Subject: [Vala] Extra documentation for vapis on Valadoc
 
 
 My
  question is how did the extra documentation get there? I looked in the
 Glib-2.0 vapi but there's nothing extra there.
 

 My understanding is Valadoc is not generated from vapi files.

 It has it's own markup style ( see http://valadoc.org/#!wiki=markup ) and
 source code ( see https://gitorious.org/valadoc-org/valadoc-org/ ), but
 that may not be the whole story because the relevant valadoc file I can
 find (
 https://gitorious.org/valadoc-org/valadoc-org/source/6c7d58e17a247438337d75bde80737f0e539fa2b:documentation/glib-2.0/glib-2.0.valadoc)
  doesn't seem to contain the GLib.Markup.printf_escaped function you were
 interested in.

 Hope that helps,

 Al
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Extra documentation for vapis on Valadoc

2013-09-24 Thread Steven Oliver
I was looking through Valadoc.org today and came across this entry:

http://valadoc.org/#!api=glib-2.0/GLib.Markup.printf_escaped

My question is how did the extra documentation get there? I looked in the
Glib-2.0 vapi but there's nothing extra there.

https://git.gnome.org/browse/vala/tree/vapi/glib-2.0.vapi#n3553

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Emendo text editor

2013-09-23 Thread Steven Oliver
No github or bitbucket?

Steven N. Oliver


On Mon, Sep 23, 2013 at 2:15 PM, simargl arch...@gmail.com wrote:

 Hi,

 Emendo is a simple text editor with syntax highlighting written in Vala,
 using Gtk+3 and Gtksourceview. If someone is interested source tarball can
 be found here:
 http://alphaos.tuxfamily.org/forum/viewtopic.php?f=8t=702#p1151

 Presenting this text editor to you is one thing, but more important there
 are two known bugs I am still not able to solve:

 First, before closing program from toolbar or with Ctrl+Q, there is
 source_buffer_check method called (line 700) from action_quit (line 573)
 method, that offers to save changes if source buffer is modified. That
 works fine if program is closing from toolbar button or Ctrl+Q, but when X
 in titlebar is clicked, program first closes then shows that dialog box and
 offers to save changes.

 Second, replace_all method (line 545) works OK, but it is not undoable,
 when undo button from toolbar is clicked, everything from sourcebuffer gets
 deleted.

 Thank you for any help.
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] [PATCH] [Genie] Add coalescing functionality to Genie

2013-09-10 Thread Steven Oliver
Vala Devs,
I originally attached this patch to:
https://bugzilla.gnome.org/show_bug.cgi?id=620133

Upon further review though I'm not really sure if the patch and the bug
report are related. Given that, I've decided to re-post the patch here. I
think it's still worth committing even if it doesn't solve the
aforementioned bug.

Steven N. Oliver
From f7dd5161bc35306b2ff8ad12e4d8a5e16f32c773 Mon Sep 17 00:00:00 2001
From: Steven Oliver oliver.ste...@gmail.com
Date: Mon, 9 Sep 2013 17:17:22 -0400
Subject: [PATCH] [Genie] Add coalescing function

---
 vala/valagenieparser.vala| 11 +++
 vala/valagenietokentype.vala |  1 +
 2 files changed, 12 insertions(+)

diff --git a/vala/valagenieparser.vala b/vala/valagenieparser.vala
index f479905..ad84415 100644
--- a/vala/valagenieparser.vala
+++ b/vala/valagenieparser.vala
@@ -1520,6 +1520,17 @@ public class Vala.Genie.Parser : CodeVisitor {
return left;
}
 
+Expression parse_coalescing_expression () throws ParseError {
+   var begin = get_location ();
+   var left = parse_conditional_or_expression ();
+   if (accept (TokenType.OP_COALESCING)) {
+   var right = parse_coalescing_expression ();
+   return new BinaryExpression (BinaryOperator.COALESCE, 
left, right, get_src (begin));
+   } else {
+   return left;
+   }
+   }
+
Expression parse_conditional_or_expression () throws ParseError {
var begin = get_location ();
var left = parse_conditional_and_expression ();
diff --git a/vala/valagenietokentype.vala b/vala/valagenietokentype.vala
index 920a96a..df78e22 100644
--- a/vala/valagenietokentype.vala
+++ b/vala/valagenietokentype.vala
@@ -107,6 +107,7 @@ public enum Vala.Genie.TokenType {
OF,
OUT,
OP_AND,
+   OP_COALESCING,
OP_DEC,
OP_EQ,
OP_GE,
-- 
1.8.3.1

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Worried about the state of Genie

2013-08-28 Thread Steven Oliver
You're not the first, and sadly, I'm sure, you won't be the last to
complain on this list about the state of bugs for Vala. As far as Genie, I
don't know what to tell you. Is there a separate mailing list for Genie?
I'm not sure i've ever seen a question come across here for it.

Is anyone else on this list a regular user of Genie?

Steven N. Oliver


On Tue, Aug 27, 2013 at 4:51 AM, Tal Liron tal.li...@gmail.com wrote:

 I think Genie is a wonderful idea, and have invested a lot in it: three
 rather large applications, and more coming in the future.

 However, I'm very concerned about its future. It has some serious
 linguistic problems and bugs. I've reported many of them on Bugzilla:

 https://bugzilla.gnome.org/**buglist.cgi?bug_status=**
 UNCONFIRMEDbug_status=NEW**bug_status=REOPENED**
 emailreporter1=1emailtype1=**exactemail1=tal.liron%**40gmail.comhttps://bugzilla.gnome.org/buglist.cgi?bug_status=UNCONFIRMEDbug_status=NEWbug_status=REOPENEDemailreporter1=1emailtype1=exactemail1=tal.liron%40gmail.com

 These bugs have been languishing for almost a year without them being
 assigned to anyone.

 Are there plans to continue supporting Genie? If not, I think it should be
 deprecated and removed from Vala. As it stands, it seems like a made a
 mistake investing in it, and should rewrite everything in Vala. :(

 -Tal
 __**_
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/**mailman/listinfo/vala-listhttps://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Worried about the state of Genie

2013-08-28 Thread Steven Oliver
On Wed, Aug 28, 2013 at 3:15 PM, Al Thomas astav...@yahoo.co.uk wrote:


 There are certainly significant bugs in Genie. I thing some are listed in
 Bugzilla for lists and dicts, which are one of the great benefits of using
 Genie and Vala, rather than C. The other bugs I have found are nested
 conditional statements. So good quality bug reporting and prioritising on
 significant failings would certainly help new people learning Genie and
 keep their momentum up with learning the language.


Are a lot of these also bugs in Vala or are you only talking bugs specific
to Genie?
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Int64 operations, I'm confused

2013-07-30 Thread Steven Oliver
You've not hit an issue with using lld have you?

https://mail.gnome.org/archives/vala-list/2012-May/msg00032.html

Steven N. Oliver


On Tue, Jul 30, 2013 at 9:44 AM, r...@no-log.org wrote:

 There is something I do not understand. I try to make a simple operation
 and here is the result.
 (...)
 int64 val1 = 96;
 int64 val2 = val1 / 8;
 stdout.printf (val1: %lld, val2 : %d\n, val1, val2);

 int val4 = 96;
 int val5 = val4 / 8;
 stdout.printf (val4: %lld, val5 : %d\n, val4, val5);

 (..)

 Results :
 val1: 96, val2 : 0
 val4: 96, val5 : 12

 In fact I want to use file.query_info() which returns an int64 for size
 (actually 96 bytes). And I need to divide size by 8 result = 0

 Any advice ? :)

 Thanks
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Little things in Vala design?

2013-06-17 Thread Steven Oliver
What quirks exactly were you talking about? The article read more
comparative than anything?

Steven N. Oliver


On Sun, Jun 16, 2013 at 11:57 PM, Mario Daniel Ruiz Saavedra 
desideran...@rocketmail.com wrote:

 Looking at [http://lwn.net/SubscriberLink/553131/f8a66b10c5cbd80f/] i
 wonder, how much of those little quirks are shared by vala? Can those be
 axed?

 ___
 Mario Daniel Ruiz Saavedra
 Estudiante Ing. Sistemas - Uninorte
 mru...@uninorte.edu.co - identi.ca/desiderantes
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Mad question - C to Vala

2013-05-22 Thread Steven Oliver
Interesting idea in this case though. You want a tool to translate (C) to a 
language (Vala) which in turn just translates it back to its original language 
(C). 


To bad the compiler doesn't have a reverse gear! Ha!
—
Sent from Mailbox for iPhone

On Wed, May 22, 2013 at 11:59 AM, Mario Daniel Ruiz Saavedra
desideran...@rocketmail.com wrote:

 I asked that some time ago, and no, there isn't anything like that, but i've 
 seen similar efforts with other languages, like Retronator's Automagically, 
 which translates from Obj-C to C#.
 ___
 Mario Daniel Ruiz Saavedra
 Estudiante Ing. Sistemas - Uninorte
 mru...@uninorte.edu.co - identi.ca/desiderantes
 -Original Message-
 From: Donn donn.in...@gmail.com
 Sender: vala-list vala-list-boun...@gnome.org
 Date: Wed, 22 May 2013 14:13:59 
 To: vala-listvala-list@gnome.org
 Subject: [Vala] Mad question - C to Vala
 I foresee the answer, but heck: Is there some program to feed a gobject 
 C source into that will spit out a vala source file? I'd love to see 
 certain sources in Vala which fits my brain so much better.
 \d
 -- 
 Cellery- 082 343 5978
 Phoney - 028 272 9033
 @ddy - donn.in...@gmail.com
 webby - http://ingleink.co.za
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala protocol buffer support

2013-01-10 Thread Steven Oliver
Awesome!

Steven N. Oliver


On Thu, Jan 10, 2013 at 12:11 AM, Robert Ancell robert.anc...@gmail.comwrote:

 Hi,

 I've made a plugin for the protocol buffer compiler to support Vala:
 http://launchpad.net/protobuf-vala

 You can read more about it in my blog:

 http://bobthegnome.blogspot.co.nz/2013/01/vala-support-for-protocol-buffers.html

 --Robert

 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vala Namespace Documentation

2012-11-07 Thread Steven Oliver
I have been complaining a lot to this list lately about the lack of
documentation for the Vala namespace in Vala. Well, since this is the open
source world, if you don't like you can fix it yourself. While that rarely
works for me in this case I tried and I actually succeeded.

For anyone who would like documentation on Vala itself you can now find it
here. No promises on how often I'll keep this updated. As long as my
interest lasts or at least as long as people request it.

http://steveno.github.com/vala

Finally, generating this documentation forced me to make some rather nasty
changes to the vala source code. I haven't delved into how exactly valadoc
works but it appears to do static analysis as it generates the
documentation. Vala's own namespace, according to valadoc, is a little
messy. Just saying...

Anyway. Enjoy!!

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vala Source Documentation

2012-11-02 Thread Steven Oliver
Is there a reason that the valadoc output for Vala's own code isn't hosted
somewhere? Valadoc.org is nice enough, but it's only for code besides Vala
itself.

It seems reasonable enough that Vala's own documentation would be hosted
there too. Perhaps at valadoc.org/vala??

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Vala namespace documentation?

2012-10-23 Thread Steven Oliver
I was looking at the Valadate code and I'm getting some compilation errors
on functions in the Vala namespace. Where is the documentation for that?
The specific file in question is here:

http://git.yorba.org/cgit.cgi/valadate/tree/runner/girsuiteinfo.vala

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Unit Testing in Vala

2012-10-19 Thread Steven Oliver
There are a couple of unit testing frameworks out there for Vala. I know
there a multitude of frameworks people have written themselves for
themselves that aren't really published as stand alone projects. Given that
I'd like to start putting some testing in a project I'm working on and I
had a few questions for the audience.

It appears to me that Valadate is the most mature testing platform out
there. I've noticed it's hosted on Gitorious but it appears that Yorba
has cloned it on their server and have made updates to it that never made
it back to Gitorious. It also appears that despite hosting Valadate Yorba
doesn't actually use it. * puzzled *

Is there anything else out there worth looking at? Or at lest ones that
have seen updates in the past 2 years? And finally, what is everyone doing
for unit testing? It appears to be something a lot of projects don't really
do anymore.

Steven N. Oliver
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Unit Testing in Vala

2012-10-19 Thread Steven Oliver
I am sorry if I made it sound like you guys had done something wrong. That
was not my intention!

Is there a reason you're not currently using it, even if you aren't further
developing it?

Steven N. Oliver

On Fri, Oct 19, 2012 at 3:21 PM, Jim Nelson j...@yorba.org wrote:

 For the record, Yorba attempted to contact the original developer of
 Valadate and received no response.  We had some testing needs awhile back,
 and so we forked.  The work we did was not to add features, but merely to
 rip things out to get it to compile with the then-current version of Vala.

 You are correct, we're not currently using or developing Valadate.  We
 would like it if someone stepped up to take over the project.  The code is
 most likely suffering from bit rot and could use some attention.
  Unfortunately, we have our hands full with other projects and can't spend
 the time it would take.

 -- Jim

 On Fri, Oct 19, 2012 at 6:49 AM, Steven Oliver oliver.ste...@gmail.com
 wrote:

 There are a couple of unit testing frameworks out there for Vala. I know
 there a multitude of frameworks people have written themselves for
 themselves that aren't really published as stand alone projects. Given
 that
 I'd like to start putting some testing in a project I'm working on and I
 had a few questions for the audience.

 It appears to me that Valadate is the most mature testing platform out
 there. I've noticed it's hosted on Gitorious but it appears that Yorba
 has cloned it on their server and have made updates to it that never made
 it back to Gitorious. It also appears that despite hosting Valadate Yorba
 doesn't actually use it. * puzzled *

 Is there anything else out there worth looking at? Or at lest ones that
 have seen updates in the past 2 years? And finally, what is everyone doing
 for unit testing? It appears to be something a lot of projects don't
 really
 do anymore.

 Steven N. Oliver



___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Monodevelop

2012-09-17 Thread Steven Oliver
On Sun, Sep 16, 2012 at 6:21 AM, rastersoft ras...@rastersoft.com wrote:


 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Hi all:

 I've been using Anjuta for a long time for developing with Vala, but now
 I want to try with Monodevelop.

 I tested it, and seemed to work fine, except when compiling, because I
 was unable to specify it to use Libgee (it wasn't on the list of packages).

 After searching and testing, I found that the problem is that
 Monodevelop is using only the VAPIs from /usr/share/vala-0.14, and
 refuses to use the ones in /usr/share/vala and /usr/share/vala-0.16

 Copying the files from /usr/share/vala to /usr/share/vala-0.14 allows me
 to use Libgee, but I have vala 0.16, and want to use it. How can I
 specify the vala version to use?

 Thanks.

 - --
 Nos leemos
  RASTER(Linux user #228804)
 ras...@rastersoft.com  http://www.rastersoft.com

 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.11 (GNU/Linux)
 Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

 iEYEARECAAYFAlBVqAgACgkQXEZvyfy1ha8ZrwCgp0VNNOqw0acPU1lYJ+Gxp7l4
 MdkAoIUq4y19JvgDHrZGXxbIIlxVXOPB
 =cKg/
 -END PGP SIGNATURE-


This sounds more like an issue with Monodevelop than Vala, no?
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] sqlheavy?

2012-07-02 Thread Steven Oliver
On Mon, Jul 2, 2012 at 2:22 PM, Eric Gregory e...@yorba.org wrote:

 On Thu, Jun 21, 2012 at 9:44 AM, Jonas Kulla nyocu...@googlemail.com
 wrote:

  I assume it's pretty up to date.
 

 Sadly that's not the case, which is why we're in the process of removing
 SQLHeavy from Geary.

  - Eric


Would you mind revealing what you'll be replacing it with? Something in
house?
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] sqlite3_finalize() ??

2012-06-27 Thread Steven Oliver
On Wed, Jun 27, 2012 at 3:44 PM, Luca Bruno lethalma...@gmail.com wrote:

 On Wed, Jun 27, 2012 at 8:17 PM, Brian Duffy brdu...@gmail.com wrote:

  Hi,
 
  Is it safe to say that I don't have to worry about calling finalize() on
 an
  sqlite3 prepared statement in Vala? I can't find any reference to it in
  ValaDoc.
 
 
 Yes. The easiest and faster way to check is either by using valac -C or
 reading the vapi (
 http://git.gnome.org/browse/vala/tree/vapi/sqlite3.vapi#n351)

 --
 www.debian.org - The Universal Operating System


I ask this on behalf of myself and everyone else on this list whose too
afraid to ask.

Would you mind enlightening those less endowed with what you see in the
VAPI that answers his question?
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] sqlheavy?

2012-06-21 Thread Steven Oliver
I know they Yorba is using it for their new Geary client.

Check here:
http://git.yorba.org/cgit.cgi/geary/

Steven N. Oliver


On Thu, Jun 21, 2012 at 10:00 AM, Brian Duffy brdu...@gmail.com wrote:

 Hi everyone,

 I need to use sqlite in my app. Does anyone have any experience using the
 sqlheavy wrapper? Does it make working with sqlite in Vala more friendly in
 your experience? Is it kept up to date?

 thanks

 Brian

 --
 Duff

 ___
 vala-list mailing list
 vala-list@gnome.org
 https://mail.gnome.org/mailman/listinfo/vala-list


___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Using vala, libgda, and waf

2012-06-11 Thread Steven Oliver

On 06/11/2012 04:46 AM, Abderrahim Kitouni wrote:

Hi,

في ح، 10-06-2012 عند 00:22 -0400 ، كتب Steven Oliver:

I have a very very simple pet project I'm writing and I want to
integrate some storage in a DB using libgda or GnomeDB (not real sure
what it's official name is now). I've pasted the basics of the top of my
wscript file. I cannot for the life of me figure out how to get waf to
recognize libgda. I'm still on Fedora 15 so I only have up to
libgda-4.0, which is fine, because if I can't get it to work having 5
won't help me any.

I've tried several different opts.load statements in the below code
including libgda, libgda4, libgda-4.0. Does anyone know what the
right statement is???

(This has actually nothing to do with vala, it's really a waf question.)
Anyway, you need to use conf.check_cfg like it is done for glib,
something like:

conf.check_cfg(package = 'libgda-4.0',
uselib_store = 'GDA',
mandatory = True,
args = '--cflags --libs')

and use GDA in the uselib for your application.

HTH,
Abderrahim

That has done the trick. Thank you very much! I will have to read up 
more on what exactly conf.check_cfg and opts.load do in waf.

___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


[Vala] Using vala, libgda, and waf

2012-06-09 Thread Steven Oliver
I have a very very simple pet project I'm writing and I want to 
integrate some storage in a DB using libgda or GnomeDB (not real sure 
what it's official name is now). I've pasted the basics of the top of my 
wscript file. I cannot for the life of me figure out how to get waf to 
recognize libgda. I'm still on Fedora 15 so I only have up to 
libgda-4.0, which is fine, because if I can't get it to work having 5 
won't help me any.


I've tried several different opts.load statements in the below code 
including libgda, libgda4, libgda-4.0. Does anyone know what the 
right statement is???


===CODE===

import os
import waflib

top = '.'
out = 'build'

def options(opts):
opts.load('compiler_c')
opts.load('vala')
opts.load('glib2')
opts.load('libxml2')

def configure(conf):
conf.check_vala((0, 14, 2))

conf.check_cfg(
package = 'glib-2.0',
uselib_store = 'GLIB',
atleast_version = '2.30.0',
mandatory = True,
args = '--cflags --libs')

===END CODE===
___
vala-list mailing list
vala-list@gnome.org
https://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Binding problem or ClutterGst problem or my problem?

2012-01-13 Thread Steven Oliver
Surely when they created Vala they saw that coming. Why package VAPIs with
Vala to start with? Was it expected you'd retrieve VAPIs manually in
situations like this and keep and track yourself, leaving the provided set
as (for lack of a better word at the moment) backups?

Steven N. Oliver


On Fri, Jan 13, 2012 at 12:46 PM, Emmanuele Bassi eba...@linux.intel.comwrote:

 On 2012-01-13 at 09:32, Brian Duffy wrote:
  Maybe I'm wrong but I was going on the assumption that the vapi authors
 are
  not basing their version numbers on minor releases such as clutter-1.8
 or
  clutter-gst-1.4 or whatever. For instance, when  include the clutter
  package in my application I am using --pkg clutter-1.0 even though I am
  using the clutter-1.8 that F16 has available through yum.

 that's because the 1.0 fragment of the clutter-1.0 pkg-config name
 (which is what Vala uses to find the library compiler and linker flags
 when you use the --pkg command line argument) is the API version, not
 the Clutter version.

 Clutter 1.8 still allows you to use the API of every other release of
 the 1.x series, as it's API and ABI compatible.

  I would be interested if anyone can clarify what the deal is here. I
 would
  hate to think that Vala is only providing functionality that has existed
 in
  clutter since 1.0 or Clutter-gst since 1.0. I can't believe that is the
  case.

 it's exactly the case, but it's probably not what you meant. any
 function at the time 1.0 was released is still available in Clutter 1.8;
 if you need a specific version of Clutter you'll have to check the
 version using pkg-config at configure time.

 Clutter itself has two ways for checking at compile time and run time
 what version is being used:

  • the CLUTTER_CHECK_VERSION() macro, which can be used to delimit a
  section in the C code, e.g.:

#if CLUTTER_CHECK_VERSION(1, 8, 0)
  clutter_object_method_added_in_1_8_0 (foo);
#else
  clutter_object_method_available_before (foo);
  clutter_object_method_that_may_have_been_deprecated_later (bar);
#endif

  • the clutter_check_version() function, which can be used to check
  the version of the Clutter library that is *currently* running the
  application, e.g.:

if (clutter_check_version (1, 8, 0))
  clutter_object_method (arg);
else
  clutter_object_another_method (another_arg);

 this obviously applies to the C API; if you need to use a method or a
 class and the vapi file doesn't list them, then you'll have to update
 the vapi file and either depend on a new version of Vala that ships that
 updated vapi, or ship the updated vapi file yourself.

 yes, that's a problem of Vala, and the fact that all vapi files are
 centralized with Vala, instead of living outside of the project.

 ciao,
  Emmanuele.

 --
 Emmanuele Bassi,
 Intel Open Source Technology Center
 ___
 vala-list mailing list
 vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Genie and extra '\n' in some strings

2012-01-06 Thread Steven Oliver
Since Genie imitates Python perhaps it does it because Python does it in
most cases. See this page:
http://docs.python.org/reference/simple_stmts.html#print

Steven N. Oliver


On Fri, Jan 6, 2012 at 8:30 AM, Piotr Borkowski rezy...@gmail.com wrote:

 Thank you for your reply, Abderrahim.

  As you can see, in both cases the newline is added to a print'ed string,
  so I guess it is intentional.

 I think this is intentional, but I do not understand why it has been
 applied. This seems unnecessary.

 After compiling the functional equivalent of that program in Vala,
 such additions do not occur.

 Programs in C are the same except those strange extras in Genie version.


 // hello.vala
 public static void main (string[] args)
 {
   var caption = Hello World!\n;
   var hello = new HelloWorld ();
   var message = hello.say (caption);
   print (Message: %s\n, message);
 }

 class HelloWorld : Object
 {
   public string say (string greeting)
   {
   print (greeting);
   return OK;
   }
 }


 // hello.c - vala version

 ...

 void _vala_main (gchar** args, int args_length1) {
   gchar* _tmp0_;
   gchar* caption;
   HelloWorld* _tmp1_;
   HelloWorld* hello;
   gchar* _tmp2_ = NULL;
   gchar* message;
   _tmp0_ = g_strdup (Hello World!\n);
   caption = _tmp0_;
   _tmp1_ = hello_world_new ();
   hello = _tmp1_;
   _tmp2_ = hello_world_say (hello, caption);
   message = _tmp2_;
g_print (Message: %s\n, message);
_g_free0 (message);
   _g_object_unref0 (hello);
   _g_free0 (caption);
 }

 ...

 gchar* hello_world_say (HelloWorld* self, const gchar* greeting) {
   gchar* result = NULL;
   const gchar* _tmp0_;
   gchar* _tmp1_;
g_return_val_if_fail (self != NULL, NULL);
   g_return_val_if_fail (greeting != NULL, NULL);
   _tmp0_ = greeting;
g_print (%s, _tmp0_);
   _tmp1_ = g_strdup (OK);
   result = _tmp1_;
   return result;
 }

 ...
 ___
 vala-list mailing list
 vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala logo

2012-01-02 Thread Steven Oliver
Second that. A more readable font for VALA would be a plus in my opinion as 
well.

On Jan 2, 2012, at 12:28 PM, Dr. Michael Lauer wrote:

 I also like version 5, however I think the typography
 should be reconsidered. While it looks cool and scifi-like,
 I'd appreciate something more readable.
 
 Cheers,
 
 :M:
 
 ___
 vala-list mailing list
 vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list

___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list


Re: [Vala] Vala logo

2011-12-31 Thread Steven Oliver
I like the wings. What's the connection to vala though?

Sent from my iPhone

On Dec 31, 2011, at 8:03 PM, Tobias Bernard berto...@gmail.com wrote:

 Hi all,
 
 It's been a few months since I first proposed to help with a Vala logo and
 branding.
 Since on the mailing list there are mostly users and little developers of
 the language and they aren't very active here, it's hard to know who to
 talk to to organize something official.
 When I contacted Jürg Billeter as the main author of the language in
 August, he said that he's very busy but he might do something about it.
 After that I haven't heard from him, not even after I contacted him again
 in November.
 So, since Jürg seems to be too busy, is there someone else who is
 officially authorized to organize this?
 I'd love to support the project, but I can't if I don't get clear
 instructions...
 
 In case someone hasn't seen the proposals, here's the most recent
 versionhttp://ubuntuone.com/p/1DBL/
 .
 
 kind regards
 Tobias Bernard
 ___
 vala-list mailing list
 vala-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/vala-list
___
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list