Sign in to follow this  
Guest Vorlin

Same element copied, copy fails????????

Recommended Posts

I really do think there may be something wrong with my parser... and if it wasn't for the fact that all my flyable AC are fine, I'd be sure of it. (Edit: Sorry, "flyable AC" here means all the gauges that are release versions in AC I fly are working perfectly, no matter who wrote them.)These are mouse area tests... I haven't reached the point where I could test what I wanted to because the second mouse area fails to activate... even though it's a copy of the first with the coordinates, K event and tooltip text changed.And they're both copies of a working element from a gauge file I already wrote last month.For me, this script displays both Polygons perfectly, but only the first mouse area shows a cursor. The second is dead. I've been over it perhaps 20 times... I'd be very thankful for any thoughts on this.The code: <Element> <Polygon Bright="Yes" FillColor="#00FF00"> <Point X ="1" Y ="1"/> <Point X ="100" Y ="1"/> <Point X ="100" Y ="100"/> <Point X ="1" Y ="100"/> </Polygon> </Element> <Element> <Polygon Bright="Yes" FillColor="#0000FF"> <Point X ="200" Y ="1"/> <Point X ="300" Y ="1"/> <Point X ="300" Y ="100"/> <Point X ="200" Y ="100"/> </Polygon> </Element> <Mouse> <Area Left="1" Top="1" Right="100" Bottom="100"> <Tooltip>Top Section</Tooltip> <Click>(>K:RELOAD_PANELS)</Click> <Cursor Type="Hand"/> </Area> <Area Left="200" Top="1" Right="300" Bottom="100"> <Tooltip>Calibrate Altimiter</Tooltip> <Click>(>K:BAROMETRIC)</Click> <Cursor Type="Hand"/> </Area> </Mouse>Thanks,Scott / Vorlin

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi,May be you have to define or is background image too small.Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan,After several other tries including nesting the areas to see if that helped, I realized that when I stack the two areas on top of each other(one at X=1 and y=1 with the other at x=1 and y=100) the second area IS showing but it's only 1 pixel in height... even though it's defined to be 100 pixels high.So yes, it got even more strange... I even went back and reloaded the original file I wrote that this mouse area code came from and it works perfectly.I'm totally confused... and late for work.Gotta run, thanks for the idea. I'll try it, and any others, later today.Scott / Vorlin

Share this post


Link to post
Share on other sites

Personally, I find this confusing: I much prefer this "style" of definition: IOW, set the top left corner of the mouse area, then simply specify the height and width in pixels... ;)

Share this post


Link to post
Share on other sites

Bill,I used Height and Width in the first try... they gave me issues a few months ago and so I changed to the Right / Bottom setup but I tried to return to H / W with this one.Either way, same result.But there is one thing that may cause someone to realize what's happening:<Area Left="1" Top="1" Height="100" Width="100">Area 1 code here, Tooltip says "Area 1"<Area Left="1" Top="101" Height="100" Width="100">Area 2 code here, Tooltip says "Area 2"I get all of area 1 on top and area 2 is 100 px Wide and 1 px high, below the top area. Now try this...Switch ONLY the values for Top="" and leave everything else alone. I mean that I was really careful to touch NOTHING else at all...Now I get Area 2 on top... 100 px wide and a full 100 px high... and it's Area 1 that is 100 px Wide and 1 px high.This proves only one thing... that the problem cannot be the syntax of the mouse areas themselves because each one will work in turn, but only the one placed on top works correctly.I'm using this overall structure:<Gauge><Update Frequency ="6" />&ltElement>(Draw top polygon here)</Element>&ltElement>(Draw bottom polygon here)</Element><Mouse><Area>(Mouse area 1 here)</Area><Area>(Mouse area 2 here)</Area></Mouse></Gauge>The DTD passes it... and this is a home made DTD that passes everything from the 747, the Baron, FSGPS.xml, some of Jordan Moore's stuff (he knows and has the DTD).... it's as complete a DTD as I could make.I'm stumped... it's almost as if the gauge area for the polygons is a larger size than what's being allowed for the mouse area. But as for why, I can't figure that out. The panel.cfg doesn't limit the size of the gauge at all, only gives the upper left point coordinates.I'm one step short of a reinstall over here... and with UT and 9.1, plus a few other things that aren't cut&paste reinstalls, it's something I'd really rather avoid.Thanks for any ideas.Scott / Vorlin

Share this post


Link to post
Share on other sites

Did you try:(Draw top polygon here)(Draw bottom polygon here)(Mouse area 1 here)(Mouse area 2 here)Should workJan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan,Magnifique! Merci beaucoup!The key was: <Size X="100" Y="201"/>I have no idea why it suddenly needs a size statement when all the files processed for the DTD didn't show one. The DTD I created form over 8000 lines of XML doesn't even show that the size tag is a valid child of gauge.Not gps_500.xml, not the Garmin430, not the entire panel full of stuff that I wrote last month... but now, suddenly, it refuses to allow multiple mouse areas to work without the size statement?I'm going to go take a break... this thing is more tempermental than my ex-fiance.THANK YOU!Scott / Vorlin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this