I am completely stuck

This is how you should write your child contract if you wish to use inheritance. Then all you have to do is to deploy the child contract. You don’t have to deploy the parent. Use the same parent contract as in your latest post.

pragma solidity ^0.4.20;

import './parent.sol';

contract InhChild is InhParent{

  function getValue(address addr) constant returns (uint256[]){
     return accountTx(addr);
 }

}
1 Like

Hi Filip,

Thank you so much for your reply.
I have tested your solution and in this case the child contract is inheriting all the functions from the parent contract. and if I store some values using the store function in parent contract, I can’t access these values by calling the getValue function in child contract.
I can only access the values that are being stored using the storeValue function in child contract.
So, if i have to run the both functions, store and get value, in the child contract then why I need to inherit them from parent contract? I mean, in that case a simple getter and setter function can also do the same job.

I want to use store values in parent contract and access them in child contract via inheritance or any other possible mean. is that possible?
with thanks,

I dont understand how to compile my code from atom. Ivan is compiling his code from atom to the white screen on the right side. I just cant figure out how to do that to. Please help!!

White screen is browser. Just find where you saved *.html and open the file.

Hi,

I have installed Atom Text Editor v 1.27.2 x 64 on Mac 10.13.4 but when I am typing in the editor, it does not autocomplete. I checked to see if there was an additional plug-in that was required but documentation states that it is bundled with Atom. I looked in Preferences>Packages and ‘autocomplete-atom-api 0.10.7’ is enabled, so I can’t work out why autocomplete is not working?

I learn the following from @Wasil_Sriwi’s post about a preview package in Atom. Works for me!:

Hope this helps.

3 Likes

Check out @Wasil_Sriwi’s post , here: https://forum.toshitimes.com/t/html-reading-assignment/3055/170?u=bon

Besides the preview package for Atom, he also mentions a package called “autoclave” that completes entries for you. I haven’t installed that one yet, but the preview package works perfectly. (Thanks again, @Wasil_Sriwi for that info!)

1 Like

hey guys and gals i am stomped I am on the HTML portion of ivan’s on tech’s course and am currently mirror the steps that traversy html for beginners if finish that but also wanted to try this course he offered for better understanding: CSS Crash Course For Absolute Beginners as additional training for HTML .I am at about 42.50 mins in his video and this is a link to his video “https://www.youtube.com/watch?v=yfoY53QXEnI&t=1795s” now i am trying to set images for bullet points for listed items. but the image just does not show. this is my HTML code:


Categories


  </ul>
</div>

and this is my CSS code:

.categories{
border: 1px red solid;
padding: 10px;
border-radius: 15px;

}
.categories h2{
text-align: center;
}
.categories ul,{

padding: 40px;
border: 10px;

}
.categories li{
list-style: none;
list-style-image: url(‘CSS\csscheatsheet\images\download.png’);
padding-bottom: 6px;
border-bottom: dotted 1px red;

}
now i have try other methods that i found on youtube like this video :https://www.youtube.com/watch?v=sTsbQO1aAXo
and also tried suggestions from this article but it did not work :https://www.sitepoint.com/community/t/list-style-image-not-working-any-ideas/5422
i also found this article in stack overflow but it was a bit confusing to me :https://stackoverflow.com/questions/28172967/css-list-style-image-not-showing

if someone could help me with this it would be greatly appreciated , i just like to have a good understanding of things before moving on to something else. i will continue to look for resource else where but i thought i should check with yall first . thanks in advance people! yours truly Saul

1 Like

Those look like interesting videos, but I don’t think this course is even covering CSS? That has more to do with web design and manipulating how your output looks. Nothing wrong with learning it, of course, more power to you! I could be wrong, but I think it’s not necessary for this course.

1 Like

You might want to check the URL that you are using to load the images from.

1 Like

How do I clear my notifications in this forum? There are all still there even after I have read them.

1 Like

No worries @bon! you are very welcome ! I just realized that I misspelled the last one “it is autoclose-html” and it works great for me! you should try it. I will correct my post :stuck_out_tongue_closed_eyes:

2 Likes

I think you have a misunderstanding about inheritance. After you have inherited from the parent contract in the child contract, you don’t want to use the parent contract anymore. You don’t need to deploy it. You should only interact directly with the parent contract.

The point of inheritance is not to store values in the parent contract. The point is to reuse code, not having to re-write code that is common between multiple child contracts for example. Instead of doing that we can use inheritance to re-use code in all child contracts for example.

If you want to store things in other contracts and interact in between them you should look at external contracts instead. One example would be the Tokensale example in the course. Where we interact between the tokensale contract and the token contract, not using inheritance.

3 Likes

Hi all,

I am stuck on the “Scope - Local and Global Variable” Lecture. In order to connect to the console Ivan has a link in his script: " <script src=“https://ajax.googleapis.com/ajax…”

Where can I find this?

Thanks!

1 Like

To answer your question
Here’s a link to jQuery’s minified code (compressed) which you will need to download, store and reference locally. Alternatively the same code hosted by Google, which you can use with the following snippet within the head tags of your HTML.

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

A side note
jQuery provides helpful Javascript methods to interact with HTML elements on the page. Ivan doesn’t actually use any jQuery in this lecture, and you’d be fine to exclude that script from your page at this point. The console and specifically the console.log() is available within any javascript environment. Javascript is always running within your browser, unless you explicitly disable it, so console.log() will always be available and work within your <script> tags. You can view output to the console by opening developer tools, this is found in different locations for each browser, but typically you will be able to find developer tools or web console within the view menu of your browser.

1 Like

Don’t get hung up on the CSS (unless you want to be a website designer… in which case, you might want to check out Free Code Camp). I understand what you mean about wanting to understand everything before moving on, though, because I have that same urge, too, big time! But, like Ivan says, that doesn’t work, because you will never understand everything. Just keep going, even if it feels like you are flying by the seat of your pants. It looks like you are doing well on the HTML. Continue on!

2 Likes

A bit frustrating using console in Chrome!! How do you edit in the console?

1 Like

Hm that is not to connect to the console, the code you included is to get the functionality in the jQuery library. Can you describe what you’re struggling with more?

1 Like

Can you explain your question more, what do you want to edit? Include screenshots of your issue

1 Like

Hi Filip,

Thank you for your guidance.
It seems that I have wrong expectations with inheritance and I think external contracts are best option to consider in this case. Because, I want to store values in one contract and then use those stored values in another contract (by calling the store values function from parent contract to child contract).

I’ll study the tokensale contract and update you about the outcomes.
Thank you again,
with regards,

1 Like