Search Results

Search found 69 results on 3 pages for 'eventlistener'.

Page 3/3 | < Previous Page | 1 2 3 

  • Html5 - Callback when media is ready on iPad wont work

    - by Kap
    I'm trying to add a callback to a HTML5 audio element on an iPad. I added an eventlistener to the element, the myOtherThing() starts but there is no sound. If I pause and the play the sound again the audio starts. This works in chrome. Does anyone have an idea how I can do this? myAudioElement.src = "path_to_file"; addEventListener("canplay", function(){ myAudioElement.play(); myOtherThing.start(); }); SOLVED Just wanted to share my solution here, just in case someone else needs it. As far as I understand the iPad does not trigger any events without user interactions. So to be able to use "canply", "playing" and all the other events you need to use the built in media controller. Once you press play in that controller, the events gets triggered. After that you can use your custom interface.

    Read the article

  • Get old text from change event?

    - by Biroka
    Can I somehow find out what was the change in the textfield? I would want to compare the old text with the new text ... the problem is, that I have multiple textAreas in a tab-editor, and all the textAreas are watched by one eventListener. I want to get a value calculated by the next formula: globalChangeCount += thisTextArea.currentCharacterCount - thisTextArea.oldtCharacterCount where the globalChangeCount is a value modified by all changes in any of the textAreas. I am searching for these values through the event variable, but can't seam to find the old text of the textArea.

    Read the article

  • Testing whether an event has happened after a period of time in jQuery

    - by chrism
    I'm writing a script for a form-faces xforms product that is keyed off an event built into form faces. The event is called 'xforms-ready'. I have define 'startTime' as happening as soon as the document in 'ready'. What I want the script to do is warn the user that it is taking too long before the 'xforms-ready' happens, say if it's been 6 seconds since 'startTime'. I can easily do things when the 'xforms-ready' event happens using the code below: new EventListener(document.documentElement, "xforms-ready", "default", function() { var endTime = (new Date()).getTime(); } ); however the warning will want to happen before 'endTime' is defined. So I guess I want something that works like this: If 6 seconds has passed since startTime and endTime is not yet defined do X or possibly more efficiently: If 6 seconds has passed since startTime and 'xforms-ready' has not yet happened do X Can anyone suggest a way of doing this?

    Read the article

  • What if I made an explicit reference to 'this' for use inside an inner class?

    - by badp
    So far, I've used this approach to access this from the scope of an inner class: class FooManagementWindow extends JFrame { JButton rejectFoo; //... void getFooAcceptingPanel(){ //... final FooManagementWindow referenceToThis = this; rejectFoo = new JButton("Reject"); rejectFoo.addEventListener(new EventListener() { @Override public void actionPerformed(ActionEvent arg) { referenceToThis.setEnabled(false); //this requires a network call //... referenceToThis.setEnabled(true); //the user may resume his work } }); //... } } However, I just learned that instead of declaring referenceToThis, a direct reference is kept for me as: FooManagementWindow.this I have no reason to think my less standard approach may lead to errors or weird corner cases. Or are there?

    Read the article

  • Does remove a DOM object (in Javascript) will cause Memory leak if it has event attached?

    - by seatoskyhk
    So, if in the javascript, I create a DOM object in the HTML page, and attach event listener to the DOM object, upon I remove the the DOM from HTML page, does the event listener still exist and causing memory leak? function myTest() { var obj = document.createElement('div'); obj.addEventListener('click', function() {alert('whatever'); }); var body = document.getElementById('body'); // assume there is a <div id='body'></div> already body.appendChild(obj); } // then after some user actions. I call this: function emptyPage() { var body = document.getElementById('body'); body.innerHTML = ''; //empty it. } So, the DOM object, <div> inside body is gone. But what about the eventlistener? I'm just afraid that it will cause memory leak.

    Read the article

  • ActionScript arrays being automatically set to other values

    - by nababa
    I am making a flash game, in each round, the player will chose either True or False. The decision of each round will be stored in an array. That is, it looks like {true, false, true, false}.. When the user clicks the "Debrief“ button, the eventlistener will be called and the game will go to the debriefing part. It will read the array mentioned before. However, the array values are all "false". I am very sure that the array has not being touched in between. So, any ideas about why the array is set to false mysteriously?

    Read the article

  • HTTPService/ResultEvent with Flex 3.2 versus Flex >= 3.5

    - by Julian
    Hey everybody, through a design decission or what-so-ever Adobe changed the content of the ResultEvent fired by a HTTPService Object. Take a look at following example: var httpService:HTTPService = myHTTPServices.getResults(); httpService.addEventListener(ResultEvent.RESULT,resultHandler); httpService.send(); /** * Handels the login process */ function resultHandler(event:ResultEvent):void { // get http service var httpService = (event.target as HTTPService); // do something } It works like a charm with Flex 3.2. But when I try to compile it with Flex 3.5 or Flex 4.0 event.target as HTTPService is null. I figured out that event.target is now an instance of HTTPOperation. That is interesting because I can't find HTTPOperation in the langref. However, I think what Flash Builder's debugger means is mx.rpc.http.Operation. The debugger also shows that event.target has a private attribute httpService which is the instance I expected to get with event.target. But it's private, so event.target.httpService doesn't work. If I only want to remove the EventListener I can cast event.target as EventDispatcher. But I need to use methods from HTTPService. So: How can I get the HTTPService instance from the ResultEvent? Any help would be appreciated. Thanks! J.

    Read the article

  • FireFox Toolbar Prefwindow unload/acceptdialog Event to Update the toolbar

    - by Mark
    Hi all, I'm trying to develop a firefox toolbar ;) so my structure is In the options.xul is an PrefWindow which i'm opening over an <toolbarbutton oncommand="esbTb_OpenPreferences()"/> function esbTb_OpenPreferences() { window.openDialog("chrome://Toolbar/content/options.xul", "einstellungen", "chrome,titlebar,toolbar,centerscreen,modal", this);} so in my preferences i can set some checkboxes which indicates what links are presented in my toolbar. So when the preferences window is Closed or the "Ok" button is hitted I want to raise an event or an function which updates via DOM my toolbar. So this is the function which is called when the toolbar is loaded. It sets the links visibility of the toolbar. function esbTB_LoadMenue() { var MenuItemNews = document.getElementById("esbTb_rss_reader"); var MenuItemEservice = document.getElementById("esbTb_estv"); if (!(prefManager.getBoolPref("extensions.esbtoolbar.ShowNews"))) { MenuItemNews.style.display = 'none'; } if (!(prefManager.getBoolPref("extensions.esbtoolbar.ShowEservice"))) { MenuItemEservice.style.display = 'none'; } } So I tried some thinks like adding an eventlistener to the dialog which doesn't work... in the way I tried... And i also tried to hand over the window object from the root window( the toolbar) as an argument of the opendialog function changed the function to this. function esbTB_LoadMenue(RootWindow) { var MenuItemNews = RootWindow.getElementById("esbTb_rss_reader"); var MenuItemEservice = RootWindow.getElementById("esbTb_estv");} And then tried to Access the elements over the handover object, but this also not changed my toolbar at runtime. So what i'm trying to do is to change the visibile links in my toolbar during the runtime and I don't get it how I should do that... thanks in advance

    Read the article

  • flash as3 document class and event listeners

    - by Lee
    I think i have this document class concept entirly wrong now, i was wondering if someone mind explaining it.. I assumed that the above class would be instantiated within the first frame on scene one of a movie. I also assumed that when changing scenes the state of the class would remain constant so any event listeners would still be running.. Scene 1: I have a movieclip named ui_mc, that has a button in for muting sound. Scene 2: I have the same movie clip with the same button. Now the eventListener picks it up in the first scene, however it does not in the second. I am wondering for every scene do the event listeners need to be resetup? If that is the case if their an event listener to listen for the change in scene, so i can set them back up again lol.. Thanks in advance.. package { import flash.display.MovieClip; import flash.events.MouseEvent; import flash.media.Sound; import flash.media.SoundChannel; public class game extends MovieClip { public var snd_state:Boolean = true; public function game() { ui_setup(); } public function ui_setup():void { ui_mc.toggleMute_mc.addEventListener(MouseEvent.CLICK, snd_toggle); } private function snd_toggle(event:MouseEvent):void { // 0 = No Sound, 1 = Full Sound trace("Toggle"); } } }

    Read the article

  • AS3 URLRequest in for Loop problem

    - by Adrian
    Hi guys, I read some data from a xml file, everything works great besides urls. I can't figure what's the problem with the "navigateURL" function or with the eventListener... on which square I click it opens the last url from the xml file for(var i:Number = 0; i <= gamesInput.game.length() -1; i++) { var square:square_mc = new square_mc(); //xml values var tGame_name:String = gamesInput.game.name.text()[i];//game name var tGame_id:Number = gamesInput.children()[i].attributes()[2].toXMLString();//game id var tGame_thumbnail:String = thumbPath + gamesInput.game.thumbnail.text()[i];//thumb path var tGame_url:String = gamesInput.game.url.text()[i];//game url addChild(square); square.tgname_txt.text = tGame_name; square.tgurl_txt.text = tGame_url; //load & attach game thumb var getThumb:URLRequest = new URLRequest(tGame_thumbnail); var loadThumb:Loader = new Loader(); loadThumb.load(getThumb); square.addChild(loadThumb); // square.y = squareY; square.x = squareX; squareX += square.width + 10; square.buttonMode = true; this.addEventListener(MouseEvent.CLICK, navigateURL); } function navigateURL(event:MouseEvent):void { var url:URLRequest = new URLRequest(tGame_url); navigateToURL(url, "_blank"); trace(tGame_url); } Many thanks!

    Read the article

  • How to get user input before saving a file in Sublime Text

    - by EddieJessup
    I'm making a plugin in Sublime Text that prompts the user for a password to encrypt a file before it's saved. There's a hook in the API that's executed before a save is executed, so my naïve implementation is: class TranscryptEventListener(sublime_plugin.EventListener): def on_pre_save(self, view): # If document is set to encode on save if view.settings().get('ON_SAVE'): self.view = view # Prompt user for password message = "Create a Password:" view.window().show_input_panel(message, "", self.on_done, None, None) def on_done(self, password): self.view.run_command("encode", {password": password}) The problem with this is, by the time the input panel appears for the user to enter their password, the document has already been saved (despite the trigger being 'on_pre_save'). Then once the user hits enter, the document is encrypted fine, but the situation is that there's a saved plaintext file, and a modified buffer filled with the encrypted text. So I need to make Sublime Text wait until the user's input the password before carrying out the save. Is there a way to do this? At the moment I'm just manually re-saving once the encryption has been done: def on_pre_save(self, view, encode=False): if view.settings().get('ON_SAVE') and not view.settings().get('ENCODED'): self.view = view message = "Create a Password:" view.window().show_input_panel(message, "", self.on_done, None, None) def on_done(self, password): self.view.run_command("encode", {password": password}) self.view.settings().set('ENCODED', True) self.view.run_command('save') self.view.settings().set('ENCODED', False) but this is messy and if the user cancels the encryption then the plaintext file gets saved, which isn't ideal. Any thoughts? Edit: I think I could do it cleanly by overriding the default save command. I hoped to do this by using the on_text_command or on_window_command triggers, but it seems that the save command doesn't trigger either of these (maybe it's an application command? But there's no on_application_command). Is there just no way to override the save function?

    Read the article

  • Attaching an event to an Iframe that contains more iframes

    - by Oscar Godson
    I have an editor which is in my window that contains a wrapping iframe and then 2 more iframes inside like (the HTML inside the <iframe> element is inserted via write() in JS, not hardcoded like this): <iframe class="parent"> <div class="wrapper"> <iframe class="editor"></iframe> <iframe class="previewer"></iframe> </div> </iframe> One is an editor, the other is a previewer. The first one that contains the two (we'll call this the parent) has an eventListener for mousemove attached to it, but nothing is firing. If i add a 5px border for example, the event will fire when I move my mouse on the border of the parent, but not when i hover over the middle which contains the editor or previewer (previewer is display:none while the editor is visible, and vice versa). So, the blue area in the following i can mousemove, but the rest I can't. It's most likely because of the stacking order, but how can I attach an event to fire on the entire frame? I need mousemove because on mousemove I display a menu in the bottom right. I want the same menu to display whether or not the editor or the previewer is visible.

    Read the article

  • Stopping/Removing an embedded player.

    - by Rajat
    Hi, I am working on a webpage where i have to include an embedded video.The video is hosted on some other domain.I am able to embed the video and autoplay once the web page is loaded.However i have a requirement where i have to remove the div displaying the video once it is played , and in place of the video i have to now display some text. The problem is i am able to do autoplay by the autostart variable in the embed tag...but how do i know that the video has ended.The hosting company only provides an embed tag and they donot have any player apis to use. One way (or rather a workaround) that i feel is to start a eventlistener in the background and see for the total time of the video and when that time is reached remove the content.But the problem is what if the user pauses the video, then also the div would be deleted. I am new to flash.Are there some standard variables or actions that we can pass as flashvars to a swf file to stop a running player or to know the state of the player (Note we are only getting an embed tag from the video hosting site so we donot own that code and they donot have much documenation to help me out with the code). Thanks for your help.

    Read the article

  • .NET: How to pass value when subscribing to event and obtain it when the event is triggered (Dynamic

    - by Entrase
    The task is to create event handlers in runtime. I need the one method to be called with different parameter value for different events. The events and their number are only known in runtime. So I'm trying to generate dynamic methods, each of which will be assigned to some event, but in general they all just pass some value to an instance method and call it. It would be great if something similar could be done the easier way. I mean passing some value at subscribing stage and then obtaining it when the event is triggered. This is what I'm trying to do now: public class EventSource { public event EventHandler eventOne; public event EventHandler eventTwO; public event EventHandler eventThree; } public class EventListener { SubscribeForEvents() { BindingFlags flags = BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance; // Suppose we've already got EventInfo // and target source somewhere // so we can do eventInfo.AddEventHandler(target, delegate) // Now we need a delegate. int value = 42; Type tDelegate = eventInfo.EventHandlerType; // http://msdn.microsoft.com/en-us/library/ms228976(VS.95).aspx Type returnType = GetDelegateReturnType(tDelegate); DynamicMethod listener = new DynamicMethod("", null, GetDelegateParameterTypes(tDelegate), this.GetType()); ///////// Type[] callParameters = { typeof(int) }; MethodInfo method = this.GetType().GetMethod("ToCallFromDelegate", flags); ILGenerator generator = listener.GetILGenerator(); // No success in this mess. What's wrong? generator.Emit(OpCodes.Ldc_I4, value); generator.Emit(OpCodes.Call, method); generator.Emit(OpCodes.Pop); generator.Emit(OpCodes.Ret); ///////////// Delegate delegate = listener.CreateDelegate(tDelegate); eventInfo.AddEventHandler(target, delegate); // When triggered, there is InvalidProgramException } void ToCallFromDelegate(int value) { doSomething(); } }

    Read the article

  • Adobe flex dateField

    - by JonoB
    I have some code as follows: private function onComboChange(evt:Event):void { var temp:Date = df_date.selectedDate; temp.date += 5; df_dateDue.selectedDate = new Date(temp); } In essence, I am trying to add 5 days onto the selected date in df_date, and put that date into df_dateDue. This fires off via an EventListener on a combobox. Both df_date and df_dateDue are dateFields. OK, so the first time that I run this, it works fine; df_date stays the same and df_dateDue is set to 5 days past df_date. However, the next time that I run it, df_dateDue increments by 10 days from df_date, the next time by 15, and so on. So, stepping through the code shows that somehow df_date has become linked to the temp var, and that the temp var is not resetting itself each time the function is called. Example: df_date = 01 Jan, df_dateDue = 01 Jan. Fire off the event, df_date = 01 Jan, df_dateDue = 06 Jan Fire off the event again. At this point, var temp = 06 Jan (even though df_date still shows 01 Jan), and df_dateDue is then set to 11 Jan Fire off the event again. At this point var temp = 11 Jan (even though df_date = 01 Jan), and df_dateDue is then set to 16 Jan What am I missing here?

    Read the article

  • Event Source Live streaming in Ruby on rails onError method

    - by kishorebjv
    I'm trying to implement basic rails4 code with eventsource API & Action controller live, Everything is fine but I'm not able to reach event listner . Controller code: class HomeController < ApplicationController include ActionController::Live def tester response.headers["Content-Type"] = "text/event-stream" 3.times do |n| response.stream.write "message: hellow world! \n\n" sleep 2 end end Js code: var evSource = new EventSource("/home/tester"); evSource.onopen = function (e) { console.log("OPEN state \n"+e.data); }; evSource.addEventListener('message',function(e){ console.log("EventListener .. code.."); },false); evSource.onerror = function (e) { console.log("Error State \n\n"+e.data); }; & When i reloading the page, My console output was "OPEN state" & then "Error State" as output.. event-listener code was not displaying . 1.When I'm curling the page, "message: Hellow world!" was displaying. 2.I changed in development.rb config.cache_classes = true config.eager_load = true 3. My browsers are chrome & firefox are latest versions, so no issues with them, Where I'm missing? suggestions please!

    Read the article

  • actionscript find and convert text to url

    - by gravesit
    I have this script that grabs a twitter feed and displays in a little widget. What I want to do is look at the text for a url and convert that url to a link. public class Main extends MovieClip { private var twitterXML:XML; // This holds the xml data public function Main() { // This is Untold Entertainment's Twitter id. Did you grab yours? var myTwitterID= "username"; // Fire the loadTwitterXML method, passing it the url to your Twitter info: loadTwitterXML("http://twitter.com/statuses/user_timeline/" + myTwitterID + ".xml"); } private function loadTwitterXML(URL:String):void { var urlLoader:URLLoader = new URLLoader(); // When all the junk has been pulled in from the url, we'll fire finishedLoadingXML: urlLoader.addEventListener(Event.COMPLETE, finishLoadingXML); urlLoader.load(new URLRequest(URL)); } private function finishLoadingXML(e:Event = null):void { // All the junk has been pulled in from the xml! Hooray! // Remove the eventListener as a bit of housecleaning: e.target.removeEventListener(Event.COMPLETE, finishLoadingXML); // Populate the xml object with the xml data: twitterXML = new XML(e.target.data); showTwitterStatus(); } private function addTextToField(text:String,field:TextField):void{ /*Regular expressions for replacement, g: replace all, i: no lower/upper case difference Finds all strings starting with "http://", followed by any number of characters niether space nor new line.*/ var reg:RegExp=/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig; //Replaces Note: "$&" stands for the replaced string. text.replace(reg,"<a href=\"$&\">$&</a>"); field.htmlText=text; } private function showTwitterStatus():void { // Uncomment this line if you want to see all the fun stuff Twitter sends you: //trace(twitterXML); // Prep the text field to hold our latest Twitter update: twitter_txt.wordWrap = true; twitter_txt.autoSize = TextFieldAutoSize.LEFT; // Populate the text field with the first element in the status.text nodes: addTextToField(twitterXML.status.text[0], twitter_txt); }

    Read the article

  • EventDispatcher between an as and an fla?

    - by Christopher Richa
    Hi everyone. I am making a fighting game in Flash and while I have everything running, I am missing something: a victory/loss screen. Logically, I know how to do it: if character.hp < 0 { character.dead = true; dispatchevent("death", event) } My problem is that I have no idea as to how to code it. I know I will use two classes and my two .fla files (unless I am wrong). I have two .fla files that are in play here: the Menu.fla file and the Arena.fla file. Menu.fla contains the entire navigation of the game, options, character selection screens, etc. and when it is time for the player to engage in battle, it loads the Arena.fla file, which contains only the backgrounds (depending on the selected stage) and for now is set to a length of one frame only. For Arena.fla, the real action happens in my classes, but logically, I would only need HP.as and Character.as. In Character.as, I have declared the following variable: var isDead:Boolean = false; //is character dead? In HP.as, believe I should have the following: if(currentHp<0) { currentHp = 0; character.isDead = true; //declared as var `character:Object;` EventDispatcher.dispatchEventListener("playerDead", playerDead); } And finally, in Arena.fla, I want to be able to detect the above-mentioned eventlistener and simply move on to a second frame which will display a message in the style of "PLAYER ONE HAS WON" or "PLAYER ONE HAS LOST" with a button that will allow me to go back to the character selection screen. This is the first part in which I am stuck: how do I detect the dispatched event listener in my main .fla file? Secondly, if the player clicks on the "CONTINUE" button, which displays regardless if the player has won or lost, how can my Menu.fla (which loads the Arena.swf) detect this click event, unload the game, and go back to the character selection screen? Thank you in advance for helping me out. I realize this is a lot of text but it's the most descriptive I can be. If you have any questions or need any clarification concerning my question, feel free to speak up. -Christopher

    Read the article

  • Complex event system for DungeonKeeper like game

    - by paul424
    I am working on opensource GPL3 game. http://opendungeons.sourceforge.net/ , new coders would be welcome. Now there's design question regarding Event System: We want to improve the game logic, that is program a new event system. I will just repost what's settled up already on http://forum.freegamedev.net/viewtopic.php?f=45&t=3033. From the discussion came the idea of the Publisher / Subscriber pattern + "domains": My current idea is to use the subscirbers / publishers model. Its similar to Observable pattern, but instead one subscribes to Events types, not Object's Events. For each Event would like to have both static and dynamic type. Static that is its's type would be resolved by belonging to the proper inherited class from Event. That is from Event we would have EventTile, EventCreature, EvenMapLoader, EventGameMap etc. From that there are of course subtypes like EventCreature would be EventKobold, EventKnight, EventTentacle etc. The listeners would collect the event from publishers, and send them subcribers , each of them would be a global singleton. The Listeners type hierachy would exactly mirror the type hierarchy of Events. In each constructor of Event type, the created instance would notify the proper listeners. That is when calling EventKnight the proper ctor would notify the Listeners : EventListener, CreatureLisener and KnightListener. The default action for an listner would be to notify all subscribers, but there would be some exceptions , like EventAttack would notify AttackListener which would dispatch event by the dynamic part ( that is the Creature pointer or hash). Any comments ? #include <vector> class Subscriber; class SubscriberAttack; class Event{ private: int foo; int bar; protected: // static std::vector<Publisher*> publishersList; static std::vector<Subscriber*> subscribersList; static std::vector<Event*> eventQueue; public: Event(){ eventQueue.push_back(this); } static int subscribe(Subscriber* ss); static int unsubscribe(Subscriber* ss); //static int reg_publisher(Publisher* pp); //static int unreg_publisher(Publisher* pp); }; // class Publisher{ // }; class Subscriber{ public: int (*newEvent) (Event* ee); Subscriber( ){ Event::subscribe(this); } Subscriber( int (*fp) (Event* ee) ):newEvent(fp){ Subscriber(); } ~Subscriber(){ Event::unsubscribe(this); } }; class EventAttack: Event{ private: int foo; int bar; protected: // static std::vector<Publisher*> publishersList; static std::vector<SubscriberAttack*> subscribersList; static std::vector<EventAttack*> eventQueue; public: EventAttack(){ eventQueue.push_back(this); } static int subscribe(SubscriberAttack* ss); static int unsubscribe(SubscriberAttack* ss); //static int reg_publisher(Publisher* pp); //static int unreg_publisher(Publisher* pp); }; class AttackSubscriber :Subscriber{ public: int (*newEvent) (EventAttack* ee); AttackSubscriber( ){ EventAttack::subscribe(this); } AttackSubscriber( int (*fp) (EventAttack* ee) ):newEventAttack(fp){ AttackSubscriber(); } ~AttackSubscriber(){ EventAttack::unsubscribe(this); } }; From that point, others wanted the Subject-Observer pattern, that is one would subscribe to all event types produced by particular object. That way it came out to add the domain system : Huh, to meet the ability to listen to particular game's object events, I though of introducing entity domains . Domains are trees, which nodes are labeled by unique names for each level. ( like the www addresses ). Each Entity wanting to participate in our event system ( that is be able to publish / produce events ) should at least now its domain name. That would end up in Player1/Room/Treasury/#24 or Player1/Creature/Kobold/#3 producing events. The subscriber picks some part of a tree. For example by specifiing subtree with the root in one of the nodes like Player1/Room/* ,would subscribe us to all Players1's room's event, and Player1/Creature/Kobold/#3 would subscribe to Players' third kobold's event. Does such event system make sense to you ? I have many implementation details to ask as well, but first let's start some general discussion. Note1: Notice that in the case of a fight between two creatues fight , the creature being attacked would have to throw an event, becuase it is HE/SHE/IT who have its domain address. So that would be BeingAttackedEvent() etc. I will edit that post if some other reflections on this would come out. Note2: the existing class hierarchy might be used to get the domains addresses being build in constructor . In a ctor you would just add + ."className" to domain address. If you are in a class'es hierarchy leaf constructor one might use nextID , hash or any other charactteristic, just to make the addresses distinguishable . Note3:subscribing to all entity's Events would require knowledge of all possible events produced by this entity . This could be done in one function call, but information on E produced would have to be handled for every Entity. SmartNote4 : Finding proper subscribers in a tree would be easy. One would start in particular Leaf for example Player1/Creature/Kobold/#3 and go up one parent a time , notifiying each Subscriber in a Node ie. : Player1/Creature/Kobold/* , Player1/Creature/* , Player1/* etc, , up to a root that is /* .<<<< Note5: The Event system was needed to have some way of incorporating Angelscript code into application. So the Event dispatcher was to be a gate to A-script functions. But it came out to this one.

    Read the article

< Previous Page | 1 2 3