Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 16 20:07
    matthewp commented #5384
  • Oct 16 20:06
    matthewp labeled #5384
  • Oct 16 20:06
    matthewp opened #5384
  • Oct 16 19:53
    matthewp opened #5383
  • Oct 16 16:23
    phillipskevin closed #4841
  • Oct 15 21:43

    phillipskevin on master

    Update dist for release (compare)

  • Oct 15 21:43

    phillipskevin on v6.1.1

    Update dist for release 6.1.1 (compare)

  • Oct 15 21:34

    phillipskevin on can-observable-mixin-1.0.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-observ… Merge branch 'master' into gree… Merge pull request #5382 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5382
  • Oct 15 21:34

    phillipskevin on can-make-map-1.2.2

    (compare)

  • Oct 15 21:34

    phillipskevin on master

    fix(package): update can-make-m… Merge pull request #5380 from c… (compare)

  • Oct 15 21:34
    phillipskevin closed #5380
  • Oct 15 20:30
    phillipskevin synchronize #5382
  • Oct 15 20:30

    phillipskevin on can-observable-mixin-1.0.2

    fix(package): update can-observ… fix(package): update can-simple… Merge pull request #5372 from c… and 2 more (compare)

  • Oct 15 20:30
    phillipskevin opened #5382
  • Oct 15 20:28

    phillipskevin on can-simple-map-4.3.3

    (compare)

  • Oct 15 20:28

    phillipskevin on master

    fix(package): update can-simple… Merge pull request #5378 from c… (compare)

  • Oct 15 20:28
    phillipskevin closed #5378
  • Oct 15 20:26

    phillipskevin on can-observable-mixin-1.0.1

    (compare)

Kevin Phillips
@phillipskevin
@georgesunil81 you should use your viewmodel to set the label. Instead of modifying the dom directly.
@RALifeCoach you can do it like that. You can also try using replace. Although I'm not positive if that will solve your issue.
Sunil George
@georgesunil81
@phillipskevin , but the problem is that there is a series of buttons with no unique identifier on it. So, I thought, let me get the element when the event happens and use that as a handle and use jquery to change the label.
But, what I am finding is that %element gives the text of the element (ie. the entire <button>...</button> as a text) and not something that I can use with jquery!
Kevin Phillips
@phillipskevin
It's a dom element. So if you want to use it with jquery, you'll have to wrap it with jquery.
Sunil George
@georgesunil81
How do I do that? Coould you help.
with an simple and quick example
Kevin Phillips
@phillipskevin
Import jquery and do $(el)
Sunil George
@georgesunil81
Okay @phillipskevin thanks, I am trying that...
Yes @phillipskevin , that worked. Thanks a ton for your help on this.
Kevin Phillips
@phillipskevin
Sure
Sunil George
@georgesunil81
Need some help with PDF download if anybody can help. I have a API that responds with PDF stream with -
Content-Type →application/octet-stream
Content-Disposition →attachment; filename=Documentation.pdf
I am getting the API response as the stream. I want to present it to the user for download as "Documentation.pdf".
Please help. Thanks in advance.
Sunil George
@georgesunil81
Is there anything in CanJS that helps with this, or do I have to go via JQuery or plain JavaScript?
Christopher Oliphant
@RALifeCoach
@georgesunil81 My guess is that you will need to use jQuery or Javascript
Justin Meyer
@justinbmeyer
@Bajix change a lists's set? No, but you should be able to get dynamic subsets of items if you use cache-requests behavior
@RALifeCoach What about can-connect do you need me to look at?
looking up above
it seems you need the connection-store
behavior as well
Christopher Oliphant
@RALifeCoach
@justinbmeyer That was a while ago, I have everything working with that now
Justin Meyer
@justinbmeyer
yeah, I've been a bit busy the last 3 or so weeks
catching up on everything
Christopher Oliphant
@RALifeCoach
However, if you have a minute I am struggling with a steal-tools question
No problem, I know you guys are very busy.
Justin Meyer
@justinbmeyer
I'll meet you in the steal-tools room
steal room
Christopher Oliphant
@RALifeCoach
steal-tools or steal?
the question is posted in stealjs/steal
Adam L Barrett
@BigAB

Okay, here's what I want:
I want to be able to get all the methods on a DefineMap instance, that are not the methods provided by DefineMap (get,set,setup,serialize,...etc), I only want the methods defined in the propsDefinition object, or any propsDefinition object of it's from an already extended DefineMap class.

Is there a good way to get what I want?

My first thought is, see if there is any way to access the propsDefinition objects from the class/constructor function, sooo...
If you have an extended DefineMap constructor function:

const User = DefinedMap.extend({
  name: 'string',
  login(username, password) { ... }
})

Is there anyway to get the object passed to extend there from the User class?
If User was then extended:

const PrivilegedUser = User.extend({
  login(username, password) { ... },
  verifyRole(role) { ... }
})

Is there a way from the PrivilegedUser function to access both the object passed to as well as the one User.extend() passed to DefineMap.extend()?

From this example above, what I really want, is to end up with a list of method keys, in this case from PrivilegedUser I would want ['login', 'verifyRole']
Matthew Phillips
@matthewp
if(!DefineMap.prototype[methodName])
or
if(instance.__proto__[methodName])
Justin Meyer
@justinbmeyer
Please take our training session time survey: https://twitter.com/canjs/status/771026512057434112
Adam L Barrett
@BigAB
@matthewp No I want to get a list of the method names, I wont know them already
Justin Meyer
@justinbmeyer
@BigAB his suggestion was accounting for that
he implied a loop
you can do a for in loop of the instance.constructor.prototype
then check to make sure the property is .hasOwnProperty() on that object
Chris
@chrischrischris
Hi, Is there a way to determine if a control is currently bound to an element?
Justin Meyer
@justinbmeyer
I think a control adds to the element's data
if you're using jquery, $(element).data("control")
I think