Giter VIP home page Giter VIP logo

dmc-corona-library's People

Contributors

dmccuskey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmc-corona-library's Issues

dmc_buttons: _initComplete not being called.

Using dmc_buttons radio group.

Problem: Initial state of the button's active/inactive modes are not set. In my case the button's active image is showing underneath the inactive image since they are of different sizes.

Details:
img_data.active.isVisible = false is not being called in BinaryButton:_initComplete() since BinaryButton has __isIntermediate set on the object for being a child class of ButtonBase.

Feature request: Mutually exclusive touch "groups"

Hello David,

First off, I love your dmc_touchmanager.lua library. It saved my butt. I have a feature request that would be an awesome addition to your library. It's easiest to explain it with a short example:

Pretend that I'm working on a virtual tape recorder. I have Play, Stop, and Record buttons, each with a touch event. I'm using multitouch in my application, so technically it is possible to press any of these three buttons simultaneously. When that happens, the three touch-handling functions run at the same time with potentially unpredictable results.

It would be great to be able to say, "While the Play button is touched, the Stop button should not respond to a touch".

Thanks!

  • Bret

websocket example doesn't work once uploaded on mobile phone (iPhone6)

Hello,

The websocket example works on Corona simulator, but as soon as I upload it onto my iphone6, I have the following error in logs :

Oct  3 01:37:05 iPhone-de-olivier dmc-websockets-echo[2496] <Warning>: Platform: iPhone / iPhone7,2 / 8.0.2 / Apple A8 GPU / OpenGL ES 2.0 Apple A8 GPU - 50.5.1 / 2014.2393
Oct  3 01:37:05 iPhone-de-olivier dmc-websockets-echo[2496] <Warning>: 

    ##############################################
Oct  3 01:37:05 iPhone-de-olivier dmc-websockets-echo[2496] <Warning>: Lua Patch::activating patch 'table-pop'
Oct  3 01:37:05 iPhone-de-olivier dmc-websockets-echo[2496] <Warning>: Lua Patch::activating patch 'string-format'
Oct  3 01:37:05 iPhone-de-olivier dmc-websockets-echo[2496] <Warning>: Runtime error
    /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/dmc_corona/dmc_websockets.lua:136: module 'dmc_sockets' not found in archive:
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/
    module 'dmc_sockets' not found:resource (dmc_sockets.lu) does not exist in archive
        no field package.preload['dmc_sockets']
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.lua'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.lua'
        no file './dmc_sockets.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.so'dmc_sockets
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona
    /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/dmc_corona/dmc_sockets.lua:130: module 'dmc_sockets.async_tcp' not found in archive:
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/
    module 'dmc_sockets.async_tcp' not found:resource (dmc_sockets.async_tcp.lu) does not exist in archive
        no field package.preload['dmc_sockets.async_tcp']
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.async_tcp.lua'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.async_tcp.lua'
        no file './dmc_sockets.async_tcp.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.async_tcp.so'
        no file './dmc_sockets.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_sockets.so'dmc_sockets.async_tcp
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona
    /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/dmc_corona/dmc_sockets/async_tcp.lua:53: module 'plugin.openssl' not found in archive:
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/
    module 'plugin.openssl' not found:resource (plugin.openssl.lu) does not exist in archive
        no field package.preload['plugin.openssl']
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/plugin.openssl.lua'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/plugin.openssl.lua'
        no file './plugin.openssl.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/plugin.openssl.so'
        no file './plugin.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/plugin.so'plugin.openssl
    /private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona
    module 'dmc_corona.plugin.openssl' not found:resource (dmc_corona.plugin.openssl.lu) does not exist in archive
        no field package.preload['dmc_corona.plugin.openssl']
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona.plugin.openssl.lua'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona.plugin.openssl.lua'
        no file './dmc_corona.plugin.openssl.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona.plugin.openssl.so'
        no file './dmc_corona.so'
        no file '/private/var/mobile/Containers/Bundle/Application/8EF0CF7B-216B-4B74-8CD0-8DDB99966A7A/dmc-websockets-echo.app/dmc_corona.so'dmc_corona.plugin.openssl
    stack traceback:
        [C]: in function 'error'
        /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/dmc_corona_boot.lua:421: in function 'require'
        /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/dmc_corona/dmc_websockets.lua:136: in main chunk
        [C]: in function 'require'
        ?: in function <?:803>
        (tail call): ?
        /Users/olivier/Downloads/DMC-Corona-Library-master/examples/dmc_websockets/dmc-websockets-echo/main.lua:18: in main chunk

I have this error as soon as I include the line in any project :

local WebSockets = require 'dmc_corona.dmc_websockets' 

I have not tried on other iPhone/iPad model.

Thanks for any advice.

async_tcp.lua: premature close of socket

Hi,
I open an async socket and sends a HTTP request as soon the socket
has entered a CONNECTED state.

The problem: The socket closes abruptly as soon as I sends the HTTP
request though. The strange thing is that I can see (using a network
sniffer) that the HTTP response actually arrives to my machine. If I call
sock:reconnect() as soon as the socket closes I can actually read the
data I see with the network sniffer. AFAICS I should be able to read the
data in the socket buffer even though the socket has been closed?

Your example slightly simplified:

local Sockets = require "lib.dmc_corona.dmc_sockets"
local onConnect, dataCallback, newlineCallback

local host = "www.dn.se"
local port = 80
local sock

local function sendRequest()
  local bytes, err
  local req_t, req

  local req_t = {
    "GET / HTTP/1.1\r\n",
    "Host: " .. host .. "\r\n",
    --"User-Agent: DMC Sockets " .. Sockets.__version .. "\r\n",
    "Connection: close" .. "\r\n",
    "\r\n"
  }
  req = table.concat( req_t, "" )
  bytes, err = sock:send( req )
end

newlineCallback = function( event )
  print("== Newline Handler ==")
  event = event or {}

  if not event.data then
    print( event.emsg )
  else
    print("Received Data:\n")
    for i,v in ipairs( event.data ) do
      print(i,v)
    end
    print("\n")

  end
end

onConnect = function(event)
  if event.status == sock.CONNECTED then
    print("=== Connection Established ===")
    sendRequest()
    print("Reading Data\n\n")
    sock:receiveUntilNewline( newlineCallback )
  elseif event.status == sock.CLOSED then
    print("=== Connection Closed ===\n\n")
  else
    print("=== Connection Error ===")
    print( event.emsg )
  end
end

print("Starting Connection")
sock = Sockets:create( Sockets.ATCP )
sock:connect( host, port, { onConnect=onConnect } )

The result I see in the console:

maj 21 08:13:26.135 Starting Connection
maj 21 08:13:26.171 === Connection Established ===
maj 21 08:13:26.171 Reading Data
maj 21 08:13:26.490 === Connection Closed ===

The result I see with a network sniffer:

192.168.001.008.63023-095.101.045.192.00080: GET / HTTP/1.1
Host: www.dn.se
Connection: close

095.101.045.192.00080-192.168.001.008.63023: HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/8.5
X-Powered-By: ASP.NET
X-Frame-Options: SAMEORIGIN
Content-Length: 333001
Cache-Control: private, max-age=43
Date: Sat, 21 May 2016 18:13:20 GMT
Connection: close
Set-Cookie: weight=34; expires=Fri, 19-Aug-2016 18:13:20 GMT; path=/; domain=.dn.se
Expires: Tue, 01 January 2013 01:00:00 GMT

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="ctl00_HtmlElement" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head id="ctl00_masterPageHeader"><meta name="ARTICLEFIRSTPUBLISHDATE" property="ARTICLEFIRSTPUBLISHDATE" content="" /><meta name="ARTICLEAUTHORS" property="ARTICLEAUTHORS" content="" /><meta name="CSPAGEURL" property="CSPAGEURL" content="dn.se" /><meta name="CSSEARCH" property="CSSEARCH" content="" /><meta name="CSPAGETYPE" property="CSPAGETYPE" content="Section+with+three+columns" /><meta name="CSPAGENAME" property="CSPAGENAME" content="home.page" /><meta name="CSLEVEL2" property="CSLEVEL2" content="&amp;level-2=none" /><meta name="CSLEVEL1" property="CSLEVEL1" content="&amp;level-1=home" /><meta name="ADSPAGETYPE" property="ADSPAGETYPE" content="Section with three columns" /><meta name="ADSLAYOUT" property="ADSLAYOUT" content="Ettan" /><meta
...

I'm most probably dazed and confused. Can you help?

Cheers
/Jocke

dmc_objects : multiple call to _undoInit when using destroy (using inheritance)

Hello,
I'm starting to use your nice library today, trying to have a better structure in my codes and I just ran in a little issue. It's not a really big deal but I was thinking, if you still work on improving the library, you may be interested...

The thing is when I have a class A inheriting from CoronaBase and a class B inheriting from A. I override the _undoInit(), _undoCreateView() or _undoInitComplete() methods on class A but not on B. But when I use the destroy method on an instance of the class B there is two call done to these methods instead of just one.

You can easily see the problem by just adding some print in the _undoInit() and the _undoCreateView() of your Shape exemple.

It's not a big deal I can avoid this by just adding the methods to the B class with just the call to the super class.

Well that's all, I tried to find where the problem could come from by looking to your code but didn't really had the time to investigate a lot.
Thanks a lot for your great library! Keep up the good work!
Greg

create swipe()

create swipe() library function, including constraints, etc.

tag as 0.2.0

Crash when using wss:// secure connection -- nil pointer to _socket:setoption function

dmc_corona-2.x

When using a wss:// secure connection for either websocket or wamp connection, async_tcp.la:240 crashes with a nil pointer. Works fine with ws://.

Runtime error
/Users/n8/Development/Project_Name/dmc_corona/dmc_sockets/async_tcp.lua:523: /Users/n8/Development/Project_Name/dmc_corona/dmc_sockets/async_tcp.lua:240: attempt to call method 'setoption' (a nil value)

                self._socket:setoption( 'keepalive', true )
                self._socket:setoption( 'tcp-nodelay', true )

self._socket is valid at time of execution. build.settings is including the ssl plugin.
["plugin.openssl"] = { publisherId = "com.coronalabs", },

Why is this happening, is there a fix, or workaround?

create move()

create move() library function, including constraints, etc.

tag as 0.1.0

Documentation offline

Hi David,

I am not sure if you are aware that the documentation has been offline for a while now. Do you have plans to bring it back up? If not, is there any chance you can include the documentation for the DMC lib in this git?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.