Welcome, Guest
Please Login or Register.    Lost Password?

Calendar's name and missing handlers
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: Calendar's name and missing handlers
#17454
Re:Calendar's name and missing handlers 2 Years ago  
anoob wrote:
At the moment, this is impossible,...
Yes, I knew it.
Therefore I offered new event handlers
Wasly
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Moscow, Russia Birthday: 03/23
Last Edit: 2012/07/12 02:20 By Wasly.
The administrator has disabled public write access.
 
#17458
Re:Calendar's name and missing handlers 2 Years ago  
There is something you can do, but it's incomplete, so it won't work.

With Rainlendar_SetOption(path, name, value) you can using (e.g.):
Code:

[Calendars/Calendar1]
Name=Default
Plugin=iCalendar Format
Enabled=1
ReadOnly=0
SuppressAlarms=0
DefaultAlarm=
VisualCategory=
TimeOffset=0


You will need to look every calendar, compare with the one you want to change (using Rainlendar_GetCalendars), then using Rainlendar_SetOption("Calendars/Calendar" .. iNumber, "Name", strNewName) you can change the name. But, the path is getted from:

Code:

[iCalendar\ Format/Default]
Filename=C:\\Users\\[USER NAME]\\.rainlendar2\\Default.ics
Monitor=0


And there's no way to change "iCalendar\ Format/Default" to "iCalendar\ Format/NEWNAME" (at least what I suppose) or create, change or remove any other path.

Unless... you could persuade Rainy to add a function to rename calendars or to add/change/remove paths...
Jorge_Luis
Platinum Boarder
Posts: 786
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#17460
Re:Calendar's name and missing handlers 2 Years ago  
Wasly wrote:anoob wrote:At the moment, this is impossible,...
Yes, I knew it.
Therefore I offered new event handlers

I am confused, if Rainlendar is not running, how to trigger and execute handler ?
anoob
Platinum Boarder
Posts: 494
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: TaiChung, Taiwan, R.O.C. Birthday: 02/12
The administrator has disabled public write access.
I couldn't speak English! This skin released to Customize.org(Do you want it? Click Picture) Please contact me if interested: jhg5702@gmail.com
 
#17462
Re:Calendar's name and missing handlers 2 Years ago  
I don't know which is the Wasly's idea, but I know that many (I can't count them) apps has an OnClose or OnClosing function (at least, this exists on VB .NET and C .NET). It could be used to make a last change before closing the app, e.g., save a file, launch an alert (with another app).
There will need to be captured the close event and see if any handler is setted. If setted, run the function and close, if not, close directly.

---

As a workaround for the "calendar enabled", "calendar disabled" event, you (Wasly) can create a 1 sec. timer to keep a record of enabled/disabled calendars. If one of them change it status, launch a second function.
Jorge_Luis
Platinum Boarder
Posts: 786
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#17473
Re:Calendar's name and missing handlers 2 Years ago  
@Wasly: Can you give some more details what exactly are you trying to accomplish (i.e. why do you want to rename the calendar and know when Rainlendar closes)? The notifications for the closing and enabling/disabling the calendar should be quite easy to implement but renaming calendars probably requires more work.
Rainy
Moderator
Posts: 5914
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#17478
Re:Calendar's name and missing handlers 2 Years ago  
Rainy wrote:
The notifications for the closing and enabling/disabling the calendar should be quite easy to implement
Yes, these notifications are very necessary!

...but renaming calendars probably requires more work.
I wanted to mark a calendars in such a way. But if it's impossible now I'll find another way.

Can you give some more details what exactly are you trying to accomplish (i.e. why do you want to rename the calendar and know when Rainlendar closes)?
1. Renaming the calendar. It was just question and no more.
2. 'Initialize' event exists. Even 'Power resume' event exists. But 'Quit' event doesn't exists.
If Rainlendar closes all the event handlers are just dropped and the script does nothing.
Of course this event is necessary that the script could execute some actions.
Wasly
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Moscow, Russia Birthday: 03/23
Last Edit: 2012/07/13 10:58 By Wasly.
The administrator has disabled public write access.
 
Go to topPage: 12
get the latest posts directly to your desktop