import Foundation
import Firebase
class DataService
{
static let dataService = DataService()
private var _BASE_REF = Firebase(url: "\(https://jokes-fbb87.firebaseio.com/)")
private var _USER_REF = Firebase(url: "\(https://jokes-fbb87.firebaseio.com/)/users")
private var _JOKE_REF = Firebase(url: "\(https://jokes-fbb87.firebaseio.com/)/jokes")
var BASE_REF: Firebase
{
return _BASE_REF
}
var USER_REF: Firebase
{
return _USER_REF
}
var CURRENT_USER_REF: Firebase
{
let userID = NSUserDefaults.standardUserDefaults().valueForKey("uid") as! String
let currentUser = Firebase(url: "\(BASE_REF)").childByAppendingPath("users").childByAppendingPath(userID)
return currentUser!
}
var JOKE_REF: Firebase
{
return _JOKE_REF
}
}
我收到此错误 1.表达式列表中的预期表达式 2.预期','分隔符 我试过清理项目,但什么也没发生。我正在使用xcode 7.3.1
答案 0 :(得分:0)
我认为您的Firebase(网址:"(https://jokes-fbb87.firebaseio.com/)")行错误"(https://jokes-fbb87.firebaseio .com /)")这些是字符串而不是变量, 只需将行更改为此
button1 = ttk.Button(self, text="Start Monitoring",
command=lambda: test()) # with lambda we are moving from start page to page 1