Changing default blue theme to green - sencha-touch

I want to change the default blue color of my Sencha Touch application to green. The steps I followed are listed below:
gem update --system
gem install compass
compass create myfile
Copied a .scss file and pasted it in the touch-2.2.1/resources/sqss/ directory.
Pasted the following code in that file and named it happy.css:
$base-color: #709e3f;
#import 'sencha-touch/default/all';
#include sencha-panel;
#include sencha-buttons;
#include sencha-sheet;
#include sencha-tabs;
#include sencha-toolbar;
#include sencha-list;
#include sencha-layout;
#include sencha-loading-spinner;
compass compile happy.scss
Replaced the name happy.scss in the app.html page.
Ran the application, and I got the following error:
Syntax error: Undefined variable: "$font-family".\a on line 2 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_Class.scss\a
from line 1 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/src/_all.scss\a
from line 1 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/themes/stylesheets/sencha-touch/default/_all.scss\a
from line 3 of
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss\a\a
1:
/Applications/XAMPP/xamppfiles/htdocs/touch-2.2.1/resources/sass/happy.scss
How can I solve this?

Add the following line
#import 'sencha-touch/default';
Before this line
#import 'sencha-touch/default/all';
Also as per documentation
There are a lot of changes from Sencha Touch 2.1 to 2.2,
The most important change to be aware of is the move away from using mixins
for each component
We found that using mixins for each component was quite slow when compiling your Sass,
so we decided to simply move to using #import to just include each component.
In Touch 2.1, your stylesheet looked like this:
#import 'sencha-touch/default/all';
#include sencha-panel;
#include sencha-buttons;
// and other components…
In Touch 2.2, it looks like this:
#import 'sencha-touch/default';
#import 'sencha-touch/default/Panel';
#import 'sencha-touch/default/Button';
// and other components

Related

Make(compiler) complains about missing llvm/PassAnalysisSupport.h file

I downloaded LLVM (12.0.1) from the script file llvm.sh which they have now started to include on their Debian downloads page.
Ran clang and everything was working as expected(good job dev team I guess?).
The installation script installed LLVM in /usr/lib/LLVM-12/ and /usr/include/LLVM-12/ (these had some .h files)
So I tried writing some passes; created an out-of-tree build using the answer given here:
Facing issue with makefile for Hello pass in llvm
But when I ran the make, it gave me this error:
/usr/include/llvm-12/llvm/Pass.h:337:10: fatal error: llvm/PassAnalysisSupport.h: No file or directory
337 | #include "llvm/PassAnalysisSupport.h"
|
compilation terminated.
So I checked /usr/include/llvm-12/llvm/ and found that Pass.h and PassAnalysisSupport.h both were present in the current directory, so shouldn't the Pass.h file have #include "PassAnalysisSupport.h" instead of the present #include "llvm/PassAnalysisSupport.h"?
I also checked the code for Pass.h online and it also had #include "llvm/PassAnalysisSupport.h". Other header files in the llvm directory also used the same format #include "llvm/<name>"
So what is going on here, who messed up, the devs or my llvm.sh (also the devs) or the problem is something else?
Any help would be appreciated (Im using Mint MATE 20.2 if thats relevant)
Source file (headers; firstpass/first/fpass.cpp):
#include <llvm-12/llvm/Pass.h>
#include <llvm-12/llvm/IR/Function.h>
#include <llvm-12/llvm/Support/raw_ostream.h>
#include <llvm-12/llvm/IR/LegacyPassManager.h>
#include <llvm-12/llvm/Transforms/IPO/PassManagerBuilder.h>
(firstpass/CMakeLists.txt):
find_package(LLVM REQUIRED CONFIG)
include_directories($(LLVM_INCLUDE_DIRS))
add_subdirectory(first)
(firstpass/first/CMakeLists.txt):
add_library(LLVMfirst MODULE fpass.cpp)

"config.h" used by but not bundled with libxml

libxml uses the following line of code in libxml.h but it doesn't come bundled with libxml.
#include "config.h"
I'm trying to use XMPPFramework for Objective-C, in Swift. The XMPPFramework has libxml as a dependency.
You could try including these:
#include <stdio.h>
#include <libxml/tree.h>
#include <libxml/parser.h>
As found on:
http://wiki.xmlsoft.org/The_libxml2_Library#Installing

Unit Test build failing when importing MagicalRecord

I have a project setup using the UnitTest template provided by Apple. Too I added MagicalRecord to Prefix header. When I am running on the device and Simulator everything is working fine.
Except the Unit Tests, when I am compiling for the unit tests the build failed with the following command: 'CoreData+MagicalRecord.h' file not found . This happens in the prefix header.
prefix.pch
//
// Prefix header for all source files of the '123tv' target in the '123tv' project
//
#import <Availability.h>
#ifndef __IPHONE_3_0
#warning "This project uses features only available in iOS SDK 3.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import "Environments.h"
#import "CoreData+MagicalRecord.h"
#import "PBLog.h"
#endif
Has anyone an idea?
Make sure that the Header Search Paths is set up correctly for your test target.
I generally use CocoaPods which will automate this stuff for you
Try to run command (1) in terminal, then add import in step (2)
In your project directory
run pod update
You should now be able to add
#import <MagicalRecord/CoreData+MagicalRecord.h>
to any of your target's source files and begin using MagicalRecord!

unable to use the reachability functionality of objective C

I am using XCode 4.3 and trying to check if the user has internet connection
I am using the reachability functions that are provided by apple but when I create an instance using this line
Reachability *curReach= [Reachability reachabilityWithHostName:#"http://www.google.com"];
I get the following errors :
"_OBJC_CLASS_$_Reachability", referenced from:
objc-class-ref in classfile.m
and
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have included reachability.h and .m and I included the following in my .h and my .m file :
#import <SystemConfiguration/SystemConfiguration.h>
#import <Foundation/Foundation.h>
#import <CoreFoundation/CoreFoundation.h>
#include <netinet/in.h>
#import "Reachability.h"
#import <sys/socket.h>
#import <netinet/in.h>
#import <netinet6/in6.h>
#import <arpa/inet.h>
#import <ifaddrs.h>
#import <netdb.h>
any reason why I am getting this error?
You've possibly chopped the error message a little too tightly, but it looks like a link-time error warning you that the Reachability class isn't part of your final binary, despite the interface having been visible while building.
So either you're using a static library for the reachability code and have built it for ARM (ie, actual device deployment), or you've neglected to include Apple's Reachability.m in your target. Possibly the easiest way to check the latter is to enable the right panel, select Reachability.m and look for a suitable tick under the 'Target Membership' heading.

Why am I unable to #ifdef stdafx.h?

I am trying to include 2 platform-specific stdafx.h files in my .cpp file, but the compiler is unhappy when I try to #ifdef it.
#ifdef _WIN32
#include "stdafx.h"
#elif _MAC
#include "MAC/stdafx.h"
#endif
You may wonder why I am using stdafx.h in the Mac code, but that is not important at the moment :).
When I try to compile the code on Windows, I receive: Fatal Error C1018. I tried enclosing other header files with #ifdef in the same file, and the compiler was happy. Therefore, it looks like Windows doesn't like stdafx.h to be #ifdef-ed, or that Windows only allows #include stdafx.h
to be the first line in the file.
So my question is, why?
Kat
When the compiler includes a pre-compiled header, it basically "forgets" anything that came before the header. Thus your #elif isn't matched to a #if anymore.
This is because you have Precompiled Headers turned on - turn it off and you should be fine.