ericabouaf / wireit

A javascript wiring library to create web wirable interfaces for dataflow applications, visual programming languages or graphical modeling.
http://neyric.github.io/wireit/docs/
Other
520 stars 90 forks source link

check for existence of load panel in loadPipe #33

Closed DerManoMann closed 14 years ago

DerManoMann commented 14 years ago

It would be great if in loadPipe() there could be a check if this.loadPanel exists. I'd like to implement some custom auto loading and having to create the load panel to avoid breaking loadPipe is a bit cumbersome.

Background: Our code is based on the jsBox example and in the jsBox.init function we load modules dynamically via JSON rather than having them hardcoded in the modules list in jsBox. However, this raises some other issues, in particular race conditions, because the auto load can't run before the dynamic modules are loaded. If not, loadPipe won't be able to find the auto loaded wiring modules in the module list. One other idea is to extract the current auto load code from onLoadSuccess into a separate autoLoad method to allow to override it.

ta, mano

ericabouaf commented 14 years ago

You mean just like this ? http://github.com/neyric/wireit/commit/6469a6daaae4d5f46a6746430b6592d6b59e9007

ericabouaf commented 14 years ago

btw, keep the good ideas coming in :)

DerManoMann commented 14 years ago

like you've been reading my mind ;) ta.

ericabouaf commented 14 years ago

Ok, I'll be changing this code soon anyway (Multiple tabs, loading of pipes by other field than "name",...)

DerManoMann commented 14 years ago

If you need more ideas, I've added (very custom, though):

If you want to I could email you the base editor class we came up with...

ericabouaf commented 14 years ago

sure, send it ! or fork the library and commit it on GitHub !

DerManoMann commented 14 years ago

ah, I'd rather email as some is not really of general use - also you probably don't need another editor subclass :) Still, perhaps good reading to see what users are actually trying to customize...