Updated example scripts to work with 2.0.0
This commit is contained in:
parent
0b15005e3a
commit
d96671508b
@ -12,4 +12,4 @@ moment.set_coordinates(19.03990999, 47.49801000, 280);
|
|||||||
moment.set_house_system(Swe.HouseSystem.PLACIDUS);
|
moment.set_house_system(Swe.HouseSystem.PLACIDUS);
|
||||||
|
|
||||||
planet = moment.get_planet(Swe.Planet.SUN);
|
planet = moment.get_planet(Swe.Planet.SUN);
|
||||||
log(planet.position);
|
log(planet.get_position());
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local lgi = require 'lgi'
|
local lgi = require 'lgi'
|
||||||
local SweGlib = lgi.require('SweGlib', '1.0')
|
local SweGlib = lgi.require('SweGlib', '2.0')
|
||||||
|
|
||||||
SweGlib.init()
|
SweGlib.init()
|
||||||
|
|
||||||
@ -14,4 +14,4 @@ moment:set_house_system(SweGlib.HouseSystem.PLACIDUS)
|
|||||||
moment:add_all_planets()
|
moment:add_all_planets()
|
||||||
|
|
||||||
local planet = moment:get_planet(SweGlib.Planet.SUN)
|
local planet = moment:get_planet(SweGlib.Planet.SUN)
|
||||||
io.write(planet.position, "\n")
|
io.write(planet:get_position(), "\n")
|
||||||
|
@ -2,7 +2,7 @@ package SweGlib;
|
|||||||
|
|
||||||
use Glib::Object::Introspection;
|
use Glib::Object::Introspection;
|
||||||
|
|
||||||
Glib::Object::Introspection->setup(basename => 'SweGlib', version => '1.0', package => 'SweGlib');
|
Glib::Object::Introspection->setup(basename => 'SweGlib', version => '2.0', package => 'SweGlib');
|
||||||
|
|
||||||
package main;
|
package main;
|
||||||
|
|
||||||
@ -18,4 +18,4 @@ $moment->set_house_system("placidus");
|
|||||||
$moment->add_all_planets();
|
$moment->add_all_planets();
|
||||||
|
|
||||||
$planet = $moment->get_planet("sun");
|
$planet = $moment->get_planet("sun");
|
||||||
print($planet->position, "\n");
|
print($planet->get_position(), "\n");
|
||||||
|
@ -12,4 +12,4 @@ moment.set_house_system(SweGlib.HouseSystem.PLACIDUS)
|
|||||||
moment.add_all_planets()
|
moment.add_all_planets()
|
||||||
|
|
||||||
planet = moment.get_planet(SweGlib.Planet.SUN)
|
planet = moment.get_planet(SweGlib.Planet.SUN)
|
||||||
print planet.position
|
print planet.get_position()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user