Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-08 Thread Stephan Eggermont
You can find it on smalltalkhub StephanEggermont/SpecGenerator. In Pharo4 
you'll miss spec updates, you'll need to add at least the FastTable based list 
and the SelectEntity widget. 

Code generation is straightforward, and should be refactored

Stephan

Verstuurd vanaf mijn iPhone


Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Merwan Ouddane

Yes I did.

Have you tried on windows ?

Merwan

On 08/07/2016 21:20, Esteban Lorenzano wrote:

it works fine for me:

Struct>>b
"This method was automatically generated"
^Enum fromInteger: (handle unsignedLongAt: 5)

Struct>>b: anObject
"This method was automatically generated"
handle unsignedLongAt: 5 put: anObject value

Struct>>c
"This method was automatically generated"
^Enum fromInteger: (handle unsignedLongAt: 9)

Struct>>c: anObject
"This method was automatically generated"
handle unsignedLongAt: 9 put: anObject value

question: did you initialise the Enum? before generating fields?

Esteban

On 08 Jul 2016, at 20:42, Merwan Ouddane > wrote:


Struct >> fieldsDesc
^#( void* a;
Enum b;
Enum c;
)

Enum >> enumDecl
^ #( TEST 1 )

I joined a .st with the struct and the enum, the package name is FFITest.

Merwan

On 08/07/2016 20:14, Esteban Lorenzano wrote:

that still does not helps… show me the code!

Esteban

On 08 Jul 2016, at 20:09, Merwan Ouddane > wrote:


Sorry not unsigned longs but enumerations

On Fri, Jul 8, 2016 at 10:09 AM, Esteban Lorenzano 
mailto:esteba...@gmail.com>> wrote:


how do you declare this?


On 08 Jul 2016, at 10:01, Merwan Ouddane
mailto:merwanoudd...@gmail.com>> wrote:

I spoke too fast ^^'

struct Test {
  void * ptr;
  insigned long i;
  insigned long j;
}

Real size is 12, UFFI counts 24

Merwan


Le 7 juil. 2016 10:02, "Merwan Ouddane"
mailto:merwanoudd...@gmail.com>> a
écrit :

Now it is working, thank you :)

On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano
mailto:esteba...@gmail.com>> wrote:

Hi,

> On 07 Jul 2016, at 01:54, Ben Coman
mailto:b...@openinworld.com>> wrote:
>
> On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane
mailto:merwanoudd...@gmail.com>> wrote:
>> PS: for the first example, the alignment is not
respected, the vec3
>> structure is starting at 9 but uffi is fetching it at 5
>
> Hi Esteban,
>
> Is it possible to get a feature or a recipe to
output the sizeof or
> offset of fields in types as understood by the
Image, and the same
> from a C side - that could be used as the standard
first step in
> troubleshooting these kinds of issues ?

FFIExternalType class>>sizeOf: ?

but that does not works for complex type sizes (like
FFIExternalArray).

I don’t know what the problem is here, because in my
test (attached) it seems to be working fine.
maybe problem is on how the Vec3 array is created, it
should be something like this:

Vec3 class>>iinitialize
self
  type: (FFIExternalType resolveType: 'double')
  size: 3

(is like that because FFITypeArray is more designed to
be used creating anonymous types than concretes, but
well… )

in any case, it seems to be working for me.

Now, about the use…

doing this:

p := Position new.
p v1 at: 1 put: 42.0.
p v1 at: 1. “will print 0.0"

why? because it works making a copy (maybe it should
work passing a segment, as nested structs work, but
this is how it works now).

What should work (at doesn’t) in this case is this:

v := Vector3 new.
p := Position new.
v at: 1 put: 42.0.
p v1: v.
p v1 at: 1. “will print 42.0"

it does not work because I made a mistake in field
generation that I already fixed… so you will need to
update UFFI (and regenerate field accessors) ;)

also… I will provide a fix to make first case work…
just later because now I’m going to my french lessons :)

Esteban

ps: for future reference, a description of: install
this, run that, is a lot easier to understand the
problem (is a case of “show me the code!”) :P




>
> cheers -ben
>
>>
>>
>> On 06/07/2016 17:55, Merwan Ouddane wrote:
>>
>> Another test:
>> I replaced double by integer, for visibility...
>> typedef struct vec3 {
>>  int data[3];
>> } vec3;
>>
>> add a second vec3 to position:
>>
>> typedef struct position {
>>  int i;
>>  vec3 vec;
>>  vec3 vec2;
>> } position;
>>
>> Now in pharo:
>> Position >> fieldsDesc
>> "self

Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Esteban Lorenzano
it works fine for me: 

Struct>>b
"This method was automatically generated"
^Enum fromInteger: (handle unsignedLongAt: 5)

Struct>>b: anObject
"This method was automatically generated"
handle unsignedLongAt: 5 put: anObject value

Struct>>c
"This method was automatically generated"
^Enum fromInteger: (handle unsignedLongAt: 9)

Struct>>c: anObject
"This method was automatically generated"
handle unsignedLongAt: 9 put: anObject value

question: did you initialise the Enum? before generating fields?

