Skip to content
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

Code Block issue #4972

Closed
dbaldacchino opened this issue Jul 22, 2015 · 15 comments
Closed

Code Block issue #4972

dbaldacchino opened this issue Jul 22, 2015 · 15 comments
Assignees
Labels
needs investigation Needs looked into further.

Comments

@dbaldacchino
Copy link

When you start typing something in a code block, as soon as you type ".", it automatically selects the first item in the list of commands it finds based on what you type. This shouldn't happen and it should pick the item in the list only when you click Enter. Here's an example when trying to type "pt.x" in a code block similar to what is shown possible in this post: http://dynamobim.com/cbns-for-dummies/. As soon as you type "pt.", it automatically changes "pt" to "AdaptiveComponent". It should only pick "AdaptiveComponent" if I click the Enter key. Right now you have to play games in order to type in the variable name you want if there's a list of items available. Am I missing something or is this a known issue? Thanks.

@dbaldacchino
Copy link
Author

On a related note, Point.ByCoordinates is not working. Testing with 0.8.2.2005.

codeblock_point bycoordinates

@aparajit-pratap
Copy link
Contributor

This is an error due to a namespace conflict with Point class due to another package loaded in your Dynamo session. It could possibly be due to Rhynamo. This issue has been taken care of. If a user has a conflicting namespace in an installed package, and he types a class name in a code block, he will see all occurrences of that class. For instance if he has Rhynamo loaded, he will see Autodesk.Point and Rhino.Point when he starts typing “Point” in a code block. And if he opens an existing working file that uses a code block with “Point” in it, it should continue to work in any package environment unless that DYN file predates version 0.8.0.

Similar discussions can be found here:
#3208
#4821

@aparajit-pratap
Copy link
Contributor

As for the issue with typing a "." in code block node, it does autocomplete on doing so. This is as designed and is the same behavior that most IDE's exhibit.

@dimven
Copy link
Contributor

dimven commented Jul 23, 2015

My temporary workaround for the initial issue is to press the space bar after "pt", followed by a backspace. I've experienced similar behavior with other abbreviations but can't think of other examples at the moment.

@dbaldacchino
Copy link
Author

I understand it's similar to most IDE's, but in a code block, you're also typing in custom variables. The software should not be making the assumption that I want to pick something from the list. In my example of typing "pt", it is quite bizarre that the software picks "AdaptiveComponent". Having to type in spaces, then delete them etc. to get around this behavior ends up killing the nice fluidity that the code block was designed to achieve.

As for custom packages interfering with namespaces, I'll check what I have installed tomorrow. Is the fix already in a daily build? Thanks.

@aparajit-pratap
Copy link
Contributor

I see your concern with autocompletion of code block variables. The reason why you see this "bizarre" behavior is because autocomplete does not support completion of variables yet. We will be be adding this feature after which this issue should be solved.

The namespace conflict work is in the product since version 0.8.0.

@dbaldacchino
Copy link
Author

Thanks. So if the fix has been applied since 0.8.0, why am I having this problem in 0.8.2.2005? Here's what I have installed. Seems like Point is being redefined by one of the packages, rendering Point.ByCoordinates unusable.
packages

If I use Autodesk.Point.ByCoordinates, it works.

@mjkkirschner
Copy link
Member

Hi @dbaldacchino I believe point will be still be redefined, but when using autocomplete both possible namespaces will be shown so you can pick the fully qualified name of the method you want.

@dbaldacchino
Copy link
Author

Hi @holyjewsus , that's not happening for me. If I didn't read through the previous threads posted above, I wouldn't have known how to fix it and I guarantee you my users wouldn't have a clue! Here's what I see as I start typing:

point

@mjkkirschner
Copy link
Member

hi @dbaldacchino thanks for clarifying.

@aparajit-pratap
Copy link
Contributor

@dbaldacchino I see that even though there is a namespace conflict with "Point", you are not seeing all namespaces having "Point" in autocomplete? This should definitely not be the case. Autocomplete should display all possible collisions. If that's the case, this is a bug. The only way I can think of reproducing this is by installing all the packages that you have shown above and trying it out locally. Will do so and get back to you. Anyway, do you have any idea which package the other "Point" could be coming from?

@dbaldacchino
Copy link
Author

Hi, yes I'm not seeing the other namespaces. I really don't know which package it's coming from without uninstalling one by one. I'll post back if I find out tomorrow. Thanks.

@dbaldacchino
Copy link
Author

The culprit is Mantis Shrimp by @ksobon. Once uninstalled, Point started working as expected and no errors were thrown.

@ksobon
Copy link

ksobon commented Jul 27, 2015

Yes, I am using RhinoCommon in MantisShrimp and it has a Point class. However, I thought this was already addressed:
capture
It must be a regression in 0.8.2

@aparajit-pratap
Copy link
Contributor

@ikeough ikeough added the API label May 3, 2016
@johnpierson johnpierson added 0.x needs investigation Needs looked into further. and removed API labels Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Needs looked into further.
Projects
None yet
Development

No branches or pull requests

7 participants