[squeak-dev] ClockAndCalendarMorphs project on SqueakSource
Lou at Keystone-Software.com
Tue Jan 30 21:02:56 UTC 2018
On Tue, 30 Jan 2018 15:04:24 -0500, Ron Teitelbaum <ron at usmedrec.com> wrote:
>Just for fun, you can get user lat and long from the resulting dictionary
>by using the following:
> (WebClient httpGet: 'http://freegeoip.net/json/', (WebClient httpGet: '
>https://api.ipify.org') content) content
Very interesting. Is there code to parse the lat and long from the string? I don't think I
will incorporate it into the morph but I wouldn't mind supplying it in a comment for a user to
As is often the case, I have already made some changes to the code. I figured out a way to
have the clock face picture be a local file or a URL to a file on the web. So something like
this would work:
c := ClockImageMorph clockFace:
I think I will wait a day or two before uploading a new version.
>All the best,
>On Tue, Jan 30, 2018 at 2:40 PM, Louis LaBrunda <Lou at keystone-software.com>
>> I have created and uploaded my ClockAndCalendarMorphs project on
>> SqueakSource. It depends upon
>> another of my projects, KscAstroDataApp. KscAstroDataApp is used to
>> calculate sunrise and
>> sunset times displayed on the clock and calendar. Latitude and longitude
>> are required for the
>> sunrise and sunset calculations. If you don't supply them, no attempt
>> will be made to do the
>> calculations. In that case the KscAstroDataApp package should not be
>> needed. Anyway it is
>> probably best to download it too.
>> I'm new to SqueakSource and I'm not sure I defined the dependency
>> correctly. If not, I will
>> fix it. Please let me know if you have any problems. The code below will
>> get you started
>> testing/playing with the clock morph. The latitude & longitude are for my
>> The #initialize method of ClockImageMorph has a lot of comments about the
>> options of the clock.
>> Have fun.
>> | c |
>> " c := ClockImageMorph clockFace: 'path2picture.jpg'."
>> c := ClockImageMorph new.
>> " c setTestMode."
>> c desiredExtent: 1200 at 800.
>> c setIncludeCalendar.
>> c latitude: 40.66296 longitude: -74.535398.
>> " c beTwentyFourHourClock."
>> c setUseArabicNumerals.
>> " c setUseRomanNumerals."
>> c setAddCirclesAndTicks.
>> " c setUseFancyHourHand.
>> c setUseFancyMinuteHand.
>> c setUseFancySecondHand."
>> " c beFullScreen."
>> c setShowDateTimeInfo.
>> c numberColor: Color blue; circleColor: Color blue; tickColor:
>> Color blue.
>> c hourHandColor: Color blue; minuteHandColor: Color blue;
>> secondHandColor: Color blue.
>> c calendarTextColor: Color blue.
>> c open.
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
Keystone Software Corp.
More information about the Squeak-dev