Questions tagged [observers]

An object which registers itself to listen for updates on another object

In an , observers register themselves with a subject. The subject notifies each of its observers about updates to itself, usually by calling a method on the observers.

911 questions
-1
votes
1 answer

Magento order observer not catching the order

I can't get the magento to respond to event sales_order_save_after. I use observer for the event. I am pretty sure my xml is well formed, since I use Magicento for this. This is my config.xml:
-1
votes
2 answers

iOS continuous action

The basic scenario is to request data from server once some parameters that represented by tags(UIView) has been edited by user. The general solution is to add events to observe those tags. Once any tag has been removed, a new http request could be…
Chen Wei
  • 521
  • 4
  • 10
-2
votes
1 answer

Why some Notifications.userInfo is nil?

An example: Why this Notification "didActivateApplicationNotification" NSWorkspace.shared.notificationCenter.addObserver(self, selector: #selector(updateOnFocus(notification:)), name:…
a_kira
  • 195
  • 10
-2
votes
1 answer

Detecting when numbers are in close range of each other

In Swift, I have a method that produces a number set like the following: 86.9238759555414 86.4558606813632 86.4277950105986 86.6055803862833 86.1875587264579 86.7055257286376 86.7445244949838 86.5632505027143 86.7381593407261 // This will trigger a…
Joe
  • 3,772
  • 3
  • 33
  • 64
-2
votes
1 answer

How to use `SELF` in swift playground?

How to reference Swift Playground itself? I am trying to use NSNotificationCenter to observe some variable, but i do not know how to implement it on Playground. Here is my code, actually i just want to observe the timeout variable, but without the…
unknowncoder
  • 132
  • 1
  • 10
-2
votes
1 answer

Swift: Global variable not updating

In a file called Menu, I have this: class Menu: UIViewController { var no_of_swipes = 99 @IBAction func pressedThreeSwipes(sender: AnyObject) { no_of_swipes = 3 } } And in another file I have this: class Game: UIView { func…
William Clark
  • 91
  • 1
  • 3
  • 11
-3
votes
1 answer

How to run a selenium script whenever i received a new message on web whatsapp

I'm writing a script in java using selenium to read the new messages received on web WhatsApp by detecting the new message count red bubble and opening it and reading last x unread messages. I'm able to do that successfully. But what I want that is…
-3
votes
1 answer

android firebase stop ChildEventListener

I am trying to remove my ChildEventListener observer when I leave the activity as shown below in my onPause method. Basically my problem is when I leave the activity and return to it my childListener gets incremented by one so depending on how many…
-4
votes
2 answers

Execute a function only when an element with a certain id becomes available

I have a JavaScript function that should be executed only when an element of a certain id becomes available in the DOM.
Edgar Derby
  • 2,543
  • 4
  • 29
  • 48
-5
votes
1 answer

Is there any network connection observer available in .net?

Is there an observer available in .NET which notifies when the host's internet connection gets connected or disconnected?
RoK
  • 5
  • 2
1 2 3
60
61