[26 Jan 2010] GetAttribute(#DISPLAY,1,#ATTRLAYERS) -> always 0?
Posted: Sat Jun 13, 2020 5:32 pm
Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 26 Jan 2010 11:14:01 -0000
Since HW4.5,
GetAttribute(#DISPLAY,1,#ATTRLAYERS)
returns 0.
For example:
I have two TextObjects, layers are enabled and now I want to do the following:
Output is then:
You see, that text1 and text2 have an layer-ID, but "GetAttribute()" returns always 0? Why is that the case and what has changed here in HW4.5 compared to HW4.0? The documentation didn't help me so far 
Thanks, Tom
Since HW4.5,
GetAttribute(#DISPLAY,1,#ATTRLAYERS)
returns 0.
For example:
I have two TextObjects, layers are enabled and now I want to do the following:
Code: Select all
Local numlay = GetAttribute(#DISPLAY,1,#ATTRLAYERS)
DisplayTextObject(1,100,100)
SetLayerName(numlay+1,"text1")
DisplayTextObject(2,150,100)
SetLayerName(numlay+2,"text2")
Debugprint("id of text1: "..GetAttribut(#LAYER,"text1",#ATTRLAYERID))
Debugprint("id of text2: "..GetAttribut(#LAYER,"text2",#ATTRLAYERID))
Debugprint("number of layers: "..GetAttribute(#DISPLAY,1,#ATTRLAYERS))
Code: Select all
id of text1: 1
id of text2: 2
number of layers: 0
Thanks, Tom