PDA

View Full Version : Ruleset Warning: Anchored control static height ignored



Nilliom
May 20th, 2007, 20:13
I encounter this error on the console very often. I am creating my one ruleset and I get this error. Is there any way for me to find which control is givin me this and how to solve it.

Thanks

nezzir
May 20th, 2007, 22:07
I have this problem as well. You don't see it though unless you manually open the console or some "red" error opens if for you. It's proving difficult to track down...

Oberoten
May 21st, 2007, 08:04
Find the Register.lua file and either edit it down to contain only {} or delete it entirely.

This should help.

nezzir
May 21st, 2007, 12:00
Find the Register.lua file and either edit it down to contain only {} or delete it entirely.

This should help.

That file does not exist in my ruleset, or the example rules (now that I look).

Oberoten
May 21st, 2007, 12:05
It is on the first level of your datafolder.

nezzir
May 21st, 2007, 14:03
It is on the first level of your datafolder.
That files does not exist on my computer. Do you mean "GlobalRegistry.lua"?

If so, deleting that file didn't do anything. It just recreated it - errors still there.

Oberoten
May 22nd, 2007, 07:49
Hmmm... Okay. I will look into this, tweak a bit on my own and if I find anything else that might work (or not as the case may be...) I'll post it here.

nezzir
May 22nd, 2007, 12:02
Hmmm... Okay. I will look into this, tweak a bit on my own and if I find anything else that might work (or not as the case may be...) I'll post it here.

Oh, it's probably just me not using a tag properly. The character sheet was the first thing I did when I was making my ruleset, so it was early in the learning curve. I'm sure I'll stumble across it and it'll be something stupid.

Elf
May 22nd, 2007, 13:55
I have had the same trouble... I managed to fix it once... Than noticed that I used the wrong template type for one of my fields; I corrected and now I am back to the red font of pain.... In my case it was a control static width not anchoring correctly; check to see if you are anchoring a field such as a modifier to a static string control.

Nilliom
May 23rd, 2007, 01:57
I started this thread by I think I have the answer now. I had a page full of these warning.

I have found that if in a template that I am using I have put the position tag with a lone position like below or right or left that I would get the error, but if I put righthigh or belowleft the warning will go away.

I think the change may also be needed at the tag level in my sheet not just in the template. Maybe there is a problem in the position tag that it does not accept the lone version of the positions.

At least for now I don't get the warning on my page.

Hope this help

Dachannien
May 23rd, 2007, 04:34
Sounds like the position for one or more objects wasn't sufficiently specified. The "below", "right", etc. anchors would only specify one axis, and you'd need to specify the other axis some other way.

Foen
May 23rd, 2007, 06:30
Or, conversely, you have specified enough anchor points that the height is already determined. Adding a 'height' parameter is therefore redundant (and possibly contradictory).

If you anchor the top of a control and the bottom, then the height is fixed. Under some circumstances, this is also true if you position the control to the left or right, of another (it inherits the height from its parent).

Are you able to identify which control is giving you the problem, then post the xml anchor code here?

Stuart
(Foen)

TarynWinterblade
May 23rd, 2007, 06:44
As Foen stated, if you use left or right as your position, it will automatically set the position of the element to be equal to the height of the element it's being positioned relative to. The same goes with top and bottom, except with width instead of height.

Mgrancey
June 12th, 2013, 05:14
Is there anywhere that provides further definition on which/what postions require or already have information on? Anything further expanded for other such things?

I've looked at the Ruleset Mod guide, the Ruleset reference, the XML schema guide, and Anatomy of a Ruleset, but none seem to have done such.

Dakadin
June 12th, 2013, 05:55
I've had problems tracking it down in the past but a list of the options are in the Ruleset Reference for the windowcontrol. Look at the <position> tag. Here is the information from there.