Esteban

> On 08 Jul 2016, at 20:42, Merwan Ouddane  wrote:
> 
> Struct >> fieldsDesc
> ^#( void* a;
> Enum b;
> Enum c; 
> )
> 
> Enum >> enumDecl
> ^ #( TEST 1 )
> 
> I joined a .st with the struct and the enum, the package name is FFITest.
> 
> Merwan
> 
> On 08/07/2016 20:14, Esteban Lorenzano wrote:
>> that still does not helps… show me the code!
>> 
>> Esteban
>> 
>>> On 08 Jul 2016, at 20:09, Merwan Ouddane >> > wrote:
>>> 
>>> Sorry not unsigned longs but enumerations
>>> 
>>> On Fri, Jul 8, 2016 at 10:09 AM, Esteban Lorenzano >> > wrote:
>>> how do you declare this?
>>> 
 On 08 Jul 2016, at 10:01, Merwan Ouddane >>> > wrote:
 
 I spoke too fast ^^'
 
 struct Test {
   void * ptr;
   insigned long i;
   insigned long j;
 }
 
 Real size is 12, UFFI counts 24
 
 Merwan
 
 
 Le 7 juil. 2016 10:02, "Merwan Ouddane" >>> > a écrit :
 Now it is working, thank you :)
 
 On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano >>> > wrote:
 Hi,
 
 > On 07 Jul 2016, at 01:54, Ben Coman >>> > > wrote:
 >
 > On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane >>> > > wrote:
 >> PS: for the first example, the alignment is not respected, the vec3
 >> structure is starting at 9 but uffi is fetching it at 5
 >
 > Hi Esteban,
 >
 > Is it possible to get a feature or a recipe to output the sizeof or
 > offset of fields in types as understood by the Image, and the same
 > from a C side - that could be used as the standard first step in
 > troubleshooting these kinds of issues ?
 
 FFIExternalType class>>sizeOf: ?
 
 but that does not works for complex type sizes (like FFIExternalArray).
 
 I don’t know what the problem is here, because in my test (attached) it 
 seems to be working fine.
 maybe problem is on how the Vec3 array is created, it should be something 
 like this:
 
 Vec3 class>>iinitialize
 self
 type: (FFIExternalType resolveType: 'double')
 size: 3
 
 (is like that because FFITypeArray is more designed to be used creating 
 anonymous types than concretes, but well… )
 
 in any case, it seems to be working for me.
 
 Now, about the use…
 
 doing this:
 
 p := Position new.
 p v1 at: 1 put: 42.0.
 p v1 at: 1. “will print 0.0"
 
 why? because it works making a copy (maybe it should work passing a 
 segment, as nested structs work, but this is how it works now).
 
 What should work (at doesn’t) in this case is this:
 
 v := Vector3 new.
 p := Position new.
 v at: 1 put: 42.0.
 p v1: v.
 p v1 at: 1. “will print 42.0"
 
 it does not work because I made a mistake in field generation that I 
 already fixed… so you will need to update UFFI (and regenerate field 
 accessors) ;)
 
 also… I will provide a fix to make first case work… just later because now 
 I’m going to my french lessons :)
 
 Esteban
 
 ps: for future reference, a description of: install this, run that, is a 
 lot easier to understand the problem (is a case of “show me the code!”) :P
 
 
 
 
 >
 > cheers -ben
 >
 >>
 >>
 >> On 06/07/2016 17:55, Merwan Ouddane wrote:
 >>
 >> Another test:
 >> I replaced double by integer, for visibility...
 >> typedef struct vec3 {
 >> int data[3];
 >> } vec3;
 >>
 >> add a second vec3 to position:
 >>
 >> typedef struct position {
 >> int i;
 >> vec3 vec;
 >> vec3 vec2;
 >> } position;
 >>
 >> Now in pharo:
 >> Position >> fieldsDesc
 >> "self rebuildFieldAccessors"
 >>^ #(
 >>int i;
 >>Vec3 vec;
 >>Vec3 vec2;
 >> )
 >>
 >> The size returned for each stucture is 16 instead of 12 that because of 
 >> the
 >> "8 byte alignment"
 >>
 >> Meaning that the "position" structure is corrupted.
 >>
 >> With this function:
 >>
 >>
 >> extern "C" void DLL_EXPORT fillStruct(position 

Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Merwan Ouddane

Struct >> fieldsDesc
^#( void* a;
Enum b;
Enum c;
)

Enum >> enumDecl
^ #( TEST 1 )

I joined a .st with the struct and the enum, the package name is FFITest.

Merwan

On 08/07/2016 20:14, Esteban Lorenzano wrote:

that still does not helps… show me the code!

Esteban

On 08 Jul 2016, at 20:09, Merwan Ouddane > wrote:


Sorry not unsigned longs but enumerations

On Fri, Jul 8, 2016 at 10:09 AM, Esteban Lorenzano 
mailto:esteba...@gmail.com>> wrote:


how do you declare this?


On 08 Jul 2016, at 10:01, Merwan Ouddane
mailto:merwanoudd...@gmail.com>> wrote:

