Hi,
Thanks for putting Fusetools together, I think it’s great.
If I may add my 2cents, it might miss some class and files semantics as projects go slightly bigger than the examples. Examples which I think are great by the way. Let me try to explain myself.
I have tried the Signup Concept and the Rotating Slide Bar examples, and am now trying to merge both (because I want to build on these two samples). I have started with a page control as such:
<PageControl>
<Page ux:Name="LoginPage">
<LoginPanel />
</Page>
<Page ux:Name="HomePage">
<HomePanel />
</Page>
</PageControl>
I think what is missing in Fuse is the fundamentals as to “What is a class?” and “How classes in projects files relate?”.
In my new project, I have merged the two project files, and renamed the Signup main view to LoginView. On the click of the “Signup” button, I’m trying to display the other “Page” from the Rotating Slide Bar example. Projet which I’ll gladly attach, but above this, I get these error messages:
MainView.ux(1): E8001: You cannot ux:Include the file 'LoginView.ux' because it's root node is marked with ux:Class. You can instantiate the class with <LoginPanel /> instead. LoginView.ux(57): E8001: 'HomePage' declared in MainView.ux(202) is a member 'MainView' and cannot be accessed from 'LoginPanel'. To make this work, consider making 'LoginPanel' an ux:InnerClass of 'MainView'. RotatingSidebar: E0000: Object reference not set to an instance of an object Build ended fuse: Failed to compile project
Ok, I created a class in its own file but what could be possibly wrong with doing this? It seems like a great practice. Now, having no ux:Class makes it impossible to reach from another file?!?
I tried to include it making it an inner class:
<ux:Include File="LoginView.ux" />
It compiles, but the runtime gives the following error message:
Preview detected an unhandled exception: Outracks.Simulator.Runtime.VariableNotBound: Element '5#' was referenced before it was initialized at Outracks.Simulator.Runtime.Environment.GetValue (Outracks.Simulator.Bytecode.Variable variable) [0x00000] in <filename unknown>:0 at Outracks.Simulator.Runtime.Environment.GetValue (Outracks.Simulator.Bytecode.Variable variable) [0x00000] in <filename unknown>:0
The thought I have after seing these is the following. After some 20 years of doing Java software development, I have started looking at many other platforms. There’s one thing that Java is quite solid at, and it’s large size projects. I have to admit that the concept of class/inner class/files is well rounded up there and it’s worth being being inspired from.
In fuse, I wish these rules were clearer. If I instantiate a class at the root level of a file, I should be able to use it in another. Or why should I have to declare a class as us:InnerClass, a class defined within another is inner (or what else could it be I’m wondering). I should be able to navigate to the class of panel, regardless in which file is was defined…
That said, what you give have done is great but the classes/object instantiation aspect of fusetools needs some love.
Cheers, keep up the solid work.