Source language: Translate to:

Plugin and Action NeoAppBuilder

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

Plugin and Action NeoAppBuilder

Postby anton » Sun Jan 31, 2016 12:39 pm

Hello. You can plug-in, run the standard action NeoAppBuilder?
User avatar
anton
 
Posts: 53
Joined: Fri Oct 19, 2012 9:21 pm

Re: Plugin and Action NeoAppBuilder

Postby Tony Kroos » Sun Jan 31, 2016 12:50 pm

Do you mean how to run nab action from plugin?
Tony Kroos
 
Posts: 402
Joined: Thu Oct 15, 2009 3:43 pm

Re: Plugin and Action NeoAppBuilder

Postby anton » Sun Jan 31, 2016 1:28 pm

Tony Kroos wrote:Do you mean how to run nab action from plugin?

Yes. Exactly
User avatar
anton
 
Posts: 53
Joined: Fri Oct 19, 2012 9:21 pm

Re: Plugin and Action NeoAppBuilder

Postby Neosoft Support » Sun Jan 31, 2016 4:55 pm

You can't use NeoAppBuuilder's scripting language in a plugin - only JavaScript. However, all NeoAppBuilder actions are converted to JavaScript by the compiler. So if you look at the code created by the compiler for an app you can see the JavaScript equivalents for each NAB action. In most cases you can use similar calls in your plugins.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Plugin and Action NeoAppBuilder

Postby anton » Mon Feb 01, 2016 12:44 am

Neosoft Support wrote:You can't use NeoAppBuuilder's scripting language in a plugin - only JavaScript. However, all NeoAppBuilder actions are converted to JavaScript by the compiler. So if you look at the code created by the compiler for an app you can see the JavaScript equivalents for each NAB action. In most cases you can use similar calls in your plugins.


It is clear. :) I once watched a code that is obtained after compilation. But to make it workable in the plugin could not.
Code go to the page looks like this:
Code: Select all
NeoApp.controller("NewPage_Ctrl", function($scope,$rootScope,$route,$timeout,$filter,$window,$animate) {
$App.NAB.PageNumber = 1;
$App.NAB.PageID = "NewPage";
$scope.PushButton1_click = function() {debugScriptBegin( 103,"PushButton1","click",1 );
debugScriptRun( 103,"GotoPage \"NewPage\"",0 );
$scope.GotoPage( "NewPage" );
debugScriptEnd( 103 );};
});


It turns out for the transition to a specific page meets function:
Code: Select all
function() {$scope.GotoPage( "NewPage" );

But how do you make it work in the plugin , I do not know.

The program NeoAppBuilder of this design works. A similar plug-in, no.
Code: Select all
BeginJS
$scope.GotoPage( "NewPage" );
EndJS
User avatar
anton
 
Posts: 53
Joined: Fri Oct 19, 2012 9:21 pm

Re: Plugin and Action NeoAppBuilder

Postby Neosoft Support » Tue Feb 02, 2016 8:03 pm

This is a bit convoluted, but try this:

var neoApp = angular.element(document.getElementById("ng-view")).scope();
neoApp.GotoPage( "NewPage" );
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5593
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Plugin and Action NeoAppBuilder

Postby luishp » Wed Feb 03, 2016 3:04 am

Code: Select all
var neoApp = angular.element(document.getElementById("ng-view")).scope();
neoApp.GotoPage( "NewPage" );


Works!
Thank you!
Luis Hernández - SinLios Soluciones Digitales
http://sinlios.com
User avatar
luishp
 
Posts: 357
Joined: Wed May 23, 2007 10:17 am
Location: Spain

Re: Plugin and Action NeoAppBuilder

Postby anton » Wed Feb 03, 2016 1:03 pm

Thank you. Works like a clock , and even better :)
User avatar
anton
 
Posts: 53
Joined: Fri Oct 19, 2012 9:21 pm


Return to General NeoAppBuilder Discussion

Who is online

Users browsing this forum: No registered users and 2 guests

cron