I spoke too fast ^^'

struct Test {
  void * ptr;
  insigned long i;
  insigned long j;
}

Real size is 12, UFFI counts 24

Merwan


Le 7 juil. 2016 10:02, "Merwan Ouddane" mailto:merwanoudd...@gmail.com>> a écrit :

Now it is working, thank you :)

On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano
mailto:esteba...@gmail.com>> wrote:

Hi,

> On 07 Jul 2016, at 01:54, Ben Coman
mailto:b...@openinworld.com>> wrote:
>
> On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane
mailto:merwanoudd...@gmail.com>> wrote:
>> PS: for the first example, the alignment is not
respected, the vec3
>> structure is starting at 9 but uffi is fetching it at 5
>
> Hi Esteban,
>
> Is it possible to get a feature or a recipe to output
the sizeof or
> offset of fields in types as understood by the Image,
and the same
> from a C side - that could be used as the standard
first step in
> troubleshooting these kinds of issues ?

FFIExternalType class>>sizeOf: ?

but that does not works for complex type sizes (like
FFIExternalArray).

I don’t know what the problem is here, because in my
test (attached) it seems to be working fine.
maybe problem is on how the Vec3 array is created, it
should be something like this:

Vec3 class>>iinitialize
self
type: (FFIExternalType resolveType:
'double')
size: 3

(is like that because FFITypeArray is more designed to
be used creating anonymous types than concretes, but well… )

in any case, it seems to be working for me.

Now, about the use…

doing this:

p := Position new.
p v1 at: 1 put: 42.0.
p v1 at: 1. “will print 0.0"

why? because it works making a copy (maybe it should
work passing a segment, as nested structs work, but this
is how it works now).

What should work (at doesn’t) in this case is this:

v := Vector3 new.
p := Position new.
v at: 1 put: 42.0.
p v1: v.
p v1 at: 1. “will print 42.0"

it does not work because I made a mistake in field
generation that I already fixed… so you will need to
update UFFI (and regenerate field accessors) ;)

also… I will provide a fix to make first case work… just
later because now I’m going to my french lessons :)

Esteban

ps: for future reference, a description of: install
this, run that, is a lot easier to understand the
problem (is a case of “show me the code!”) :P




