objects in outline view

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

objects in outline view

#1

Postby Steve James » Tue Feb 09, 2016 4:19 pm

Perplexing. I've only ever seen an object (ie green c) in the script outline view at this point.

Code: Select all

var obj = {};
obj.id = 
As soon as I enter a value the object disappears from the outline view.
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#2

Postby Steve » Tue Feb 09, 2016 5:23 pm

Hi Steve,

I assume you mean the JavaScript editor?

Did mean you have only ever see the green icon with the C in it?

Do you never see the grey local variable icon or the function icon?

Steve
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#3

Postby Steve James » Wed Feb 10, 2016 9:20 am

Hi Steve, yes in the JavaScript editor.

I can see grey local variables and blue functions fine but objects are interesting.

I had a another look this morning and I can get objects to appear at the moment inconsistently (or more accurately I've not worked out the hows and whens).

The outline view is new (and brilliant), I'm not sure it is a big deal but it is interesting when a variable displays as a variable or an object.

I've got a config file in an old solution with a complex object that simply displays as a variable. I like the idea we can bring files into the Ebase designer that used to reside in the file system.


Thanks
0 x

Steve
Moderator
Moderator
Posts: 421
Joined: Fri Sep 07, 2007 3:44 pm
Location: Sandy, UK
Contact:

#4

Postby Steve » Wed Feb 10, 2016 10:13 am

Hi Steve,

This is all quite new and it looks as if it needs some work in the future.

The green class comes up when you add a prototype to your JavaScript object.

Code: Select all

function person(first, last) {
    this.firstName = first;
    this.lastName = last;
    this.debug= function() {return this.firstName + " " + this.lastName;};
}

person.prototype.age = 21;

person.prototype.fullName= function() {
    return this.firstName + " " + this.lastName;
};
The code above shows the prototypes added to the Object in the outline tree:
age
fullName()

It does not show the object other properties such as:
firstName
lastName
debug()

I noticed the JavaScript intellisense does not cope with these types of objects either.

I would expect:

var a = new person("Steve", "James");

a.

I would expect to see the firstName, lastName and debug() attributes after the "a.". And the new prototypes added the the object.

I will add this as a bug, as it needs to be looked into.

Steve
0 x

Steve James
Ebase User
Posts: 331
Joined: Mon Mar 10, 2014 8:34 am

#5

Postby Steve James » Wed Feb 10, 2016 10:59 am

Thanks Steve, at least we can more easily navigate lengthy lumps of code.
0 x


Who is online

Users browsing this forum: No registered users and 4 guests