Welcome, Guest
Please Login or Register.    Lost Password?

New context menu button?
(1 viewing) (1) Guest
Go to bottomPage: 12345
TOPIC: New context menu button?
#10722
Re:New context menu button? 4 Years, 7 Months ago  
Can your post also the Private_SetIcalProperty() function?
Rainy
Moderator
Posts: 5804
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10724
Re:New context menu button? 4 Years, 7 Months ago  
Hmpf, ähh, yeah, but it's the default function which YOU delivered with rainlendar as far as I understand!?

Code:

function Private_SetIcalProperty(strComponent, strProperty, strValue)
  s, e = string.find(strComponent, strProperty .. ":.-\r\n")
  if (s and e) then
    -- The property was found -> replace the value
    return string.gsub(strComponent, strProperty .. ":(.-)\r\n", strProperty .. ":" .. strValue .. "\r\n")
  else
    -- The property is missing -> create a new one
    return string.gsub(strComponent, "END:", strProperty .. ":" .. strValue .. "\r\nEND:")
  end
end



it's not my own function...
yoodilo
Expert Boarder
Posts: 103
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2009/08/28 13:09 By yoodilo.
The administrator has disabled public write access.
 
#10734
Re:New context menu button? 4 Years, 7 Months ago  
The Private_SetIcalProperty() replaces the existing property so you cannot use it to add new properties. You need to create a new function which just adds the property to the event.
Rainy
Moderator
Posts: 5804
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10735
Re:New context menu button? 4 Years, 7 Months ago  
Äh and why is it than working for ADDING (not replacing) ignore-dates for recurrent dates as you told me to do in this post before:

www.rainlendar.net/cms/index.php?option=com_kunena&Itemid=42&func=view&catid=6&id=10515&limit=6&limitstart=6#10605

(in a)).
yoodilo
Expert Boarder
Posts: 103
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10736
Re:New context menu button? 4 Years, 7 Months ago  
The "EXDATE" works because it will be converted to "EXDATE;VALUE=DATE" after the changes are applied to the event so the Private_SetIcalProperty() function doesn't find an existing property to replace when it is changed a second time.
Rainy
Moderator
Posts: 5804
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#10737
Re:New context menu button? 4 Years, 7 Months ago  
Hm ok, I understand. Would this be enough:

Code:


function Private_SetIcalProperty(strComponent, strProperty, strValue)
  return string.gsub(strComponent, "END:", strProperty .. ":" .. strValue .. "\r\nEND:")
end



since I don't need a check, just adding it?
yoodilo
Expert Boarder
Posts: 103
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12345
get the latest posts directly to your desktop