>
> cheers -ben
>
>>
>>
>> On 06/07/2016 17:55, Merwan Ouddane wrote:
>>
>> Another test:
>> I replaced double by integer, for visibility...
>> typedef struct vec3 {
>> int data[3];
>> } vec3;
>>
>> add a second vec3 to position:
>>
>> typedef struct position {
>> int i;
>> vec3 vec;
>> vec3 vec2;
>> } position;
>>
>> Now in pharo:
>> Position >> fieldsDesc
>> "self rebuildFieldAccessors"
>>^ #(
>>int i;
>>Vec3 vec;
>>Vec3 vec2;
>> )
>>
>> The size returned for each stucture is 16 instead of
12 that because of the
>> "8 byte alignment"
>>
>> Meaning that the "position" structure is corrupted.
>>
>> With this function:
>>
>>
>> extern "C" void DLL_EXPORT fillStruct(position *position)
>> {
>>position -> i = 19;
>>(position -> vec).data[0] = 1;
>>(posi

Re: [Pharo-users] Database band reports...

2016-07-08 Thread anonyme
Ok, thanks you for responses. A band report is more than a PDF 
generator... It's a queries manager with varaible management facilities 
: details queries connect to master query, and you can manage sub report 
bottlenek into other master reports. The band report generator has the 
ability to manage page organisation, and editor add text styled... I 
can't use samlltalk database without a good band report component.


But argos band report displayed under look to be fine, if there is a 
possibility to use it with smaltalk... It looks like argos is a server. 
But what about interfaces with smalltalk ?


cheers - Patrick


Le 08/07/2016 à 16:08, Ben Coman a écrit :

On Fri, Jul 8, 2016 at 5:45 PM, stepharo  wrote:

Hi patrick

What is a band report?

http://webhelp.evisions.com/HelpFiles/Argos/4.2/en/Content/10101001.html

Sorry Patrick.  Pharo has such a GUI report generator.  But Artefact
seems to provide similar features via code...
https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Artefact/Artefact.pdf

cheers -ben


Did you check Artefact because you can generate pdf with Artefact.

Stef




Hi,

My previous message stayed without responses, so I published it agin...
I'm
looking for a database band report component. The goal is to build quickly
a
PDF report from SQL requests. An exemple is  Lazreport, this is a tutorial
  .



--
View this message in context:
http://forum.world.st/Database-band-reports-tp4905523.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.











Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Esteban Lorenzano
that still does not helps… show me the code!

Esteban

> On 08 Jul 2016, at 20:09, Merwan Ouddane  wrote:
> 
> Sorry not unsigned longs but enumerations
> 
> On Fri, Jul 8, 2016 at 10:09 AM, Esteban Lorenzano  > wrote:
> how do you declare this?
> 
>> On 08 Jul 2016, at 10:01, Merwan Ouddane > > wrote:
>> 
>> I spoke too fast ^^'
>> 
>> struct Test {
>>   void * ptr;
>>   insigned long i;
>>   insigned long j;
>> }
>> 
>> Real size is 12, UFFI counts 24
>> 
>> Merwan
>> 
>> 
>> Le 7 juil. 2016 10:02, "Merwan Ouddane" > > a écrit :
>> Now it is working, thank you :)
>> 
>> On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano > > wrote:
>> Hi,
>> 
>> > On 07 Jul 2016, at 01:54, Ben Coman > > > wrote:
>> >
>> > On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane > > > wrote:
>> >> PS: for the first example, the alignment is not respected, the vec3
>> >> structure is starting at 9 but uffi is fetching it at 5
>> >
>> > Hi Esteban,
>> >
>> > Is it possible to get a feature or a recipe to output the sizeof or
>> > offset of fields in types as understood by the Image, and the same
>> > from a C side - that could be used as the standard first step in
>> > troubleshooting these kinds of issues ?
>> 
>> FFIExternalType class>>sizeOf: ?
>> 
>> but that does not works for complex type sizes (like FFIExternalArray).
>> 
>> I don’t know what the problem is here, because in my test (attached) it 
>> seems to be working fine.
>> maybe problem is on how the Vec3 array is created, it should be something 
>> like this:
>> 
>> Vec3 class>>iinitialize
>> self
>> type: (FFIExternalType resolveType: 'double')
>> size: 3
>> 
>> (is like that because FFITypeArray is more designed to be used creating 
>> anonymous types than concretes, but well… )
>> 
>> in any case, it seems to be working for me.
>> 
>> Now, about the use…
>> 
>> doing this:
>> 
>> p := Position new.
>> p v1 at: 1 put: 42.0.
>> p v1 at: 1. “will print 0.0"
>> 
>> why? because it works making a copy (maybe it should work passing a segment, 
>> as nested structs work, but this is how it works now).
>> 
>> What should work (at doesn’t) in this case is this:
>> 
>> v := Vector3 new.
>> p := Position new.
>> v at: 1 put: 42.0.
>> p v1: v.
>> p v1 at: 1. “will print 42.0"
>> 
>> it does not work because I made a mistake in field generation that I already 
>> fixed… so you will need to update UFFI (and regenerate field accessors) ;)
>> 
>> also… I will provide a fix to make first case work… just later because now 
>> I’m going to my french lessons :)
>> 
>> Esteban
>> 
>> ps: for future reference, a description of: install this, run that, is a lot 
>> easier to understand the problem (is a case of “show me the code!”) :P
>> 
>> 
>> 
>> 
>> >
>> > cheers -ben
>> >
>> >>
>> >>
>> >> On 06/07/2016 17:55, Merwan Ouddane wrote:
>> >>
>> >> Another test:
>> >> I replaced double by integer, for visibility...
>> >> typedef struct vec3 {
>> >> int data[3];
>> >> } vec3;
>> >>
>> >> add a second vec3 to position:
>> >>
>> >> typedef struct position {
>> >> int i;
>> >> vec3 vec;
>> >> vec3 vec2;
>> >> } position;
>> >>
>> >> Now in pharo:
>> >> Position >> fieldsDesc
>> >> "self rebuildFieldAccessors"
>> >>^ #(
>> >>int i;
>> >>Vec3 vec;
>> >>Vec3 vec2;
>> >> )
>> >>
>> >> The size returned for each stucture is 16 instead of 12 that because of 
>> >> the
>> >> "8 byte alignment"
>> >>
>> >> Meaning that the "position" structure is corrupted.
>> >>
>> >> With this function:
>> >>
>> >>
>> >> extern "C" void DLL_EXPORT fillStruct(position *position)
>> >> {
>> >>position -> i = 19;
>> >>(position -> vec).data[0] = 1;
>> >>(position -> vec).data[1] = 2;
>> >>(position -> vec).data[2] = 3;
>> >>(position -> vec2).data[0] = 1;
>> >>(position -> vec2).data[1] = 2;
>> >>(position -> vec2).data[2] = 3;
>> >> }
>> >>
>> >> We will get:
>> >> position i == 19
>> >> position vec at: 1 == 1
>> >> position vec2 at: 1 == 2
>> >>
>> >>
>> >> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado > >> > wrote:
>> >>>
>> >>> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
>> >>> will check with mingw.
>> >>>
>> >>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane > >>> >:
>> 
>>  Using codeblocks, mine are:
>> 
>>  mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>>  mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>>  -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll  obj\Release\main.o  -o
>>  bin\Release\Test.dll -s -m32
>> 
>> 
>>  On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane >  >
>>  wrote:
>> >
>> > I am not moving from another platefor

Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Merwan Ouddane
Sorry not unsigned longs but enumerations

On Fri, Jul 8, 2016 at 10:09 AM, Esteban Lorenzano 
wrote:

