[Newbies] 24 hours expiration? PDF? Using Alias?

Matthias Berth matthias.berth at googlemail.com
Wed Feb 10 09:28:39 UTC 2010

Hi Van,

On Wed, Feb 10, 2010 at 9:48 AM, Van Upboy <van.upboy at gmail.com> wrote:
> Hello all,
> 1. Some data 'expires' after 24 hours. So when the object is initialized, I
> do:
>    creationDate: Date today.
> And there is a method to check if the data is expired, like this:
>    ^self creationDate > (creationDate addDays: 1)
> But when thinking it over, I'm wonder what happens when the object is
> created at 23:59, and at 00:01 I check this property. Will it be 'expired'?
> Or should I use a Time object instead? The problem with that is that time
> only runs daily from 00:00 - 23:59, so using Time alone I also can't check
> the 24 hours, or can I?

You can look at the internals of a Date object by doing

  Date today inspect.

That will open an inspector window on the date object. Date is a time
span, represented as a point in time (midnight) + a duration of 24
hours. For your application, I guess you want to use a DateAndTime,

  DateAndTime now

> 2. When I was debugging this, I wanted to look up the Date object in de OB
> System Browser. But I can't find it the object. It is probably hidden
> somewhere in a package, but I don't know which one. What is the best way to
> search for an object?

Right-click in the packages pane, then choose "Find class".
Alternatively, you can execute (Do-it, Command-D).

  Date browse.

BTW, you're looking for the Date _class_, right?

> 3. I would like to create a pdf file. What is the best way to do it? I asked
> a question about where to find the SPDF library, but I didn't get an answer.
> Are there other options?

There is an FAQ about creating PDFs with seaside on www.seaside.st

> 4. I'm using an alias (Van Upboy) to access this list. What is common
> practice? Do ppl use their real names? The problem I have with that is that
> I don't like the idea that all these mailings will end up on the Internet
> with my name, so I rather not use it. The problem with an alias is that
> would rather use my real name, it is more personal.

I guess it's your choice. Most people use real names, but I havent
seen anybody complain about pseudonyms. BTW, I find it more convenient
to write several short emails, one for each topic.

> Any help is appreciated, thanks!

You're welcome!


More information about the Beginners mailing list