Simple calendar app

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Simple calendar app

Post by PeterS »

I've been using the last of my furlough time to create a simple app for displaying ICS (iCal) files in a calendar.

It is Pure Pascal with ObjectGEM which I have never done much with so it is very much an Alpha at this time.

https://github.com/ps68060/GEMiCal

It does have a slight memory leak but I have also noticed that the PP ide has a leak as well.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I have uploaded a release to github:

https://github.com/ps68060/GEMiCal/releases

No new features in recent builds I have been improving the code structure to make it easier to add more features.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I would like to change the events from text to buttons, rather like hyperlinks. This is so the event can be opened and to use bubble help.

I can't find an example of adding buttons to a window in objectGem.

Also I don't know if I can create a button in the rsc and then make lots of copies of it in code.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I did get my wish, I had a chance to do a bit of work on GEMiCal.

It's still WIP but there is now a gemical.cnf file that has lat, long and utcoffset values. It uses these to calculate sunrise and sunset times for the current date (only the current date).

I will do another release on GitHub after a bit more testing and tinkering.
User avatar
shoggoth
Nature
Nature
Posts: 1117
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Simple calendar app

Post by shoggoth »

Hey what a nice project! I gave it a spin on my EmuTOS Hatari setup, and it looks really promising. I'll test it on my Vampire/MyAES setup when I've got some Atari time again. Nice work!
Ain't no space like PeP-space.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

Thanks, there is a bit of a memory leak, probably something I'm missing in objectGEM.

It is very much a WIP but all feedback is gladly received.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I think the memory leak is caused by Egale. When it is running, even in the background, then pulling down any menu causes memory leaks.

I have made a GEMiCal release 0.3 on github, I wanted to get something out before Xmas.

https://github.com/ps68060/GEMiCal/releases
Last edited by PeterS on Thu Dec 23, 2021 8:59 am, edited 1 time in total.
masteries
Captain Atari
Captain Atari
Posts: 332
Joined: Thu Jul 16, 2015 4:05 pm

Re: Simple calendar app

Post by masteries »

Due to the screenshot resolution and colour depth,

It is intended for plain ST machines, TT or Falcon ones?
The inner mastery...

Metal Slug for Atari STE: https://www.youtube.com/watch?v=FMrdjrrtxWo
https://www.youtube.com/watch?v=hgW6Fc5Jli0

Low Cost Hard Disk for Atari ST/E (now it reaches 650 KB/s reading and 375 KB/s writing):
https://www.atari-forum.com/viewtopic.php?f=33&t=40018
https://www.youtube.com/watch?v=Qn9IwKo-EoA
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I have written it on my Milan. It probably won't look good on an ST, I've not tried it. It should be ok on a Falcon but I don't know what the resolution limits are. I think the current window size is 800x680.

I suppose it should get the screen resolution and set the window size so it fits on the screen at the very least. There is no colour used at the moment. The UI is a bit crude, it doesn't do any scaling. I had to write a lot of the low level code to read ICS files and even trig code to get the sunrise calcs to work so the UI hasn't had a lot of input.

I am looking for functionality rather than compatibility.
stormy
Atari God
Atari God
Posts: 1137
Joined: Tue Jan 26, 2016 12:39 pm

Re: Simple calendar app

Post by stormy »

Will test it out on my machines that have graphics cards, thank you :)
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

Has anyone tried it in Aranym ?

I don't use it but I did a quick Aranym-Afros install on windows 10 and gemical crashes as the window opens.
User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 13183
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Simple calendar app

Post by wongck »

Tried on my CT63 and Aranym. unfortunately it just hang on both.
Guess not what you wanted to hear.
The menu and window frames are drawn and then it hangs.
Happens on Mint and TOS.

This is in TOS
gemical.jpg
You do not have the required permissions to view the files attached to this post.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff that are no longer for sale due to them over 30 years old - click here for list
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

Thanks I will look into it after NY.
joska
Hardware Guru
Hardware Guru
Posts: 5183
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Simple calendar app

Post by joska »

It does work on my Milan with MiNT/XaAES and memory protection enabled. However, it appears to send an AV-message to the desktop when it starts, with a pointer to private memory. This kills the desktop. To fix this you must either set the protection flag for gemical to "Readable" or properly allocate the AV buffer as global using Mxalloc.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I think the v3 upload was corrupted, v2 works under Aranym.

It's written in Pascal so I am not sure mxalloc is relevant.
joska
Hardware Guru
Hardware Guru
Posts: 5183
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Simple calendar app

Post by joska »

I don't know Pure Pascal, but unless it has some specific functionality to allocate global memory you need to use Mxalloc for correct use of the AV protocol.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I'm not using AV protocol as far as I'm aware.

I suspect if you try v2 you won't see any AV protocol.

How did you detect this btw ?
joska
Hardware Guru
Hardware Guru
Posts: 5183
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: Simple calendar app

Post by joska »

The desktop is killed due to a memory violation unless gemical's protection flag is set to "Readable" or "Global". This is usually caused by some application sending the desktop an AV-message with a pointer to private memory, so I just assumed that this was the case here as well.
Jo Even

VanillaMiNT - Falcon060 - Milan060 - Falcon040 - MIST - Mega STE - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64
ThorstenOtto
Atari God
Atari God
Posts: 1836
Joined: Sun Aug 03, 2014 5:54 pm

Re: Simple calendar app

Post by ThorstenOtto »

PeterS wrote: Sat Jan 01, 2022 6:16 pm I'm not using AV protocol as far as I'm aware.
You are using ObjectGEM, and that uses AV-Protokoll quite a lot.
User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 13183
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: Simple calendar app

Post by wongck »

So v2 works.
However, it seem to repeating the an entries.

I am using the ICS from here.
gemical.jpg
You do not have the required permissions to view the files attached to this post.
My Stuff: FB/Falcon CT63 CTPCI ATI RTL8139 USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff that are no longer for sale due to them over 30 years old - click here for list
Lostboysix
Atari freak
Atari freak
Posts: 59
Joined: Thu Sep 24, 2009 11:39 pm

Re: Simple calendar app

Post by Lostboysix »

Hi Peter,

it looks really nice. A great start.
Can confirm the repeating entries though.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I don't see repeating entries. I wonder if it's a timezone thing ? I haven't addressed timezones yet.
Lostboysix
Atari freak
Atari freak
Posts: 59
Joined: Thu Sep 24, 2009 11:39 pm

Re: Simple calendar app

Post by Lostboysix »

Hi Peter,

retested it on MagicPC and latest (publicly available) Aranym (windows version). Gemcal is working fine on both.
Issue: I tried different ICS files, but they aren´t imported, only the one used by wongck is working and with this duplicates are shown.
Maybe you can try it with "our" ICS files and check if you can duplicate the issue.

https://www.feiertage-deutschland.de/co ... wnload.php
https://www.ferienwiki.de/exports/de#google_vignette
You do not have the required permissions to view the files attached to this post.
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

Ics files are very complex and Apple and Microsoft versions have some different interpretations.

Gemical only covers very basic time and date start and end and not much else. It is Minimum Viable Product.

I will have a look at the files you posted.

Ps
It's weird seeing my app on someone else's system :D
PeterS
Captain Atari
Captain Atari
Posts: 492
Joined: Fri Nov 09, 2007 1:53 pm
Location: England, GB

Re: Simple calendar app

Post by PeterS »

I renamed the files to nice 8+3 friendly ones and opened Gemical.

It looks like the Baden-Württemberg one has opened but the feiertage-deutschland one didn't get processed correctly.

A quick look at the file and my immediate guess is the missing dtend tag is the issue.
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “C / PASCAL etc.”