> how do you declare this?
>
> On 08 Jul 2016, at 10:01, Merwan Ouddane  wrote:
>
> I spoke too fast ^^'
>
> struct Test {
>   void * ptr;
>   insigned long i;
>   insigned long j;
> }
>
> Real size is 12, UFFI counts 24
>
> Merwan
>
> Le 7 juil. 2016 10:02, "Merwan Ouddane"  a
> écrit :
>
>> Now it is working, thank you :)
>>
>> On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano 
>> wrote:
>>
>>> Hi,
>>>
>>> > On 07 Jul 2016, at 01:54, Ben Coman >> > wrote:
>>> >
>>> > On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane <
>>> merwanoudd...@gmail.com> wrote:
>>> >> PS: for the first example, the alignment is not respected, the vec3
>>> >> structure is starting at 9 but uffi is fetching it at 5
>>> >
>>> > Hi Esteban,
>>> >
>>> > Is it possible to get a feature or a recipe to output the sizeof or
>>> > offset of fields in types as understood by the Image, and the same
>>> > from a C side - that could be used as the standard first step in
>>> > troubleshooting these kinds of issues ?
>>>
>>> FFIExternalType class>>sizeOf: ?
>>>
>>> but that does not works for complex type sizes (like FFIExternalArray).
>>>
>>> I don’t know what the problem is here, because in my test (attached) it
>>> seems to be working fine.
>>> maybe problem is on how the Vec3 array is created, it should be
>>> something like this:
>>>
>>> Vec3 class>>iinitialize
>>> self
>>> type: (FFIExternalType resolveType: 'double')
>>> size: 3
>>>
>>> (is like that because FFITypeArray is more designed to be used creating
>>> anonymous types than concretes, but well… )
>>>
>>> in any case, it seems to be working for me.
>>>
>>> Now, about the use…
>>>
>>> doing this:
>>>
>>> p := Position new.
>>> p v1 at: 1 put: 42.0.
>>> p v1 at: 1. “will print 0.0"
>>>
>>> why? because it works making a copy (maybe it should work passing a
>>> segment, as nested structs work, but this is how it works now).
>>>
>>> What should work (at doesn’t) in this case is this:
>>>
>>> v := Vector3 new.
>>> p := Position new.
>>> v at: 1 put: 42.0.
>>> p v1: v.
>>> p v1 at: 1. “will print 42.0"
>>>
>>> it does not work because I made a mistake in field generation that I
>>> already fixed… so you will need to update UFFI (and regenerate field
>>> accessors) ;)
>>>
>>> also… I will provide a fix to make first case work… just later because
>>> now I’m going to my french lessons :)
>>>
>>> Esteban
>>>
>>> ps: for future reference, a description of: install this, run that, is a
>>> lot easier to understand the problem (is a case of “show me the code!”) :P
>>>
>>>
>>>
>>>
>>> >
>>> > cheers -ben
>>> >
>>> >>
>>> >>
>>> >> On 06/07/2016 17:55, Merwan Ouddane wrote:
>>> >>
>>> >> Another test:
>>> >> I replaced double by integer, for visibility...
>>> >> typedef struct vec3 {
>>> >> int data[3];
>>> >> } vec3;
>>> >>
>>> >> add a second vec3 to position:
>>> >>
>>> >> typedef struct position {
>>> >> int i;
>>> >> vec3 vec;
>>> >> vec3 vec2;
>>> >> } position;
>>> >>
>>> >> Now in pharo:
>>> >> Position >> fieldsDesc
>>> >> "self rebuildFieldAccessors"
>>> >>^ #(
>>> >>int i;
>>> >>Vec3 vec;
>>> >>Vec3 vec2;
>>> >> )
>>> >>
>>> >> The size returned for each stucture is 16 instead of 12 that because
>>> of the
>>> >> "8 byte alignment"
>>> >>
>>> >> Meaning that the "position" structure is corrupted.
>>> >>
>>> >> With this function:
>>> >>
>>> >>
>>> >> extern "C" void DLL_EXPORT fillStruct(position *position)
>>> >> {
>>> >>position -> i = 19;
>>> >>(position -> vec).data[0] = 1;
>>> >>(position -> vec).data[1] = 2;
>>> >>(position -> vec).data[2] = 3;
>>> >>(position -> vec2).data[0] = 1;
>>> >>(position -> vec2).data[1] = 2;
>>> >>(position -> vec2).data[2] = 3;
>>> >> }
>>> >>
>>> >> We will get:
>>> >> position i == 19
>>> >> position vec at: 1 == 1
>>> >> position vec2 at: 1 == 2
>>> >>
>>> >>
>>> >> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado 
>>> wrote:
>>> >>>
>>> >>> I compiled the DLL using Visual Studio 2015 Community Edition. Later
>>> I
>>> >>> will check with mingw.
>>> >>>
>>> >>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane :
>>> 
>>>  Using codeblocks, mine are:
>>> 
>>>  mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>>>  mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>>>  -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll
>>> obj\Release\main.o  -o
>>>  bin\Release\Test.dll -s -m32
>>> 
>>> 
>>>  On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane <
>>> merwanoudd...@gmail.com>
>>>  wrote:
>>> >
>>> > I am not moving from another plateform :/
>>> >
>>> > I tried it in pharo 6 and I it didn't work either.
>>> >
>>> > It could be my dll. What is your compilation line for the dll ?
>>> >
>>> > Thanks you,
>>> > Merwan
>>> >
>>> > On Tue, Jul 5, 2016 at 2:14

