Switch to DuckDuckGo Search
   December 12, 2012  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >


NOTICE: This channel is no longer actively logged.

Toggle Join/Part | bottom
[00:13:12] *** filt3rek|2 has joined #nme
[00:16:02] *** filt3rek has quit IRC
[00:46:23] *** Caribou| has quit IRC
[00:57:15] <aiham> Hi
[00:57:28] <aiham> Is there an explanation of the NME events, with a focus on Android/iOS apps?
[00:57:36] <aiham> I've looked at http://www.haxenme.org/api/types/nme/events/Event.html
[00:58:25] <aiham> But I'm not sure which events map to the iOS events that I'm used to, such as pause and resume, going to and from background, memory warnings, and exiting the app.
[01:57:43] *** Triplefox_ has joined #nme
[01:58:02] *** Triplefox has quit IRC
[02:00:26] *** Triplefox_ is now known as Triplefox
[02:35:18] *** Decept404 has quit IRC
[04:32:36] *** Jan_Flanders has quit IRC
[04:33:09] *** MaskedPixel has quit IRC
[04:46:55] *** filt3rek|2 has quit IRC
[07:19:57] *** Triplefox has quit IRC
[07:21:13] *** Triplefox has joined #nme
[07:22:45] *** Robipo has joined #nme
[08:16:56] *** aiham has quit IRC
[08:38:15] *** bl4z has joined #nme
[09:37:38] *** empika_ has joined #nme
[09:40:54] *** bl4z has quit IRC
[09:45:35] *** empika_ has quit IRC
[09:45:55] *** Boorik has joined #nme
[09:54:45] *** aiham has joined #nme
[10:36:38] *** Caribou| has joined #nme
[11:03:09] *** [404]NotFound has joined #nme
[11:05:10] *** bl4z has joined #nme
[11:10:38] <[404]NotFound> is there a way to draw text on a nme.display.Graphics object?
[11:14:47] *** filt3rek|2 has joined #nme
[11:15:20] *** bl4z has quit IRC
[11:15:42] *** bl4z has joined #nme
[11:50:06] *** _Muffin_ has joined #nme
[11:56:31] *** Jan_Flanders has joined #nme
[12:11:26] *** _Muffin_ has quit IRC
[12:16:37] *** filt3rek|2 is now known as filt3rek
[12:39:07] *** Triplefox has quit IRC
[13:07:33] *** MaskedPixel has joined #nme
[13:33:38] *** bl4z has quit IRC
[13:35:42] *** bl4z has joined #nme
[14:11:39] *** missilemike has joined #nme
[14:21:10] *** Devaki has joined #nme
[14:55:05] *** lordkryss has joined #nme
[15:20:08] *** bl4z has quit IRC
[17:03:23] *** Decept404 has joined #nme
[17:08:11] *** aiham has quit IRC
[17:13:36] *** bl4z has joined #nme
[17:16:00] <bl4z> hello // what would be the most elegant way to detect if user is currenty online with his device (android and/or ios) ?
[17:31:51] <filt3rek> hi bl4z
[17:32:01] <filt3rek> what do you mean please ?
[17:36:14] *** Devaki2 has joined #nme
[17:37:05] *** Devaki has quit IRC
[17:41:39] <bl4z> well in java i can use something like that NetworkInfo ni = cm.getActiveNetworkInfo();
[17:41:40] <bl4z> if (ni == null) {
[17:41:40] <bl4z> // There are no active networks.
[17:41:40] <bl4z> return false;
[17:41:40] <bl4z> }-- to see if i have inet connection -- and if i got i use curl to post something to the serve
[17:42:51] <bl4z> i know i got loader.addEventListener(Event.COMPLETE, loaded);
[17:43:32] <bl4z> i could do some fake request and only if i got response i would set "online" flag to ture
[17:43:55] <bl4z> but i dont know if that is the optimal solution
[17:45:52] *** Devaki2 has quit IRC
[17:48:03] <filt3rek> ah ok I see
[17:48:20] <filt3rek> well I would do also a fake request
[17:48:37] <filt3rek> sorry have'nt any other idea right now
[17:48:56] <bl4z> oki -- but here is the catch
[17:49:07] <bl4z> ofc complete event is never fierd
[17:49:28] <bl4z> but is there any other event that would be fired if connection is not possible?
[17:49:44] <bl4z> i coudl not find something like Event.IOERROR ...
[17:50:06] <bl4z> i use this object var loader:URLLoader = new URLLoader();
[17:50:50] <bl4z> as3 has something like this // ioError
[17:50:51] <bl4z> Dispatched if a call to URLLoader.load() results in a fatal error that terminates the download. URLLoader
[17:51:55] <bl4z> sorry /// i see something new now '-- import nme.events.IOErrorEvent;
[17:54:39] <bl4z> now i see -- flash dont have this one // ill test like this :) #if (android || ios)
[17:54:40] <bl4z> loader.addEventListener(Event.IOErrorEvent, error);
[17:54:40] <bl4z> #end
[18:24:47] *** Devaki has joined #nme
[18:35:34] *** Devaki has quit IRC
[18:37:01] *** Devaki has joined #nme
[18:40:38] *** Boorik has quit IRC
[18:44:49] *** bl4z has quit IRC
[19:11:28] *** MaskedPixel_ has joined #nme
[19:19:30] <llamahunter> is haxenme.org down?
[19:25:12] <Robipo> as usual ?
[19:29:48] *** missilemike has quit IRC
[19:58:44] *** missilemike has joined #nme
[20:04:03] *** _Muffin_ has joined #nme
[20:10:58] *** bl4z has joined #nme
[20:16:39] <llamahunter> is there a good reference on using networking in nme? in particular, async event handling?
[20:25:53] *** rafah has joined #nme
[20:26:41] *** rafah has left #nme
[20:34:40] *** Jan_Flanders has quit IRC
[20:39:08] *** Jan_Flanders has joined #nme
[20:39:53] *** missilemike has quit IRC
[20:40:04] <MaskedPixel_> llamahunter: I don't know anything about networking but this article might transfer well: http://www.wildbunny.co.uk/blog/2012/10/09/how-to-make-a-multi-player-game-part-1/
[20:41:34] <llamahunter> thx… I'm very proficient in network programming, but looking for some pointers on how it is done in NME. seems there is some missing functionality?
[20:42:47] <[404]NotFound> no, perfectly feasible
[20:43:24] <llamahunter> how does one do async socket io in nme?
[20:43:29] *** missilemike has joined #nme
[20:44:25] *** missilemike has quit IRC
[20:45:40] <[404]NotFound> http://haxe.org/api/sys/net/socket
[20:46:44] <llamahunter> yes, but how do you use that in NME to get async events? the main loop is out of your control, so there's no place to select()
[20:48:55] <[404]NotFound> i think there was a good tutorial about async sockets, but i can't find it anymore
[20:49:08] <[404]NotFound> anyway, you can always roll your own server thread
[20:50:12] <llamahunter> how does one do a thread safe dispatch to other code, tho? Seems that the safe way is to go through the thread queue, but again, that doesn't seem to support async messages.
[20:50:25] *** missilemike has joined #nme
[20:51:29] <[404]NotFound> http://haxe.org/doc/neko/threads
[20:52:09] <llamahunter> thx, but again, that is a) a synchronous example of thread communication, and b) in neko, not nme (I'm targetting cpp).
[20:52:21] <[404]NotFound> works the same in neko
[20:52:36] <llamahunter> not async
[20:52:57] <[404]NotFound> s/neko/cpp/
[20:53:17] <llamahunter> in nme, the main loop is 'elsewhere', meaning you are relying on something in the nme runtime to do the polling.
[20:56:55] *** Decept404 has quit IRC
[21:00:22] <[404]NotFound> sorry, i haven't tried any other solution than a separate polling thread yet
[21:05:25] <llamahunter> with a separate polling thread, tho, how do you take action on other datastructures in a thread safe way?
[21:06:42] <[404]NotFound> mutexes
[21:06:44] <[404]NotFound> mutices?
[21:07:01] <[404]NotFound> never used them in haxe though
[21:07:23] <llamahunter> again… mutex appears blocking, and so can't be used from the main loop. :-(
[21:07:25] *** bl4z has quit IRC
[21:07:30] <llamahunter> seems that there is some missing functionality here in NME
[21:07:46] <Jan_Flanders> in cpp you mean then?
[21:07:59] <llamahunter> async socket IO seems unsupported from the main NME loop
[21:08:26] <llamahunter> the nme.events.DataEvent type doesn't even appear to exist.
[21:08:59] <[404]NotFound> that's right, a _clean_ way for async communication is still missing
[21:09:22] <llamahunter> also, there is no nme.net.XMLSocket
[21:10:04] <[404]NotFound> something like this: https://github.com/roustem/AsyncSocket but for haxe
[21:10:30] <llamahunter> or nme.net.Socket, for that matter
[21:10:41] <llamahunter> something that implements IEventDispatcher
[21:11:42] <llamahunter> it's a solved problem in AS3, and it appears the low level pieces are there in Haxe to implement it, which is why its surprising it hasn't been done yet somehow in NME.
[21:12:51] <llamahunter> does no one do bidirectional network communication in NME?
[21:15:26] <[404]NotFound> maybe most people did it like i did: for the lack of an elegant way, they roll their own half-par solution :D
[21:16:48] <llamahunter> still don't see how that can work in a thread safe way from a polling thread without a huge impact on the rest of your codebase.
[21:19:47] <photex> hi folks. How can I force all files in a particular package to be compiled?
[21:20:41] <photex> I have an entity package and my intention is to have the classes defined there to be used by config files
[21:21:10] <photex> for example, a test_entity.xml will have an element <type>my.entity.package.MyEntity</type>
[21:21:42] <photex> This will currently only work if the class is referred to somewhere else in the code
[21:22:15] <photex> otherwise its not compiled I suppose so the calls to Type.createInstance and Type.resolveType return null
[21:23:45] <photex> sorry, Type.resolveClass
[21:29:32] <Jan_Flanders> macro include
[21:30:21] <Jan_Flanders> http://haxe.org/api/haxe/macro/compiler
[21:30:38] <Jan_Flanders> tatic function include( pack : String, ?rec : Bool, ?ignore : Array<String>, ?classPaths : Array<String> ) : Void
[21:30:40] <Jan_Flanders> Include for compilation all classes defined in the given package excluding the ones referenced in the ignore list.
[21:31:27] <Jan_Flanders> you can use it from command line as well: --macro include(...
[21:31:51] *** Devaki has quit IRC
[21:32:59] <Jan_Flanders> I'd give it a shot with : <haxeflag name="--macro" value="include(...)" /> in your nmml
[21:33:08] <photex> ah, ok that was my next question
[21:33:16] <photex> Thanks a bunch Jan_Flanders
[21:33:28] <Jan_Flanders> Let me know if it works. Never tried it from nmml myself :)
[21:36:59] <Jan_Flanders> You can check the hxml file in your haxe/bin folder to see if it was processed correctly by NME's commanline tools's script
[21:37:31] <Jan_Flanders> *bin/haxe folder
[22:38:02] *** Triplefox has joined #nme
[22:59:22] <photex> Awesome Jan_Flanders, it worked!
[22:59:38] <Jan_Flanders> great! Thanks for letting me know the result :)
[23:20:07] *** onr has quit IRC
[23:20:35] *** onr has joined #nme
[23:26:22] *** lordkryss has quit IRC
[23:27:14] *** Robipo has quit IRC
[23:59:08] *** _Muffin_ has quit IRC
top

   December 12, 2012  
< | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | >