ProjectEditor in exported App?

Request a new command, feature, or improvement

Moderator: MSandro

Post Reply
Posts: 162
Joined: Jul 26th, '17, 21:12

ProjectEditor in exported App?

Post by MSandro » Apr 23rd, '18, 19:06

Hi, I've tried around a lot to enable all GP features in a exported app, like import classes or media. Functions which needs a ProjectEditor to work. It was no problem to start a project with the ProjectEditor in a exported app, but the problem is, how to prevent the pressentation-mode from beeing exited?

First I've changed the like the following:

Code: Select all

method startupFile AppMaker {
  return '
to startup {
  setGlobal ''vectorTrails'' false

to openProjectEditorApp {
  setGlobal 'alanMode' false
  setGlobal 'app' true
  page = (newPage 800 500)
  setDevMode page false
  setGlobal 'page' page
  open page true
  editor = (initialize (new 'ProjectEditor') (emptyProject))
  addPart page editor
  pageResized editor
  developerModeChanged editor
  enterPresentation editor
  openProjectFromFile (last (allInstances 'Stage')) 'project.gpp'
  startSteppingSafely page true
  broadcast 'go'
Now I've focused on how to prevent the pressentation mode from beeing closed. I've added a global variable named "app" to check if GP was opened as exported app and added a some code to the

Code: Select all

method interactionLoop Page {
  while true {
    doOneCycle this
    if (and (global 'app') (not (isPresenting (last (allInstances 'Stage'))))) {
      enterPresentation (last (allInstances 'ProjectEditor'))
I am searching for a better solution but I think it works okay. What do you think about those changes?

Post Reply