View Full Version : Typecasting to Uwindow root failing :S
Hey, I'm working on a server actor for a UT2003-based game called Rainbow Six. Currently I'm having some problems trying to access the uwindow system.
This code is from within my custom PlayerController:
simulated function MakeMenu()
local WindowConsole C;
C = WindowConsole(Player.Console);
if ( C.Root != none )
The problem is, i get "Error: Unrecognized member 'ShowWindow' " when i compile. I can change ShowWindow to anything that's in the root window, and i still get the same error. As far as I can tell, this is a typecasting error right? But what am I doing wrong?
08-17-2009, 05:30 PM
That code looks much like UT1-style UWindow system, which is completely different from the UT200x GUI system. Are you sure you're reading the correct tutorials?
I actually haven't been able to find any uwindow tutorials. This code above I wrote after some delving in the Ravenshield source, which does have WindowConsole, Root window, etc. As far as i can tell, ive accessed Root properly, but any time i try to run a function from root, i get the "unrecognized member" error.
08-18-2009, 12:16 PM
check the ordering of your EditPackages= lines.
Make sure you add the line referencing your custom package BELOW the lines which reference stock packages. Apparently load order is important to the compiler.
Yeah the editpackages lines are in the correct order. :S this is weird ...
btw wrench love your quote.
Alright well I've done more research. it seems as though it's not my typecasting that's failing, it's the fact that no UWindow subclass i create will recognize functions in the parent class.
class RPGWindow extends UWindowWindow;
Trying to compile this gives me: "Error: unknown function 'Created' in Class UWindow.UWindowWindow"
Although when I open the UWindowWindow.uc, I see this:
// Implemented in a child class
Other attempts confirm: for some reason, the compiler does NOT recognize any function in the root window, so any calls to these functions give me a compile error. Does anyone know why???
Well, I have solved the problem.
With the game I mod, RavenShield, the developers never released the source code. A small, buggy SDK was made by fans using UTPT to get class, function, and variable names. However, although this SDK would compile many basic functions, parts of it were incomplete, like its UWindow code.
Another SDK, the one I'm currently using, is much more complete. However, I had forgotten tht my UWindow.u file was still from the old SDK, so it was missing many essential functions. So, I just went into UWindow, did some hard work, and got it to recompile with the functions I need. And now my code works :D
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.