VISIBLE(FALSE) doesn't works

celevenceleven Member Posts: 3
I'm programming the Eight-Queen-Problem in NAV. I create a form, shapes to represent the chessboard and textboxes for the queens with a "Q"-textconstant (for Queen) as sourceexpression for the textboxes.

With a recursive function i set e.g. the first solution in an array. The calculation is correct, the right queens are shown after the calculation.

BUT: I will set the queens during the calculation. I will make visible how backtracking works, make the calculation visible, make visible how the program set and remove queens. When i e.g. call from the recursive mainfunction a function that do showing the queens:
CurrForm.queen_23.VISIBLE(x[2] = 3);
CurrForm.queen_23.UPDATE;
...

When the expression is True, then the "queen_23" will appear on the chessboard cause the UPDATE on textbox. BUT WHEN THE VISIBLE STATEMENT IS FALSE, the program has to remove the queen, but this doesen't works.Why Not? Is this a problem of a recursive function that calls a function?

Thanks for Feedbacks.

Comments

  • kinekine Member Posts: 12,562
    You can try to update whole form by CurrForm.Update(False)... :wink:
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • celevenceleven Member Posts: 3
    An Update on the whole form doesn't works. But I solved this problem in another way. I created a new matrix as the source expression for the textboxes. After i assigned a 'Q' or a '(space)' to it, depends on whitch textbox shows a queen and which not. After this, i update the textboxes with this statement: CurrForm.textbox.UPDATE;. Now it works.
Sign In or Register to comment.