- This topic has 3 replies, 3 voices, and was last updated 11 years, 1 month ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Integrated Application Platform
Integrated Application Platform › Forums › General › Standalone use and PersistentWindow
I read in the User’s Manual that using PersistentWindow is one way to make a Suneido application standalone. But what other options are there? Is using PersistentWindow the preferred way?
PersistentWindow just remembers the size and position of the window(s) from one session to another. Otherwise, it is just a normal Window. The IDE uses PersistentWindow.
You basically have the same options as for any Windows application – either a Dialog or some kind of Window.
For our own applications we use BookControl in a PersistentWindow, with a login dialog first.
An alternative for standalone applications:
1.Rename the library with your code to MyProg (or any name you like the apllication to be called)
2. In Myprog create an item Init, that starts your program, for instance:
function(args)
{
Window(#(MyControllerInMyProg) exitOnClose:, keep_placement:)
}
3. Change Init in stdlib, after the lines:
if Date(Built().BeforeFirst(' (')) < required
{
...
}
replace the remaining code by:
if ("suneido" isnt (progname = ExePath().Basename().BeforeLast(".")).Lower() and
LibraryTables().Has?(progname) and false isnt Use(progname))
Init(Cmdline().Trim())
else if (progname is "suneido")
PersistentWindow.Load()
4. Rename suneido.exe to MyProg.exe
If suneido is started as MyProg.exe, it will show your window and remember the placement and size.
Started as suneido.exe it will give you the WorkSpace etc.
Nice, thanks Jos