Re: [Pharo-users] Database band reports...

2016-07-08 Thread Ben Coman
On Fri, Jul 8, 2016 at 5:45 PM, stepharo  wrote:
> Hi patrick
>
> What is a band report?

http://webhelp.evisions.com/HelpFiles/Argos/4.2/en/Content/10101001.html

Sorry Patrick.  Pharo has such a GUI report generator.  But Artefact
seems to provide similar features via code...
https://ci.inria.fr/pharo-contribution/view/Books/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/book-result/Artefact/Artefact.pdf

cheers -ben

>
> Did you check Artefact because you can generate pdf with Artefact.
>
> Stef
>
>
>
>> Hi,
>>
>> My previous message stayed without responses, so I published it agin...
>> I'm
>> looking for a database band report component. The goal is to build quickly
>> a
>> PDF report from SQL requests. An exemple is  Lazreport, this is a tutorial
>>   .
>>
>>
>>
>> --
>> View this message in context:
>> http://forum.world.st/Database-band-reports-tp4905523.html
>> Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
>>
>>
>
>



Re: [Pharo-users] Spec vs Brick vs Glamour vs Morphic vs WTF?

2016-07-08 Thread Brad Selfridge
Stephan, 

I watched your video. Very cool. I'm really interested in you code
generation process. What I'm working on will also require generating
Smalltalk classes and methods from a Spec GUI. I do not want to
auto-generate a GUI, but non-GUI classes only. It would be nice not to have
to reinvent the wheel again. If that's possible. 

I am still working on Pharo 4.0. Are there instructions on how to import
your code? Or, is it not available at this time? 

Thanks, 



-
Brad Selfridge
--
View this message in context: 
http://forum.world.st/Spec-vs-Brick-vs-Glamour-vs-Morphic-vs-WTF-tp4905178p4905581.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Re: [Pharo-users] Database band reports...

2016-07-08 Thread stepharo

Hi patrick

What is a band report?

Did you check Artefact because you can generate pdf with Artefact.

Stef



Hi,

My previous message stayed without responses, so I published it agin... I'm
looking for a database band report component. The goal is to build quickly a
PDF report from SQL requests. An exemple is  Lazreport, this is a tutorial
  .



--
View this message in context: 
http://forum.world.st/Database-band-reports-tp4905523.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.







Re: [Pharo-users] How do I debug: "There was an error while trying to install GitFileTree. Installation was cancelled." from Catalog Browser

2016-07-08 Thread stepharo
the problem is that for the shortcut we could to a spy in the menu. For 
other actions were


we do not have double ways to access them this is difficult to explain 
to the user how to do something


without being far too much boring for the one knowing.


Stef



Le 7/7/16 à 01:58, Ben Coman a écrit :

On Thu, Jul 7, 2016 at 2:33 AM, Dale Henrichs
 wrote:


On 07/06/2016 06:37 AM, Cyril Ferlicot Delbecque wrote:


On 06/07/2016 15:28, Dale Henrichs wrote:

Alistair,

Well thank you very much ... Those two menu items are very well hidden:)
Until you prompted me to look closely I
never even noticed that little icon...

Sometimes I think similar to how shortcut keys are notified the
first few times a tool is opened, you could get a red outline quickly
cycle through all the buttons when a tool is first opened to avoid
this sort of domestic blindness - but I'm not sure if it would be too
distracting/annoying.

cheers -ben



Is there a reason that those two menu items are not on the stack pane
menu?

Hi,

I already opened an issue some month ago about it. As you, I think it
should be in the stack pane context menu.

https://pharo.fogbugz.com/f/cases/17387/Missing-copy-stack-in-GTDebugger


Very Good ... at least now I know how to tell my users how to copy a stack
trace, because they don't have a clue how to do it either :)

Dale








Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Esteban Lorenzano
how do you declare this?

> On 08 Jul 2016, at 10:01, Merwan Ouddane  wrote:
> 
> I spoke too fast ^^'
> 
> struct Test {
>   void * ptr;
>   insigned long i;
>   insigned long j;
> }
> 
> Real size is 12, UFFI counts 24
> 
> Merwan
> 
> 
> Le 7 juil. 2016 10:02, "Merwan Ouddane"  > a écrit :
> Now it is working, thank you :)
> 
> On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano  > wrote:
> Hi,
> 
> > On 07 Jul 2016, at 01:54, Ben Coman  wrote:
> >
> > On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane  > > wrote:
> >> PS: for the first example, the alignment is not respected, the vec3
> >> structure is starting at 9 but uffi is fetching it at 5
> >
> > Hi Esteban,
> >
> > Is it possible to get a feature or a recipe to output the sizeof or
> > offset of fields in types as understood by the Image, and the same
> > from a C side - that could be used as the standard first step in
> > troubleshooting these kinds of issues ?
> 
> FFIExternalType class>>sizeOf: ?
> 
> but that does not works for complex type sizes (like FFIExternalArray).
> 
> I don’t know what the problem is here, because in my test (attached) it seems 
> to be working fine.
> maybe problem is on how the Vec3 array is created, it should be something 
> like this:
> 
> Vec3 class>>iinitialize
> self
> type: (FFIExternalType resolveType: 'double')
> size: 3
> 
> (is like that because FFITypeArray is more designed to be used creating 
> anonymous types than concretes, but well… )
> 
> in any case, it seems to be working for me.
> 
> Now, about the use…
> 
> doing this:
> 
> p := Position new.
> p v1 at: 1 put: 42.0.
> p v1 at: 1. “will print 0.0"
> 
> why? because it works making a copy (maybe it should work passing a segment, 
> as nested structs work, but this is how it works now).
> 
> What should work (at doesn’t) in this case is this:
> 
> v := Vector3 new.
> p := Position new.
> v at: 1 put: 42.0.
> p v1: v.
> p v1 at: 1. “will print 42.0"
> 
> it does not work because I made a mistake in field generation that I already 
> fixed… so you will need to update UFFI (and regenerate field accessors) ;)
> 
> also… I will provide a fix to make first case work… just later because now 
> I’m going to my french lessons :)
> 
> Esteban
> 
> ps: for future reference, a description of: install this, run that, is a lot 
> easier to understand the problem (is a case of “show me the code!”) :P
> 
> 
> 
> 
> >
> > cheers -ben
> >
> >>
> >>
> >> On 06/07/2016 17:55, Merwan Ouddane wrote:
> >>
> >> Another test:
> >> I replaced double by integer, for visibility...
> >> typedef struct vec3 {
> >> int data[3];
> >> } vec3;
> >>
> >> add a second vec3 to position:
> >>
> >> typedef struct position {
> >> int i;
> >> vec3 vec;
> >> vec3 vec2;
> >> } position;
> >>
> >> Now in pharo:
> >> Position >> fieldsDesc
> >> "self rebuildFieldAccessors"
> >>^ #(
> >>int i;
> >>Vec3 vec;
> >>Vec3 vec2;
> >> )
> >>
> >> The size returned for each stucture is 16 instead of 12 that because of the
> >> "8 byte alignment"
> >>
> >> Meaning that the "position" structure is corrupted.
> >>
> >> With this function:
> >>
> >>
> >> extern "C" void DLL_EXPORT fillStruct(position *position)
> >> {
> >>position -> i = 19;
> >>(position -> vec).data[0] = 1;
> >>(position -> vec).data[1] = 2;
> >>(position -> vec).data[2] = 3;
> >>(position -> vec2).data[0] = 1;
> >>(position -> vec2).data[1] = 2;
> >>(position -> vec2).data[2] = 3;
> >> }
> >>
> >> We will get:
> >> position i == 19
> >> position vec at: 1 == 1
> >> position vec2 at: 1 == 2
> >>
> >>
> >> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado  >> > wrote:
> >>>
> >>> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
> >>> will check with mingw.
> >>>
> >>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane  >>> >:
> 
>  Using codeblocks, mine are:
> 
>  mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>  mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>  -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll  obj\Release\main.o  -o
>  bin\Release\Test.dll -s -m32
> 
> 
>  On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane   >
>  wrote:
> >
> > I am not moving from another plateform :/
> >
> > I tried it in pharo 6 and I it didn't work either.
> >
> > It could be my dll. What is your compilation line for the dll ?
> >
> > Thanks you,
> > Merwan
> >
> > On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado  > >
> > wrote:
> >>
> >> Hi Merwan,
> >>
> >> I tested this on Pharo 6 and it is working in Windows. However, in 32
> >> bits Window doubles have an 8 byte alignment, unlike Linux

Re: [Pharo-users] [UFFI] Using a nested structure

2016-07-08 Thread Merwan Ouddane
I spoke too fast ^^'

struct Test {
  void * ptr;
  insigned long i;
  insigned long j;
}

Real size is 12, UFFI counts 24

Merwan

Le 7 juil. 2016 10:02, "Merwan Ouddane"  a écrit :

