Servoy 6 Warnings from 5 import

Hi

I am getting a load of errors showing up having imported a solution from 5 to 6. At first glance it would seem that 6 is far more particular about what it is prepared to parse, however having fixed the Errors I am still presented with several warnings. Can anyone point me in the right direction of what these mean

  1. The method setFont() is undefined for the type RuntimeLabel
    I get setFont(‘Verdana,0,10’) is no longer a function and appears to have been replaced with font(‘Verdana,0,10’), however the latter breaks all together and setFront shows the warning. I am using this to show a label as button is selected or not

  2. The method setImageURL() is undefined for the type RuntimeLabel
    appears to be broadly the same it works but is obviously not right

As there are various other examples and all end with “…is undefined for the type RuntimeLabel” can someone point out what is wrong so I can “correct it”

Best
Gordon

Hi Gordon,

  1. The method setImageURL() is undefined for the type RuntimeLabel
    appears to be broadly the same it works but is obviously not right

The syntax should be:

var img = "media:///media.png";
forms.yourForm.elements.image.imageURL = img;

Thanks Thomas

188 errors to go all probably syntax related what joy !!

Mind you Servoy 6 is a heck of a lot nicer to use to will have to forgive it

Cheers
Gordon

Again on a similar subject I can find no reference to how a script is called differently in another form:

forms.client_activities.setup();

Throws a warning - having looked though the Servoy 6 Wiki notes on upgrades I can’t see any mention that this has changed

The message shows is

The property temps_reminders is undefined for the type
Forms<mod_staff_sections>

Many thanks
Gordon

Gordon:

  1. The method setFont() is undefined for the type RuntimeLabel
    I get setFont(‘Verdana,0,10’) is no longer a function and appears to have been replaced with font(‘Verdana,0,10’), however the latter breaks all together and setFront shows the warning. I am using this to show a label as button is selected or not

font is the same thing, that is now a property instead of a method. (you can also get it instead of just set)

about that last problem: i don’t understand at all what you mean there, Where do you get that warning on?

jcompagner:

Gordon:

  1. The method setFont() is undefined for the type RuntimeLabel
    I get setFont(‘Verdana,0,10’) is no longer a function and appears to have been replaced with font(‘Verdana,0,10’), however the latter breaks all together and setFront shows the warning. I am using this to show a label as button is selected or not

font is the same thing, that is now a property instead of a method. (you can also get it instead of just set)

about that last problem: i don’t understand at all what you mean there, Where do you get that warning on?

Johan thanks for the post, see the attached image which is the warning I am getting for scripts from other forms

Essentially when the solution loads it triggers cascading set of setup scripts that configure various sections of the app and to say the least I was a bit surprised when my trigger scripts were flagging warnings !

Cheers
Gordon

Tab panels

The Wiki says

removeAllTabs
BooleanremoveAllTabs()
Removes all tabs for a specified tabpanel.

Returns
Boolean – a boolean value indicating if tabs were successfully removed

Sample
forms.customer.elements.customer_id.removeAllTabs();

This is no longer valid and throws a warning - any ideas how tabs are managed now ??? I need to manage 60+ plus tabs on various layouts all controlled from methods so its throwing a lot of warning errors not surprisingly !!

Cheers
Gordon

for me that works just fine:

elements.mytabpanel.removeAllTabs();

but is customer_id really a tabpanel?? That sounds really like something else, for example just a textfield displaying the customer_id

about thise forms “client_activities” i guess you are trying to access there a form “client_activities” which are not in that solution itself or in one of the modules…
You can only access those forms there.