NotAdam / Lumina

A simple, performant and extensible framework for interacting with FFXIV game data
Do What The F*ck You Want To Public License
92 stars 54 forks source link

Should IsValueCreated reference Value instead of _value? #19

Closed daemitus closed 3 years ago

daemitus commented 3 years ago

It seems as if when checking if a LazyRow is made via IsValueCreated, since it references _value it's going to always be null until Value is called atleast once. Maybe I'm still thinking in terms of HasValue. Would the appropriate behaviour be to check if Value is null for having a value rather than IsValueCreated?

RowID, HasValue, IsValueCreated, ZoneName over 2 iterations of a sheet.

911 False False
912 False False Gyr Abania
913 False False
914 False False Norvrandt
915 False False
916 False False Norvrandt
917 False False Norvrandt
918 False False Norvrandt
919 False False

911 True True
912 True True Gyr Abania
913 True True
914 True True Norvrandt
915 True True
916 True True Norvrandt
917 True True Norvrandt
918 True True Norvrandt
919 True True
lmcintyre commented 3 years ago

That's the point of a LazyRow, it won't load until it's been asked to be loaded, and then it stays loaded. Unless I'm misunderstanding

daemitus commented 3 years ago

Yeah, I think i've wrapped my head around this now. I'm confusing the old terminology, hence why it was changed. Just check Value is null, press on.