Property editor: Access model.config from custom configuration template
Hi guys
I'm currently having fun with a package that will hopefully be available to the public very soon.
For the package configuration I have made a custom view, which has a custom config controller attached.
Then I have some other configuration options created using the default "textstring" view - But I would like to access those values from these fields within my custom configuration view...but I can't do $scope.model.config in this context...but just wondering if there is a service or anything that I can inject, which makes those values easily accessible?
I have found a very hackish way of accessing the values but I would rather be able to access them in a more proper way if possible - The solution I have now works but it's very fragile and can easily break if I ad some point decide to refactor things and forget that the hackis htere and it's not something others should copy without at least considering the approach (I'll make sure to write that in the comments :))
So I hope my question makes sense? :) - If anyone is curious I expect to have a first release of the package sometime near the end of next week. (Suspense!).
So I gave this an afterthought and came to the conclusion that whatever approach I could take achieving this the code would still be a bit hackish so I think that the best way for me to achieve what I want is to add the settings fields to the custom view instead.
Only downside to this is that I need to override a single line of CSS on the umb-property class setting the margin-left:-180px;
That makes everything much more simple - And all of this probably does not make sense to other people than me right now anyway - But once the package is released it's probably easier for me to explain what I originally wanted to achieve :)
and I might just be reiterating what you are trying to do.
But if you are talking about preValues for your custom property editor package; and you want one preValue to see what was typed into another preValue. then perhaps instead of having some config options based on the textstring view, and some that are not; why not just have one custom config option ?
based on a custom property editor, that contains the text string input, and also the custom fields, then the values should be in the same scope, to be able to make your other fields respond to what has been inputted into the text string...
Thanks for responding - That was exactly the approach I ended up doing.
The reason why I considered the other approach was because I was not thinking clearly - And I wanted to keep the config styling on par with what one usually sees when setting up native property editors.
But once I was thinking clearly (just before I fell asleep - typical!) I came to the same conclusion and the only thing I needed to do to make the styling look right using this approach was to add a negative left margin.
But it's nice with a sanity check and confirmation - So thanks for chiming in on this one mate :)
Property editor: Access model.config from custom configuration template
Hi guys
I'm currently having fun with a package that will hopefully be available to the public very soon.
For the package configuration I have made a custom view, which has a custom config controller attached.
Then I have some other configuration options created using the default "textstring" view - But I would like to access those values from these fields within my custom configuration view...but I can't do $scope.model.config in this context...but just wondering if there is a service or anything that I can inject, which makes those values easily accessible?
I have found a very hackish way of accessing the values but I would rather be able to access them in a more proper way if possible - The solution I have now works but it's very fragile and can easily break if I ad some point decide to refactor things and forget that the hackis htere and it's not something others should copy without at least considering the approach (I'll make sure to write that in the comments :))
So I hope my question makes sense? :) - If anyone is curious I expect to have a first release of the package sometime near the end of next week. (Suspense!).
/Jan
So I gave this an afterthought and came to the conclusion that whatever approach I could take achieving this the code would still be a bit hackish so I think that the best way for me to achieve what I want is to add the settings fields to the custom view instead.
Only downside to this is that I need to override a single line of CSS on the umb-property class setting the margin-left:-180px;
That makes everything much more simple - And all of this probably does not make sense to other people than me right now anyway - But once the package is released it's probably easier for me to explain what I originally wanted to achieve :)
/Jan
Hi Jan
If I understand what you are talking about...
and I might just be reiterating what you are trying to do.
But if you are talking about preValues for your custom property editor package; and you want one preValue to see what was typed into another preValue. then perhaps instead of having some config options based on the textstring view, and some that are not; why not just have one custom config option ?
http://www.nibble.be/?p=377
based on a custom property editor, that contains the text string input, and also the custom fields, then the values should be in the same scope, to be able to make your other fields respond to what has been inputted into the text string...
or you may not be talking about that :-)
regards
Marc
Hi Marc
Thanks for responding - That was exactly the approach I ended up doing.
The reason why I considered the other approach was because I was not thinking clearly - And I wanted to keep the config styling on par with what one usually sees when setting up native property editors.
But once I was thinking clearly (just before I fell asleep - typical!) I came to the same conclusion and the only thing I needed to do to make the styling look right using this approach was to add a negative left margin.
But it's nice with a sanity check and confirmation - So thanks for chiming in on this one mate :)
Cheers, Jan
is working on a reply...