Page 1 of 1

LM_String What's happening?

Posted: Thu May 11, 2017 4:44 am
by strider2000
Can anyone tell me why

Code: Select all

	print(self.moho.document:StyleByID(0).fName:Buffer())
	print(self.moho.document:StyleByID(0).fName:Buffer())
works, but

Code: Select all

	local style = self.moho.document:StyleByID(0)
	print(style.fName:Buffer())
	print(style.fName:Buffer())
complains that fName is a nil value on the second print? I'm not really trying to print it twice. I'm renaming styles, but I noticed that

Code: Select all

       style.fName:Set()
was failing with fName being nil if I did a

Code: Select all

       style.fName:Buffer()
before it.