Eureka: [rowByTag] using baseValue don't work

Created on 5 Oct 2016  路  8Comments  路  Source: xmartlabs/Eureka

Hello,

i've a problem with rowByTag,
I'm using this code:

fileprivate func configureUsernameRow() {
        self.usernameRow?.baseCell.baseRow.title = "Nom d'utilisateur"
        _ = Session.appUser.username.asObservable().subscribe { username in
            SpeedLog.print(username)
            self.usernameRow?.baseValue = username.element ?? "Nothing"
            self.usernameRow?.updateCell()
        }
}

but it's show nothin' :( i've tried with row.value too ..
But i've something in element (optional)

Can i've help please,

Thanks

awaiting response question

All 8 comments

subscribe reactive closure is being called?

which is the type of username and username.element ?? why are you using .element?

thanks for fast answer :)
because swiftreact was updated recently cause of swift 3 you know ;)
so, yes it's work, because SpeedLog.print(username) was working i've got the username in console,
but now, it's worse .. it's random, 1 on 10 times its print the username
i'm looking on react too .. i'm gonna try a cast in String for test,
I'll let you know

okay.

Take into account that you can only set up String values to baseValue property (for this particular row), otherwise the value is discarded.

Also make sure the code is running in main thread.

so,

i do that ->

fileprivate func configureUsernameRow() {
        self.usernameRow?.baseCell.baseRow.title = "Nom d'utilisateur"
        _ = Session.appUser.username.asObservable().subscribe { username in
            SpeedLog.print(username)
            SpeedLog.print(username.element)
            SpeedLog.print(username.element!)
            self.usernameRow?.value = username.element! ?? "Nothing"
            self.usernameRow?.updateCell()
        }
    }

and in console ->

SettingsVM.configureMyProfileRow()[93]: Mon profil called
MyProfileVM.configureUsernameRow()[55]: next(Optional("ogorbatchev"))
MyProfileVM.configureUsernameRow()[56]: Optional(Optional("ogorbatchev"))
MyProfileVM.configureUsernameRow()[57]: Optional("ogorbatchev")

so, it's not working .. :'(

and the joke IIIIIS ->
that's working !!

 fileprivate func configureCountryRow() {
        self.countryRow?.baseCell.baseRow.title = "Pays"
        _ = Session.appUser.country.asObservable().subscribe { country in
            SpeedLog.print(country)
            self.countryRow?.baseValue = country.element ?? "Pas de Pays"
        }
    }

EDIT1: i've tried with this -> "value" and "baseValue" .. it's nothing change
I despair

i can't provide any additional help with the info you provided so far.
i'm sure it works since we have test that cover baseValue and value properties.

If you upload a project to easily reproduce it i will take a look.

BTW
do self.countryRow?.title = "Pays" instead of self.countryRow?.baseCell.baseRow.title = "Pays"

hahaha, i've tried this

self.usernameRow?.title = "Nom d'utilisateur"
self.usernameRow?.baseValue = "Nothing"
self.usernameRow?.updateCell()

and it isn't working

EDIT1: fuck .. i'm an idiot, i replace the string by "" in other place .. so sorry for that
thanks for help
see ya

Was this page helpful?
0 / 5 - 0 ratings