Page 1 of 1

Property select method shows method in different solutions

PostPosted: Thu Nov 21, 2013 11:42 am
by deezzub
I want to select the showLookupWindow function for an "onAction" button event. The "Select Method" window shows me the same function from different solutions. Why the function is not only shown once, if the solution I'm in knows the solution where the showLookupWindow function is.

2013-11-21 09_07_46-servoy_developer_button_event_method_select_same_methods_from_different_scopes.png
Same method from different solutions
2013-11-21 09_07_46-servoy_developer_button_event_method_select_same_methods_from_different_scopes.png (49.9 KiB) Viewed 6249 times

Re: Property select method shows method in different solutio

PostPosted: Thu Nov 21, 2013 2:07 pm
by mboegem
Hi Sebastian,

the selection dialog shows you all possible entries that match your criteria.
That means:
- every matched entry in a scope (which is basically public)
- every matched entry in a form as long as it's not tagged 'private' or sometimes 'protected'

In your case the functions might be exactly the same (which would be a bit strange as you don't want to have duplicate code and shouldn't be necessary), but this selection is proposed based on a function name and not code.
Your current scope does matter as you will never see functions which are higher in the solution/module hierarchy.

The only thing I don't understand is why it's also proposing the deprecated method in 'svy_nav_lookup_windows.globals'
I'd say this is incorrect and a bug in Servoy.

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 10:56 am
by rgansevles
mboegem wrote:The only thing I don't understand is why it's also proposing the deprecated method in 'svy_nav_lookup_windows.globals'
I'd say this is incorrect and a bug in Servoy.


Marc,

I don't think we should just filter out deprecated methods.
They are marked very clearly using the strike-though font but they can still be used.

Rob

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 11:26 am
by deezzub
rgansevles wrote:I don't think we should just filter out deprecated methods.
They are marked very clearly using the strike-though font but they can still be used.

I agree with that, but I think the svyLookupWindows.showLookupWindow should only be showed once, because in the end there is only one svyLookupWindows.showLookupWindow.

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 11:47 am
by rgansevles
Sebastian,

Do you have the same scope name in different solutions?
This is only allowed for the globals scope, all others should be uniquely named

Rob

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 1:03 pm
by deezzub
rgansevles wrote:Do you have the same scope name in different solutions?
This is only allowed for the globals scope, all others should be uniquely named

No, our scope names are all uniquely named.

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 1:11 pm
by rgansevles
Then the problem is not duplicate methods showing but duplicate scopes showing.

I think somehow your workspace ina confused state.

Is there any way you can reproduce that from a new workspace with a new solution?

Rob

Re: Property select method shows method in different solutio

PostPosted: Wed Nov 27, 2013 1:51 pm
by deezzub
rgansevles wrote:I think somehow your workspace ina confused state.

This occurs also in a fresh Servoy installation with our project(s) cloned from Git remote. I think it has something to do with the dependencies of the module, where I want to use the function.