> Now it is working, thank you :)
>
> On Thu, Jul 7, 2016 at 8:42 AM, Esteban Lorenzano 
> wrote:
>
>> Hi,
>>
>> > On 07 Jul 2016, at 01:54, Ben Coman  wrote:
>> >
>> > On Thu, Jul 7, 2016 at 12:58 AM, Merwan Ouddane <
>> merwanoudd...@gmail.com> wrote:
>> >> PS: for the first example, the alignment is not respected, the vec3
>> >> structure is starting at 9 but uffi is fetching it at 5
>> >
>> > Hi Esteban,
>> >
>> > Is it possible to get a feature or a recipe to output the sizeof or
>> > offset of fields in types as understood by the Image, and the same
>> > from a C side - that could be used as the standard first step in
>> > troubleshooting these kinds of issues ?
>>
>> FFIExternalType class>>sizeOf: ?
>>
>> but that does not works for complex type sizes (like FFIExternalArray).
>>
>> I don’t know what the problem is here, because in my test (attached) it
>> seems to be working fine.
>> maybe problem is on how the Vec3 array is created, it should be something
>> like this:
>>
>> Vec3 class>>iinitialize
>> self
>> type: (FFIExternalType resolveType: 'double')
>> size: 3
>>
>> (is like that because FFITypeArray is more designed to be used creating
>> anonymous types than concretes, but well… )
>>
>> in any case, it seems to be working for me.
>>
>> Now, about the use…
>>
>> doing this:
>>
>> p := Position new.
>> p v1 at: 1 put: 42.0.
>> p v1 at: 1. “will print 0.0"
>>
>> why? because it works making a copy (maybe it should work passing a
>> segment, as nested structs work, but this is how it works now).
>>
>> What should work (at doesn’t) in this case is this:
>>
>> v := Vector3 new.
>> p := Position new.
>> v at: 1 put: 42.0.
>> p v1: v.
>> p v1 at: 1. “will print 42.0"
>>
>> it does not work because I made a mistake in field generation that I
>> already fixed… so you will need to update UFFI (and regenerate field
>> accessors) ;)
>>
>> also… I will provide a fix to make first case work… just later because
>> now I’m going to my french lessons :)
>>
>> Esteban
>>
>> ps: for future reference, a description of: install this, run that, is a
>> lot easier to understand the problem (is a case of “show me the code!”) :P
>>
>>
>>
>>
>> >
>> > cheers -ben
>> >
>> >>
>> >>
>> >> On 06/07/2016 17:55, Merwan Ouddane wrote:
>> >>
>> >> Another test:
>> >> I replaced double by integer, for visibility...
>> >> typedef struct vec3 {
>> >> int data[3];
>> >> } vec3;
>> >>
>> >> add a second vec3 to position:
>> >>
>> >> typedef struct position {
>> >> int i;
>> >> vec3 vec;
>> >> vec3 vec2;
>> >> } position;
>> >>
>> >> Now in pharo:
>> >> Position >> fieldsDesc
>> >> "self rebuildFieldAccessors"
>> >>^ #(
>> >>int i;
>> >>Vec3 vec;
>> >>Vec3 vec2;
>> >> )
>> >>
>> >> The size returned for each stucture is 16 instead of 12 that because
>> of the
>> >> "8 byte alignment"
>> >>
>> >> Meaning that the "position" structure is corrupted.
>> >>
>> >> With this function:
>> >>
>> >>
>> >> extern "C" void DLL_EXPORT fillStruct(position *position)
>> >> {
>> >>position -> i = 19;
>> >>(position -> vec).data[0] = 1;
>> >>(position -> vec).data[1] = 2;
>> >>(position -> vec).data[2] = 3;
>> >>(position -> vec2).data[0] = 1;
>> >>(position -> vec2).data[1] = 2;
>> >>(position -> vec2).data[2] = 3;
>> >> }
>> >>
>> >> We will get:
>> >> position i == 19
>> >> position vec at: 1 == 1
>> >> position vec2 at: 1 == 2
>> >>
>> >>
>> >> On Tue, Jul 5, 2016 at 3:12 PM, Ronie Salgado 
>> wrote:
>> >>>
>> >>> I compiled the DLL using Visual Studio 2015 Community Edition. Later I
>> >>> will check with mingw.
>> >>>
>> >>> 2016-07-05 14:58 GMT+02:00 Merwan Ouddane :
>> 
>>  Using codeblocks, mine are:
>> 
>>  mingw32-g++.exe -m32 -DBUILD_DLL -c main.cpp -o obj\Release\main.o
>>  mingw32-g++.exe -shared -Wl,--output-def=bin\Release\libTest.def
>>  -Wl,--out-implib=bin\Release\libTest.a -Wl,--dll
>> obj\Release\main.o  -o
>>  bin\Release\Test.dll -s -m32
>> 
>> 
>>  On Tue, Jul 5, 2016 at 2:52 PM, Merwan Ouddane <
>> merwanoudd...@gmail.com>
>>  wrote:
>> >
>> > I am not moving from another plateform :/
>> >
>> > I tried it in pharo 6 and I it didn't work either.
>> >
>> > It could be my dll. What is your compilation line for the dll ?
>> >
>> > Thanks you,
>> > Merwan
>> >
>> > On Tue, Jul 5, 2016 at 2:14 PM, Ronie Salgado 
>> > wrote:
>> >>
>> >> Hi Merwan,
>> >>
>> >> I tested this on Pharo 6 and it is working in Windows. However, in
>> 32
>> >> bits Window doubles have an 8 byte alignment, unlike Linux where
>> they have a
>> >> 4 byte alignment.
>> >>
>> >> Can you try doing the following before performing the ffi call in
>> >> Windo

[Pharo-users] Database band reports...

2016-07-08 Thread patrick71
Hi,

My previous message stayed without responses, so I published it agin... I'm
looking for a database band report component. The goal is to build quickly a
PDF report from SQL requests. An exemple is  Lazreport, this is a tutorial
  .



--
View this message in context: 
http://forum.world.st/Database-band-reports-tp4905523.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.