rename block ID
-
Hiho.
As you can look into my projects I have no testcode for you. But here is the part of the source code which is obviously not right:
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // fxDreema block #DrawGui (Draw Upper Border <br>) // void block164(int _parent_=0) { if (blockDrawGui==false || FXD_BREAK==true) {return;} FXD_CURRENT_FUNCTION_ID=164;So the block should not be called block164 but DrawGui!? So the error i get when compiling is :
Compilation errors
(4398,90) : error 256: 'DrawGui' - undeclared identifier
Result: 1 error(s), 0 warning(s)
Time: 93 msCan you help me here too?

thanks in advance
hilaPS: after some test it seems FXdreema doesn't like any other then numbers as IDs or there wne't something wrong with my project
-
Funny thing. I renamed a block to ID 2222 and then FXdreema seems to internally renamed my 'DrawGui' blockID to 2224 ...
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~// // fxDreema block #DrawGui (Draw Upper Border <br>) // void block2224(int _parent_=0) { -
Hmmmm, I guess you are playing in MetaEditor with this. All of these numbers are generated when you export the file and normally they are fine. Also it is possible to give a block non-numeric ID... but I will probably prevent this, and maybe I will hide all the block numbers as well.
Some programs generate some short title instead of numbers. Well, I am so much focused to make the code friendly to read. It is, but for me.
If this is somehow generated from fxDreema, give me the project ID

-
Hi.
I didn't 'play' with Metaeditor. I just posted the code for you to see what FXdreema compiles. I get the error message right out of FXdreema without editing the code!
You can look at my project amcTradeManager (mt4-8677).
I just modifed it. When you look at the tab 'on chart' and there at Block with the name 'TestBlock'. It call the block with the name 'DrawLowerBorder'.
I named one block like 'DrawLowerBorder' but when i compile the project i get the error 'DrawLowerBorder' undeclared identifier.This comes right out of FXdreema...
-
What i find suspicious is that the variable is surrounded by ' at the beginning and ' at the end ...
......
FXdreema1.png -
I think that everything works. Now you have some errors in the block with the custom code.
There is a function "fxD_BlocksLookupTable()" that is used to support blocks "OR" and "AND", and because of that you are able to see human-readable variables mixed with number IDs. Long story.
-
I'am just working on the project

I will copy the projet in its faulty state an post again the project ID.
-
So. I made a copy of the current project its ID is mt4-1549.
You see the error. The blocks to take a look into are on the 'on Chart' tab number 66 and the 'DrawGui' block.
Thanks in advance
-
Got it. The problem is a little bit below on the code where I get the ID of the block and put it as is, and if it numeric there is no problem, but in this case the ID is DrawGui and this is not recognized as a variable

But I really think that I will remove the option to give blocks IDs like this, and I'm thinking of how to hide them, so they will remain for the system. Which block will run first (in parallel connections) will depend on it's relative position to the other blocks - the first to run is the one who is on the right/on top. What do you think about this idea?
-
Fine that you found the problem.
Giving block a real name and not only a number is in my opinion a very good idea!!!!!

When you also wan't to remove the IDs from the vision of the user then how can I jump from one block to another when they are not connected.
Example: I have some functionality at the 'on chart' tab and when I initialize the EA I need to call that functionality within the 'on init' tab then I won't have any chance of calling the blocks at the 'on chart' tab and have to copy the whole functionality to the 'on init' tab!? I won't have any 'GoTo' functionality!?I really would love to see the names IDs stay ! I was so happy to see that I can jump to another block on another tab that makes the EA better readable and gives it more structure!
Hope you let the IDs stay.

thanks
hila -
You could prevent several connections from one block to another and introduce a new block which has one input and several outputs. And the logic in which ordering the outputs will be activated lies within the block. (Left to right, Right to left, ...) What do you think of this?
-
__Fine that you found the problem.
Giving block a real name and not only a number is in my opinion a very good idea!!!!!

When you also wan't to remove the IDs from the vision of the user then how can I jump from one block to another when they are not connected.
Example: I have some functionality at the 'on chart' tab and when I initialize the EA I need to call that functionality within the 'on init' tab then I won't have any chance of calling the blocks at the 'on chart' tab and have to copy the whole functionality to the 'on init' tab!? I won't have any 'GoTo' functionality!?I really would love to see the names IDs stay ! I was so happy to see that I can jump to another block on another tab that makes the EA better readable and gives it more structure!
Hope you let the IDs stay.

thanks
hila[/quote:3nihl69m]People don't understand what happens when they have parallel connections. Sometimes they even connect blocks in parallel when it's easier to connect them serial... then I explain about these IDs.
Another problem is that at some point numbers become big numbers. Also when you have many blocks and there is no order, it's hard to find certain ID. And there is a title that can be edited, why not using this?
For "worm holes" maybe it's better to have special blocks with special IDs, or why not colors.
There was a guy who suggested a block with multiple inputs and multiple outputs 3 years ago, to be something like matrix. But again, people don't get some simple things, what about such a fancy stuff (this is only more material for me to support)
-
I understand.
More block functionalites means more support. 'Keep it simple' is the way to go. Sure.
Sometimes drag and drop is easily done but without any thinking before doing it. When there is still a chance of 'calling' a block from another tab or some other 'distant location' you can hide the IDs.
-
Now you can't connect blocks between tabs only because you can't see them at the same time. And if it is possible to make connections like this, how the connections would look like?

Now I even have ideas to make it possible to use multiple pages (tabs) within the same event tab... to group blocks somehow, something like Areas. This means even more tabs. I always prefer to see everything on the same page, but sometimes it's good to put some order
-
__Now you can't connect blocks between tabs only because you can't see them at the same time. And if it is possible to make connections like this, how the connections would look like? :)[/quote:3blsqgjh]
Sorry I don't understand.
Ex.: 'on Init' I do a 'Run blocks' and in there I call a block which is on the 'on Chart' tab. This is how I do it at the moment. As I said. Its some kind of GoTo statement and easy to handle. (at least for me).