Updated 031 Automatic import of custom code during compilation in JCB (markdown)
parent
31e8e1ffb3
commit
3eeab9a24d
@ -41,13 +41,13 @@ The way I'll do that is I'm just going to open custom codes in a new tab. And lo
|
|||||||
|
|
||||||
### Looking at The Replaced Code In Editor [00:10:03](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m03s)
|
### Looking at The Replaced Code In Editor [00:10:03](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m03s)
|
||||||
|
|
||||||
Now let's go back to the code. It actually inserted the code in the correct place, it moved the other code down enough lines, and it changed it from replace to replaced. It added the id after it. That targets it. I could go and say I don't actually want this in here, like that, click save, [00:10:32](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m32s) and then go back to the compiler, compile it again. Here we go, install it again. Go back here, refresh this. Oeps it didn't change let me quickly go see why. I forgot to add in the diamond. You want to change the code you need to ensure that you add this back in, otherwise it will not even look for it. So we add that back in. Let's try again. [00:11:18](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m18s) It worked it updated the code in the database. Let's install it. It updated in the code. So that's how easy it is to replace a certain section.
|
Now let's go back to the code. It actually inserted the code in the correct place, it moved the other code down enough lines, and it changed it from replace to replaced. It added the id after it. That targets it. I could go and say I don't actually want this in here, like that, click save, [00:10:32](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h10m32s) and then go back to the compiler, compile it again. Here we go, install it again. Go back here, refresh this. Oeps it didn't change let me quickly go see why. I forgot to add in the diamond. You want to change the code you need to ensure that you add this back in, otherwise it will not even look for it. So we add that back in. Let's try again. It worked it updated the code in the database. Let's install it. It updated in the code. So that's how easy it is to replace a certain section.
|
||||||
|
|
||||||
### Inserting Custom Code Via Editor
|
### Inserting Custom Code Via Editor [00:11:32](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m32s)
|
||||||
|
|
||||||
Let's look at inserting. Remember as I said, don't put code close to each other within at least eight lines. So 1, 2, 3, 4, 5, 6, 7, 8. I could actually from this line insert, another set or either insert or replace another section of code. [00:11:58](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m58s) The reason is because the fingerprint that it creates above the insertion, is sometimes up to 8 lines long. It could happen that it actually uses from there(see video). And that could possibly be an error when you make a change here. It will think that this code is also been affected and it won't find it. So that is one of the limitations that these code insertions that you do either by replacing or inserting as chunk of text script, can only be inserted up to eight lines apart [00:12:34](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h12m34s) From each other. Let's do an insertion over here(see video). We got that inserted there. I did put a comment. Let's save and compile.
|
Let's look at inserting. Remember as I said, don't put code close to each other within at least eight lines. So 1, 2, 3, 4, 5, 6, 7, 8. I could actually from this line insert, another set or either insert or replace another section of code. [00:11:58](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h11m58s) The reason is because the fingerprint that it creates above the insertion, is sometimes up to 8 lines long. It could happen that it actually uses from there(see video). And that could possibly be an error when you make a change here. It will think that this code is also been affected and it won't find it. So that is one of the limitations that these code insertions that you do either by replacing or inserting as chunk of text script, can only be inserted up to eight lines apart From each other. Let's do an insertion over here(see video). We got that inserted there. I did put a comment. Let's save and compile.
|
||||||
|
|
||||||
### Checking The Custom Code Tab For New Entry Before New Installation
|
### Checking The Custom Code Tab For New Entry Before New Installation [00:13:46](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h13m46s)
|
||||||
|
|
||||||
Before we install it, we can just again go check whether everything was done as expected. Yes the insertion was grabbed. It was added to the database and it is there. [00:14:04](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m04s) It has the hash target, with insertion we only need where it starts not where it ends. And so we can close that. Now simply install that component. Let's go look at the code. It did added the replacement script, change it from replace to replaced. It's added the inserted script from insert to inserted. [00:14:34](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m34s) If you want to make a change to it, we're again just add these diamonds here(<>). Make our change. Save the file of course, and compile. Let's check whether the work was updated. Great it's updated the work in the database. So let's install the component. Let's go look at the code again. Wonderful it's added it back. All seems well. [00:15:18](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m18s)
|
Before we install it, we can just again go check whether everything was done as expected. Yes the insertion was grabbed. It was added to the database and it is there. [00:14:04](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m04s) It has the hash target, with insertion we only need where it starts not where it ends. And so we can close that. Now simply install that component. Let's go look at the code. It did added the replacement script, change it from replace to replaced. It's added the inserted script from insert to inserted. [00:14:34](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m34s) If you want to make a change to it, we're again just add these diamonds here(<>). Make our change. Save the file of course, and compile. Let's check whether the work was updated. Great it's updated the work in the database. So let's install the component. Let's go look at the code again. Wonderful it's added it back. All seems well. [00:15:18](https://www.youtube.com/watch?v=DFMfIl-VkSk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m18s)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user