undefined variables when importing another less file. LESS - asp.net-mvc

When I load my Quote View, I'm getting unprocessed less text at the top. Stating a list of less variables undefined. However when I refresh the same page, the error goes away, and the styles work fine. I realize that SSPContainer.less is loaded after ReadOnlyWaybill.less (incorrect)when error, and on page refresh (working fine) is loaded before. so why is it behaving like that?
I'm using mvc bundling.
layout view - uses the layout bundle including SSPContainer.less
QuoteView - uses the quote bundle, including ReadOnlyWizard.less. but it is also inheriting the 'layout bundle files' as layout view is the master page of Quote View.
error - variable #line such and such is undefined in ReadOnlyWizardLess
SSPContainer.less - this is the parent less file, and declares the variables.
-ReadOnlyWizard.less - this imports 'SSPContainer.less' and uses its less variables.
??

Related

Sitefinity 9.2 MVC 5 Feather and Ninject - Error loading module, another module with the same name has already been loaded

Please see attached screenshots and code if that makes it easier (at the bottom of this http://www.sitefinity.com/developer-network/forums/developing-with-sitefinity-/sitefinity-8-2-to-9-upgrade-error#HlX3NsE3622pWP8AAERlJg post)
I have tried all the methods listed above and the workaround, but still keep getting the same issue.
This happens when I trigger changes(activate/deactivate) a module in Sitefinity/Administration/ModulesAndServices
The progress bar (green) goes into a loop and refreshing the page gives me this:
Error loading Ninject component ICache
No such component has been registered in the kernel's component container.
Suggestions:
1) If you have created a custom subclass for KernelBase, ensure that you have properly
implemented the AddComponents() method.
2) Ensure that you have not removed the component from the container via a call to RemoveAll().
3) Ensure you have not accidentally created more than one kernel.
And in the error logs for sitefinity I get:
Message : Error loading module 'YourPackage.YourModule' of type YourModule
Another module (of type YourModule) with the same name has already been loaded
Suggestions:
1) Ensure that you have not accidentally loaded the same module twice.
2) If you are using automatic module loading, ensure you have not manually loaded a module
that may be found by the module loader.
Have followed the article: http://docs.sitefinity.com/feather-use-constructor-dependency-injections
and the workaround too: https://github.com/Sitefinity/feather/issues/2580
Thanks in Advance

iOS: Unknown classes in reflection

At runtime, when listing the classes in my main bundle (using objc_getClassList). I see things like :
_TtGCs18ManagedProtoBufferVs29_HashedContainerStorageHeaderVs5UInt8_
_TtGCs13ManagedBufferVs29_HashedContainerStorageHeaderVs5UInt8_
_TtGCs28_NativeDictionaryStorageImplCSo8NSObjectPs9AnyObject__
_TtGCs18_HeapBufferStorageVs18_StringBufferIVarsVs6UInt16_
Any ideas what those are??
Also, they do not always appear...
I also see NSKVONotifying_NSUserDefaults sometimes.

Detecting unused methods iOS

Very simple question and hopefully isn't duplicated :).
The situation is following:
Project has been developing more then a year and by many developers.
From time to time I'm facing with unused methods (which are defined in .h and .m) obviously I'm not getting any warnings.
This is not critical, but I would like to have project cleared from all unnecessary staff. Of course I can search for all methods and define which are unused in project but I wonder if there is more elegant way?!
Thanks
A quick way to check while browsing your source code is the View > Standard Editor > Show Related Items menu (shortcut key: ^1). Place your cursor within a method body and then view the Callers.
AppCode (http://www.jetbrains.com/objc) can tell you if a method or an import is unused.
It's works in real time, but you can also inspect a whole project (menu code > inspect Code)
I don't think xCode can do it.
AppCode is not free, but it has a trial version.
Might I suggest adding an NSLOG to these methods. For example, if you have a View Controller called Home, you can go into the .m file for the Home View Controller and at the top of the function, write the following:
NSLOG(#"Method 1, has 3 buttons);
then watch the readout as you progress through the actions on that View Controller. The log should say something that would best describe the method in question. Step 2 would be to take the methods that you feel aren't showing up on the output and comment them out. That can be done by highlighting the method and then hitting Command + '/' on the keyboard. This will place '//' in front of each highlighted line commenting it out. Test your view controller again and if still no errors, you can delete that method. That's a free way to do it, but it does take some time.

Rails 3.2 + CoffeeScript + Namespacing + Separate Files = Confusion

I have one companion script file for a Rails model, that uses code I've broken down into a hierarchy of over a dozen classes, for things like jQuery/Bootstrap UI code, factoring out similarities between different types of dialog, and so on. Let's say I'm working with articles.js.coffee as the "main page script" here.
I can define Coffeescript classes, namespace them as something like window.ourproject.OurUIDialog, and save them in separate, per-class source files such as app/assets/javascripts/OurUIDialog.js.coffee. Restart the Rails server, and that class can be subclassed, e.g., window.ourproject.PostInfoDialog extends window.ourproject.OurUIDialog. As long as PostInfoDialog is in articles.js.coffee (where the instantiation of the PostInfoDialog is), all is well.
But, if I move the subclass (PostInfoDialog) out into a separate file, e.g., PostInfoDialog.js.coffee, then attempting to do anything at all with it within the main articles script produces
Uncaught TypeError: Cannot read property 'prototype' of undefined
Again:
This revolves around a Rails model's companion script file, here called articles.js.coffee;
window.ourproject.OurUIDialog gets picked up whether it's in its own file or in articles.js.coffee
window.ourproject.PostInfoDialog (which extends OurUIDialog) can only be used if it's not in a separate file, even though viewing the generated HTML shows PostInfoDialog being included with all the other script files.
I'm tearing my hair out trying to figure this out, and I didn't have much left to begin with. Any ideas?
Pretty sure that Trevor Burnham answered my question when he answered this one; I just didn't see it the first dozen times I searched. :-P
Thanks to both of you for reading this one, though. :-)

Help-balloons in Grails

I am using the help-balloons plugin
I would like to use it parametrized. I mean, the messages should come from a properties file. In the documentation appears the following:
<g:helpBalloon code="user.name" suffix=".help"/>
In this last example, the code attribute is used to look up the balloon's title within the message bundle and then the suffix is added to the code (producing user.name.help in our example) as the key to be used for looking up the content of the balloon.
My question is:
Where should be located this properties file (message bundle)?
Can I have one message bundle per controller?
Luis
if you looked at the source code for the help balloon tag, it literally uses the grails interationalization code to render the message if given a key. http://fisheye.codehaus.org/browse/grails-plugins/grails-help-balloons/trunk/grails-app/taglib/HelpBalloonTagLib.groovy?r=45243
check out this page http://www.grails.org/doc/1.0.x/guide/10.%20Internationalization.html it tells you where and how to name the file for message bundles.
as for a message bundle per controller, it doesnt seem like you can (at least not apparent from the documentation). but you can hack it by prefixing the message key by the controller name, and thus use the same message bundle file (message.properties_ but still be able to namespace each message.
Where are the Resource bundles:
There is a directory under grails-app called i18n where all the generated resource files are placed, start looking there and see how they are used in the app.
You may be able to just place multiple message files for your controllers in there for organization, just be careful of reusing keys as I'm not sure how that will be handled off hand.
How to access them:
Maybe this will help I hope:
http://www.nabble.com/Organizing-message-bundles-tt16169280.html#a16169280

Resources