thousands error/warning servoy 6

Questions, tips and tricks and techniques for scripting in Servoy

thousands error/warning servoy 6

Postby Juan Etec » Mon Aug 08, 2011 5:28 pm

Hi,
I am testing servoy 6.0 with a solution who work in servoy 5.2.8.
I export my solution from 5.2.8 and import in servoy 6.0.
An than appears only 16 error and 4200 warning.
Some of them are under control, but another are difficult to know the problem.

Some difficult error:
-A cycle was detected in the build path of project: Example

- If in a relation I use a global variable from another module from the same application :Relation "xxxx_to_yyyy" has a primary dataprovider "globals.variable" which is not found.

-If I use a relation who source an destination have a table but in the 'FROM' column has only a global variable and I use that in a Form who his dataSource is none: Relation "_to_articulos$sn_tree_id_selected" has a primary dataprovider "globals.sn_tree_id_selected" which is not found.


Some difficult warnings:
-The property tipo is undefined for the type JSRecord

if I has that code, how can I define that record?

Code: Select all
* @param {JSRecord} record
   *
   * @returns {Boolean}
   *
   * @properties={typeid:24,uuid:"E3542176-DBCB-4251-B5F3-892F4B35B564"}
   */
       function factura_onRecordInsert(record) {
   
      record.tipo


-I use to call a lot of method from my solution to a module and it give me a warning, the same problem with global variable: The property utl_dato is undefined for the type Globals<MySolution>

-The function sn_guardar() is undefined in this script
Code: Select all
function sn_guardar(_no_editable) {
            return _super.sn_guardar(_no_editable)}
Un Saludo

Juan Ramírez
Juan Etec
 
Posts: 64
Joined: Mon Apr 20, 2009 8:23 pm
Location: Gran Canaria - Spain

Re: thousands error/warning servoy 6

Postby jdbruijn » Tue Aug 09, 2011 9:26 am

Hi Juan,
Seems you have some work to do ;)
I had about 1200 warnings and 2-3 errors.

I can give you hints on the folowing 2 warnings, the others I haven't come across.
-The property tipo is undefined for the type JSRecord

I think you can define which datasourse the record is from:
Code: Select all
* @param {JSRecord<db:/server/table>}


-The function sn_guardar() is undefined in this script

Check if the super function has its parameters defined.

Greetinx,

Jos
Jos de Bruijn
Focus Feedback BV
Servoy Certified Developer
Image
jdbruijn
 
Posts: 492
Joined: Sun Apr 11, 2010 6:34 pm

Re: thousands error/warning servoy 6

Postby Juan Etec » Tue Aug 09, 2011 10:44 am

Hi Jos,
thanks for your answer.

Yes the second answer the problem is what do you say to me.
Un Saludo

Juan Ramírez
Juan Etec
 
Posts: 64
Joined: Mon Apr 20, 2009 8:23 pm
Location: Gran Canaria - Spain

Re: thousands error/warning servoy 6

Postby pbakker » Wed Aug 10, 2011 9:42 am

If you have a cycle in your buildpath, it means that solution/module A includes solution/module B, which in turn includes solution/module A again. This is not a best practice, a solutions module structure should be a tree like structure.

You can lower the Problem market level from Error to Warning here: Window > Preferences > Dynamic languages: Build path problems
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: thousands error/warning servoy 6

Postby Harjo » Mon Aug 15, 2011 2:12 pm

I'm still a bit confused about this cycle detected, module including thing....

In Servoy 3 it was common knowledge to have a module, that contains, every relation, calculation, common used images, etc...
So if we created a new module, like invoicing, we included this core_module so that we have immediately access to all this stuff.
Also, the main-solution (our CRM) includes this core_module, and also our main-solution, includes ofcourse the invoicing module.

And now we have got an error, that a cycle is detected.. why? I understand the warnings, that if you have images, or formnames, with the same name,....

As far as I know, Servoy flattens everything down, so why is this a risk?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: thousands error/warning servoy 6

