-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Propose to depreciate childWithName+ #207
Comments
yes #childNamed: and #childWidthId: seem identical |
I think your proposal is right. |
Ok no problem to do a PR. |
@tinchodias I have tried to refactor some methods here : https://github.com/labordep/Bloc |
Hi @labordep I of got the same image freeze! My steps were: clone your repo on my Mac and run the build.sh script to install it. Then I started to place halts and ended placing one at the first line of There first I noticed an exception in a debugger (wantsSteps blah blah) in the screenshot below, and I went to the Preferences to disable dialog warnings checkbox (I suspected this can help, but wasn't sure at all): Then run again the test and the error was different: At that point I realized the rewriting expression may require the argument (see inline comment in the repo). And yes, it was required. So now the test runs without freezing, but it fails: the id returned by the BlElement is not the Symbol but an BlElementId I think. The test fail message is confusing because the printString of the BlElementId is exactly like the Symbol. I'm not sure there what is the good solution, I let it to the author ;) |
Thanks @tinchodias I will check that :) |
I have created an issue for Pharo about this problem : pharo-project/pharo#12791 |
The issue tracker entry for Pharo uses #name on Class.. there is no way that this can work, as #name is called again in the debugger (or the exception). |
wantSteps might be related to |
If I use this on a simple example
It might be that you called this in a situation where the method with the error is called in a loop? |
Possible, but how can I stop the loop to check that ? |
You can't... it will allocate so much memory so fast that it just freezes. Adding a DNU in #name is just not a good thing to do. |
Thanks @MarcusDenker :)
is not a good idea because |
if you do it with a method that has lots and lots of calls (in a loop, maybe even another process), and you add an error there, you will have problems... this got a bit confusing as you used #name in Class in the other issue tracker: that method is better not to be touched, as it is used to print the exception when the DNU happens. In the case of containerName I guess it is similar, a method that is used a lot while the system is running. |
Yes I think |
Hi, what happened with the associated code change? |
Looking at usages of containerName and containerName:, I guess they are legacy from another time where they made sense, but now should really be deprecated and substituted. |
ok :) |
Yes! |
Hi @tinchodias,
I propose to depreciate all
BlElement>>childWithName+
methods because of multiples points :BlElement>>childWithId+
methods which are doing the same thingselementId
Name
is not the most common term to speak about an identification of a graphical element (but this point is subjective from my experience) and we prefer id which is most operationnalThanks for your feedback.
The text was updated successfully, but these errors were encountered: