[Plugin] PingForum Home > Construct 2 Development > Plugins for Construct 2
Topic: [Plugin] Ping
Posted: 24 Feb 2012 at 12:58am
Very basic plugins, basically add two events:
Is not connected
They return true if the user has internet access or false if not (and the other way around) trough: navigator.onLine
I hope it would be helpful to anyone, it should be helpful for offline app on the chrome web store or mobile.
|Post Options Quote Reply Posted: 24 Feb 2012 at 1:39pm|
I guess it is the same as the Browser plugin "Is online", "On went online" and "On went offline" conditions ?
If so, prefer using the browser plugin.
I won't list this plugin on the list for now as it's better to use the built-in plugin in that case.
If the functions provided by your plugin are different than those of the browser object, then I'll list it.
Edited by Kyatric - 24 Feb 2012 at 1:40pm
|Post Options Quote Reply Posted: 25 Feb 2012 at 11:21am|
Yes, it's the same more or less, the only difference is that I added an isOffline condition, not he went offline, if he started offline which was lacking from the browser plugin and I needed it.
|Post Options Quote Reply Posted: 25 Feb 2012 at 12:23pm|
Well, "is Offline" is an inverted "Is online" condition.
Not listing the plugin, sorry.
|Post Options Quote Reply Posted: 25 Feb 2012 at 1:13pm|
No problem Kyatric, no problem at all, that teaches me to read the manual, I didn't know you could invert an action :-(
Sorry for wasting your time
|Post Options Quote Reply Posted: 25 Feb 2012 at 2:05pm|
Oh you're not wasting my time by no mean.
I feel more like you might have wasted a bit of yours.
On the way though you saw how to put up a custom plugin, and learnt a few others things about C2 so I guess it's not totaly wasted/lost.
The reason I prefer not listing the plugin is to prevent other users of "making the same mistake".
Plugins are cool to help out with a lots of things, but sometime, using a thrid-part plugin you might miss an already built-in feature and "important mechanism" (I think that now that you know you can invert conditions, a lot of new designs and patterns are crossing your mind).
Sorry if I sounded a bit stiff, it wasn't intended and I'm always pleased to see new plugins and new plugins builders in this part of the forum.
It's just in that case that "a better solution" already exists and is an important mechanism of C2 I consider ppl shouldn't be missing.
Edited by Kyatric - 25 Feb 2012 at 2:07pm
|Post Options Quote Reply Posted: 25 Feb 2012 at 6:16pm|
No don't worry, I learned a lot and I'll be doing plugins, actually I already did other plugins just to invert actions, can you believe it?
I'm just glad that my current project didn't require that many inversions :-P
Anyway thanks, I hope to post something more useful in the future :-)
|Forum Jump||Forum Permissions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum