Search found 9 matches

by Dantevg
Wed Feb 01, 2017 8:16 am
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

Yes I know that channel:peek() is just channel:pop() but without changing the queue. But I want to make sure I don't receive any messages from myself. Or is that already taken care of by LÖVE? I thought channel:pop() did modify some internal state, the queue.
by Dantevg
Tue Jan 31, 2017 2:25 pm
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

That's strange... I thought channel:pop() was describable as:

Code: Select all

data = channel:peek()
channel:pop()
Or am I missing something here? In my code it doesn't work...

EDIT: So, the wiki was wrong, thanks for editing!
by Dantevg
Tue Jan 31, 2017 11:12 am
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

I know the usage of the channel functions. I had already tried it, of course, because it seems so unlogical. When I try to receive a flat table with channel:peek(), it just doesn't receive it. It really doesn't work.
by Dantevg
Tue Jan 31, 2017 9:44 am
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

Something related: Why do all the channel functions accept flat tables, but the channel.peek() function doesn't?

EDIT: Bitser may be really helpful if I get stuck on this problem
by Dantevg
Tue Jan 24, 2017 3:16 pm
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

raidho36 wrote:Why wouldn't it be?

Code: Select all

local a = { }
local b = { }
a.b = b
b.a = a
Okay, that's simple indeed, now I get it.
by Dantevg
Tue Jan 24, 2017 2:09 pm
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Re: Sending nested tables over channels

bartbes wrote:Serialization code that only supports tables without cyclic references can be much simpler and faster than code that does have to support those, for instance.
What are cyclic references? A table referencing itself? Is that even possible in lua?
by Dantevg
Mon Jan 23, 2017 4:01 pm
Forum: Support and Development
Topic: Sending nested tables over channels
Replies: 16
Views: 4274

Sending nested tables over channels

Maybe this is a stupid question, but why aren't we able to send nested tables over channels? Is it impossible or very hard to make? Is there a solution to send nested tables over channels? Serializing? Repeated channel sends? EDIT: I want to send something like this: local t = { { type = "foo", "dat...
by Dantevg
Sun Jan 22, 2017 4:12 pm
Forum: Support and Development
Topic: Getting Windows 10 color
Replies: 9
Views: 1923

Re: Getting Windows 10 color

So, the easyest (and maybe the best) option is to set the window to borderless and make my own title bar I think.
Thanks for all the reactions BTW!
by Dantevg
Sat Nov 26, 2016 10:39 am
Forum: Support and Development
Topic: Getting Windows 10 color
Replies: 9
Views: 1923

Getting Windows 10 color

Hello, I was playing around with graphics, and I have just installed windows 10 with its fancy graphics, so I was thinking: Is it possible to get the RGB value of the window color, to set it as a background? (Or maybe even setting it to another color?) That would be nice to have. I want to make some...