<position > ... </position>
The shorthand notation position (above, aboveleft, aboveright, below, belowleft, belowright, left, lefthigh, leftlow, right, righthigh, rightlow, insidetop, insidetopleft, insidetopright, insidebottom, insidebottomleft, insidebottomright, insideleft, insideright, over)

Hopefully I didn't misunderstand your question. :)

Moon Wizard
June 12th, 2013, 07:54
The corner options (insidetopleft, aboveright, etc.) specify 2 anchors, while the edge options (insidetop, below, etc.) specify 3 anchors. The offset tag is used to apply horizontal and vertical offsets to the anchors.

For example, position="insidetop" offset="#x,#y" sets these anchors:
* Top anchor matches parent top anchor plus positive offset #y
* Left anchor matches parent left anchor plus positive offset #x
* Right anchor matches parent right anchor plus negative offset #x

Another example, position="aboveright" offset="#x,#y) sets these anchors:
* Bottom anchor matches parent top anchor plus negative offset #y
* Right anchor matches parent right anchor plus negative offset #x

If left and right anchors are defined, then the width attribute is ignored. If top and bottom anchors are defined, then the height attribute is ignored.

Let me know if you have any questions.

Regards,
JPG

Mgrancey
June 12th, 2013, 09:02
So if I understand this right:
If I anchor something to [above, insidetop, right, insideright, below, insidebottom, left, insideleft] the anchored child inherits 3 anchors; x,y position relevant to its parent anchor and either the width for horizontal (above, insidebottom, etc) and height for vertical (insideleft, right, etc.) values.

While any corner anchors only provide the X and Y anchors, no size anchors, to its children.

So when I get

Ruleset Warning: Anchored control static height ignored for 'mZeonAct'

It really means that I don't need to set a height value under offset.

I think I'm good for now, though after I make some fixes I might have others.

Just to make sure, the inheritances weren't explained or defined anywhere or is that what the '0's represent in the schema; its an attribute that I don't need to define?

Moon Wizard
June 12th, 2013, 19:03
I'm not sure which zeroes you are referring to. If you are talking about the offset attribute (i.e. <offset>0,0</offset>); then yes, that attribute is not needed unless you are using the position attribute and you want to adjust the position slightly.

An example from the ruleset I am working on, in case it's useful. These two controls show a group box graphic on a window, and a label at the top of the group box which is centered within the frame and is 10 pixels offset from the top of the frame. This is from a skills page of a character sheet. I've removed the templates, so it's only using base control objects.



<genericcontrol name="skillsframe">
<bounds>15,0,480,280</bounds>
<frame>
<name>groupbox</name>
</frame>
</genericcontrol>
<stringcontrol name="label_skillsframe">
<anchored>
<to>skillsframe</to>
<position>insidetop</position>
<offset>0,10</offset>
<size>
<height>20</height>
</size>
</anchored>
<font>sheetlabel</font>
<center />
<static>Skills</static>
</stringcontrol>


Cheers,
JPG

Mgrancey
June 12th, 2013, 19:40
I was referring the schema for FG XML that someone put up
https://voxtyrannis.com/fantasygrounds/foundation-ruleset/fg2-foundation-schema.html

If you look at the picture left of "instance" there is [0,1] for parent,anchor,relation,offset tags. To clarify, the '0' would mean False or Off, representing that you should not put a value in there.

Or I'm completely misreading it, which I seem to have been doing.

Moon Wizard
June 12th, 2013, 20:00
I'm not familiar with that schema, so I don't know if it's correct or not. The {0,1} doesn't make sense to me in the example you posted. All of those tags take string values, but treat them differently.
* Parent must refer to a previously defined control name.
* Anchor must be one of the values (left, right, top, bottom, center)
* Relation must be one of the values (absolute, relative, current)
* Offset must be a number

I just use the Ruleset Reference section in the Library portion of the web site to outline the XML definition. FG does not enforce any schema, but simply ignores tags/values that are not expected.

Regards,
JPG