Re: [Pharo-users] DateTime now nanos

2020-06-14 Thread jtuc...@objektfabrik.de

Jeff,

I can't comment on the problem per se, as I am not a frequent Pharo user.

But whenever something would be all over the place, I'd suggest thinking 
about wrapping the problem into its own class, so that your point in 
time is not an instance of DateAndTime but one of your wrapper class. 
This wrapper could be a subclass (I wouldn't recommend that) or some 
kind of facade for a DateAndTime specialized for your needs. You can 
then implement the droppoing of Nanos and whatever else may be needed 
for your SQLite handling in this specialized class and therefor avoid 
forgetting to do this on one of the many places in your application.


Just an idea to get a handle on your problem, maybe not worth much more 
than a few cents.


Joachim


Am 15.06.20 um 06:44 schrieb Jeff Gray:

Hi all.
In Playground I write these lines:

Transcript cr; show: DateAndTime now printString.
Transcript cr; show: (DateAndTime fromSeconds: (DateAndTime now asSeconds))
printString.

and in the Transcript window I get these results:

2020-06-15T14:33:06.630367+10:00
2020-06-15T14:33:06+10:00

I was expecting these two to be the same.

I was hoping to use DateAndTime fromSeconds: and aDateAndTime asSeconds to
convert a DateAndTime to/from a number in order to store it in SQLite, but I
don't like the way the nanos are dropped using this method.
It's all good if I remember to call DateAndTime now truncated, and drop the
nanos myself, but that might be all over the place in my application.

Instead, is there a better way to convert a DateAndTime to and from a
number?



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html




--
---
Objektfabrik Joachim Tuchel  mailto:jtuc...@objektfabrik.de
Fliederweg 1 http://www.objektfabrik.de
D-71640 Ludwigsburg  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1





[Pharo-users] DateTime now nanos

2020-06-14 Thread Jeff Gray
Hi all.
In Playground I write these lines:

Transcript cr; show: DateAndTime now printString.
Transcript cr; show: (DateAndTime fromSeconds: (DateAndTime now asSeconds))
printString.

and in the Transcript window I get these results:

2020-06-15T14:33:06.630367+10:00
2020-06-15T14:33:06+10:00

I was expecting these two to be the same.

I was hoping to use DateAndTime fromSeconds: and aDateAndTime asSeconds to
convert a DateAndTime to/from a number in order to store it in SQLite, but I
don't like the way the nanos are dropped using this method.
It's all good if I remember to call DateAndTime now truncated, and drop the
nanos myself, but that might be all over the place in my application.

Instead, is there a better way to convert a DateAndTime to and from a
number?  



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html



Re: [Pharo-users] Pharo 8.0 bug

2020-06-14 Thread ducasse
Thanks Sebastian 

We are now since a couple of years managing Pharo via github. 
I can do a Pull Request with you changes. 
Now it may be a good occasion for you to practice. 
Let me know if you want to try by yourself. 

https://github.com/pharo-project/pharo/wiki/Contribute-a-fix-to-Pharo 


S.

Re: [Pharo-users] Pharo 8.0 bug

2020-06-14 Thread Sebastian Heidbrink via Pharo-users
--- Begin Message ---

Thank you Serge and Ben,

I am sorry, I used google and this came up first.
Sure, I can raise the issue on Github.

Thanks again!
Sebastian


On 2020-06-14 4:31 a.m., Ben Coman wrote:

hi Sebastian,

Thanks for taking the time to report your issue.
Note that Fogbugz is no longer used for issue tracking.
Issues are now tracked at... 
https://github.com/pharo-project/pharo/issues

Could you try creating your issue there?

cheers -ben

On Sun, 14 Jun 2020 at 13:35, Sebastian Heidbrink via Pharo-users 
mailto:pharo-users@lists.pharo.org>> wrote:


Hello,

I am unfortunately not able to register at https://pharo.fogbugz.com/
because "/issues-register-service not found".

This is why I post the following bug here:

I attached a test case and how that somebody can recreate it.

I just downloaded a Pharo 8.0 64Bit image with the pharolauncher to a
Windows 10 machine.

Depending on my actions within the dev environment the test case
passes
or fails in the last two asserts.

What one has to do is just run the test and see if it fails the
first time.

If it does not fail then:

1. Remove the comment in the test method.

2. Within the System Browser navigate to the ValueHolderTestClass and
back to ValueHolderTestCase again.

3. Rerun the test

With a little back and forth you will eventually see the last asserts
fails with

"TestFailure: Got '13' instead for 'Test3' "


It would be highly appreciated if somebody with access to
pharo.fogbugz.com  would find the time
to try this and upload the
information provided.


Here the full info about the image:
Pharo 8.0.0
Build information:
Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f
(64 Bit)


Thank you!

Cheers!

Sebastian




--- End Message ---


Re: [Pharo-users] Willow-Seaside serving static files

2020-06-14 Thread Esteban Maringolo
The handler at /files (WAFileManager?), is set to explicitly forbid listing
of files.

El dom., 14 de junio de 2020 07:33, Tomaž Turk 
escribió:

> Hi, I added an image to a subclass of WAFileLibrary to serve it as a
> static file from within Pharo. Everything seems fine, except that the
> /files URL is not accessible:
>
> Error: you are forbidden to access "/files".
>
> and source view displays
>
> /files/EMStaticFiles/window.png not found
>
> if I click on image's URL.
>
> I loaded Seaside as a Willow's dependency.
>
> Best wishes,
> Tomaz
>
>
>
>
>


Re: [Pharo-users] Pharo 8.0 bug

2020-06-14 Thread Ben Coman
hi Sebastian,

Thanks for taking the time to report your issue.
Note that Fogbugz is no longer used for issue tracking.
Issues are now tracked at... https://github.com/pharo-project/pharo/issues
Could you try creating your issue there?

cheers -ben

On Sun, 14 Jun 2020 at 13:35, Sebastian Heidbrink via Pharo-users <
pharo-users@lists.pharo.org> wrote:

> Hello,
>
> I am unfortunately not able to register at https://pharo.fogbugz.com/
> because "/issues-register-service not found".
>
> This is why I post the following bug here:
>
> I attached a test case and how that somebody can recreate it.
>
> I just downloaded a Pharo 8.0 64Bit image with the pharolauncher to a
> Windows 10 machine.
>
> Depending on my actions within the dev environment the test case passes
> or fails in the last two asserts.
>
> What one has to do is just run the test and see if it fails the first time.
>
> If it does not fail then:
>
> 1. Remove the comment in the test method.
>
> 2. Within the System Browser navigate to the ValueHolderTestClass and
> back to ValueHolderTestCase again.
>
> 3. Rerun the test
>
> With a little back and forth you will eventually see the last asserts
> fails with
>
> "TestFailure: Got '13' instead for 'Test3' "
>
>
> It would be highly appreciated if somebody with access to
> pharo.fogbugz.com would find the time to try this and upload the
> information provided.
>
>
> Here the full info about the image:
> Pharo 8.0.0
> Build information:
> Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (64
> Bit)
>
>
> Thank you!
>
> Cheers!
>
> Sebastian
>
>
>


[Pharo-users] Willow-Seaside serving static files

2020-06-14 Thread Tomaž Turk
Hi, I added an image to a subclass of WAFileLibrary to serve it as a 
static file from within Pharo. Everything seems fine, except that the 
/files URL is not accessible:


Error: you are forbidden to access "/files".

and source view displays

/files/EMStaticFiles/window.png not found

if I click on image's URL.

I loaded Seaside as a Willow's dependency.

Best wishes,
Tomaz





Re: [Pharo-users] Pharo 8.0 bug

2020-06-14 Thread serge . stinckwich
Hi Sebastian,

We are not using fogbugz since a long time for bug report. You can submit yr 
issue on Pharo github issue tracker:
https://github.com/pharo-project/pharo/issues

Regards

Sent from my iPhone

> On 14 Jun 2020, at 13:35, Sebastian Heidbrink  wrote:
> 
> Hello,
> 
> I am unfortunately not able to register at https://pharo.fogbugz.com/ because 
> "/issues-register-service not found".
> 
> This is why I post the following bug here:
> 
> I attached a test case and how that somebody can recreate it.
> 
> I just downloaded a Pharo 8.0 64Bit image with the pharolauncher to a Windows 
> 10 machine.
> 
> Depending on my actions within the dev environment the test case passes or 
> fails in the last two asserts.
> 
> What one has to do is just run the test and see if it fails the first time.
> 
> If it does not fail then:
> 
> 1. Remove the comment in the test method.
> 
> 2. Within the System Browser navigate to the ValueHolderTestClass and back to 
> ValueHolderTestCase again.
> 
> 3. Rerun the test
> 
> With a little back and forth you will eventually see the last asserts fails 
> with
> 
> "TestFailure: Got '13' instead for 'Test3' "
> 
> 
> It would be highly appreciated if somebody with access to pharo.fogbugz.com 
> would find the time to try this and upload the information provided.
> 
> 
> Here the full info about the image:
> Pharo 8.0.0
> Build information: 
> Pharo-8.0.0+build.1124.sha.0932da82f08175e906b0e2a8052120c823374e9f (64 Bit)
> 
> 
> Thank you!
> 
> Cheers!
> 
> Sebastian
> 
> 
> 
>