Text Only Compiler

Does anyone know of any product (language etc) the creates a GUI application (like XOJO does), BUT your project file is 100% text, by this I mean the developement environment does NOT have a GUI for laying out forms/windows/views, that is MUST be defined by the developer in text only…

Basically, the developer uses Notepad or some other “generic” text editor to create the entire project, and submits it to a “compiler”

I’m looking for ideas how how others would have defined the requirements for such a text file

PowerBasic and CreativeBasic to name just two. They both use WinSDK style code to define the UI.

You can do the same thing with C, C++, C#, VB.net and so on. Just because it has a convenience tool doesn’t mean you have to use it.

Thanks… but nothing I can find on PB, CB or WinSDK defines anytype of text-only format for defining a screen
I did find 3rd party tools for PB to create GUI… but the PB docs seem to be lacking in any details.

PureBasic and AutoIt

Corona?

I’m not sure if this is an example of what you are referring to, but Adobe has something called ScriptUI in their Javascript language for their apps, which allows you to create dialogs in javascript code (although it doesn’t create a compiled application like XOJO does).

Here’s an excerpt from one of the scripts I have using ScriptUI:

[quote] // Create dialog window
var dlg = new Window(‘dialog’) ;
dlg.alignChildren = ‘left’
// Add static text field to show current value
var lblText = dlg.add(‘statictext’, undefined, ‘Enter the percentage the file will be printed’)

// Add options to select paper size (Letter or Tabloid or 12x18
var pageSizes = ['Letter', 'Tabloid', '12 x 18']
var paperSize = dlg.add("dropdownlist", undefined ,['Letter', 'Tabloid', '12 x 18']);
paperSize.width = 400
paperSize.text = 'Letter'
paperSize.selection = 0

// Add radio buttons to select portrait or landscape (default portrait)
var radPortrait = dlg.add('radiobutton', undefined, 'Portrait')
var radLandscape = dlg.add('radiobutton', undefined, 'Landscape')
radPortrait.value = true
// NOTE - Need to add onClick handlers to reset txtPercentage value selected for that choice
radPortrait.onClick = function () { txtPercentage.text= scalePortrait}
radLandscape.onClick = function () { txtPercentage.text = scaleLandscape}

// Add text field to input percentages
var txtPercentage= dlg.add('edittext', undefined, scalePortrait)
// NOTE - Need to add onChange handlers to reset lblFileInfo value
txtPercentage.onChanging =  setCurrentValue
txtPercentage.characters = 10

[/quote]

…and if you’re looking for an example of a barebones development environment, it doesn’t get much featureless than the built-in Javascript editor in Acrobat. :wink:

[quote=200625:@Dave S]Thanks… but nothing I can find on PB, CB or WinSDK defines anytype of text-only format for defining a screen
I did find 3rd party tools for PB to create GUI… but the PB docs seem to be lacking in any details.[/quote]
Here is a CB example from the examples directory of a Notepad like program:
The code is a little long and not relevant to Xojo so I will direct message you.

Some PB examples can be found here http://www.powerbasic.com/support/pbforums/forumdisplay.php?f=68 Get them while you can because that forum will probably vanish in October.

Guess it depends on what you’re looking for Dave
Do you want something that looks like a window layout in a Xojo VCP file that is JUST metrics + relevant code ?
Those metrics have to be converted into the code that actually creates the window, places controls on it etc.

Or do you want to write code that create the window, controls etc then there are lots of systems like PureBasic, PowerBasic etc where you see something like

[code]If OpenWindow(0, 100, 200, 500, 300, “PureBasic MiniBrowser v1.0”, #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_SizeGadget)

CreateStatusBar(0, WindowID(0))
AddStatusBarField(#PB_Ignore)
StatusBarText(0, 0, “Welcome to the world’s smallest Browser ! :)”, 0)

ButtonGadget(1, 0, 0, 50, 25, “Back”)
ButtonGadget(2, 50, 0, 50, 25, “Next”)
ButtonGadget(3, 100, 0, 50, 25, “Stop”)[/code]

and so on

The amount of code you dont have to write using the “metrics only” style can actually be quite significant

Norm… actually more like your second example…
XOJO VCP (or similar format) is fine to store a project in a computer readable, succint format
But what I need is something that a developer would actually WRITE directly…

As in… here is Notepad (or your favorite text editor)
write a text file (one or more if you want to have UI in one, logic in others)
hand it to a command line (ish) compiler
look at the compile log, if errors go to step 1

Yes this is contrary to todays drag-n-drop environments, but its the first step

If I can come up with a viable text format to support what I want , then a future GUI to write that text for me is always a possiblity

I’d actually write something that can consume the metrics & do the grunt work so what you write is a lot simpler
But thats just me

I’ve done the “write all the code to create the layout” bit in C and Pascal and it sucks
The cycle to get something laid out right is a time sink

:slight_smile: I know, and I totally agree… but I think for this project this MIGHT be the right direction… maybe not, but won’t really know until I fail or succeed, but either way I’m sure to learn alot along the way

Bob, do you have more information on this?

Nothing that isn’t already in the forums over there. The domain expires at that time and there has been no official activity in about a year. The closest they have is Gary Beene who is a volunteer moderator and he hasn’t been hearing much of anything either.

[quote=200653:@Norman Palardy]I’d actually write something that can consume the metrics & do the grunt work so what you write is a lot simpler
But thats just me

I’ve done the “write all the code to create the layout” bit in C and Pascal and it sucks
The cycle to get something laid out right is a time sink[/quote]

I remember building windows and menu resources with mouse support in QuickBasic as well as time slicing execution back in the eighties. Kind of tedious, but very fine when it was complete.

Looks the DDT for PowerBasic is close to the type of thing I am looking for…

Thanks to everyone for pointing me a a decent direction :slight_smile:

Have a look at rubymotion (for iOs and OSX). With rubymotion you can create GUI in pure code and the compiler does the rest.

this would be a sad end for this great piece of software… I grew up with Borland Turbo-Basic 1.x later with Power-Basic for DOS…
@Geoff Perlman : How do you think about this? Does a buyout of pb’s assets make sense for xojo?
?

[quote=200677:@Tomas Jakobs]this would be a sad end for this great piece of software… I grew up with Borland Turbo-Basic 1.x later with Power-Basic for DOS…
@Geoff Perlman : How do you think about this? Does a buyout of pb’s assets make sense for xojo?
?[/quote]

Not long ago, I found the original Power Basic diskettes :wink:

I used GFA basic in the Atari ST days, followed it to Windows eventually. I remember creating the window by defining the layout in code very much like Normans example.

I loved the speed but didn’t love the window creation much.

Done both
I prefer writing metrics and letting some code chew on it and write the actual code to create the layout
Its basically what xojo does for you