Page 1 of 1

LM_String What's happening?

Posted: Wed May 10, 2017 8:44 pm
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.