Postby Karel Broer » Tue Aug 16, 2011 10:22 am

Harjo wrote:I'm still a bit confused about this cycle detected, module including thing....

In Servoy 3 it was common knowledge to have a module, that contains, every relation, calculation, common used images, etc...
So if we created a new module, like invoicing, we included this core_module so that we have immediately access to all this stuff.
Also, the main-solution (our CRM) includes this core_module, and also our main-solution, includes ofcourse the invoicing module.

And now we have got an error, that a cycle is detected.. why? I understand the warnings, that if you have images, or formnames, with the same name,....

As far as I know, Servoy flattens everything down, so why is this a risk?

Same question here. Our modules use functionality from eachother, but are maintained separatly
Karel Broer
ServoyCamp - http://www.servoycamp.com
User avatar
Karel Broer
 
Posts: 779
Joined: Mon May 03, 2004 12:49 am
Location: Doetinchem

Re: thousands error/warning servoy 6

Postby jcompagner » Tue Aug 16, 2011 1:38 pm

I think i have explained this already, but circular references don't make any sense
At the moment you have that then it is just one project

The error you see is from Eclipse itself, not something we do. Why? Lets just say that you need to build your solution... You have there 2 modules A and B now we need to build/check them
Which one should be first to build? A or B? Because A says i depend on B but B says no i need A...

There are all kinds of hacks for this to not go into a stack overflow because of this, but in the end it is just not something what you should do.

For example would you do something like this

Form A extends Form B
and Form B extends again Form A

thats what you are doing....

Modules should work standalone, but now if you just want to work on a single module and you activate that one, you just activate everything again.

If you now also would use that module in another solution, what you do is include everything again, so you simple other solution also depends on your big main solution..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: thousands error/warning servoy 6

Postby Harjo » Tue Aug 16, 2011 5:40 pm

Oke I understand that, but now my example above.

So, we need in every module, some core, relations, globals, images for buttons, etc..etc..
Do we REALLY have to import them or recreate them again, in every module? This generates, a bunch of warnings, because you have the same relations-names, images-names etc..etc.. than we REALLY have to rename or prefix them again, for every module? :shock:

Is'nt this a HUGE overhead??
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: thousands error/warning servoy 6

Postby tysonj » Wed Aug 17, 2011 9:10 am

:idea: I feel the below link would help you
http://forum.servoy.com/viewtopic.php?f=3&t=13602
User avatar
tysonj
 
Posts: 47
Joined: Tue Sep 28, 2010 2:07 pm
Location: Paris, France.

Re: thousands error/warning servoy 6

Postby ROCLASI » Wed Aug 17, 2011 9:21 am

Hi Harjo,

You can use your common submodules just fine. These should not give any cycle warnings. It's the 'Link module' methodology that will cause this.
And in the end they are just warnings, not errors. So it's not really a showstopper.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: thousands error/warning servoy 6

Postby Joas » Wed Aug 17, 2011 9:22 am

Harjo wrote:In Servoy 3 it was common knowledge to have a module, that contains, every relation, calculation, common used images, etc...
So if we created a new module, like invoicing, we included this core_module so that we have immediately access to all this stuff.
Also, the main-solution (our CRM) includes this core_module, and also our main-solution, includes ofcourse the invoicing module.

So this looks like this:
Code: Select all
    MAIN
      |
    __|_____
   |        |
CORE     INVOICE
            |
           CORE

Here you don't have a cycle, it would only be a cycle if one of the modules includes one of it's (grand)parents.

So if you have a cycle, then it must be that also one of the following is going on:
-CORE includes MAIN or INVOICE
-INVOICE includes MAIN.
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL

Re: thousands error/warning servoy 6

Postby Harjo » Wed Aug 17, 2011 9:35 am

Ahhh, Joas, YOU put me on the right track! :D

I thought indeed, that I had such structure, but one module indeed, included the main-solution, which was not needed.
I'm happy now! :D
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 29 guests

cron