Today I did some heavy web development with the REAL Studio Web Edition. And I got a few curious things. I think this are internal variables, but they look interesting. So have you tried adding a variable "port as integer" to your App object in the Web Edition? Guess what happens?
Well, your port variable is there. No error, but suddenly you can't launch your app! Seems like port is a variable already declared by REAL Studio. Your own property hides the one from the framework and suddenly it uses port=0 for the sockets. A simple
print str(app.port)shows the port from the build settings. Port does not autocomplete, but it is listed in the documentation, so this is not a hidden thing. On the documentation you see also an icon property. But it's not in the current REAL Studio WebApplication class, at least not in REAL Studio 2010r5.
So it's somewhere else and I found it. If you are in app.open, the word framework does not autocomplete, but once you wrote it for any reason, it shows "WebApplication.framework as Dictionary" in the status line. This dictionary is very interesting. To look inside, simply write in a app.open event
Sub Open()Once in the debugger, you can see the content of d. The dictionary has the following keys and values:
dim d as dictionary = framework
- framework.css, some Style Sheets
- pagestop.png, a PNG with forbidden sign. You see it if the connection is lost.
- space.gif, a GIF.
- favicon.ico, the favorite icon which Safari shows next to the URL. Currently a globe picture.
Sub Open()I don't know how REAL Software sees this, but I like this dictionary. It allows us to customize a few things like the favorite icon and the pagestop icon. They could simply document it and have users pass their own items here. Maybe that's their intent as normally they hide properties used by the framework. Sometimes you see those internal properties in the debugger or in autocomplete. They start with underscores and should be invisible for autocomplete or the debugger. By the way: Documenting this dictionary would implement a few feature requests right away.
// take a picture
dim p as picture = logoMBS(500)
// make a PNG
dim s as string = PictureToPNGStringMBS(p,0)
// assign to the framework dictionary
framework.Value("pagestop.png") = s
PS: Years ago I read this Inside Turbo Pascal books to learn how things worked and I think this should exist for REAL Studio, too.