Skip to content

Instantly share code, notes, and snippets.

@exclusiveTanim
exclusiveTanim / Crash.log
Last active January 25, 2019 18:38
Sample Code for iOS listView
[ERROR] : Script Error {
[ERROR] : column = 15;
[ERROR] : line = 901;
[ERROR] : message = "Invalid type passed to function";
[ERROR] : nativeLocation = "-[TiUILabel setAttributedString_:] (TiUILabel.m:485)";
[ERROR] : nativeReason = "expected: TiUIAttributedStringProxy, was: NSNull";
[ERROR] : nativeStack = "3 listViewIssue 0x000000010dcb5bdb -[TiUIView throwException:subreason:location:] + 107\n4 listViewIssue 0x000000010dd239a7 -[TiUILabel setAttributedString_:] + 503\n5 listViewIssue 0x000000010dd38cdf __DoProxyDelegateChangedValuesWithProxy_block_invoke.54 + 47\n6 listViewIssue 0x000000010dd8205e TiThreadPerformOnMainThread + 78\n7 listViewIssue 0x000000010dd38bc5 DoProxyDelegateChangedValuesWithProxy + 853\n8 listViewIssue 0x000000010dcba744 -[TiUIView propertyChanged:oldValue:newValue:proxy:] + 68\n9 listViewIssue 0x000000010dd3e8aa -[TiProxy replaceValue:forKey:notification:] + 1114\n10 listViewIssue 0x000000010dd3eabd -[TiProxy setValue:for
@exclusiveTanim
exclusiveTanim / app.js
Created January 10, 2019 16:42
Barcode Alert Issue
/*Add alert in success block after a time delay.
See the following example. Especially line no 205 to 225*/
var Barcode = require('ti.barcode');
Barcode.allowRotation = true;
Barcode.displayedMessage = 'Place barcode inside rectangle';
Barcode.allowMenu = false;
Barcode.allowInstructions = true;
Barcode.useLED = true;
@exclusiveTanim
exclusiveTanim / app.js
Created December 13, 2018 18:10
Keyboard Hide touch
var window = Ti.UI.createWindow({
backgroundColor:'yellow'
});
var view = Titanium.UI.createView({
backgroundColor : 'red',
width : 300,
height : 300
});
var textField = Ti.UI.createTextField({
backgroundColor : '#fafafa',
@exclusiveTanim
exclusiveTanim / dataShowViewController.m
Created November 30, 2018 21:04
যারা যারা ডাটাবেজে ইন্সার্ট করেছেন এখন ডাটা আন্তে পারছে না
#import "HomeViewController.h"
#import "dboperation.h"
#import "TableViewCell.h"
@interface HomeViewController ()
@end
@implementation HomeViewController
@exclusiveTanim
exclusiveTanim / log.txt
Created November 29, 2018 17:48
SF_01019972 test log
[root@swarm-manager-ip-10-0-10-90 ec2-user]# docker service ls | grep tst-gateway
2hs8r9aiqf3k 5b4cdf47e7cfe4002f6ed27b_tst-gateway replicated 1/1 registry.cloudapp-enterprise.appcelerator.com/library/5b4cdf47e7cfe4002f6ed27b_tst-gateway_0.7.7_100000373_1543446098164 *:30387->80/tcp
[root@swarm-manager-ip-10-0-10-90 ec2-user]# docker service ps 2hs8r9aiqf3k| grep Running
ngbg9em9khue 5b4cdf47e7cfe4002f6ed27b_tst-gateway.1 registry.cloudapp-enterprise.appcelerator.com/library/5b4cdf47e7cfe4002f6ed27b_tst-gateway_0.7.7_100000373_1543446098164 apps-ip-10-0-11-22 Running Running 11 hours ago
[root@swarm-manager-ip-10-0-10-90 ec2-user]# docker service inspect 2hs8r9aiqf3k| grep ACS_URL| uniq
"NODE_ACS_URL=https://dcdfc73aa11d4164990a21bbc323ac4cfdb10859.cloudapp-enterprise.appcelerator.com",
[root@swarm-manager-ip-10-0-10-90 ec2-user]#
[root@sw
@exclusiveTanim
exclusiveTanim / AppDelegate.h
Created November 27, 2018 14:19
Full Sqlite Database code is here
//AppDelegate.h
@property(strong, nonatomic)NSString *strpath;
-(void)copyandpaste;
//AppDelegate.m
@synthesize strpath;
on your didFinishLaunchingWithOptions method
[self copyandpaste];
@exclusiveTanim
exclusiveTanim / Login.txt
Created November 27, 2018 12:49
For Login Check Code
-(IBAction)logincheck:(id)sender{
if ([_Text1.text isEqualToString:@""] || [_Text2.text isEqualToString:@""]) {
UIAlertController *error1 = [UIAlertController alertControllerWithTitle:@"Alert Message" message:@"Enter User Name and Password" preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil];
[error1 addAction:cancel];
[self presentViewController:error1 animated:YES completion:nil];
}
else if ([_Text1.text isEqualToString:@"admin"] || [_Text2.text isEqualToString:@"12345"]){
MainViewController *HomePage = [self.storyboard instantiateViewControllerWithIdentifier:@"mainView"];
[self.navigationController pushViewController:HomePage animated:YES];
@exclusiveTanim
exclusiveTanim / app.js
Created November 12, 2018 14:22
2 different workaround for 01014599
//1. Use Ti.UI.iOS.NavigationWindow instead of Ti.UI.Window for property "contentView" of popover.
var win = Ti.UI.createWindow({backgroundColor: 'white'});
var button = Ti.UI.createButton({title: 'Open Popover!', top : 100});
button.addEventListener('click', function(e){
popover.show({ view: button });
})
win.add(button);
var contentWindow = Ti.UI.createWindow({
@exclusiveTanim
exclusiveTanim / app.js
Created November 7, 2018 12:40
Tableview search bar workaround
var win = Ti.UI.createWindow({
backgroundColor : '#fff'
});
var self = Ti.UI.createView({
borderRadius : 10,
backgroundColor : 'red',
});
win.add(self);
@exclusiveTanim
exclusiveTanim / app.js
Created November 5, 2018 13:29
Modified Test Code
var win1 = Ti.UI.createWindow({
backgroundColor : 'white',
title : 'Blue'
});
var btn = Ti.UI.createButton({
title : 'open home screen ',
top : 100
});
var mainNavWin;
var webview;