Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    kullt
    @kullt
    Hi. Would a behaviour be a good place to check whether a user has been disabled and stop any further action?
    ioseb
    @realioseb
    @kullt, I don't think so. i prefer server-side data insertions and i'm putting all kind of checkers in methods
    kullt
    @kullt
    @realioseb Yeah, that's what I do and did in the end. Thanks for the reply.
    janek
    @jbbr
    Hi, is there a recommended way of changing default validation errors - globally or at least per Astro-Class?
    It's not very convenient to add an error message to every collection's field especially for multi-language environments :)
    Zaiban
    @Zaiban
    @sveinburne Type.types.Number is working
    Jules Sam. Randolph
    @jsamr
    @Zaiban Interresting ... I guess the issue comes from lodash find method, we'll mimick the Type.find method to see what is not working in IE11
    static find(Class) {
        return _.find(this.types, (type) => {
          return type.class === Class;
        });
    }
    Is the Type.find method definition. I'm writing a mimick, back in 2 min
    Jules Sam. Randolph
    @jsamr
    var Type = require('meteor/jagi:astronomy/lib/modules/fields/type').default
    var lfind = require('lodash/find')
    function findtype(Class) {
      return lfind(Type.types, function(type) {
        console.info(Class, type)
        return type.class === Class;
      })
    }
    findtype(Number)
    We could also print type.class === Class after the first console.info
    Jules Sam. Randolph
    @jsamr
    lodash/lodash#2423 with the following Type.has definition :
    static has(name) {
        return _.has(this.types, name);
    }
    Jules Sam. Randolph
    @jsamr
    @Zaiban Have you noticed anything?
    Rand Nix
    @therenix
    Anyone using a good Forms package compatible with Astronomy2?
    Zaiban
    @Zaiban
    @sveinburne Sorry it took so long, here are the results: https://gist.github.com/Zaiban/9751730dba4d4cedb0a8a479a8024179
    Zaiban
    @Zaiban
    So it gives false with Number.. trying it with anything other than Number works
    Zaiban
    @Zaiban
    tried downgrading to lodash 3 and that fixes the problem, so its definitely related to lodash 4
    Zaiban
    @Zaiban
    I'll take that back, lodash 3 gives also false with number, forgot String as the argument when switching to lodash 3
    Zaiban
    @Zaiban
    it seems that the definition of Number is different in IE11 than other browsers.. and thats causing the issue
    Zaiban
    @Zaiban
    or I dont know, I'm still a beginner with JavaScript.. but thanks for help @sveinburne , now we at least have a clue about the bug. Its a shame IE11 is still default browser for so many, Microsoft could have updated them all to Edge regardless of OS while they were at it
    Jules Sam. Randolph
    @jsamr
    @Zaiban You're welcome! It's really a shame IE11 doesn't provide consistency for the equality operation ! Such a shame ... Try with ==instead of === as I've just suggested in the issue tracker
    Jules Sam. Randolph
    @jsamr
    @Zaiban I managed to ask a friend for a Windows 10 laptop, and I made the following checks in IE11 :
    This message was deleted
    Number === Number // true
    Number == Number // true
    Does those checks work for you? What is your IE exact version ? Mine is 11.0.10240.17022? It might be a bug that has been corrected.
    Mateusz Qunabu
    @qunabu
    Hello. I'm having issue with saving field to connection. I get Exception while invoking method '/Astronomy/insert' TypeError: undefined is not a function has anyone experience something similar ?
    Rand Nix
    @therenix
    Is there a trick to get V2 to install? I've done "Meteor add jagi:astronomy" but it looks in my .meteor dir like it installed 1.2.11 -- also the first time I try to use the imported Class, I get an undefined error....
    Thomas ن
    @duvrai_twitter
    Where should I report a bug for the 2.x documentation?
    Thomas ن
    @duvrai_twitter
    Essentially in http://jagi.github.io/meteor-astronomy/v2#transient-fields this should be replaced with e.currentTarget.
    Rand Nix
    @therenix

    Why is this:

      update({Meteor, LocalState}, data) {
        Meteor.call('companies.find', data._id, (err, res) => {
          if (err) {
            return LocalState.set('COMPANY_FIND_ERROR', err.message);
          } else {
            let comp = res;
            comp.modifiedBy = Meteor.user().username;
            comp.name = data.name;
            comp.compNum = data.compNum;
            comp.addressOne = data.addressOne;
            comp.addressTwo = data.addressTwo;
            comp.addressThree = data.addressThree;
            comp.addressFour = data.addressFour;
            comp.addressDisplay = data.addressDisplay;
            comp.country = data.country;
            comp.phone = data.phone;
            comp.email = data.email;
            comp.fax = data.fax;
            Meteor.call('companies.add', comp, (err1, res1) => {
              if (err) {
                console.log('Error Detected:  ', err1.message);
                return LocalState.set('COMPANY_ADD_ERROR', err1.message);
              } else {
                console.log('Successfully saved!', res1);
              }
            });
          }
        });

    giving me:

    E11000 duplicate key error collection: meteor.companies index: _id_ dup key: { : \\"GyiJ4bcv7jT98mBba\\" }"

    Rand Nix
    @therenix
    Is there a better way to do an update from a React Form?
    ioseb
    @realioseb
    @therenix i m not sure but i think your method 'companies.find' returns object containing '_id' which must be unique in collection. then you are sending that object back to server to create new record with existing '_id'
    @therenix and if you want your app more secure: 'comp.modifiedBy = Meteor.user().username;' such things must be done on server, considering that I can call 'companies.add' from browser console and send all kind of data i wish
    burggraben
    @burggraben
    Only since my last update attributes of instances of subclasses are set to undefined when they were queried by their parent class. For example like let child = Parent.findOne({_id: childId}) leads to child.childAttribute === undefined, when childAttribute is set and defined in the fields of the Child = Parent.inherit(… class. Is this intended?
    M. Aufa Husen R.
    @aufahr
    Hi im having a problem with astronomy in which im calling a save function on a server with meteor methods and it throws an exception that says save() is not a function, any clues why? help..
    Adalberto Soares
    @soaresa
    Maybe you are getting the object with Cars.find() (Collection) and not like Car.find() (Astronomy Class)
    M. Aufa Husen R.
    @aufahr
    im trying to create/insert a new one to db
    and yes i've refer to the astronomy class correctly
    Ścibor Rudnicki
    @sciborrudnicki
    Hi, i am trying to use astronomy, but i have got an error: 404, reason: "Method '/Astronomy/insert' not found". Actually i use simpleSchema and Collection2 with success.
    i thought that i should define /Astronomy/insert method, so i did it, and i get Uncaught Error: A method named '/Astronomy/insert' is already defined
    jagi
    @jagi
    @Diabeu27 you're missing some imports. Check everything one more time
    Ścibor Rudnicki
    @sciborrudnicki
    mhmm, i will check it again
    okaay, i see you are from poland, poznań here
    Sam Hulick
    @ffxsam
    has anyone else had issues with Astronomy 2, where the results of a .find().fetch() of one item starts to mix properties with a completely different data model?
    e.g., I'm passing the results of Insights.find().fetch() into a React component.. yet it has NONE of the properties an Insight has, and instead has the same properties a Tag model does, which is label
    makes no sense
    yet in the Meteor container, if I just do a console.log(Insights.find().fetch()), then the right data is passed into the React component
    which, again, makes no sense
    Sam Hulick
    @ffxsam
    so for instance, this is the actual schema (part of it) for Insight:
    insights_js_-_harris_-___Volumes_SuperData_Sites_harris-partners_harris__-_WebStorm_2016_3_EAP.png
    and here's how it's actually showing up when I console.log it in Chrome:
    Developer_Tools_-_http___localhost_3000_insights_nupepYmLW5HCiQbJ8_details.png
    and if I do instanceof Tag on that class, it says true. what the heck?!