Diddy scope ?

Monkey Forums/Monkey Programming/Diddy scope ?

Paul - Taiphoz(Posted 2012) [#1]
Hay all, today is the day I set aside to start a new project, and I have opted to use diddy, for it's screen handling.

My plan was/is to have a main file with only the main function, and any imports and globals.

I then wanted to have a source file for each main class in my project, so I wanted to for example have a source file called player which will hold all my player class stuff, and a source fille called menu which would have all the diddy menu screen and options stuff.

But when I try my code, I keep getting an error "Type Screen no found".

is the scope of diddy not global to the whole project and all its included files?


Volker(Posted 2012) [#2]
and I have opted to use diddy, for it's screen handling.

Good decision.

Import diddy into your main file, and import main file into your menu file.
Monkey handles cyclic imports (thanks god).


Paul - Taiphoz(Posted 2012) [#3]
Ah.. I see, I got round it by importing the individual files to each include, thanks for the tip.

I lost the link dont suppose you have a url for the diddy docs, lots of stuff here im just finding out about by looking at its source, which is kinda annoying, informative, but distracting :)


Samah(Posted 2012) [#4]
lol... "docs"
The documentation is "read the example programs". :)
...or ask me or therevills.


Paul - Taiphoz(Posted 2012) [#5]
Yeah I kinda thought thats what it might be thats why I'm sitting in the shoutbox at indiecodes, just in case I get stuck and he happens to be on.

enjoying the whole framework so far tho, which is really cool. although not really tried anything major yet, just sorting out my screens , drawing some basic backgrounds, images to show game controls and stuff like that.

You guys thought about porting this to blitzmax?


Samah(Posted 2012) [#6]
@Taiphoz: You guys thought about porting this to blitzmax?

It'd be a fairly big undertaking. For the most part the syntax is quite similar, but BlitzMax has no interfaces, and the collections API (and other parts) require them. It'd require a bit of reworking.


Paul - Taiphoz(Posted 2012) [#7]
yeah but if you could get the same functionality out of it , it would do really well in the max community.

that aside, have to admit its damn nice work, really loving how easily it makes sectioning off code into different screens and their relative code :) thanks..

thanks..


thanks :)