g4143

g4143

Accesing A Module's Structure

How does one access/create the structure Inode, defined below, from another module?

defmodule Cont.Expr do

  defmodule Inode do
    defstruct value: 0
  end

end

Marked As Solved

christopheradams

christopheradams

inode = %Cont.Expr.Inode{}

Also Liked

josevalim

josevalim

Creator of Elixir

Where are you placing your files? How is you or your editor compiling them? mix compile?

josevalim

josevalim

Creator of Elixir

I would double check the file extensions. If that still does not work, can you push the project to Github or something that reproduces the error?

josevalim

josevalim

Creator of Elixir

I could not reproduce it. What is your Elixir version?

Last Post!

g4143

g4143

I’m just glad that issue is solved(for me). Do you know how confusing it is to see an error pop-up in the editor indicating something is incorrect when it really isn’t?

Thank-you everyone for helping with this problem. I’ll file the report today.

Where Next?

Popular in Questions Top

hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Other popular topics Top

jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement