Thread Tools Display Modes
02-02-12, 10:24 AM   #1
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Calendar Invite Pending

Hi forums :-)
I am looking for a neat little code that, instead of the calendar-icon keeps blinking all the time; then it should just show the (?).
Hope you know what I mean and call help.
Have a great day.
  Reply With Quote
02-03-12, 01:09 AM   #2
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by laukond View Post
Hi forums :-)
I am looking for a neat little code that, instead of the calendar-icon keeps blinking all the time; then it should just show the (?).
Hope you know what I mean and call help.
Have a great day.
Are you looking for a way to just disable the pulsing glow animation?

Edit: Something simple like this should technically do the trick:
lua Code:
  1. local f = CreateFrame("frame");
  2. f:RegisterEvent("CALENDAR_UPDATE_PENDING_INVITES");
  3. f:RegisterEvent("PLAYER_ENTERING_WORLD");
  4. f:SetScript("OnEvent", function(self,event,...)
  5.     if GameTimeFrame then
  6.         if GameTimeCalendarInvitesGlow then
  7.             GameTimeCalendarInvitesGlow:Show() = GameTimeCalendarInvitesGlow:Hide()
  8.             GameTimeCalendarInvitesGlow:Hide()
  9.         end
  10.     end
  11. end);

Last edited by suicidalkatt : 02-03-12 at 01:40 AM.
  Reply With Quote
02-03-12, 03:17 AM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
This line is not valid Lua:
Code:
GameTimeCalendarInvitesGlow:Show() = GameTimeCalendarInvitesGlow:Hide()
It will first evaluate the right side of the equation, and come up with a nil value (since the Hide method on a frame does not return any values). Then it will try to assign that value to the left side of the equation, but since the left side is not a variable (but also a nil value) it will fail and trigger a Lua error. It's bascially the same as trying to do:
Code:
4 = 6
I think you meant to do this:
Code:
GameTimeCalendarInvitesGlow.Show = GameTimeCalendarInvitesGlow.Hide
... which will evaluate the right side to come up with the actual function that runs when you call the "Hide" method on the frame, and assign it to the "Show" method name on the same name, so that when you do call the "Show" method (or more likely, Blizzard's code calls it) you call the "Hide" method instead.
  Reply With Quote
02-03-12, 03:28 AM   #4
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
This line is not valid Lua:
Code:
GameTimeCalendarInvitesGlow:Show() = GameTimeCalendarInvitesGlow:Hide()
It will first evaluate the right side of the equation, and come up with a nil value (since the Hide method on a frame does not return any values). Then it will try to assign that value to the left side of the equation, but since the left side is not a variable (but also a nil value) it will fail and trigger a Lua error. It's bascially the same as trying to do:
Code:
4 = 6
I think you meant to do this:
Code:
GameTimeCalendarInvitesGlow.Show = GameTimeCalendarInvitesGlow.Hide
... which will evaluate the right side to come up with the actual function that runs when you call the "Hide" method on the frame, and assign it to the "Show" method name on the same name, so that when you do call the "Show" method (or more likely, Blizzard's code calls it) you call the "Hide" method instead.
Derp, yea that's what I meant.
  Reply With Quote
02-03-12, 09:03 AM   #5
laukond
A Black Drake
Join Date: Dec 2011
Posts: 87
Originally Posted by suicidalkatt View Post
Are you looking for a way to just disable the pulsing glow animation?
Hey there Thank you for your reply, but I it is the blinking I want to stop.
For example:
I'm having a pending invite for an event.
Instead of half of the time showing [thedate] and half of the time [?] <- as in pending invite. Then just [?] if I have an invite pending

But your code helps a little along the way so far
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Calendar Invite Pending


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off